From f001cda07f6aa026d59e448b49212c0182ed895c Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Tue, 2 Jun 2009 12:40:48 +0200 Subject: 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 --- src/corelib/tools/qlocale.cpp | 1 - src/corelib/tools/qlocale.h | 2 -- 2 files changed, 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 -- cgit v0.12