diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-03-01 13:10:08 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-03-01 13:15:11 (GMT) |
commit | 124cc3c0dfe18c2e5027a0eee430ac03b48807c0 (patch) | |
tree | 20c289a0785786c124eef5908ed5a7cd276c2a45 /src/corelib | |
parent | 17a4f332f0d416af842145f0ebc7f2ebe7f33527 (diff) | |
download | Qt-124cc3c0dfe18c2e5027a0eee430ac03b48807c0.zip Qt-124cc3c0dfe18c2e5027a0eee430ac03b48807c0.tar.gz Qt-124cc3c0dfe18c2e5027a0eee430ac03b48807c0.tar.bz2 |
Wrap qPrintable inside QString
QString() is a no-op if string is already a QString
And it fixes the compilation if other types are use that do not have
toLocal8Bit such as QStringBuilder.
WebKit trunk has an instance of such usage.
Reviewed-by: Joao
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qglobal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 67ccf4d..2ddb91d 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1667,7 +1667,7 @@ inline void qUnused(T &x) { (void)x; } #endif #ifndef qPrintable -# define qPrintable(string) (string).toLocal8Bit().constData() +# define qPrintable(string) QString(string).toLocal8Bit().constData() #endif Q_CORE_EXPORT void qDebug(const char *, ...) /* print debug message */ |