diff options
author | Ariya Hidayat <ariya.hidayat@nokia.com> | 2009-06-11 11:09:54 (GMT) |
---|---|---|
committer | Ariya Hidayat <ariya.hidayat@nokia.com> | 2009-06-11 11:34:58 (GMT) |
commit | 92c979126ea9d0217ceddb05b7909c12f47dc504 (patch) | |
tree | b8d634bbb98d79911e8754e06dba0f0d931a3fc0 /src/gui/styles/qs60style_simulated.cpp | |
parent | 5b4ee7641fb8b6a60f7293139028eb91d012ccd6 (diff) | |
download | Qt-92c979126ea9d0217ceddb05b7909c12f47dc504.zip Qt-92c979126ea9d0217ceddb05b7909c12f47dc504.tar.gz Qt-92c979126ea9d0217ceddb05b7909c12f47dc504.tar.bz2 |
Newer version of GCC only recognized __func__ (as a static function).
Reviewed-by: aportale
Diffstat (limited to 'src/gui/styles/qs60style_simulated.cpp')
-rw-r--r-- | src/gui/styles/qs60style_simulated.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/gui/styles/qs60style_simulated.cpp b/src/gui/styles/qs60style_simulated.cpp index 7667f92..ff70e0a 100644 --- a/src/gui/styles/qs60style_simulated.cpp +++ b/src/gui/styles/qs60style_simulated.cpp @@ -61,13 +61,20 @@ QT_BEGIN_NAMESPACE static const quint32 blobVersion = 1; static const int pictureSize = 256; +#if defined(Q_CC_GNU) +#if __GNUC__ >= 2 +#define __FUNCTION__ __func__ +#endif +#endif + + bool saveThemeToBlob(const QString &themeBlob, const QHash<QString, QPicture> &partPictures, const QHash<QPair<QString, int>, QColor> &colors) { QFile blob(themeBlob); if (!blob.open(QIODevice::WriteOnly)) { - qWarning() << __FUNCTION__": Could not create blob: " << themeBlob; + qWarning() << __FUNCTION__ << ": Could not create blob: " << themeBlob; return false; } @@ -106,7 +113,7 @@ bool loadThemeFromBlob(const QString &themeBlob, { QFile blob(themeBlob); if (!blob.open(QIODevice::ReadOnly)) { - qWarning() << __FUNCTION__": Could not read blob: " << themeBlob; + qWarning() << __FUNCTION__ << ": Could not read blob: " << themeBlob; return false; } QDataStream blobIn(&blob); @@ -115,7 +122,7 @@ bool loadThemeFromBlob(const QString &themeBlob, blobIn >> version; if (version != blobVersion) { - qWarning() << __FUNCTION__": Invalid blob version: " << version << " ...expected: " << blobVersion; + qWarning() << __FUNCTION__ << ": Invalid blob version: " << version << " ...expected: " << blobVersion; return false; } @@ -148,7 +155,7 @@ bool loadThemeFromBlob(const QString &themeBlob, } if (dataIn.status() != QDataStream::Ok) { - qWarning() << __FUNCTION__": Invalid data blob: " << themeBlob; + qWarning() << __FUNCTION__ << ": Invalid data blob: " << themeBlob; return false; } return true; |