aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-01-04 17:37:00 -0500
committerKen Moore <ken@ixsystems.com>2017-01-04 17:37:00 -0500
commit491b06d75e4ab3340429875b58e0149692384a03 (patch)
treedddae1dbfe59a82028a11cd436d7f286b72481b3 /src-qt5/core/lumina-desktop
parentMerge branch 'master' of github.com:trueos/lumina (diff)
downloadlumina-491b06d75e4ab3340429875b58e0149692384a03.tar.gz
lumina-491b06d75e4ab3340429875b58e0149692384a03.tar.bz2
lumina-491b06d75e4ab3340429875b58e0149692384a03.zip
Create a new "ExternalProcess" class in the library directory which is specifically designed for launching external processes in an unattended manner and automatically cleaning up the object on the heap when finished. It will also hide any output from the process or forward it to a designated log file rather than polluting the current process output channel.
Diffstat (limited to 'src-qt5/core/lumina-desktop')
-rw-r--r--src-qt5/core/lumina-desktop/LSession.cpp9
-rw-r--r--src-qt5/core/lumina-desktop/lumina-desktop.pro4
2 files changed, 7 insertions, 6 deletions
diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp
index 0387555a..a4cc12a7 100644
--- a/src-qt5/core/lumina-desktop/LSession.cpp
+++ b/src-qt5/core/lumina-desktop/LSession.cpp
@@ -16,6 +16,7 @@
//LibLumina X11 class
#include <LuminaX11.h>
#include <LUtils.h>
+#include <ExternalProcess.h>
#include <unistd.h> //for usleep() usage
@@ -276,8 +277,9 @@ void LSession::launchStartupApps(){
LOS::setScreenBrightness( tmp );
qDebug() << " - - Screen Brightness:" << QString::number(tmp)+"%";
}
- QProcess::startDetached("nice lumina-open -autostart-apps");
-
+ //QProcess::startDetached("nice lumina-open -autostart-apps");
+ ExternalProcess::launch("nice lumina-open -autostart-apps");
+
//Re-load the screen brightness and volume settings from the previous session
// Wait until after the XDG-autostart functions, since the audio system might be started that way
qDebug() << " - Loading previous settings";
@@ -524,7 +526,8 @@ void LSession::SessionEnding(){
//===============
void LSession::LaunchApplication(QString cmd){
LSession::setOverrideCursor(QCursor(Qt::BusyCursor));
- QProcess::startDetached(cmd);
+ ExternalProcess::launch(cmd);
+ //QProcess::startDetached(cmd);
}
QFileInfoList LSession::DesktopFiles(){
diff --git a/src-qt5/core/lumina-desktop/lumina-desktop.pro b/src-qt5/core/lumina-desktop/lumina-desktop.pro
index 4b725288..1d60f7d3 100644
--- a/src-qt5/core/lumina-desktop/lumina-desktop.pro
+++ b/src-qt5/core/lumina-desktop/lumina-desktop.pro
@@ -15,9 +15,7 @@ include(../libLumina/LuminaXDG.pri)
include(../libLumina/LuminaX11.pri)
include(../libLumina/LuminaSingleApplication.pri)
include(../libLumina/LuminaThemes.pri)
-
-#LIBS += -lLuminaUtils -lxcb -lxcb-damage
-#DEPENDPATH += ../libLumina
+include(../libLumina/ExternalProcess.pri)
TEMPLATE = app
bgstack15