From: GiWoong Kim Date: Fri, 4 Sep 2015 08:54:31 +0000 (+0900) Subject: menu: clean up some lines X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~40^2~150 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eabb06f14ac057288ffb7834e0b88445e986a2dc;p=sdk%2Femulator%2Fqemu.git menu: clean up some lines check a SDB file exists before initializing & etc Change-Id: I8921a0e4d15e466a65d5acb776c489792209702b Signed-off-by: GiWoong Kim --- diff --git a/tizen/src/ui/menu/contextmenu.cpp b/tizen/src/ui/menu/contextmenu.cpp index 76edb57674..9e160b28c1 100644 --- a/tizen/src/ui/menu/contextmenu.cpp +++ b/tizen/src/ui/menu/contextmenu.cpp @@ -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); diff --git a/tizen/src/ui/qt5_supplement.cpp b/tizen/src/ui/qt5_supplement.cpp index 48bf3e4068..c8b6610749 100644 --- a/tizen/src/ui/qt5_supplement.cpp +++ b/tizen/src/ui/qt5_supplement.cpp @@ -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) {