diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-06-02 10:40:48 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-06-02 10:44:42 (GMT) |
commit | f001cda07f6aa026d59e448b49212c0182ed895c (patch) | |
tree | ec2939a40ce1dcc53d31ef0a6a18e584209a83bc | |
parent | fa5a8defd6b1449b81bd67a6b22a398e0d1ed366 (diff) | |
download | Qt-f001cda07f6aa026d59e448b49212c0182ed895c.zip Qt-f001cda07f6aa026d59e448b49212c0182ed895c.tar.gz Qt-f001cda07f6aa026d59e448b49212c0182ed895c.tar.bz2 |
Removed an ifdef in QLocale that breaks the One Definition Rule.
From a merge request #553 by Gordon Schumacher:
During a build internal to Qt, if a header included by qlocale.cpp
itself includes qlocale.h, then QLOCALE_CPP will never be set. If you
attempt to build qmake from its own .pro file, qmake_pch.h includes
qtextstream.h, which (now) includes qlocale.h, thus causing a compile
error trying to call the QSystemLocale(bool) function
Inspired-by: Gordon Schumacher <gordon@rebit.com>
-rw-r--r-- | src/corelib/tools/qlocale.cpp | 1 | ||||
-rw-r--r-- | src/corelib/tools/qlocale.h | 2 |
2 files changed, 0 insertions, 3 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 9953155..4c2f59a 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -42,7 +42,6 @@ #include "qglobal.h" #ifndef QT_NO_SYSTEMLOCALE -#define QLOCALE_CPP QT_BEGIN_NAMESPACE class QSystemLocale; static QSystemLocale *QSystemLocale_globalSystemLocale(); diff --git a/src/corelib/tools/qlocale.h b/src/corelib/tools/qlocale.h index 5b611eb..987ab4e 100644 --- a/src/corelib/tools/qlocale.h +++ b/src/corelib/tools/qlocale.h @@ -99,11 +99,9 @@ public: virtual QVariant query(QueryType type, QVariant in) const; virtual QLocale fallbackLocale() const; -#ifdef QLOCALE_CPP private: QSystemLocale(bool); friend QSystemLocale *QSystemLocale_globalSystemLocale(); -#endif }; #endif |