VirtualBox

儲存庫 vbox 的更動 30930


忽略:
時間撮記:
2010-7-20 下午02:26:06 (14 年 以前)
作者:
vboxsync
訊息:

FE/Qt: New running VM core: More wise positioning settings processing for normal & scale windows.

位置:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
檔案:
修改 2 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp

    r30751 r30930  
    517517        QStringList strPositionSettings = machine.GetExtraDataStringList(strPositionAddress);
    518518
    519         bool ok = true, max = false;
     519        bool ok = !strPositionSettings.isEmpty(), max = false;
    520520        int x = 0, y = 0, w = 0, h = 0;
     521
    521522        if (ok && strPositionSettings.size() > 0)
    522523            x = strPositionSettings[0].toInt(&ok);
     524        else ok = false;
    523525        if (ok && strPositionSettings.size() > 1)
    524526            y = strPositionSettings[1].toInt(&ok);
     527        else ok = false;
    525528        if (ok && strPositionSettings.size() > 2)
    526529            w = strPositionSettings[2].toInt(&ok);
     530        else ok = false;
    527531        if (ok && strPositionSettings.size() > 3)
    528532            h = strPositionSettings[3].toInt(&ok);
     533        else ok = false;
    529534        if (ok && strPositionSettings.size() > 4)
    530535            max = strPositionSettings[4] == VBoxDefs::GUI_LastWindowState_Max;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp

    r30848 r30930  
    217217        QStringList strPositionSettings = machine.GetExtraDataStringList(strPositionAddress);
    218218
    219         bool ok = true, max = false;
     219        bool ok = !strPositionSettings.isEmpty(), max = false;
    220220        int x = 0, y = 0, w = 0, h = 0;
     221
    221222        if (ok && strPositionSettings.size() > 0)
    222223            x = strPositionSettings[0].toInt(&ok);
     224        else ok = false;
    223225        if (ok && strPositionSettings.size() > 1)
    224226            y = strPositionSettings[1].toInt(&ok);
     227        else ok = false;
    225228        if (ok && strPositionSettings.size() > 2)
    226229            w = strPositionSettings[2].toInt(&ok);
     230        else ok = false;
    227231        if (ok && strPositionSettings.size() > 3)
    228232            h = strPositionSettings[3].toInt(&ok);
     233        else ok = false;
    229234        if (ok && strPositionSettings.size() > 4)
    230235            max = strPositionSettings[4] == VBoxDefs::GUI_LastWindowState_Max;
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette