VirtualBox

Changeset 66626 in vbox


Ignore:
Timestamp:
Apr 20, 2017 11:57:56 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
114674
Message:

FE/Qt: Settings: Using the new errors handling mechanism for all saving related errors.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp

    r66614 r66626  
    10711071}
    10721072
    1073 void UIMessageCenter::cannotSaveDisplaySettings(const CSystemProperties &comProperties, QWidget *pParent /* = 0 */)
    1074 {
    1075     error(pParent, MessageType_Error,
    1076           tr("Cannot save display settings."),
    1077           formatErrorInfo(comProperties));
    1078 }
    1079 
    1080 void UIMessageCenter::cannotSaveGeneralSettings(const CSystemProperties &comProperties, QWidget *pParent /* = 0 */)
    1081 {
    1082     error(pParent, MessageType_Error,
    1083           tr("Cannot save general settings."),
    1084           formatErrorInfo(comProperties));
    1085 }
    1086 
    1087 void UIMessageCenter::cannotSaveInputSettings(const CSystemProperties &comProperties, QWidget *pParent /* = 0 */)
    1088 {
    1089     error(pParent, MessageType_Error,
    1090           tr("Cannot save input settings."),
    1091           formatErrorInfo(comProperties));
    1092 }
    1093 
    1094 void UIMessageCenter::cannotSaveLanguageSettings(const CSystemProperties &comProperties, QWidget *pParent /* = 0 */)
    1095 {
    1096     error(pParent, MessageType_Error,
    1097           tr("Cannot save language settings."),
    1098           formatErrorInfo(comProperties));
    1099 }
    1100 
    1101 void UIMessageCenter::cannotLoadNetworkSettings(const CVirtualBox &comVBox, QWidget *pParent /* = 0 */)
    1102 {
    1103     error(pParent, MessageType_Error,
    1104           tr("Cannot load network settings."),
    1105           formatErrorInfo(comVBox));
    1106 }
    1107 
    1108 void UIMessageCenter::cannotLoadNetworkSettings(const CHost &comHost, QWidget *pParent /* = 0 */)
    1109 {
    1110     error(pParent, MessageType_Error,
    1111           tr("Cannot load network settings."),
    1112           formatErrorInfo(comHost));
    1113 }
    1114 
    1115 void UIMessageCenter::cannotSaveNetworkNatSettings(const CNATNetwork &comNetwork, QWidget *pParent /* = 0 */)
    1116 {
    1117     error(pParent, MessageType_Error,
    1118           tr("Cannot save NAT network settings."),
    1119           formatErrorInfo(comNetwork));
    1120 }
    1121 
    1122 void UIMessageCenter::cannotSaveNetworkHostSettings(const CHostNetworkInterface &comInterface, QWidget *pParent /* = 0 */)
    1123 {
    1124     error(pParent, MessageType_Error,
    1125           tr("Cannot save host-only network settings."),
    1126           formatErrorInfo(comInterface));
    1127 }
    1128 
    1129 void UIMessageCenter::cannotSaveDHCPServerSettings(const CDHCPServer &comServer, QWidget *pParent /* = 0 */)
    1130 {
    1131     error(pParent, MessageType_Error,
    1132           tr("Cannot save DHCP server settings."),
    1133           formatErrorInfo(comServer));
    1134 }
    1135 
    1136 void UIMessageCenter::cannotSaveProxySettings(const CSystemProperties &comProperties, QWidget *pParent /* = 0 */)
    1137 {
    1138     error(pParent, MessageType_Error,
    1139           tr("Cannot save proxy settings."),
    1140           formatErrorInfo(comProperties));
    1141 }
    1142 
    1143 void UIMessageCenter::cannotSaveUpdateSettings(const CSystemProperties &comProperties, QWidget *pParent /* = 0 */)
    1144 {
    1145     error(pParent, MessageType_Error,
    1146           tr("Cannot save update settings."),
    1147           formatErrorInfo(comProperties));
    1148 }
    1149 
    11501073void UIMessageCenter::warnAboutUnaccessibleUSB(const COMBaseWithEI &object, QWidget *pParent /* = 0*/) const
    11511074{
     
    12291152                          QString() /* cancel button text */,
    12301153                          false /* ok button by default? */);
    1231 }
    1232 
    1233 void UIMessageCenter::cannotSaveAudioSettings(const CMachine &comMachine, QWidget *pParent /* = 0 */)
    1234 {
    1235     error(pParent, MessageType_Error,
    1236           tr("Cannot save audio settings."),
    1237           formatErrorInfo(comMachine));
    1238 }
    1239 
    1240 void UIMessageCenter::cannotSaveAudioAdapterSettings(const CAudioAdapter &comAdapter, QWidget *pParent /* = 0 */)
    1241 {
    1242     error(pParent, MessageType_Error,
    1243           tr("Cannot save audio adapter settings."),
    1244           formatErrorInfo(comAdapter));
    1245 }
    1246 
    1247 void UIMessageCenter::cannotSaveDisplaySettings(const CMachine &comMachine, QWidget *pParent /* = 0 */)
    1248 {
    1249     error(pParent, MessageType_Error,
    1250           tr("Cannot save display settings."),
    1251           formatErrorInfo(comMachine));
    1252 }
    1253 
    1254 void UIMessageCenter::cannotSaveRemoteDisplayServerSettings(const CVRDEServer &comServer, QWidget *pParent /* = 0 */)
    1255 {
    1256     error(pParent, MessageType_Error,
    1257           tr("Cannot save remote display server settings."),
    1258           formatErrorInfo(comServer));
    1259 }
    1260 
    1261 void UIMessageCenter::cannotSaveGeneralSettings(const CMachine &comMachine, QWidget *pParent /* = 0 */)
    1262 {
    1263     error(pParent, MessageType_Error,
    1264           tr("Cannot save general settings."),
    1265           formatErrorInfo(comMachine));
    1266 }
    1267 
    1268 void UIMessageCenter::cannotSaveStorageAttachmentSettings(const CMediumAttachment &comAttachment, QWidget *pParent /* = 0 */)
    1269 {
    1270     error(pParent, MessageType_Error,
    1271           tr("Cannot save storage attachment settings."),
    1272           formatErrorInfo(comAttachment));
    1273 }
    1274 
    1275 void UIMessageCenter::cannotSaveStorageMediumSettings(const CMedium &comMedium, QWidget *pParent /* = 0 */)
    1276 {
    1277     error(pParent, MessageType_Error,
    1278           tr("Cannot save storage medium settings."),
    1279           formatErrorInfo(comMedium));
    1280 }
    1281 
    1282 void UIMessageCenter::cannotSaveInterfaceSettings(const CMachine &comMachine, QWidget *pParent /* = 0 */)
    1283 {
    1284     error(pParent, MessageType_Error,
    1285           tr("Cannot save user interface settings."),
    1286           formatErrorInfo(comMachine));
    1287 }
    1288 
    1289 void UIMessageCenter::cannotSaveNetworkSettings(const CMachine &comMachine, QWidget *pParent /* = 0 */)
    1290 {
    1291     error(pParent, MessageType_Error,
    1292           tr("Cannot save network settings."),
    1293           formatErrorInfo(comMachine));
    1294 }
    1295 
    1296 void UIMessageCenter::cannotSaveNetworkAdapterSettings(const CNetworkAdapter &comAdapter, QWidget *pParent /* = 0 */)
    1297 {
    1298     error(pParent, MessageType_Error,
    1299           tr("Cannot save network adapter settings."),
    1300           formatErrorInfo(comAdapter));
    1301 }
    1302 
    1303 void UIMessageCenter::cannotSaveNATEngineSettings(const CNATEngine &comEngine, QWidget *pParent /* = 0 */)
    1304 {
    1305     error(pParent, MessageType_Error,
    1306           tr("Cannot save NAT engine settings."),
    1307           formatErrorInfo(comEngine));
    1308 }
    1309 
    1310 void UIMessageCenter::cannotSaveParallelSettings(const CMachine &comMachine, QWidget *pParent /* = 0 */)
    1311 {
    1312     error(pParent, MessageType_Error,
    1313           tr("Cannot save parallel ports settings."),
    1314           formatErrorInfo(comMachine));
    1315 }
    1316 
    1317 void UIMessageCenter::cannotSaveParallelPortSettings(const CParallelPort &comPort, QWidget *pParent /* = 0 */)
    1318 {
    1319     error(pParent, MessageType_Error,
    1320           tr("Cannot save parallel port settings."),
    1321           formatErrorInfo(comPort));
    1322 }
    1323 
    1324 void UIMessageCenter::cannotSaveSerialSettings(const CMachine &comMachine, QWidget *pParent /* = 0 */)
    1325 {
    1326     error(pParent, MessageType_Error,
    1327           tr("Cannot save serial ports settings."),
    1328           formatErrorInfo(comMachine));
    1329 }
    1330 
    1331 void UIMessageCenter::cannotSaveSerialPortSettings(const CSerialPort &comPort, QWidget *pParent /* = 0 */)
    1332 {
    1333     error(pParent, MessageType_Error,
    1334           tr("Cannot save serial port settings."),
    1335           formatErrorInfo(comPort));
    1336 }
    1337 
    1338 void UIMessageCenter::cannotLoadFoldersSettings(const CMachine &comMachine, QWidget *pParent /* = 0 */)
    1339 {
    1340     error(pParent, MessageType_Error,
    1341           tr("Cannot load shared folders settings."),
    1342           formatErrorInfo(comMachine));
    1343 }
    1344 
    1345 void UIMessageCenter::cannotSaveFoldersSettings(const CMachine &comMachine, QWidget *pParent /* = 0 */)
    1346 {
    1347     error(pParent, MessageType_Error,
    1348           tr("Cannot save shared folders settings."),
    1349           formatErrorInfo(comMachine));
    1350 }
    1351 
    1352 void UIMessageCenter::cannotLoadFoldersSettings(const CConsole &comConsole, QWidget *pParent /* = 0 */)
    1353 {
    1354     error(pParent, MessageType_Error,
    1355           tr("Cannot load shared folders settings."),
    1356           formatErrorInfo(comConsole));
    1357 }
    1358 
    1359 void UIMessageCenter::cannotSaveFoldersSettings(const CConsole &comConsole, QWidget *pParent /* = 0 */)
    1360 {
    1361     error(pParent, MessageType_Error,
    1362           tr("Cannot save shared folders settings."),
    1363           formatErrorInfo(comConsole));
    1364 }
    1365 
    1366 void UIMessageCenter::cannotLoadFolderSettings(const CSharedFolder &comFolder, QWidget *pParent /* = 0 */)
    1367 {
    1368     error(pParent, MessageType_Error,
    1369           tr("Cannot load shared folder settings."),
    1370           formatErrorInfo(comFolder));
    1371 }
    1372 
    1373 void UIMessageCenter::cannotSaveFolderSettings(const CSharedFolder &comFolder, QWidget *pParent /* = 0 */)
    1374 {
    1375     error(pParent, MessageType_Error,
    1376           tr("Cannot save shared folder settings."),
    1377           formatErrorInfo(comFolder));
    1378 }
    1379 
    1380 void UIMessageCenter::cannotSaveStorageSettings(const CMachine &comMachine, QWidget *pParent /* = 0 */)
    1381 {
    1382     error(pParent, MessageType_Error,
    1383           tr("Cannot save storage settings."),
    1384           formatErrorInfo(comMachine));
    1385 }
    1386 
    1387 void UIMessageCenter::cannotSaveStorageControllerSettings(const CStorageController &comController, QWidget *pParent /* = 0 */)
    1388 {
    1389     error(pParent, MessageType_Error,
    1390           tr("Cannot save storage controller settings."),
    1391           formatErrorInfo(comController));
    1392 }
    1393 
    1394 void UIMessageCenter::cannotSaveSystemSettings(const CMachine &comMachine, QWidget *pParent /* = 0 */)
    1395 {
    1396     error(pParent, MessageType_Error,
    1397           tr("Cannot save system settings."),
    1398           formatErrorInfo(comMachine));
    1399 }
    1400 
    1401 void UIMessageCenter::cannotSaveUSBSettings(const CMachine &comMachine, QWidget *pParent /* = 0 */)
    1402 {
    1403     error(pParent, MessageType_Error,
    1404           tr("Cannot save USB settings."),
    1405           formatErrorInfo(comMachine));
    1406 }
    1407 
    1408 void UIMessageCenter::cannotSaveUSBControllerSettings(const CUSBController &comController, QWidget *pParent /* = 0 */)
    1409 {
    1410     error(pParent, MessageType_Error,
    1411           tr("Cannot save USB controller settings."),
    1412           formatErrorInfo(comController));
    1413 }
    1414 
    1415 void UIMessageCenter::cannotSaveUSBDeviceFiltersSettings(const CUSBDeviceFilters &comFilters, QWidget *pParent /* = 0 */)
    1416 {
    1417     error(pParent, MessageType_Error,
    1418           tr("Cannot save USB device filters settings."),
    1419           formatErrorInfo(comFilters));
    1420 }
    1421 
    1422 void UIMessageCenter::cannotSaveUSBDeviceFilterSettings(const CUSBDeviceFilter &comFilter, QWidget *pParent /* = 0 */)
    1423 {
    1424     error(pParent, MessageType_Error,
    1425           tr("Cannot save USB device filter settings."),
    1426           formatErrorInfo(comFilter));
    14271154}
    14281155
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h

    r66614 r66626  
    229229    void cannotRemoveHostInterface(const CProgress &progress, const QString &strInterfaceName, QWidget *pParent = 0);
    230230    void cannotSetSystemProperties(const CSystemProperties &properties, QWidget *pParent = 0) const;
    231     void cannotSaveDisplaySettings(const CSystemProperties &comProperties, QWidget *pParent = 0);
    232     void cannotSaveGeneralSettings(const CSystemProperties &comProperties, QWidget *pParent = 0);
    233     void cannotSaveInputSettings(const CSystemProperties &comProperties, QWidget *pParent = 0);
    234     void cannotSaveLanguageSettings(const CSystemProperties &comProperties, QWidget *pParent = 0);
    235     void cannotLoadNetworkSettings(const CVirtualBox &comVBox, QWidget *pParent = 0);
    236     void cannotLoadNetworkSettings(const CHost &comHost, QWidget *pParent = 0);
    237     void cannotSaveNetworkNatSettings(const CNATNetwork &comNetwork, QWidget *pParent = 0);
    238     void cannotSaveNetworkHostSettings(const CHostNetworkInterface &comInterface, QWidget *pParent = 0);
    239     void cannotSaveDHCPServerSettings(const CDHCPServer &comServer, QWidget *pParent = 0);
    240     void cannotSaveProxySettings(const CSystemProperties &comProperties, QWidget *pParent = 0);
    241     void cannotSaveUpdateSettings(const CSystemProperties &comProperties, QWidget *pParent = 0);
    242231
    243232    /* API: Machine settings warnings: */
     
    249238    int confirmFloppyAttachmentCreation(const QString &strControllerName, QWidget *pParent = 0) const;
    250239    int confirmRemovingOfLastDVDDevice(QWidget *pParent = 0) const;
    251     void cannotSaveAudioSettings(const CMachine &comMachine, QWidget *pParent = 0);
    252     void cannotSaveAudioAdapterSettings(const CAudioAdapter &comAdapter, QWidget *pParent = 0);
    253     void cannotSaveDisplaySettings(const CMachine &comMachine, QWidget *pParent = 0);
    254     void cannotSaveRemoteDisplayServerSettings(const CVRDEServer &comServer, QWidget *pParent = 0);
    255     void cannotSaveGeneralSettings(const CMachine &comMachine, QWidget *pParent = 0);
    256     void cannotSaveStorageAttachmentSettings(const CMediumAttachment &comAttachment, QWidget *pParent = 0);
    257     void cannotSaveStorageMediumSettings(const CMedium &comMedium, QWidget *pParent = 0);
    258     void cannotSaveInterfaceSettings(const CMachine &comMachine, QWidget *pParent = 0);
    259     void cannotSaveNetworkSettings(const CMachine &comMachine, QWidget *pParent = 0);
    260     void cannotSaveNetworkAdapterSettings(const CNetworkAdapter &comAdapter, QWidget *pParent = 0);
    261     void cannotSaveNATEngineSettings(const CNATEngine &comEngine, QWidget *pParent = 0);
    262     void cannotSaveParallelSettings(const CMachine &comMachine, QWidget *pParent = 0);
    263     void cannotSaveParallelPortSettings(const CParallelPort &comPort, QWidget *pParent = 0);
    264     void cannotSaveSerialSettings(const CMachine &comMachine, QWidget *pParent = 0);
    265     void cannotSaveSerialPortSettings(const CSerialPort &comPort, QWidget *pParent = 0);
    266     void cannotLoadFoldersSettings(const CMachine &comMachine, QWidget *pParent = 0);
    267     void cannotSaveFoldersSettings(const CMachine &comMachine, QWidget *pParent = 0);
    268     void cannotLoadFoldersSettings(const CConsole &comConsole, QWidget *pParent = 0);
    269     void cannotSaveFoldersSettings(const CConsole &comConsole, QWidget *pParent = 0);
    270     void cannotLoadFolderSettings(const CSharedFolder &comFolder, QWidget *pParent = 0);
    271     void cannotSaveFolderSettings(const CSharedFolder &comFolder, QWidget *pParent = 0);
    272     void cannotSaveStorageSettings(const CMachine &comMachine, QWidget *pParent = 0);
    273     void cannotSaveStorageControllerSettings(const CStorageController &comController, QWidget *pParent = 0);
    274     void cannotSaveSystemSettings(const CMachine &comMachine, QWidget *pParent = 0);
    275     void cannotSaveUSBSettings(const CMachine &comMachine, QWidget *pParent = 0);
    276     void cannotSaveUSBControllerSettings(const CUSBController &comController, QWidget *pParent = 0);
    277     void cannotSaveUSBDeviceFiltersSettings(const CUSBDeviceFilters &comFilters, QWidget *pParent = 0);
    278     void cannotSaveUSBDeviceFilterSettings(const CUSBDeviceFilter &comFilter, QWidget *pParent = 0);
    279240    void cannotAttachDevice(const CMachine &machine, UIMediumType type, const QString &strLocation, const StorageSlot &storageSlot, QWidget *pParent = 0);
    280241    bool warnAboutIncorrectPort(QWidget *pParent = 0) const;
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsPage.cpp

    r66593 r66626  
    3939    , m_fIsValidatorBlocked(true)
    4040{
     41}
     42
     43void UISettingsPage::notifyOperationProgressError(const QString &strErrorInfo)
     44{
     45    QMetaObject::invokeMethod(this,
     46                              "sigOperationProgressError",
     47                              Qt::BlockingQueuedConnection,
     48                              Q_ARG(QString, strErrorInfo));
    4149}
    4250
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsPage.h

    r66593 r66626  
    107107    virtual void saveFromCacheTo(QVariant &data) = 0;
    108108
     109    /** Notifies listeners about particular COM error.
     110      * @param  strErrorInfo  Brings the details of the error happened. */
     111    void notifyOperationProgressError(const QString &strErrorInfo);
     112
    109113    /* Validation stuff: */
    110114    void setValidator(UIPageValidator *pValidator);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.cpp

    r66600 r66626  
    250250        const UIDataSettingsGlobalDisplay &newDisplayData = m_pCache->data();
    251251
    252         // Here could go changes for m_properties.
    253 
    254         /* Show error message if necessary: */
    255         if (!fSuccess)
    256             msgCenter().cannotSaveDisplaySettings(m_properties, this);
    257 
    258252        /* Save maximum guest resolution policy and/or value: */
    259253        if (   fSuccess
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.cpp

    r66600 r66626  
    211211        /* Show error message if necessary: */
    212212        if (!fSuccess)
    213             msgCenter().cannotSaveGeneralSettings(m_properties, this);
     213            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_properties));
    214214
    215215        /* Save new general data from the cache: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp

    r66600 r66626  
    11591159        const UIDataSettingsGlobalInput &newInputData = m_pCache->data();
    11601160
    1161         // Here could go changes for m_properties.
    1162 
    1163         /* Show error message if necessary: */
    1164         if (!fSuccess)
    1165             msgCenter().cannotSaveInputSettings(m_properties, this);
    1166 
    11671161        /* Save new host-combo shortcut from the cache: */
    11681162        const UIDataShortcutRow fakeHostComboItem(0, UIHostCombo::hostComboCacheKey(), QString(), QString(), QString());
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.cpp

    r66600 r66626  
    457457        const UIDataSettingsGlobalLanguage &newLanguageData = m_pCache->data();
    458458
    459         // Here could go changes for m_properties.
    460 
    461         /* Show error message if necessary: */
    462         if (!fSuccess)
    463             msgCenter().cannotSaveLanguageSettings(m_properties, this);
    464 
    465459        /* Save new language data from the cache: */
    466460        if (newLanguageData.m_strLanguageId != oldLanguageData.m_strLanguageId)
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.cpp

    r66623 r66626  
    11211121        /* Show error message if necessary: */
    11221122        if (!fSuccess)
    1123             msgCenter().cannotLoadNetworkSettings(comVBox, this);
     1123            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comVBox));
    11241124        else
    11251125        {
     
    12381238            /* Show error message if necessary: */
    12391239            if (!fSuccess)
    1240                 msgCenter().cannotSaveNetworkNatSettings(comNetwork, this);
     1240                notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comNetwork));
    12411241        }
    12421242    }
     
    13331333        /* Show error message if necessary: */
    13341334        if (!fSuccess)
    1335             msgCenter().cannotLoadNetworkSettings(comHost, this);
     1335            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comHost));
    13361336        else
    13371337        {
     
    13811381            /* Show error message if necessary: */
    13821382            if (!fSuccess)
    1383                 msgCenter().cannotSaveNetworkHostSettings(comInterface, this);
     1383                notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comInterface));
    13841384            else
    13851385            {
     
    13921392                /* Show error message if necessary: */
    13931393                if (!fSuccess)
    1394                     msgCenter().cannotLoadNetworkSettings(comVBox, this);
     1394                    notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comVBox));
    13951395                else
    13961396                {
     
    14151415                    /* Show error message if necessary: */
    14161416                    if (!fSuccess)
    1417                         msgCenter().cannotSaveDHCPServerSettings(comServer, this);
    1418                     // if (!comServer.isOk())
    1419                     //    emit sigOperationProgressError(UIMessageCenter::formatErrorInfo(comServer));
     1417                        notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comServer));
    14201418                }
    14211419            }
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp

    r66600 r66626  
    264264        const UIDataSettingsGlobalProxy &newProxyData = m_pCache->data();
    265265
    266         // Here could go changes for m_properties.
    267 
    268         /* Show error message if necessary: */
    269         if (!fSuccess)
    270             msgCenter().cannotSaveProxySettings(m_properties, this);
    271 
    272266        /* Save new proxy data from the cache: */
    273267        UIProxyManager proxyManager;
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.cpp

    r66600 r66626  
    259259        const UIDataSettingsGlobalUpdate &newUpdateData = m_pCache->data();
    260260
    261         // Here could go changes for m_properties.
    262 
    263         /* Show error message if necessary: */
    264         if (!fSuccess)
    265             msgCenter().cannotSaveUpdateSettings(m_properties, this);
    266 
    267261        /* Save new update data from the cache: */
    268262        const VBoxUpdateData newData(newUpdateData.m_periodIndex, newUpdateData.m_branchIndex);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.cpp

    r66555 r66626  
    273273        /* Show error message if necessary: */
    274274        if (!fSuccess)
    275             msgCenter().cannotSaveAudioSettings(m_machine, this);
     275            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    276276        else
    277277        {
     
    297297            /* Show error message if necessary: */
    298298            if (!fSuccess)
    299                 msgCenter().cannotSaveAudioAdapterSettings(comAdapter, this);
     299                notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comAdapter));
    300300        }
    301301    }
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp

    r66555 r66626  
    12751275        /* Show error message if necessary: */
    12761276        if (!fSuccess)
    1277             msgCenter().cannotSaveDisplaySettings(m_machine, this);
     1277            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    12781278
    12791279        /* Save guest-screen scale-factor: */
     
    13081308        /* Show error message if necessary: */
    13091309        if (!fSuccess)
    1310             msgCenter().cannotSaveDisplaySettings(m_machine, this);
     1310            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    13111311        else
    13121312        {
     
    13461346            /* Show error message if necessary: */
    13471347            if (!fSuccess)
    1348                 msgCenter().cannotSaveRemoteDisplayServerSettings(comServer, this);
     1348                notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comServer));
    13491349        }
    13501350    }
     
    14851485        /* Show error message if necessary: */
    14861486        if (!fSuccess)
    1487             msgCenter().cannotSaveDisplaySettings(m_machine, this);
     1487            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    14881488    }
    14891489    /* Return result: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp

    r66555 r66626  
    717717        /* Show error message if necessary: */
    718718        if (!fSuccess)
    719             msgCenter().cannotSaveGeneralSettings(m_machine, this);
     719            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    720720    }
    721721    /* Return result: */
     
    764764        /* Show error message if necessary: */
    765765        if (!fSuccess)
    766             msgCenter().cannotSaveGeneralSettings(m_machine, this);
     766            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    767767    }
    768768    /* Return result: */
     
    791791        /* Show error message if necessary: */
    792792        if (!fSuccess)
    793             msgCenter().cannotSaveGeneralSettings(m_machine, this);
     793            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    794794    }
    795795    /* Return result: */
     
    834834            /* Show error message if necessary: */
    835835            if (!fSuccess)
    836                 msgCenter().cannotSaveGeneralSettings(m_machine, this);
     836                notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    837837
    838838            /* For each attachment: */
     
    859859                /* Show error message if necessary: */
    860860                if (!fSuccess)
    861                     msgCenter().cannotSaveStorageAttachmentSettings(comAttachment, this);
     861                    notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comAttachment));
    862862                else
    863863                {
     
    913913                    }
    914914
    915                     // TODO: Decide what to do with it (also below).
    916                     // if (!comMedium.isOk())
    917                     // {
    918                     //     QMetaObject::invokeMethod(this, "sigOperationProgressError", Qt::BlockingQueuedConnection,
    919                     //                               Q_ARG(QString, UIMessageCenter::formatErrorInfo(comMedium)));
    920                     //     continue;
    921                     // }
    922 
    923915                    /* Create encryption update progress dialog: */
    924916                    QPointer<UIProgress> pDlg;
    925917                    if (fSuccess)
    926918                    {
    927                         // TODO: Decide what to do with it (also above).
    928                         // This dialog connected to settings serializer, not to message-center directly.
    929                         // What's the better approach in that case? Probably connect everything to serializer?
    930919                        pDlg = new UIProgress(comProgress);
    931920                        connect(pDlg, SIGNAL(sigProgressChange(ulong, QString, ulong, ulong)),
     
    948937                    /* Show error message if necessary: */
    949938                    if (!fSuccess)
    950                         msgCenter().cannotSaveStorageMediumSettings(comMedium, this);
     939                        notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comMedium));
    951940                }
    952941            }
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp

    r66625 r66626  
    14991499        /* Show error message if necessary: */
    15001500        if (!fSuccess)
    1501             msgCenter().cannotSaveNetworkSettings(m_machine, this);
     1501            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    15021502        else
    15031503        {
     
    16011601            /* Show error message if necessary: */
    16021602            if (!fSuccess)
    1603                 msgCenter().cannotSaveNetworkAdapterSettings(comAdapter, this);
     1603                notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comAdapter));
    16041604            else
    16051605            {
     
    16381638                    /* Show error message if necessary: */
    16391639                    if (!fSuccess)
    1640                         msgCenter().cannotSaveNATEngineSettings(comEngine, this);
     1640                        notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comEngine));
    16411641                }
    16421642            }
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.cpp

    r66559 r66626  
    573573        /* Show error message if necessary: */
    574574        if (!fSuccess)
    575             msgCenter().cannotSaveParallelSettings(m_machine, this);
     575            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    576576        else
    577577        {
     
    603603            /* Show error message if necessary: */
    604604            if (!fSuccess)
    605                 msgCenter().cannotSaveParallelPortSettings(comPort, this);
     605                notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comPort));
    606606        }
    607607    }
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.cpp

    r66555 r66626  
    869869                /* Show error message if necessary: */
    870870                if (!fSuccess)
    871                     msgCenter().cannotLoadFoldersSettings(m_machine, this);
     871                    notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    872872
    873873                break;
     
    883883                /* Show error message if necessary: */
    884884                if (!fSuccess)
    885                     msgCenter().cannotLoadFoldersSettings(m_console, this);
     885                    notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_console));
    886886
    887887                break;
     
    915915        /* Show error message if necessary: */
    916916        if (!fSuccess)
    917             msgCenter().cannotLoadFolderSettings(comCurrentFolder, this);
     917            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comCurrentFolder));
    918918
    919919        /* If that's the folder we are looking for => take it: */
     
    988988                    {
    989989                        /* Show error message: */
    990                         msgCenter().cannotSaveFoldersSettings(m_machine, this);
     990                        notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    991991                    }
    992992                    break;
     
    10011001                    {
    10021002                        /* Show error message: */
    1003                         msgCenter().cannotSaveFoldersSettings(m_console, this);
     1003                        notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_console));
    10041004                    }
    10051005                    break;
     
    10541054                    {
    10551055                        /* Show error message: */
    1056                         msgCenter().cannotSaveFoldersSettings(m_machine, this);
     1056                        notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    10571057                    }
    10581058                    break;
     
    10671067                    {
    10681068                        /* Show error message: */
    1069                         msgCenter().cannotSaveFoldersSettings(m_console, this);
     1069                        notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_console));
    10701070                    }
    10711071                    break;
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp

    r66559 r66626  
    630630        /* Show error message if necessary: */
    631631        if (!fSuccess)
    632             msgCenter().cannotSaveSerialSettings(m_machine, this);
     632            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    633633        else
    634634        {
     
    688688            /* Show error message if necessary: */
    689689            if (!fSuccess)
    690                 msgCenter().cannotSaveSerialPortSettings(comPort, this);
     690                notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comPort));
    691691        }
    692692    }
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp

    r66567 r66626  
    40264026        /* Show error message if necessary: */
    40274027        if (!fSuccess)
    4028             msgCenter().cannotSaveStorageSettings(m_machine, this);
     4028            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    40294029    }
    40304030    /* Return result: */
     
    40584058        /* Show error message if necessary: */
    40594059        if (!fSuccess)
    4060             msgCenter().cannotSaveStorageSettings(m_machine, this);
     4060            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    40614061        else
    40624062        {
     
    40994099            /* Show error message if necessary: */
    41004100            if (!fSuccess)
    4101                 msgCenter().cannotSaveStorageControllerSettings(comController, this);
     4101                notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comController));
    41024102
    41034103            /* For each attachment: */
     
    41354135        /* Show error message if necessary: */
    41364136        if (!fSuccess)
    4137             msgCenter().cannotSaveStorageSettings(m_machine, this);
     4137            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    41384138        else
    41394139        {
     
    41774177            /* Show error message if necessary: */
    41784178            if (!fSuccess)
    4179                 msgCenter().cannotSaveStorageControllerSettings(comController, this);
     4179                notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comController));
    41804180
    41814181            /* For each attachment ('removing' step): */
     
    42454245        /* Show error message if necessary: */
    42464246        if (!fSuccess)
    4247             msgCenter().cannotSaveStorageSettings(m_machine, this);
     4247            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    42484248    }
    42494249    /* Return result: */
     
    43354335        /* Show error message if necessary: */
    43364336        if (!fSuccess)
    4337             msgCenter().cannotSaveStorageSettings(m_machine, this);
     4337            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    43384338    }
    43394339    /* Return result: */
     
    44234423        /* Show error message if necessary: */
    44244424        if (!fSuccess)
    4425             msgCenter().cannotSaveStorageSettings(m_machine, this);
     4425            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    44264426    }
    44274427    /* Return result: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp

    r66555 r66626  
    11391139        /* Show error message if necessary: */
    11401140        if (!fSuccess)
    1141             msgCenter().cannotSaveSystemSettings(m_machine, this);
     1141            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    11421142    }
    11431143    /* Return result: */
     
    11781178        /* Show error message if necessary: */
    11791179        if (!fSuccess)
    1180             msgCenter().cannotSaveSystemSettings(m_machine, this);
     1180            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    11811181    }
    11821182    /* Return result: */
     
    12171217        /* Show error message if necessary: */
    12181218        if (!fSuccess)
    1219             msgCenter().cannotSaveSystemSettings(m_machine, this);
     1219            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    12201220    }
    12211221    /* Return result: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp

    r66555 r66626  
    10151015            /* Show error message if necessary: */
    10161016            if (!fSuccess)
    1017                 msgCenter().cannotSaveUSBSettings(m_machine, this);
     1017                notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    10181018            else
    10191019            {
     
    10601060        /* Show error message if necessary: */
    10611061        if (!fSuccess)
    1062             msgCenter().cannotSaveUSBSettings(m_machine, this);
     1062            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    10631063
    10641064        /* For each controller: */
     
    10851085            /* Show error message if necessary: */
    10861086            if (!fSuccess)
    1087                 msgCenter().cannotSaveUSBControllerSettings(comController, this);
     1087                notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comController));
    10881088            else
    10891089            {
     
    11011101                /* Show error message if necessary: */
    11021102                if (!fSuccess)
    1103                     msgCenter().cannotSaveUSBSettings(m_machine, this);
     1103                    notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    11041104            }
    11051105        }
     
    11381138        /* Show error message if necessary: */
    11391139        if (!fSuccess)
    1140             msgCenter().cannotSaveUSBSettings(m_machine, this);
     1140            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    11411141        else
    11421142        {
     
    11601160                        /* Show error message if necessary: */
    11611161                        if (!fSuccess)
    1162                             msgCenter().cannotSaveUSBSettings(m_machine, this);
     1162                            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    11631163                    }
    11641164
     
    11881188                        /* Show error message if necessary: */
    11891189                        if (!fSuccess)
    1190                             msgCenter().cannotSaveUSBSettings(m_machine, this);
     1190                            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    11911191                    }
    11921192
     
    12091209                        /* Show error message if necessary: */
    12101210                        if (!fSuccess)
    1211                             msgCenter().cannotSaveUSBSettings(m_machine, this);
     1211                            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(m_machine));
    12121212                    }
    12131213
     
    12361236        /* Show error message if necessary: */
    12371237        if (!fSuccess)
    1238             msgCenter().cannotSaveUSBDeviceFiltersSettings(comFiltersObject, this);
     1238            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comFiltersObject));
    12391239    }
    12401240    /* Return result: */
     
    12551255        /* Show error message if necessary: */
    12561256        if (!fSuccess)
    1257             msgCenter().cannotSaveUSBDeviceFiltersSettings(comFiltersObject, this);
     1257            notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comFiltersObject));
    12581258        else
    12591259        {
     
    13151315            /* Show error message if necessary: */
    13161316            if (!fSuccess)
    1317                 msgCenter().cannotSaveUSBDeviceFilterSettings(comFilter, this);
     1317                notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comFilter));
    13181318            else
    13191319            {
     
    13241324                /* Show error message if necessary: */
    13251325                if (!fSuccess)
    1326                     msgCenter().cannotSaveUSBDeviceFiltersSettings(comFiltersObject, this);
     1326                    notifyOperationProgressError(UIMessageCenter::formatErrorInfo(comFiltersObject));
    13271327            }
    13281328        }
Note: See TracChangeset for help on using the changeset viewer.

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