Updating link to change in openSUSE:Factory/kded revision 22.0
OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kded?expand=0&rev=d7afd3797b6f6c6327b0359a49c4deed
This commit is contained in:
parent
5e8b0afead
commit
eae0b32bf6
59
kded-fix-cmdline-parsing.patch
Normal file
59
kded-fix-cmdline-parsing.patch
Normal file
@ -0,0 +1,59 @@
|
||||
diff --git a/src/kded.cpp b/src/kded.cpp
|
||||
index 6929d7d3f24d3556f1b227d5a9bfb5b02b1c295e..082d3863dcf484a6d609e2c639c49788d9576007 100644
|
||||
--- a/src/kded.cpp
|
||||
+++ b/src/kded.cpp
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QFile>
|
||||
#include <QtCore/QTimer>
|
||||
+#include <QtCore/QCommandLineParser>
|
||||
#include <QApplication>
|
||||
|
||||
#include <QDBusConnection>
|
||||
@@ -672,6 +673,7 @@ static void setupAppInfo(QCoreApplication *app)
|
||||
{
|
||||
app->setApplicationName("kded5");
|
||||
app->setOrganizationDomain("kde.org");
|
||||
+ app->setApplicationVersion(KDED_VERSION_STRING);
|
||||
}
|
||||
|
||||
extern "C" Q_DECL_EXPORT int kdemain(int argc, char *argv[])
|
||||
@@ -679,24 +681,27 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char *argv[])
|
||||
//options.add("check", qi18n("Check Sycoca database only once"));
|
||||
|
||||
// WABA: Make sure not to enable session management.
|
||||
- putenv(qstrdup("SESSION_MANAGER="));
|
||||
+ qunsetenv("SESSION_MANAGER");
|
||||
+
|
||||
+ QApplication app(argc, argv);
|
||||
+ app.setApplicationDisplayName("KDE Daemon");
|
||||
+ setupAppInfo(&app);
|
||||
+ app.setQuitOnLastWindowClosed(false);
|
||||
+
|
||||
+ QCommandLineParser parser;
|
||||
+ parser.addHelpOption();
|
||||
+ parser.addVersionOption();
|
||||
+ parser.addOption(QCommandLineOption(QStringLiteral("check"), QStringLiteral("Check cache validity")));
|
||||
+ parser.process(app);
|
||||
|
||||
// Parse command line before checking D-Bus
|
||||
- if (argc > 1 && QByteArray(argv[1]) == "--check") {
|
||||
+ if (parser.isSet(QStringLiteral("check"))) {
|
||||
// KDBusService not wanted here.
|
||||
- QCoreApplication app(argc, argv);
|
||||
- setupAppInfo(&app);
|
||||
-
|
||||
KSycoca::self()->ensureCacheValid();
|
||||
runKonfUpdate();
|
||||
return 0;
|
||||
}
|
||||
|
||||
- QApplication app(argc, argv);
|
||||
- setupAppInfo(&app);
|
||||
- app.setApplicationDisplayName("KDE Daemon");
|
||||
- app.setQuitOnLastWindowClosed(false);
|
||||
-
|
||||
KDBusService service(KDBusService::Unique);
|
||||
|
||||
KSharedConfig::Ptr config = KSharedConfig::openConfig();
|
||||
|
@ -48,6 +48,8 @@ License: LGPL-2.1+
|
||||
Group: System/GUI/KDE
|
||||
Url: http://www.kde.org
|
||||
Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
|
||||
# PATCH-FIX-OPENSUSE kded-fix-cmdline-parsing.patch alarrosa@suse.com -- Removes a warning and fixes command line parsing
|
||||
Patch0: kded-fix-cmdline-parsing.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@ -68,6 +70,7 @@ Development files.
|
||||
%lang_package
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%cmake_kf5 -d build
|
||||
|
Loading…
Reference in New Issue
Block a user