From 92c979126ea9d0217ceddb05b7909c12f47dc504 Mon Sep 17 00:00:00 2001 From: Ariya Hidayat Date: Thu, 11 Jun 2009 13:09:54 +0200 Subject: Newer version of GCC only recognized __func__ (as a static function). Reviewed-by: aportale --- src/gui/styles/qs60style_simulated.cpp | 15 +++++++++++---- 1 file 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 &partPictures, const QHash, 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; -- cgit v0.12