summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-07-15 08:39:40 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-07-15 08:39:40 (GMT)
commit633349982422fec92df4ed06da5d2becf788c494 (patch)
tree0dad2d21a55e840efc00b252ba43034384668ed4 /src
parent4e2eb2945dbc3865e2901f12d663ed89e8f0dfbf (diff)
downloadQt-633349982422fec92df4ed06da5d2becf788c494.zip
Qt-633349982422fec92df4ed06da5d2becf788c494.tar.gz
Qt-633349982422fec92df4ed06da5d2becf788c494.tar.bz2
Amend previous commit 4e2eb2945dbc3865e2901f12d663ed89e8f0dfbf to fix compilation with QT_NO_DEBUG_STREAM
Qt in debug need to stay binary compatible with Qt in release. See also commit cbbd7e084c7e46fd906db26b13032b8368c59093 that introduced the problem Task-number: QTBUG-11510
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, 10 insertions, 4 deletions
diff --git a/src/gui/styles/qstyle.cpp b/src/gui/styles/qstyle.cpp
index 676483e..687e587 100644
--- a/src/gui/styles/qstyle.cpp
+++ b/src/gui/styles/qstyle.cpp
@@ -2421,9 +2421,10 @@ QT_BEGIN_INCLUDE_NAMESPACE
#include <QDebug>
QT_END_INCLUDE_NAMESPACE
-#if !defined(QT_NO_DEBUG) && !defined(QT_NO_DEBUG_STREAM)
+#if !defined(QT_NO_DEBUG_STREAM)
QDebug operator<<(QDebug debug, QStyle::State state)
{
+#if !defined(QT_NO_DEBUG)
debug << "QStyle::State(";
QStringList states;
@@ -2455,6 +2456,7 @@ QDebug operator<<(QDebug debug, QStyle::State state)
qSort(states);
debug << states.join(QLatin1String(" | "));
debug << ')';
+#endif
return debug;
}
#endif
diff --git a/src/gui/styles/qstyle.h b/src/gui/styles/qstyle.h
index 1ee262d..439901a 100644
--- a/src/gui/styles/qstyle.h
+++ b/src/gui/styles/qstyle.h
@@ -878,7 +878,7 @@ 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)
+#if !defined(QT_NO_DEBUG_STREAM)
Q_GUI_EXPORT QDebug operator<<(QDebug debug, QStyle::State state);
#endif
diff --git a/src/gui/styles/qstyleoption.cpp b/src/gui/styles/qstyleoption.cpp
index eeab316..4780edf 100644
--- a/src/gui/styles/qstyleoption.cpp
+++ b/src/gui/styles/qstyleoption.cpp
@@ -5419,9 +5419,10 @@ 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)
+#if !defined(QT_NO_DEBUG_STREAM)
QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType)
{
+#if !defined(QT_NO_DEBUG)
switch (optionType) {
case QStyleOption::SO_Default:
debug << "SO_Default"; break;
@@ -5482,17 +5483,20 @@ 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)
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
diff --git a/src/gui/styles/qstyleoption.h b/src/gui/styles/qstyleoption.h
index 005b36a..e79d9a4 100644
--- a/src/gui/styles/qstyleoption.h
+++ b/src/gui/styles/qstyleoption.h
@@ -958,7 +958,7 @@ T qstyleoption_cast(QStyleHintReturn *hint)
return 0;
}
-#if !defined(QT_NO_DEBUG) && !defined(QT_NO_DEBUG_STREAM)
+#if !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