Fix internal compiler error of MSVC2012.
Default to QLatin1String. Change-Id: I20b74f77ee0828a1c2b1337a3ab2e0012c8df06e Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
8e8dc60efb
commit
fd85b61d17
@@ -62,16 +62,17 @@ namespace
|
|||||||
gcc's statement-expression extension. However, in this file it will
|
gcc's statement-expression extension. However, in this file it will
|
||||||
not work, because "statement-expressions are not allowed outside functions
|
not work, because "statement-expressions are not allowed outside functions
|
||||||
nor in template-argument lists".
|
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.
|
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)
|
#if defined(Q_CC_GNU) && defined(Q_COMPILER_LAMBDA)
|
||||||
# undef QStringLiteral
|
# define Q_DEFINE_METADATA(key) const QString QtMultimedia::MetaData::key(QStringLiteral(#key))
|
||||||
# define QStringLiteral QLatin1String
|
#else
|
||||||
|
# define Q_DEFINE_METADATA(key) const QString QtMultimedia::MetaData::key(QLatin1String(#key))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define Q_DEFINE_METADATA(key) const QString QtMultimedia::MetaData::key(QStringLiteral(#key))
|
|
||||||
|
|
||||||
// Common
|
// Common
|
||||||
Q_DEFINE_METADATA(Title);
|
Q_DEFINE_METADATA(Title);
|
||||||
Q_DEFINE_METADATA(SubTitle);
|
Q_DEFINE_METADATA(SubTitle);
|
||||||
|
|||||||
Reference in New Issue
Block a user