aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop/LSession.cpp
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/LSession.cpp
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/LSession.cpp')
-rw-r--r--src-qt5/core/lumina-desktop/LSession.cpp9
1 files changed, 6 insertions, 3 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(){
bgstack15