forked from stephanemagnenat/homebrew-kf5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kf5-kded.rb
77 lines (64 loc) · 2.52 KB
/
kf5-kded.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
require "formula"
class Kf5Kded < Formula
url "http://download.kde.org/stable/frameworks/5.16/kded-5.16.0.tar.xz"
sha1 "c67985715a8f27a6e64c5654fa675e84ffaa0e4f"
homepage "http://www.kde.org/"
head 'git://anongit.kde.org/kded.git'
depends_on "cmake" => :build
depends_on "haraldf/kf5/kf5-extra-cmake-modules" => :build
depends_on "haraldf/kf5/kf5-kinit"
depends_on "qt5" => "with-d-bus"
depends_on "gettext" => :build
patch :DATA
def install
args = std_cmake_args
args << "-DCMAKE_CXX_FLAGS='-D_DARWIN_C_SOURCE'"
system "cmake", ".", *args
system "make", "install"
prefix.install "install_manifest.txt"
end
end
__END__
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9b1888e..3a5d98d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -5,13 +5,13 @@ set(kded_KDEINIT_SRCS kded.cpp kdedadaptor.cpp
kf5_add_kdeinit_executable(kded5 ${kded_KDEINIT_SRCS})
if (APPLE)
- set_target_properties(kded5 PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.template)
- set_target_properties(kded5 PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.kded.kded5")
- set_target_properties(kded5 PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Daemon")
+ set_target_properties(kded5 PROPERTIES MACOSX_BUNDLE FALSE)
+# set_target_properties(kded5 PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.template)
+# set_target_properties(kded5 PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.kded.kded5")
+# set_target_properties(kded5 PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Daemon")
endif ()
target_link_libraries(kdeinit_kded5
- Qt5::Widgets # QApplication
KF5::Service # Needed for ksycoca.h
KF5::CoreAddons # Needed for KDirWatch
KF5::DBusAddons # Needed for kdedmodule.h
diff --git a/src/kded.cpp b/src/kded.cpp
index 6a3c493..1eb2674 100644
--- a/src/kded.cpp
+++ b/src/kded.cpp
@@ -29,7 +29,7 @@
#include <QtCore/QDir>
#include <QtCore/QFile>
#include <QtCore/QTimer>
-#include <QApplication>
+#include <QtCore/QCoreApplication>
#include <QDBusConnection>
#include <QDBusInterface>
@@ -759,10 +759,10 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char *argv[])
return 0;
}
- QApplication app(argc, argv);
+ QCoreApplication app(argc, argv);
setupAppInfo(&app);
- app.setApplicationDisplayName("KDE Daemon");
- app.setQuitOnLastWindowClosed(false);
+ //app.setApplicationDisplayName("KDE Daemon");
+ //app.setQuitOnLastWindowClosed(false);
KDBusService service(KDBusService::Unique);