sdb: convert to native separator
authorMunkyu Im <munkyu.im@samsung.com>
Fri, 4 Sep 2015 09:23:21 +0000 (18:23 +0900)
committerMunkyu Im <munkyu.im@samsung.com>
Fri, 4 Sep 2015 09:46:43 +0000 (18:46 +0900)
for windows, convert slash to reverse slash.

Change-Id: I2a049bcb8addf5be0dc8bb11b7bca8e7fa2692d8
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
tizen/src/ui/menu/shellopener.cpp

index a39e1bb9f8c97124e36b817ab1b931dd9c7a6283..76ebb50e4be3dee944c096153bc93b0e144b94a2 100644 (file)
@@ -36,12 +36,13 @@ extern "C" {
 
 ShellOpener::ShellOpener()
 {
-    sdbPath = QCoreApplication::applicationDirPath();
+    QString tmpSdbPath = QCoreApplication::applicationDirPath();
 #ifdef CONFIG_WIN32
-    sdbPath += "\\..\\..\\..\\..\\..\\tools\\ansicon.exe";
+    tmpSdbPath += "\\..\\..\\..\\..\\..\\tools\\ansicon.exe";
 #else
-    sdbPath += "/../../../../../tools/sdb";
+    tmpSdbPath += "/../../../../../tools/sdb";
 #endif
+    sdbPath = QDir::toNativeSeparators(tmpSdbPath);
 }
 
 QString ShellOpener::getSdbPath()
@@ -65,10 +66,10 @@ void ShellOpener::openShell(QString title)
     }
 
 #ifdef CONFIG_WIN32
-    command = "cmd.exe";
-    arguments << "/c" << "start" << sdbPath << "sdb" << "-s" << sdbSerialName << "shell";
+    command = sdbPath;
+    arguments << "sdb" << "-s" << sdbSerialName << "shell";
 #elif defined CONFIG_DARWIN
-    command = QCoreApplication::applicationDirPath() + "/sdbscript";
+    command = QDir::toNativeSeparators(QCoreApplication::applicationDirPath() + "/sdbscript");
     arguments << sdbPath << sdbSerialName;
 #else
     command = "/usr/bin/gnome-terminal";