From: Jeremy Katz Date: Mon, 18 Jun 2012 22:18:09 +0000 (+0200) Subject: Make QUuid compile with QT_NO_QUUID_STRING without breaking QDebug << X-Git-Tag: 071012110112~333 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a8cbd3a5277494c29b2a8cd7c428b5cd4c602eae;p=profile%2Fivi%2Fqtbase.git 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 Reviewed-by: Jędrzej Nowacki --- diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp index facd180..bfe8dfc 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