forked from pool/kinfocenter5
Accepting request 340631 from home:alarrosa:branches:KDE:Frameworks5
- Fix the command line parsing, which was crashing when calling kinfocenter --version OBS-URL: https://build.opensuse.org/request/show/340631 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kinfocenter5?expand=0&rev=67
This commit is contained in:
parent
48fdeb8fac
commit
37eec9da0b
58
kinfocenter-fix-cmdline-parsing.patch
Normal file
58
kinfocenter-fix-cmdline-parsing.patch
Normal file
@ -0,0 +1,58 @@
|
||||
From: Antonio Larrosa <larrosa@kde.org>
|
||||
Date: Fri, 23 Oct 2015 12:57:44 +0000
|
||||
Subject: Fix kinfocenter crash when run with --version
|
||||
X-Git-Url: http://quickgit.kde.org/?p=kinfocenter.git&a=commitdiff&h=fe16e35904587266f37114ac682916e449677054
|
||||
---
|
||||
Fix kinfocenter crash when run with --version
|
||||
|
||||
Fix the order in which kinfocenter is initialized to first do all
|
||||
commandline parsing and only then create windows. In other case
|
||||
running "kinfocenter --version" crashes when unloading dynamic libraries
|
||||
that shouldn't have been loaded at all.
|
||||
---
|
||||
|
||||
|
||||
--- a/main.cpp
|
||||
+++ b/main.cpp
|
||||
@@ -37,14 +37,7 @@
|
||||
{
|
||||
QApplication::setApplicationDisplayName(i18n("KDE Info Center"));
|
||||
QApplication::setOrganizationDomain("kde.org");
|
||||
- display = new KInfoCenter();
|
||||
- display->show();
|
||||
|
||||
- KDBusService* service = new KDBusService(KDBusService::Unique, this);
|
||||
-}
|
||||
-
|
||||
-int main(int argc, char *argv[])
|
||||
-{
|
||||
KLocalizedString::setApplicationDomain("kinfocenter");
|
||||
|
||||
KAboutData aboutData( QStringLiteral("kinfocenter"), i18n("KDE Info Center"),
|
||||
@@ -60,14 +53,23 @@
|
||||
aboutData.addAuthor(i18n("Waldo Bastian"), QString(), QStringLiteral("bastian@kde.org"));
|
||||
aboutData.addAuthor(i18n("Nicolas Ternisien"), QString(), QStringLiteral("nicolas.ternisien@gmail.com"));
|
||||
KAboutData::setApplicationData(aboutData);
|
||||
- KicApp Kic(argc, argv);
|
||||
|
||||
QCommandLineParser parser;
|
||||
parser.addHelpOption();
|
||||
parser.addVersionOption();
|
||||
aboutData.setupCommandLine(&parser);
|
||||
- parser.process(Kic);
|
||||
+ parser.process(*this);
|
||||
aboutData.processCommandLine(&parser);
|
||||
+
|
||||
+ display = new KInfoCenter();
|
||||
+ display->show();
|
||||
+
|
||||
+ KDBusService* service = new KDBusService(KDBusService::Unique, this);
|
||||
+}
|
||||
+
|
||||
+int main(int argc, char *argv[])
|
||||
+{
|
||||
+ KicApp Kic(argc, argv);
|
||||
|
||||
return Kic.exec();
|
||||
}
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 23 17:24:15 UTC 2015 - alarrosa@suse.com
|
||||
|
||||
- Fix the command line parsing, which was crashing when
|
||||
calling kinfocenter --version
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 4 10:43:26 UTC 2015 - hrvoje.senjan@gmail.com
|
||||
|
||||
|
@ -28,6 +28,8 @@ Source: kinfocenter-%{version}.tar.xz
|
||||
Source99: %{name}-rpmlintrc
|
||||
# PATCH-FIX-OPENSUSE plasma-session-name.patch
|
||||
Patch0: plasma-session-name.patch
|
||||
# PATCH-FIX-UPSTREAM kinfocenter-fix-cmdline-parsing.patch -- Fixes crash when run with --version
|
||||
Patch1: kinfocenter-fix-cmdline-parsing.patch
|
||||
BuildRequires: extra-cmake-modules
|
||||
BuildRequires: kcmutils-devel
|
||||
BuildRequires: kcompletion-devel
|
||||
@ -71,6 +73,7 @@ KDE Utility that provides information about a computer system.
|
||||
%prep
|
||||
%setup -q -n kinfocenter-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%cmake_kf5 -d build -- -DCMAKE_INSTALL_LOCALEDIR=share/locale/kf5
|
||||
|
Loading…
Reference in New Issue
Block a user