From b83a8567e141398e86e16a38135194edf685de79 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Apr 10 2016 03:12:30 +0000 Subject: pull in upstream crash fix (kde#361517), update URL --- diff --git a/0001-fix-crash-when-loading-plugins-that-are-not-properly.patch b/0001-fix-crash-when-loading-plugins-that-are-not-properly.patch new file mode 100644 index 0000000..883f29d --- /dev/null +++ b/0001-fix-crash-when-loading-plugins-that-are-not-properly.patch @@ -0,0 +1,51 @@ +From b260ae7c9de236b320dee28d854caeccd1ff395c Mon Sep 17 00:00:00 2001 +From: Dominik Haumann +Date: Sun, 10 Apr 2016 00:00:00 +0200 +Subject: [PATCH] fix crash when loading plugins that are not properly + installed (bug #361517) + +REVIEW: 127620 +BUG: 361517 +--- + kate/katepluginmanager.cpp | 8 ++++++-- + kate/katepluginmanager.h | 5 +++++ + 2 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/kate/katepluginmanager.cpp b/kate/katepluginmanager.cpp +index 22ed1df..9fd3d7b 100644 +--- a/kate/katepluginmanager.cpp ++++ b/kate/katepluginmanager.cpp +@@ -181,8 +181,12 @@ void KatePluginManager::loadPlugin(KatePluginInfo *item) + /** + * try to load the plugin + */ +- item->load = (item->plugin = KPluginLoader(item->metaData.fileName()).factory()->create(this, QVariantList() << item->saveName())); +- ++ auto factory = KPluginLoader(item->metaData.fileName()).factory(); ++ if (factory) { ++ item->plugin = factory->create(this, QVariantList() << item->saveName()); ++ item->load = item->plugin != nullptr; ++ } ++ + /** + * tell the world about the success + */ +diff --git a/kate/katepluginmanager.h b/kate/katepluginmanager.h +index ae954d0..942e386 100644 +--- a/kate/katepluginmanager.h ++++ b/kate/katepluginmanager.h +@@ -37,6 +37,11 @@ class KateMainWindow; + class KatePluginInfo + { + public: ++ KatePluginInfo() ++ : load(false) ++ , defaultLoad(false) ++ , plugin(nullptr) ++ {} + bool load; + bool defaultLoad; + KPluginMetaData metaData; +-- +2.7.3 + diff --git a/kate.spec b/kate.spec index 4dd4de3..d04c480 100644 --- a/kate.spec +++ b/kate.spec @@ -5,13 +5,14 @@ Name: kate Summary: Advanced Text Editor Version: 15.12.3 -Release: 2%{?dist} +Release: 3%{?dist} # kwrite LGPLv2+ # kate: app LGPLv2, plugins, LGPLv2 and LGPLv2+ and GPLv2+ # ktexteditor: LGPLv2 License: LGPLv2 and LGPLv2+ and GPLv2+ -URL: https://projects.kde.org/kate +URL: https://quickgit.kde.org/?p=%{name}.git + %global revision %(echo %{version} | cut -d. -f3) %if %{revision} >= 50 %global stable unstable @@ -20,6 +21,9 @@ URL: https://projects.kde.org/kate %endif Source0: http://download.kde.org/%{stable}/applications/%{version}/src/kate-%{version}.tar.xz +## upstream patches +Patch1: 0001-fix-crash-when-loading-plugins-that-are-not-properly.patch + BuildRequires: extra-cmake-modules BuildRequires: desktop-file-utils BuildRequires: gettext @@ -175,6 +179,9 @@ fi %changelog +* Sat Apr 09 2016 Rex Dieter - 15.12.3-3 +- pull in upstream crash fix (kde#361517), update URL + * Sun Mar 20 2016 Igor Gnatenko - 15.12.3-2 - Rebuild for libgit2 0.24.0