diff options
author | Jeremy Katz <jeremy.katz@nokia.com> | 2012-06-19 00:18:09 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-20 12:38:32 +0200 |
commit | a8cbd3a5277494c29b2a8cd7c428b5cd4c602eae (patch) | |
tree | 95e6516f74debe7d8e0354fb9cf87ce784760d14 /src/corelib/plugin | |
parent | 23e3c703a1ea36083b05f1296e823162c8d24bd5 (diff) |
Make QUuid compile with QT_NO_QUUID_STRING without breaking QDebug <<
Change I0cbb0581a1c3abefdde75b7cd45fdafd31640f0d breaks the use of
operator<< for QDebug, which shows up when trying to link QtCore in
the small qconfig.
Instead, render QUuid as "QUuid(QT_NO_QUUID_STRING)".
Task-number: QTBUG-24816
Change-Id: Ia52283d7461a9907bcec7a110e41c9f830895efe
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'src/corelib/plugin')
-rw-r--r-- | src/corelib/plugin/quuid.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp index facd1804da..bfe8dfc3c4 100644 --- a/src/corelib/plugin/quuid.cpp +++ b/src/corelib/plugin/quuid.cpp @@ -986,10 +986,15 @@ QUuid QUuid::createUuid() guid; otherwise returns false. */ -#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_NO_QUUID_STRING) +#ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug dbg, const QUuid &id) { +#ifndef QT_NO_QUUID_STRING dbg.nospace() << "QUuid(" << id.toString() << ')'; +#else + Q_UNUSED(id) + dbg.nospace() << "QUuid(QT_NO_QUUID_STRING)"; +#endif return dbg.space(); } #endif |