From: aavit Date: Thu, 10 Nov 2011 10:05:15 +0000 (+0100) Subject: Add isDebugBuild() query function to QLibraryInfo X-Git-Tag: qt-v5.0.0-alpha1~2793 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=77082cd7c91905aaffcf341ab55adb07839aa33e;p=profile%2Fivi%2Fqtbase.git Add isDebugBuild() query function to QLibraryInfo Also cleaned up the doc, removing references to the buildkey() function that has been removed. Change-Id: I2cb403f93d93c0b2f71c8502818d669f7bfbfbec Reviewed-by: Paul Olav Tvete --- diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index a89e6ed..541929f 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -139,22 +139,11 @@ QSettings *QLibraryInfoPrivate::findConfiguration() \class QLibraryInfo \brief The QLibraryInfo class provides information about the Qt library. - Many pieces of information are established when Qt is configured. - Installation paths, license information, and even a unique build - key. This class provides an abstraction for accessing this - information. - - \table - \header \o Function \o Return value - \row \o buildKey() \o A string that identifies the Qt version and - the configuration. This key is used to ensure - that \l{plugins} link against the same version - of Qt as the application. - \row \o location() \o The path to a certain Qt - component (e.g., documentation, header files). - \row \o licensee(), - licensedProducts() \o Licensing information. - \endtable + Many pieces of information are established when Qt is configured and built. + This class provides an abstraction for accessing that information. + By using the static functions of this class, an application can obtain + information about the instance of the Qt library which the application + is using at run-time. You can also use a \c qt.conf file to override the hard-coded paths that are compiled into the Qt library. For more information, see @@ -212,6 +201,20 @@ QLibraryInfo::buildDate() #endif //QT_NO_DATESTRING /*! + \since 5.0 + Returns true if this build of Qt was built with debugging enabled, or + false if it was built in release mode. +*/ +bool +QLibraryInfo::isDebugBuild() +{ +#ifdef QT_DEBUG + return true; +#endif + return false; +} + +/*! Returns the location specified by \a loc. */ diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h index 4dcd8e1..dafc6bb 100644 --- a/src/corelib/global/qlibraryinfo.h +++ b/src/corelib/global/qlibraryinfo.h @@ -63,6 +63,8 @@ public: static QDate buildDate(); #endif //QT_NO_DATESTRING + static bool isDebugBuild(); + enum LibraryLocation { PrefixPath,