diff options
author | GiWoong Kim <giwoong.kim@samsung.com> | 2015-11-03 15:31:34 +0900 |
---|---|---|
committer | SeokYeon Hwang <syeon.hwang@samsung.com> | 2015-11-05 12:22:35 +0900 |
commit | 891379e1fcf11d14e8f044255be86e0e2f9fff0d (patch) | |
tree | 3bcb9478e698b20e374cd887f83b46f8457b376d /tizen | |
parent | 3f1c143efb4e9a1d0e6bb08438ed749a3d091651 (diff) | |
download | qemu-891379e1fcf11d14e8f044255be86e0e2f9fff0d.tar.gz qemu-891379e1fcf11d14e8f044255be86e0e2f9fff0d.tar.bz2 qemu-891379e1fcf11d14e8f044255be86e0e2f9fff0d.zip |
skin: fix the incorrect decision logic for VM color
Decision logic for VM color(which is used by Pair Tag on skin)
is depended on base port number. The port number is
increased by 10 from 26100.
Change-Id: I8744e837eb77773e9dedf2155abca346498ae211
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
Diffstat (limited to 'tizen')
-rw-r--r-- | tizen/src/ui/qt5_supplement.cpp | 1 | ||||
-rw-r--r-- | tizen/src/ui/uiinformation.cpp | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/tizen/src/ui/qt5_supplement.cpp b/tizen/src/ui/qt5_supplement.cpp index 3bc303a376..31c34ab4f3 100644 --- a/tizen/src/ui/qt5_supplement.cpp +++ b/tizen/src/ui/qt5_supplement.cpp @@ -113,6 +113,7 @@ void qt5_gui_init(void) uiInfo->setResolution(QSize( get_display_resolution_width(), get_display_resolution_height())); uiInfo->setBasePort(get_emul_vm_base_port()); + qDebug() << "VM base port:" << uiInfo->getBasePort(); uiInfo->setVmDataPath(QDir( QString::fromLocal8Bit(get_vm_data_path())).canonicalPath()); diff --git a/tizen/src/ui/uiinformation.cpp b/tizen/src/ui/uiinformation.cpp index 603577a901..1fa31d01e8 100644 --- a/tizen/src/ui/uiinformation.cpp +++ b/tizen/src/ui/uiinformation.cpp @@ -78,7 +78,12 @@ UIState *UiInformation::getUiState() QColor UiInformation::getVMColor() { - switch(basePort % 10) { + if (basePort <= 0) { + qWarning() << "invalid base port:" << basePort; + return QColor(255, 0, 0); + } + + switch((basePort / 10) % 10) { case 0: break; case 1: |