summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2010-07-17 10:17:19 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2010-07-17 10:17:19 (GMT)
commit998d9918e4ca5163947d209f71df6c3cf1c782dd (patch)
treec449126891b38305360cdc45b3abf74d49f6bc4f /src
parent139add5ad65e5d7b8c39127917047edb1baf4b18 (diff)
downloadQt-998d9918e4ca5163947d209f71df6c3cf1c782dd.zip
Qt-998d9918e4ca5163947d209f71df6c3cf1c782dd.tar.gz
Qt-998d9918e4ca5163947d209f71df6c3cf1c782dd.tar.bz2
Revert "Revert "Compile with QT_NO_DEBUG_STREAM""
This reverts commit 5488e9213e1163ff7cadffd32cf8c8b94e88dbf1. A fix for the symbian build issue causing the revert is now available.
Diffstat (limited to 'src')
-rw-r--r--src/gui/styles/qstyle.cpp4
-rw-r--r--src/gui/styles/qstyle.h2
-rw-r--r--src/gui/styles/qstyleoption.cpp6
-rw-r--r--src/gui/styles/qstyleoption.h2
4 files changed, 8 insertions, 6 deletions
diff --git a/src/gui/styles/qstyle.cpp b/src/gui/styles/qstyle.cpp
index 4cfa93f..676483e 100644
--- a/src/gui/styles/qstyle.cpp
+++ b/src/gui/styles/qstyle.cpp
@@ -2421,9 +2421,9 @@ QT_BEGIN_INCLUDE_NAMESPACE
#include <QDebug>
QT_END_INCLUDE_NAMESPACE
+#if !defined(QT_NO_DEBUG) && !defined(QT_NO_DEBUG_STREAM)
QDebug operator<<(QDebug debug, QStyle::State state)
{
-#if !defined(QT_NO_DEBUG) && !defined(QT_NO_DEBUG_STREAM)
debug << "QStyle::State(";
QStringList states;
@@ -2455,9 +2455,9 @@ QDebug operator<<(QDebug debug, QStyle::State state)
qSort(states);
debug << states.join(QLatin1String(" | "));
debug << ')';
-#endif
return debug;
}
+#endif
/*!
\since 4.6
diff --git a/src/gui/styles/qstyle.h b/src/gui/styles/qstyle.h
index 439d626..1ee262d 100644
--- a/src/gui/styles/qstyle.h
+++ b/src/gui/styles/qstyle.h
@@ -878,7 +878,9 @@ private:
Q_DECLARE_OPERATORS_FOR_FLAGS(QStyle::State)
Q_DECLARE_OPERATORS_FOR_FLAGS(QStyle::SubControls)
+#if !defined(QT_NO_DEBUG) && !defined(QT_NO_DEBUG_STREAM)
Q_GUI_EXPORT QDebug operator<<(QDebug debug, QStyle::State state);
+#endif
QT_END_NAMESPACE
diff --git a/src/gui/styles/qstyleoption.cpp b/src/gui/styles/qstyleoption.cpp
index c057a2b..eeab316 100644
--- a/src/gui/styles/qstyleoption.cpp
+++ b/src/gui/styles/qstyleoption.cpp
@@ -5419,9 +5419,9 @@ QStyleHintReturnVariant::QStyleHintReturnVariant() : QStyleHintReturn(Version, T
Returns a T or 0 depending on the type of \a hint.
*/
+#if !defined(QT_NO_DEBUG) && !defined(QT_NO_DEBUG_STREAM)
QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType)
{
-#if !defined(QT_NO_DEBUG) && !defined(QT_NO_DEBUG_STREAM)
switch (optionType) {
case QStyleOption::SO_Default:
debug << "SO_Default"; break;
@@ -5482,21 +5482,19 @@ QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType)
case QStyleOption::SO_GraphicsItem:
debug << "SO_GraphicsItem"; break;
}
-#endif
return debug;
}
QDebug operator<<(QDebug debug, const QStyleOption &option)
{
-#if !defined(QT_NO_DEBUG) && !defined(QT_NO_DEBUG_STREAM)
debug << "QStyleOption(";
debug << QStyleOption::OptionType(option.type);
debug << ',' << (option.direction == Qt::RightToLeft ? "RightToLeft" : "LeftToRight");
debug << ',' << option.state;
debug << ',' << option.rect;
debug << ')';
-#endif
return debug;
}
+#endif
QT_END_NAMESPACE
diff --git a/src/gui/styles/qstyleoption.h b/src/gui/styles/qstyleoption.h
index 95de8d5..005b36a 100644
--- a/src/gui/styles/qstyleoption.h
+++ b/src/gui/styles/qstyleoption.h
@@ -958,8 +958,10 @@ T qstyleoption_cast(QStyleHintReturn *hint)
return 0;
}
+#if !defined(QT_NO_DEBUG) && !defined(QT_NO_DEBUG_STREAM)
Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType);
Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QStyleOption &option);
+#endif
QT_END_NAMESPACE