KDb

KDbGlobal.h File Reference
#include "kdb_version.h"
#include <QString>
Include dependency graph for KDbGlobal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 KDb
 

Macros

#define FUTURE_TR_NOOP(x)   (x)
 
#define futureTr   QString
 
#define futureTr2(a, b)   QString(b)
 
#define KDB_IS_VERSION(a, b, c)   ( KDB_VERSION >= KDB_MAKE_VERSION(a,b,c) )
 
#define KDB_MAKE_VERSION(a, b, c)   (((a) << 16) | ((b) << 8) | (c))
 

Enumerations

enum  KDb::IdentifierEscapingType { KDb::DriverEscaping, KDb::KDbEscaping }
 
enum  KDb::ObjectType {
  KDb::UnknownObjectType = -1, KDb::AnyObjectType = 0, TableObjectType = 1, QueryObjectType = 2,
  LastObjectType = 2, KDb::KDbSystemTableObjectType = 128, KDb::IndexObjectType = 256
}
 
enum  KDb::Signedness { KDb::Signed = 0, KDb::Unsigned = 1 }
 

Detailed Description

Global public definitions

Definition in file KDbGlobal.h.

Macro Definition Documentation

◆ FUTURE_TR_NOOP

#define FUTURE_TR_NOOP (   x)    (x)

Macros for marking future QT_TR_NOOP translations.

Definition at line 166 of file KDbGlobal.h.

◆ futureTr

#define futureTr   QString

Macros for marking future Qt tr() translations.

Definition at line 160 of file KDbGlobal.h.

◆ KDB_IS_VERSION

#define KDB_IS_VERSION (   a,
  b,
 
)    ( KDB_VERSION >= KDB_MAKE_VERSION(a,b,c) )

Check if the KDb version matches a certain version or is higher.

This macro is typically used to compile conditionally a part of code:

#if KDB_IS_VERSION(3, 1, 0)
// Code for KDb 3.1
#else
// Code for KDb older than 3.1
#endif
Warning
Especially during development phases of KDb, be careful when choosing the version number that you are checking against. Otherwise you might risk to break the next KDb release. Therefore be careful that development version have a version number lower than the released version, so do not check e.g. for KDb 3.1 with KDB_IS_VERSION(3, 1, 0) but with the actual version number at a time a needed feature was introduced, e.g. KDB_IS_VERSION(3, 0, 90) for beta 3.1

Definition at line 60 of file KDbGlobal.h.

◆ KDB_MAKE_VERSION

#define KDB_MAKE_VERSION (   a,
  b,
 
)    (((a) << 16) | ((b) << 8) | (c))

Make a number from the major, minor and release number of a KDb version.

This function can be used for preprocessing when KDB_IS_VERSION is not appropriate.

Definition at line 37 of file KDbGlobal.h.

This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Jun 27 2022 04:24:32 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.