summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Lancaster <rlancaste@gmail.com>2016-10-27 06:38:47 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-27 06:38:47 (GMT)
commit0dbb399d00316aa8af3eae9020a88849f60a3cc8 (patch)
treee9f45c8a623ae45434815d98e0bc4df780e18f53
parentf27f7b4b58c8d40fa547a8444b6fccbe121b1079 (diff)
KLauncher handling on OSX
-rw-r--r--kstars/kstars.cpp7
-rw-r--r--kstars/kstarsactions.cpp12
2 files changed, 19 insertions, 0 deletions
diff --git a/kstars/kstars.cpp b/kstars/kstars.cpp
index 9139d21..01b9b02 100644
--- a/kstars/kstars.cpp
+++ b/kstars/kstars.cpp
@@ -71,6 +71,13 @@ KStars::KStars( bool doSplash, bool clockrun, const QString &startdate )
setWindowTitle(i18n("KStars"));
+ //On OS X, need to launch kdeinit5 so you can get KLauncher and KIOSlave so you can download new data.
+ //Note: You need to make sure the environment variables for KStars are set correctly to get this running properly.
+#ifdef Q_OS_OSX
+ QProcess* klauncher = new QProcess(this);
+ klauncher->start("kdeinit5");
+#endif
+
// Initialize logging settings
if (Options::disableLogging())
KSUtils::Logging::Disable();
diff --git a/kstars/kstarsactions.cpp b/kstars/kstarsactions.cpp
index c16bbf1..d299c3f 100644
--- a/kstars/kstarsactions.cpp
+++ b/kstars/kstarsactions.cpp
@@ -1456,6 +1456,18 @@ void KStars::slotAboutToQuit()
//synch the config file with the Config object
writeConfig();
+ //Terminate Child Processes if on OS X
+#ifdef Q_OS_OSX
+ QProcess* quit = new QProcess(this);
+ quit->start("killall kdeinit5");
+ quit->waitForFinished(1000);
+ quit->start("killall klauncher");
+ quit->waitForFinished(1000);
+ quit->start("killall kioslave");
+ quit->waitForFinished(1000);
+ delete quit;
+#endif
+
}
void KStars::slotShowPositionBar(SkyPoint* p )