From a8cbd3a5277494c29b2a8cd7c428b5cd4c602eae Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Tue, 19 Jun 2012 00:18:09 +0200 Subject: [PATCH] Make QUuid compile with QT_NO_QUUID_STRING without breaking QDebug << MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/corelib/plugin/quuid.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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