menu: clean up some lines
authorGiWoong Kim <giwoong.kim@samsung.com>
Fri, 4 Sep 2015 08:54:31 +0000 (17:54 +0900)
committerSangho Park <sangho.p@samsung.com>
Mon, 7 Sep 2015 07:06:24 +0000 (16:06 +0900)
check a SDB file exists before initializing & etc

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

index 76edb576747c6e6148e43e357210c98979f345c3..9e160b28c10c382b621040485badb2723a78d009 100644 (file)
@@ -833,17 +833,16 @@ void ContextMenu::slotShell()
 {
     qDebug("SDB shell");
 
-    if (!is_sdb_daemon_initialized()) {
-        showMsgBox(QMessageBox::Warning, MSG_SDB_NOT_READY);
-        return;
-    }
-
     const QString sdbPath = shellOpener->getSdbPath();
 
     QFileInfo sdbFileInfo(sdbPath);
     if (sdbFileInfo.exists() == false) {
-        showMsgBox(QMessageBox::Warning,
-            MSG_SDB_NOT_EXIST + sdbFileInfo.absoluteFilePath());
+        showMsgBox(QMessageBox::Warning, MSG_SDB_NOT_EXIST + sdbPath);
+        return;
+    }
+
+    if (!is_sdb_daemon_initialized()) {
+        showMsgBox(QMessageBox::Warning, MSG_SDB_NOT_READY);
         return;
     }
 
@@ -1017,7 +1016,7 @@ QMessageBox *ContextMenu::showMsgBox(
     QMessageBox::StandardButtons buttons,
     QMessageBox::StandardButton defaultButton)
 {
-    qDebug() << text;
+    qWarning() << text;
 
     QMessageBox *msgBox = new QMessageBox(iconType,
         EMULATOR_TITLE, text, buttons, parent);
index 48bf3e40683ace32c7eeab7421419071dc989cb5..c8b66107497883aaa031a4ec76cdfa33d59ed4fa 100644 (file)
@@ -107,20 +107,22 @@ void qt5_gui_init(void)
     /* parameter parsing */
     // TODO:
 
-    uiInfo->vmName = QString(get_vm_name()).trimmed();
+    uiInfo->vmName = QString(QString::fromLocal8Bit(get_vm_name())).trimmed();
     qDebug() << "VM name:" <<  uiInfo->vmName;
 
     uiInfo->resolution.setWidth(get_display_resolution_width());
     uiInfo->resolution.setHeight(get_display_resolution_height());
     uiInfo->basePort = get_emul_vm_base_port();
 
-    uiInfo->vmDataPath = QDir(QString::fromLocal8Bit(get_vm_data_path())).canonicalPath();
+    uiInfo->vmDataPath = QDir(
+        QString::fromLocal8Bit(get_vm_data_path())).canonicalPath();
     if (uiInfo->vmDataPath.endsWith(QDir::separator()) == false) {
         uiInfo->vmDataPath += QDir::separator();
     }
     qDebug() << "VM path:" <<  uiInfo->vmDataPath;
 
-    uiInfo->skinPath = QDir(QString::fromLocal8Bit(get_emul_skin_path())).canonicalPath();
+    uiInfo->skinPath = QDir(
+        QString::fromLocal8Bit(get_emul_skin_path())).canonicalPath();
     if (uiInfo->skinPath.endsWith(QDir::separator()) == false) {
         uiInfo->skinPath += QDir::separator();
     }
@@ -131,7 +133,7 @@ void qt5_gui_init(void)
         QSettings::IniFormat);
     QString skinName = skinInfo.value(SKIN_PROPERTY_NAME).toString();
     if (skinName.isEmpty() == true) {
-        skinName = "Undefined";
+        skinName = GENERIC_TEXT_UNDEFINED;
     }
     uiInfo->skinName = skinName;
 
@@ -207,7 +209,7 @@ void qt5_gui_init(void)
 
     /* position */
     QRect hostBounds = UIUtil::getHostScreenBounds();
-    qDebug() << "host geometry :" << hostBounds;
+    qDebug() << "host geometry:" << hostBounds;
 
     int defaultValueX = hostBounds.x() - 1;
     int defaultValueY = hostBounds.y() - 1;
@@ -217,7 +219,7 @@ void qt5_gui_init(void)
     if (xx == defaultValueX || yy == defaultValueY) {
         xx = yy = 80 + (uiInfo->basePort % 100); /* default position */
     } else {
-        qDebug("previous position value : (%d, %d)", xx, yy);
+        qDebug("previous position: (%d, %d)", xx, yy);
 
         xx = qMax(xx, hostBounds.x());
         xx = qMin(xx, hostBounds.x() + hostBounds.width() - 100);
@@ -226,7 +228,7 @@ void qt5_gui_init(void)
     }
 
     mainwindow->move(xx, yy);
-    qDebug("current position value : (%d, %d)", xx, yy);
+    qDebug("current position: (%d, %d)", xx, yy);
 
     bool onTop = mruInfo.value(SKIN_PROPERTY_WINDOW_TOPMOST).toBool();
     if (onTop == true) {