diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-07-02 12:24:12 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-04 07:20:53 +0200 |
commit | fd85b61d1716c3da5cea8c6bde054b79fd5187fc (patch) | |
tree | abf98f467ecead1607c85b45ac1eed05551c61e2 | |
parent | 8e8dc60efb153c9534c1216dedab7f0333e0e4be (diff) | |
download | qtmultimedia-fd85b61d1716c3da5cea8c6bde054b79fd5187fc.tar.gz |
Fix internal compiler error of MSVC2012.
Default to QLatin1String.
Change-Id: I20b74f77ee0828a1c2b1337a3ab2e0012c8df06e
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
-rw-r--r-- | src/multimedia/qtmedianamespace.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/multimedia/qtmedianamespace.cpp b/src/multimedia/qtmedianamespace.cpp index 94c2dbf0c..41cd2e387 100644 --- a/src/multimedia/qtmedianamespace.cpp +++ b/src/multimedia/qtmedianamespace.cpp @@ -62,16 +62,17 @@ namespace gcc's statement-expression extension. However, in this file it will not work, because "statement-expressions are not allowed outside functions nor in template-argument lists". + MSVC 2012 produces an internal compiler error on encountering + QStringLiteral in this context. Fall back to the less-performant QLatin1String in this case. */ -#if defined(QStringLiteral) && defined(QT_UNICODE_LITERAL_II) && defined(Q_CC_GNU) && !defined(Q_COMPILER_LAMBDA) -# undef QStringLiteral -# define QStringLiteral QLatin1String +#if defined(Q_CC_GNU) && defined(Q_COMPILER_LAMBDA) +# define Q_DEFINE_METADATA(key) const QString QtMultimedia::MetaData::key(QStringLiteral(#key)) +#else +# define Q_DEFINE_METADATA(key) const QString QtMultimedia::MetaData::key(QLatin1String(#key)) #endif -#define Q_DEFINE_METADATA(key) const QString QtMultimedia::MetaData::key(QStringLiteral(#key)) - // Common Q_DEFINE_METADATA(Title); Q_DEFINE_METADATA(SubTitle); |