kdeApplications: adapt deps and patches to new version
This commit is contained in:
@@ -44,17 +44,6 @@ Index: grantleetheme-17.04.0/src/grantleetheme.cpp
|
||||
loader->setTheme(dirName);
|
||||
|
||||
if (!sEngine) {
|
||||
@@ -102,9 +105,7 @@ QString ThemePrivate::errorTemplate(cons
|
||||
Grantlee::Context ctx = createContext();
|
||||
ctx.insert(QStringLiteral("error"), reason);
|
||||
ctx.insert(QStringLiteral("templateName"), origTemplateName);
|
||||
- const QString errorString = failedTemplate
|
||||
- ? failedTemplate->errorString()
|
||||
- : QStringLiteral("(null template)");
|
||||
+ const QString errorString = failedTemplate->errorString();
|
||||
ctx.insert(QStringLiteral("errorMessage"), errorString);
|
||||
return tpl->render(&ctx);
|
||||
}
|
||||
@@ -122,7 +123,7 @@ Theme::Theme(const QString &themePath, c
|
||||
KConfigGroup group(&config, QStringLiteral("Desktop Entry"));
|
||||
if (group.isValid()) {
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
diff --git a/src/grantleetheme.cpp b/src/grantleetheme.cpp
|
||||
index b86fc3a..8af72f4 100644
|
||||
--- a/src/grantleetheme.cpp
|
||||
+++ b/src/grantleetheme.cpp
|
||||
@@ -102,7 +102,10 @@ QString ThemePrivate::errorTemplate(const QString &reason,
|
||||
Grantlee::Context ctx = createContext();
|
||||
ctx.insert(QStringLiteral("error"), reason);
|
||||
ctx.insert(QStringLiteral("templateName"), origTemplateName);
|
||||
- ctx.insert(QStringLiteral("errorMessage"), failedTemplate->errorString());
|
||||
+ const QString errorString = failedTemplate
|
||||
+ ? failedTemplate->errorString()
|
||||
+ : QStringLiteral("(null template)");
|
||||
+ ctx.insert(QStringLiteral("errorMessage"), errorString);
|
||||
return tpl->render(&ctx);
|
||||
}
|
||||
|
||||
@@ -208,7 +211,7 @@ QString Theme::render(const QString &templateName, const QVariantHash &data, con
|
||||
}
|
||||
|
||||
Grantlee::Template tpl = d->loader->loadByName(templateName, ThemePrivate::sEngine);
|
||||
- if (tpl->error()) {
|
||||
+ if (!tpl || tpl->error()) {
|
||||
return d->errorTemplate(i18n("Template parsing error"), templateName, tpl);
|
||||
}
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
grantleetheme_check_null.patch
|
||||
grantlee-merge-theme-dirs.patch
|
||||
|
||||
Reference in New Issue
Block a user