grantlee5: fix gcc7 (c++11) and qt5-5.8.0 errors

The qCWarning() macro of qt5-5.8.0 expects a parameter for the
variadic part. I think this will change with qt5-5.9.x but for
now work around by modifying the calls to qCWarning().
This commit is contained in:
Jürgen Buchmüller 2017-12-18 18:13:46 +01:00
parent d590430db4
commit e3f3b5a793
2 changed files with 55 additions and 1 deletions

View File

@ -0,0 +1,54 @@
--- templates/lib/customtyperegistry.cpp 2016-04-19 08:33:17.000000000 +0200
+++ templates/lib/customtyperegistry.cpp 2017-12-18 17:59:07.377687292 +0100
@@ -57,16 +57,16 @@
{
if (!types.contains(id)) {
- qCWarning(GRANTLEE_CUSTOMTYPE) << "Don't know how to handle metatype"
- << QMetaType::typeName(id);
+ qCWarning(GRANTLEE_CUSTOMTYPE, "Don't know how to handle metatype %s",
+ QMetaType::typeName(id));
// :TODO: Print out error message
return QVariant();
}
const CustomTypeInfo &info = types[id];
if (!info.lookupFunction) {
- qCWarning(GRANTLEE_CUSTOMTYPE) << "No lookup function for metatype"
- << QMetaType::typeName(id);
+ qCWarning(GRANTLEE_CUSTOMTYPE, "No lookup function for metatype %s",
+ QMetaType::typeName(id));
lf = 0;
// :TODO: Print out error message
return QVariant();
--- templates/lib/template.cpp 2016-04-19 08:33:17.000000000 +0200
+++ templates/lib/template.cpp 2017-12-18 18:03:59.522681407 +0100
@@ -66,7 +66,7 @@
d->m_nodeList = d->compileString(templateString);
d->setError(NoError, QString());
} catch (Grantlee::Exception &e) {
- qCWarning(GRANTLEE_TEMPLATE) << e.what();
+ qCWarning(GRANTLEE_TEMPLATE, "%s", qPrintable(e.what()));
d->setError(e.errorCode(), e.what());
}
}
@@ -92,7 +92,7 @@
d->m_nodeList.render(stream, c);
d->setError(NoError, QString());
} catch (Grantlee::Exception &e) {
- qCWarning(GRANTLEE_TEMPLATE) << e.what();
+ qCWarning(GRANTLEE_TEMPLATE, "%s", qPrintable(e.what()));
d->setError(e.errorCode(), e.what());
}
--- templates/lib/qtlocalizer.cpp 2016-04-19 08:33:17.000000000 +0200
+++ templates/lib/qtlocalizer.cpp 2017-12-18 18:04:50.501680381 +0100
@@ -67,7 +67,7 @@
{
Q_ASSERT(!m_locales.isEmpty());
if (m_locales.isEmpty()) {
- qCWarning(GRANTLEE_LOCALIZER) << "Invalid Locale";
+ qCWarning(GRANTLEE_LOCALIZER, "Invalid Locale");
return QLocale();
}
return m_locales.last()->locale;

View File

@ -1,7 +1,7 @@
# Template file for 'grantlee5' # Template file for 'grantlee5'
pkgname=grantlee5 pkgname=grantlee5
version=5.1.0 version=5.1.0
revision=1 revision=2
wrksrc=${pkgname%5}-${version} wrksrc=${pkgname%5}-${version}
build_style=cmake build_style=cmake
makedepends="qt5-script-devel qt5-tools-devel" makedepends="qt5-script-devel qt5-tools-devel"