menu: execute an external process as detached mode 69/29769/1
authorGiWoong Kim <giwoong.kim@samsung.com>
Fri, 31 Oct 2014 12:08:21 +0000 (21:08 +0900)
committerGiWoong Kim <giwoong.kim@samsung.com>
Tue, 4 Nov 2014 07:12:04 +0000 (16:12 +0900)
Detached mode when I use the class method startDetached().
If the process being run request a console, Windows
provides a console windows for it.

Change-Id: I4f5fedd0cd69238e681594565ec542770ad988a6
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
tizen/src/ui/menu/contextmenu.cpp

index 608debc369595abe870d6cd2a42347a882d35e75..aebfac4eba4ea83bd8555dc427407bc78246d8bc 100644 (file)
@@ -397,8 +397,7 @@ void ContextMenu::slotShell()
     qDebug() << command << arguments;
 
     try {
-        QProcess *terminal = new QProcess(this);
-        terminal->start(command, arguments);
+        QProcess::startDetached(command, arguments);
     } catch (QString error) {
         QString msg = "Failed to open Shell : " + error;
         qDebug() << msg;
@@ -445,7 +444,7 @@ void ContextMenu::slotControlPanel()
 
     QString command;
 #ifdef CONFIG_WIN32
-    command = "java.exe";
+    command = "javaw.exe";
 #else
     command = "java";
 #endif
@@ -456,8 +455,7 @@ void ContextMenu::slotControlPanel()
     qDebug() << command << arguments;
 
     try {
-        QProcess *terminal = new QProcess(this);
-        terminal->start(command, arguments);
+        QProcess::startDetached(command, arguments);
     } catch (QString error) {
         QString msg = "Failed to open Control Panel : " + error;
         qDebug() << msg;