KCDDB

kcddb.cpp
1 /*
2  SPDX-FileCopyrightText: 2007 Richard Lärkäng <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "kcddb.h"
8 
9 #include "kcddbi18n.h"
10 
11 namespace KCDDB
12 {
13  QString
14  resultToString(Result r)
15  {
16  switch (r)
17  {
18  case Success:
19  return i18n("Success");
20  break;
21 
22  case ServerError:
23  return i18n("Server error");
24  break;
25 
26  case HostNotFound:
27  return i18n("Host not found");
28  break;
29 
30  case NoResponse:
31  return i18n("No response");
32  break;
33 
34  case NoRecordFound:
35  return i18n("No record found");
36  break;
37 
38  case MultipleRecordFound:
39  return i18n("Multiple records found");
40  break;
41 
42  case CannotSave:
43  return i18n("Cannot save");
44  break;
45 
46  case InvalidCategory:
47  return i18n("Invalid category");
48  break;
49 
50  default:
51  return i18n("Unknown error");
52  break;
53  }
54  }
55 }
QString i18n(const char *text, const TYPE &arg...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Nov 26 2021 23:22:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.