forked from pool/kinfocenter5
This commit is contained in:
parent
3648b32e5d
commit
7dccb7ef95
@ -1,58 +0,0 @@
|
||||
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();
|
||||
}
|
||||
|
@ -28,8 +28,6 @@ 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
|
||||
@ -73,7 +71,6 @@ 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
|
||||
@ -82,10 +79,6 @@ KDE Utility that provides information about a computer system.
|
||||
%install
|
||||
%kf5_makeinstall -C build
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc COPYING*
|
||||
|
Loading…
Reference in New Issue
Block a user