Changeset 34736 in vbox
- Timestamp:
- Dec 6, 2010 11:19:30 AM (14 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp
r34728 r34736 1218 1218 CStorageController controller = machine.GetStorageControllerByName (attachment.GetController()); 1219 1219 vboxProblem().cannotDetachDevice (this, machine, VBoxDefs::MediumType_HardDisk, aMedium.location(), 1220 controller.GetBus(), attachment.GetPort(), attachment.GetDevice());1220 StorageSlot(controller.GetBus(), attachment.GetPort(), attachment.GetDevice())); 1221 1221 success = false; 1222 1222 break; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxProblemReporter.cpp
r34543 r34736 18 18 */ 19 19 20 /* Global includes */ 21 #include <QDir> 22 #include <QDesktopWidget> 23 #include <QFileInfo> 24 #include <QThread> 25 #ifdef Q_WS_MAC 26 # include <QPushButton> 27 #endif 28 29 #include <iprt/err.h> 30 #include <iprt/param.h> 31 #include <iprt/path.h> 32 33 /* Local includes */ 20 34 #include "VBoxProblemReporter.h" 21 22 35 #include "VBoxGlobal.h" 23 36 #include "VBoxSelectorWnd.h" … … 25 38 #include "UIDownloaderUserManual.h" 26 39 #include "UIMachine.h" 27 28 40 #include "VBoxAboutDlg.h" 29 30 41 #include "QIHotKeyEdit.h" 31 32 42 #ifdef Q_WS_MAC 33 43 # include "VBoxUtils-darwin.h" 34 44 #endif 35 45 36 /* Qt includes */37 #include <QDir>38 #include <QDesktopWidget>39 #include <QFileInfo>40 #ifdef Q_WS_MAC41 # include <QPushButton>42 #endif43 44 #include <iprt/err.h>45 #include <iprt/param.h>46 #include <iprt/path.h>47 48 46 #if defined (Q_WS_WIN32) 49 47 #include <Htmlhelp.h> 50 48 #endif 51 52 ////////////////////////////////////////////////////////////////////////////////53 // VBoxProblemReporter class54 ////////////////////////////////////////////////////////////////////////////////55 56 /**57 * Returns a reference to the global VirtualBox problem reporter instance.58 */59 VBoxProblemReporter &VBoxProblemReporter::instance()60 {61 static VBoxProblemReporter vboxProblem_instance;62 return vboxProblem_instance;63 }64 65 bool VBoxProblemReporter::isValid() const66 {67 return qApp != 0;68 }69 70 // Helpers71 /////////////////////////////////////////////////////////////////////////////72 49 73 50 bool VBoxProblemReporter::isAnyWarningShown() … … 345 322 } 346 323 347 // Generic Problem handlers348 /////////////////////////////////////////////////////////////////////////////349 350 324 bool VBoxProblemReporter::askForOverridingFile (const QString& aPath, QWidget *aParent /* = NULL */) const 351 325 { … … 389 363 else 390 364 return true; 391 }392 393 void VBoxProblemReporter::cannotDeleteFile (const QString& path, QWidget *aParent /* = NULL */) const394 {395 message (aParent, Error,396 tr ("Failed to remove the file <b>%1</b>.<br /><br />Please try to remove the file yourself and try again.")397 .arg (path));398 365 } 399 366 … … 424 391 } 425 392 426 // Special Problem handlers427 /////////////////////////////////////////////////////////////////////////////428 429 393 void VBoxProblemReporter::showBETAWarning() 430 394 { … … 471 435 "can properly handle URLs of this type.") 472 436 .arg (aURL)); 473 }474 475 void VBoxProblemReporter::476 cannotCopyFile (const QString &aSrc, const QString &aDst, int aVRC)477 {478 PCRTSTATUSMSG msg = RTErrGet (aVRC);479 Assert (msg);480 481 QString err = QString ("%1: %2").arg (msg->pszDefine, msg->pszMsgShort);482 if (err.endsWith ("."))483 err.truncate (err.length() - 1);484 485 message (mainWindowShown(), VBoxProblemReporter::Error,486 tr ("Failed to copy file <b><nobr>%1</nobr></b> to "487 "<b><nobr>%2</nobr></b> (%3).")488 .arg (aSrc, aDst, err));489 437 } 490 438 … … 531 479 "<p>The application will now terminate.</p>"), 532 480 formatErrorInfo (vbox)); 533 }534 535 void VBoxProblemReporter::cannotSaveGlobalSettings (const CVirtualBox &vbox,536 QWidget *parent /* = 0 */)537 {538 /* preserve the current error info before calling the object again */539 COMResult res (vbox);540 541 message (parent ? parent : mainWindowShown(), Error,542 tr ("<p>Failed to save the global VirtualBox settings to "543 "<b><nobr>%1</nobr></b>.</p>")544 .arg (vbox.GetSettingsFilePath()),545 formatErrorInfo (res));546 481 } 547 482 … … 903 838 0 /* aAutoConfirmId */, 904 839 tr ("Close VM"), tr ("Continue")); 905 }906 907 void VBoxProblemReporter::cannotSetSnapshotFolder (const CMachine &aMachine,908 const QString &aPath)909 {910 message (911 mainWindowShown(),912 Error,913 tr ("Failed to change the snapshot folder path of the "914 "virtual machine <b>%1<b> to <nobr><b>%2</b></nobr>.")915 .arg (aMachine.GetName())916 .arg (aPath),917 formatErrorInfo (aMachine));918 840 } 919 841 … … 1266 1188 } 1267 1189 1268 int VBoxProblemReporter::confirmDetachAddControllerSlots (QWidget *aParent) const1269 {1270 return messageOkCancel (aParent, Question,1271 tr ("<p>There are hard disks attached to ports of the additional controller. "1272 "If you disable the additional controller, all these hard disks "1273 "will be automatically detached.</p>"1274 "<p>Are you sure you want to "1275 "disable the additional controller?</p>"),1276 0 /* aAutoConfirmId */,1277 tr ("Disable", "hard disk"));1278 }1279 1280 int VBoxProblemReporter::confirmChangeAddControllerSlots (QWidget *aParent) const1281 {1282 return messageOkCancel (aParent, Question,1283 tr ("<p>There are hard disks attached to ports of the additional controller. "1284 "If you change the additional controller, all these hard disks "1285 "will be automatically detached.</p>"1286 "<p>Are you sure you want to "1287 "change the additional controller?</p>"),1288 0 /* aAutoConfirmId */,1289 tr ("Change", "hard disk"));1290 }1291 1292 1190 int VBoxProblemReporter::askAboutHardDiskAttachmentCreation(QWidget *pParent, 1293 1191 const QString &strControllerName) … … 1360 1258 } 1361 1259 1362 void VBoxProblemReporter::cannotAttachDevice (QWidget *aParent, const CMachine &aMachine, 1363 VBoxDefs::MediumType aType, const QString &aLocation, 1364 KStorageBus aBus, LONG aChannel, LONG aDevice) 1365 { 1366 QString what (deviceToAccusative (aType)); 1367 if (!aLocation.isNull()) 1368 what += QString (" (<nobr><b>%1</b></nobr>)").arg (aLocation); 1369 1370 message (aParent, Error, 1371 tr ("Failed to attach the %1 to slot <i>%2</i> of the machine <b>%3</b>.") 1372 .arg (what) 1373 .arg (vboxGlobal().toString (StorageSlot (aBus, aChannel, aDevice))) 1374 .arg (CMachine (aMachine).GetName()), 1375 formatErrorInfo (aMachine)); 1376 } 1377 1378 void VBoxProblemReporter::cannotDetachDevice (QWidget *aParent, const CMachine &aMachine, 1379 VBoxDefs::MediumType aType, const QString &aLocation, 1380 KStorageBus aBus, LONG aChannel, LONG aDevice) 1381 { 1382 QString what (deviceToAccusative (aType)); 1383 if (!aLocation.isNull()) 1384 what += QString (" (<nobr><b>%1</b></nobr>)").arg (aLocation); 1385 1386 message (aParent, Error, 1387 tr ("Failed to detach the %1 from slot <i>%2</i> of the machine <b>%3</b>.") 1388 .arg (what) 1389 .arg (vboxGlobal().toString (StorageSlot (aBus, aChannel, aDevice))) 1390 .arg (CMachine (aMachine).GetName()), 1391 formatErrorInfo (aMachine)); 1260 void VBoxProblemReporter::cannotAttachDevice(QWidget *pParent, const CMachine &machine, 1261 VBoxDefs::MediumType type, const QString &strLocation, const StorageSlot &storageSlot) 1262 { 1263 QString strMessage; 1264 switch (type) 1265 { 1266 case VBoxDefs::MediumType_HardDisk: 1267 { 1268 strMessage = tr("Failed to attach the hard disk (<nobr><b>%1</b></nobr>) to the slot <i>%2</i> of the machine <b>%3</b>.") 1269 .arg(strLocation).arg(vboxGlobal().toString(storageSlot)).arg(CMachine(machine).GetName()); 1270 break; 1271 } 1272 case VBoxDefs::MediumType_DVD: 1273 { 1274 strMessage = tr("Failed to attach the CD/DVD device (<nobr><b>%1</b></nobr>) to the slot <i>%2</i> of the machine <b>%3</b>.") 1275 .arg(strLocation).arg(vboxGlobal().toString(storageSlot)).arg(CMachine(machine).GetName()); 1276 break; 1277 } 1278 case VBoxDefs::MediumType_Floppy: 1279 { 1280 strMessage = tr("Failed to attach the floppy device (<nobr><b>%1</b></nobr>) to the slot <i>%2</i> of the machine <b>%3</b>.") 1281 .arg(strLocation).arg(vboxGlobal().toString(storageSlot)).arg(CMachine(machine).GetName()); 1282 break; 1283 } 1284 default: 1285 break; 1286 } 1287 message(pParent ? pParent : mainWindowShown(), Error, strMessage, formatErrorInfo(machine)); 1288 } 1289 1290 void VBoxProblemReporter::cannotDetachDevice(QWidget *pParent, const CMachine &machine, 1291 VBoxDefs::MediumType type, const QString &strLocation, const StorageSlot &storageSlot) 1292 { 1293 QString strMessage; 1294 switch (type) 1295 { 1296 case VBoxDefs::MediumType_HardDisk: 1297 { 1298 strMessage = tr("Failed to detach the hard disk (<nobr><b>%1</b></nobr>) from the slot <i>%2</i> of the machine <b>%3</b>.") 1299 .arg(strLocation).arg(vboxGlobal().toString(storageSlot)).arg(CMachine(machine).GetName()); 1300 break; 1301 } 1302 case VBoxDefs::MediumType_DVD: 1303 { 1304 strMessage = tr("Failed to detach the CD/DVD device (<nobr><b>%1</b></nobr>) from the slot <i>%2</i> of the machine <b>%3</b>.") 1305 .arg(strLocation).arg(vboxGlobal().toString(storageSlot)).arg(CMachine(machine).GetName()); 1306 break; 1307 } 1308 case VBoxDefs::MediumType_Floppy: 1309 { 1310 strMessage = tr("Failed to detach the floppy device (<nobr><b>%1</b></nobr>) from the slot <i>%2</i> of the machine <b>%3</b>.") 1311 .arg(strLocation).arg(vboxGlobal().toString(storageSlot)).arg(CMachine(machine).GetName()); 1312 break; 1313 } 1314 default: 1315 break; 1316 } 1317 message(pParent ? pParent : mainWindowShown(), Error, strMessage, formatErrorInfo(machine)); 1392 1318 } 1393 1319 … … 1451 1377 .arg (aMedium.location()), 1452 1378 formatErrorInfo (aResult)); 1453 }1454 1455 void VBoxProblemReporter::cannotEjectDrive()1456 {1457 message (mainWindowShown(), Warning,1458 tr ("Failed to eject the disk from the virtual drive. "1459 "The drive may be locked by the guest operating system. "1460 "Please check this and try again."));1461 1379 } 1462 1380 … … 1752 1670 0, /* aAutoConfirmId */ 1753 1671 tr ("Mount", "additions")); 1754 }1755 1756 void VBoxProblemReporter::warnAboutTooOldAdditions (QWidget *aParent,1757 const QString &aInstalledVer,1758 const QString &aExpectedVer)1759 {1760 message (aParent ? aParent : mainMachineWindowShown(), VBoxProblemReporter::Error,1761 tr ("<p>The VirtualBox Guest Additions installed in the Guest OS are too "1762 "old: the installed version is %1, the expected version is %2. "1763 "Some features that require Guest Additions (mouse integration, "1764 "guest display auto-resize) will most likely stop "1765 "working properly.</p>"1766 "<p>Please update the Guest Additions to the current version by choosing "1767 "<b>Install Guest Additions</b> from the <b>Devices</b> "1768 "menu.</p>")1769 .arg (aInstalledVer).arg (aExpectedVer),1770 "warnAboutTooOldAdditions");1771 }1772 1773 void VBoxProblemReporter::warnAboutOldAdditions (QWidget *aParent,1774 const QString &aInstalledVer,1775 const QString &aExpectedVer)1776 {1777 message (aParent ? aParent : mainMachineWindowShown(), VBoxProblemReporter::Warning,1778 tr ("<p>The VirtualBox Guest Additions installed in the Guest OS are "1779 "outdated: the installed version is %1, the expected version is %2. "1780 "Some features that require Guest Additions (mouse integration, "1781 "guest display auto-resize) may not work as expected.</p>"1782 "<p>It is recommended to update the Guest Additions to the current version "1783 " by choosing <b>Install Guest Additions</b> from the <b>Devices</b> "1784 "menu.</p>")1785 .arg (aInstalledVer).arg (aExpectedVer),1786 "warnAboutOldAdditions");1787 }1788 1789 void VBoxProblemReporter::warnAboutNewAdditions (QWidget *aParent,1790 const QString &aInstalledVer,1791 const QString &aExpectedVer)1792 {1793 message (aParent ? aParent : mainMachineWindowShown(), VBoxProblemReporter::Error,1794 tr ("<p>The VirtualBox Guest Additions installed in the Guest OS are "1795 "too recent for this version of VirtualBox: the installed version "1796 "is %1, the expected version is %2.</p>"1797 "<p>Using a newer version of Additions with an older version of "1798 "VirtualBox is not supported. Please install the current version "1799 "of the Guest Additions by choosing <b>Install Guest Additions</b> "1800 "from the <b>Devices</b> menu.</p>")1801 .arg (aInstalledVer).arg (aExpectedVer),1802 "warnAboutNewAdditions");1803 1672 } 1804 1673 … … 2568 2437 } 2569 2438 2570 /* static */2571 QString VBoxProblemReporter::deviceToAccusative (VBoxDefs::MediumType aType)2572 {2573 QString type =2574 aType == VBoxDefs::MediumType_HardDisk ?2575 tr ("hard disk", "failed to attach ...") :2576 aType == VBoxDefs::MediumType_DVD ?2577 tr ("CD/DVD device", "failed to attach ...") :2578 aType == VBoxDefs::MediumType_Floppy ?2579 tr ("floppy device", "failed to close ...") :2580 QString::null;2581 2582 Assert (!type.isNull());2583 return type;2584 }2585 2586 2439 /** 2587 2440 * Formats the given COM result code as a human-readable string. … … 2641 2494 return QString ("<qt>%1</qt>").arg (formatted); 2642 2495 } 2643 2644 /* static */2645 QString VBoxProblemReporter::doFormatErrorInfo (const COMErrorInfo &aInfo,2646 HRESULT aWrapperRC /* = S_OK */)2647 {2648 /* Compose complex details string with internal <!--EOM--> delimiter to2649 * make it possible to split string into info & details parts which will2650 * be used separately in QIMessageBox */2651 QString formatted;2652 2653 if (!aInfo.text().isEmpty())2654 formatted += QString ("<p>%1.</p>").arg (vboxGlobal().emphasize (aInfo.text()));2655 2656 formatted += "<!--EOM--><table bgcolor=#EEEEEE border=0 cellspacing=0 "2657 "cellpadding=0 width=100%>";2658 2659 bool haveResultCode = false;2660 2661 if (aInfo.isBasicAvailable())2662 {2663 #if defined (Q_WS_WIN)2664 haveResultCode = aInfo.isFullAvailable();2665 bool haveComponent = true;2666 bool haveInterfaceID = true;2667 #else /* defined (Q_WS_WIN) */2668 haveResultCode = true;2669 bool haveComponent = aInfo.isFullAvailable();2670 bool haveInterfaceID = aInfo.isFullAvailable();2671 #endif2672 2673 if (haveResultCode)2674 {2675 formatted += QString ("<tr><td>%1</td><td><tt>%2</tt></td></tr>")2676 .arg (tr ("Result Code: ", "error info"))2677 .arg (formatRC (aInfo.resultCode()));2678 }2679 2680 if (haveComponent)2681 formatted += QString ("<tr><td>%1</td><td>%2</td></tr>")2682 .arg (tr ("Component: ", "error info"), aInfo.component());2683 2684 if (haveInterfaceID)2685 {2686 QString s = aInfo.interfaceID();2687 if (!aInfo.interfaceName().isEmpty())2688 s = aInfo.interfaceName() + ' ' + s;2689 formatted += QString ("<tr><td>%1</td><td>%2</td></tr>")2690 .arg (tr ("Interface: ", "error info"), s);2691 }2692 2693 if (!aInfo.calleeIID().isNull() && aInfo.calleeIID() != aInfo.interfaceID())2694 {2695 QString s = aInfo.calleeIID();2696 if (!aInfo.calleeName().isEmpty())2697 s = aInfo.calleeName() + ' ' + s;2698 formatted += QString ("<tr><td>%1</td><td>%2</td></tr>")2699 .arg (tr ("Callee: ", "error info"), s);2700 }2701 }2702 2703 if (FAILED (aWrapperRC) &&2704 (!haveResultCode || aWrapperRC != aInfo.resultCode()))2705 {2706 formatted += QString ("<tr><td>%1</td><td><tt>%2</tt></td></tr>")2707 .arg (tr ("Callee RC: ", "error info"))2708 .arg (formatRC (aWrapperRC));2709 }2710 2711 formatted += "</table>";2712 2713 if (aInfo.next())2714 formatted = formatted + "<!--EOP-->" + doFormatErrorInfo (*aInfo.next());2715 2716 return formatted;2717 }2718 2719 // Public slots2720 /////////////////////////////////////////////////////////////////////////////2721 2496 2722 2497 void VBoxProblemReporter::showHelpWebDialog() … … 2809 2584 } 2810 2585 2586 /* Returns a reference to the global VirtualBox problem reporter instance: */ 2587 VBoxProblemReporter &VBoxProblemReporter::instance() 2588 { 2589 static VBoxProblemReporter global_instance; 2590 return global_instance; 2591 } 2592 2593 QString VBoxProblemReporter::doFormatErrorInfo (const COMErrorInfo &aInfo, 2594 HRESULT aWrapperRC /* = S_OK */) 2595 { 2596 /* Compose complex details string with internal <!--EOM--> delimiter to 2597 * make it possible to split string into info & details parts which will 2598 * be used separately in QIMessageBox */ 2599 QString formatted; 2600 2601 if (!aInfo.text().isEmpty()) 2602 formatted += QString ("<p>%1.</p>").arg (vboxGlobal().emphasize (aInfo.text())); 2603 2604 formatted += "<!--EOM--><table bgcolor=#EEEEEE border=0 cellspacing=0 " 2605 "cellpadding=0 width=100%>"; 2606 2607 bool haveResultCode = false; 2608 2609 if (aInfo.isBasicAvailable()) 2610 { 2611 #if defined (Q_WS_WIN) 2612 haveResultCode = aInfo.isFullAvailable(); 2613 bool haveComponent = true; 2614 bool haveInterfaceID = true; 2615 #else /* defined (Q_WS_WIN) */ 2616 haveResultCode = true; 2617 bool haveComponent = aInfo.isFullAvailable(); 2618 bool haveInterfaceID = aInfo.isFullAvailable(); 2619 #endif 2620 2621 if (haveResultCode) 2622 { 2623 formatted += QString ("<tr><td>%1</td><td><tt>%2</tt></td></tr>") 2624 .arg (tr ("Result Code: ", "error info")) 2625 .arg (formatRC (aInfo.resultCode())); 2626 } 2627 2628 if (haveComponent) 2629 formatted += QString ("<tr><td>%1</td><td>%2</td></tr>") 2630 .arg (tr ("Component: ", "error info"), aInfo.component()); 2631 2632 if (haveInterfaceID) 2633 { 2634 QString s = aInfo.interfaceID(); 2635 if (!aInfo.interfaceName().isEmpty()) 2636 s = aInfo.interfaceName() + ' ' + s; 2637 formatted += QString ("<tr><td>%1</td><td>%2</td></tr>") 2638 .arg (tr ("Interface: ", "error info"), s); 2639 } 2640 2641 if (!aInfo.calleeIID().isNull() && aInfo.calleeIID() != aInfo.interfaceID()) 2642 { 2643 QString s = aInfo.calleeIID(); 2644 if (!aInfo.calleeName().isEmpty()) 2645 s = aInfo.calleeName() + ' ' + s; 2646 formatted += QString ("<tr><td>%1</td><td>%2</td></tr>") 2647 .arg (tr ("Callee: ", "error info"), s); 2648 } 2649 } 2650 2651 if (FAILED (aWrapperRC) && 2652 (!haveResultCode || aWrapperRC != aInfo.resultCode())) 2653 { 2654 formatted += QString ("<tr><td>%1</td><td><tt>%2</tt></td></tr>") 2655 .arg (tr ("Callee RC: ", "error info")) 2656 .arg (formatRC (aWrapperRC)); 2657 } 2658 2659 formatted += "</table>"; 2660 2661 if (aInfo.next()) 2662 formatted = formatted + "<!--EOP-->" + doFormatErrorInfo (*aInfo.next()); 2663 2664 return formatted; 2665 } 2666 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxProblemReporter.h
r34543 r34736 20 20 #define __VBoxProblemReporter_h__ 21 21 22 /* Global includes */ 23 #include <QObject> 24 #include <QPointer> 25 26 /* Local includes */ 22 27 #include "COMDefs.h" 23 28 #include "QIMessageBox.h" 24 29 25 /* Qt icludes */ 26 #include <QObject> 27 #include <QPointer> 28 30 /* Forward declarations */ 29 31 class VBoxMedium; 30 31 // VBoxProblemReporter class 32 //////////////////////////////////////////////////////////////////////////////// 32 struct StorageSlot; 33 33 34 34 /** … … 67 67 }; 68 68 69 static VBoxProblemReporter &instance();70 71 bool isValid() const;72 73 // helpers74 75 69 bool isAnyWarningShown(); 76 70 bool isAlreadyShown(const QString &strGuardBlockName) const; … … 150 144 QWidget* mainMachineWindowShown() const; 151 145 152 /* Generic problem handlers */153 146 bool askForOverridingFile (const QString& aPath, QWidget *aParent = NULL) const; 154 147 bool askForOverridingFiles (const QVector<QString>& aPaths, QWidget *aParent = NULL) const; … … 156 149 bool askForOverridingFilesIfExists (const QVector<QString>& aPaths, QWidget *aParent = NULL) const; 157 150 158 void cannotDeleteFile (const QString& path, QWidget *aParent = NULL) const;159 160 151 void checkForMountedWrongUSB() const; 161 152 162 /* Special problem handlers */163 153 void showBETAWarning(); 164 154 void showBEBWarning(); … … 170 160 171 161 void cannotOpenURL (const QString &aURL); 172 void cannotCopyFile (const QString &aSrc, const QString &aDst, int aVRC);173 162 174 163 void cannotFindLanguage (const QString &aLangID, const QString &aNlsPath); … … 177 166 void cannotInitCOM (HRESULT rc); 178 167 void cannotCreateVirtualBox (const CVirtualBox &vbox); 179 180 void cannotSaveGlobalSettings (const CVirtualBox &vbox,181 QWidget *parent = 0);182 168 183 169 void cannotLoadGlobalConfig (const CVirtualBox &vbox, const QString &error); 184 170 void cannotSaveGlobalConfig (const CVirtualBox &vbox); 185 171 void cannotSetSystemProperties (const CSystemProperties &props); 172 186 173 void cannotAccessUSB (const COMBaseWithEI &aObj); 187 174 … … 216 203 217 204 void cannotSendACPIToMachine(); 205 218 206 bool warnAboutVirtNotEnabled64BitsGuest(bool fHWVirtExSupported); 219 207 bool warnAboutVirtNotEnabledGuestRequired(bool fHWVirtExSupported); 220 221 void cannotSetSnapshotFolder (const CMachine &aMachine, const QString &aPath);222 208 223 209 bool askAboutSnapshotRestoring (const QString &aSnapshotName); … … 240 226 void cannotSwitchScreenInSeamless(quint64 minVRAM); 241 227 int cannotSwitchScreenInFullscreen(quint64 minVRAM); 242 243 228 int cannotEnterFullscreenMode(); 244 229 int cannotEnterSeamlessMode(); … … 259 244 const CProgress &aProgress); 260 245 261 int confirmDetachAddControllerSlots (QWidget *aParent) const;262 int confirmChangeAddControllerSlots (QWidget *aParent) const;263 264 246 int askAboutHardDiskAttachmentCreation(QWidget *pParent, const QString &strControllerName); 265 247 int askAboutOpticalAttachmentCreation(QWidget *pParent, const QString &strControllerName); … … 272 254 const CMedium &aHD, 273 255 const CProgress &aProgress); 274 void cannotAttachDevice (QWidget *aParent, const CMachine &aMachine, 275 VBoxDefs::MediumType aType, const QString &aLocation, 276 KStorageBus aBus, LONG aChannel, LONG aDevice); 277 void cannotDetachDevice (QWidget *aParent, const CMachine &aMachine, 278 VBoxDefs::MediumType aType, const QString &aLocation, 279 KStorageBus aBus, LONG aChannel, LONG aDevice); 256 void cannotAttachDevice(QWidget *pParent, const CMachine &machine, 257 VBoxDefs::MediumType type, const QString &strLocation, const StorageSlot &storageSlot); 258 void cannotDetachDevice(QWidget *pParent, const CMachine &machine, 259 VBoxDefs::MediumType type, const QString &strLocation, const StorageSlot &storageSlot); 280 260 281 261 int cannotRemountMedium (QWidget *aParent, const CMachine &aMachine, const VBoxMedium &aMedium, bool aMount, bool aRetry); … … 284 264 void cannotCloseMedium (QWidget *aParent, const VBoxMedium &aMedium, 285 265 const COMResult &aResult); 286 void cannotEjectDrive();287 266 288 267 void cannotOpenSession (const CSession &session); … … 324 303 bool confirmDownloadAdditions (const QString &aURL, ulong aSize); 325 304 bool confirmMountAdditions (const QString &aURL, const QString &aSrc); 326 void warnAboutTooOldAdditions (QWidget *, const QString &, const QString &);327 void warnAboutOldAdditions (QWidget *, const QString &, const QString &);328 void warnAboutNewAdditions (QWidget *, const QString &, const QString &);329 305 330 306 bool askAboutUserManualDownload(const QString &strMissedLocation); … … 395 371 396 372 static QString mediumToAccusative (VBoxDefs::MediumType aType, bool aIsHostDrive = false); 397 static QString deviceToAccusative (VBoxDefs::MediumType aType);398 373 399 374 static QString formatRC (HRESULT aRC); … … 434 409 private: 435 410 411 static VBoxProblemReporter &instance(); 412 436 413 friend VBoxProblemReporter &vboxProblem(); 437 414 … … 443 420 }; 444 421 445 /** 446 * Shortcut to the static VBoxProblemReporter::instance() method, for 447 * convenience. 448 */ 422 /* Shortcut to the static VBoxProblemReporter::instance() method, for convenience. */ 449 423 inline VBoxProblemReporter &vboxProblem() { return VBoxProblemReporter::instance(); } 450 424 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp
r34728 r34736 833 833 if (!m.isOk()) 834 834 vboxProblem().cannotAttachDevice(this, m, VBoxDefs::MediumType_HardDisk, 835 field("hardDiskLocation").toString(), ctrHdBus, 0, 0);835 field("hardDiskLocation").toString(), StorageSlot(ctrHdBus, 0, 0)); 836 836 } 837 837 … … 839 839 m.AttachDevice(ctrDvdName, 1, 0, KDeviceType_DVD, CMedium()); 840 840 if (!m.isOk()) 841 vboxProblem().cannotAttachDevice(this, m, VBoxDefs::MediumType_DVD, QString(), ctrDvdBus, 1, 0);841 vboxProblem().cannotAttachDevice(this, m, VBoxDefs::MediumType_DVD, QString(), StorageSlot(ctrDvdBus, 1, 0)); 842 842 843 843 if (m.isOk())
Note:
See TracChangeset
for help on using the changeset viewer.