Changeset 36393 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Mar 24, 2011 11:43:18 AM (14 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxProblemReporter.cpp
r36011 r36393 2658 2658 } 2659 2659 2660 void VBoxProblemReporter::remindAboutUnsupportedUSB2(const QString &strExtPackName, QWidget *pParent) 2661 { 2662 emit sigRemindAboutUnsupportedUSB2(strExtPackName, pParent); 2663 } 2664 2660 2665 void VBoxProblemReporter::showHelpWebDialog() 2661 2666 { … … 2888 2893 .arg(uWantedBPP).arg(uRealBPP).arg(uWantedBPP).arg(uWantedBPP), 2889 2894 kName); 2895 } 2896 2897 void VBoxProblemReporter::sltRemindAboutUnsupportedUSB2(const QString &strExtPackName, QWidget *pParent) 2898 { 2899 if (isAlreadyShown("sltRemindAboutUnsupportedUSB2")) 2900 return; 2901 setShownStatus("sltRemindAboutUnsupportedUSB2"); 2902 2903 message(pParent ? pParent : mainMachineWindowShown(), Warning, 2904 tr("<p>USB 2.0 is currently enabled for this virtual machine. " 2905 "However this requires the <b><nobr>%1</nobr></b> to be installed.</p>" 2906 "<p>Please install the Extension Pack from the VirtualBox download site. " 2907 "After this you will be able to re-enable USB 2.0. " 2908 "It will be disabled in the meantime unless you cancel the current settings changes.</p>") 2909 .arg(strExtPackName)); 2910 2911 clearShownStatus("sltRemindAboutUnsupportedUSB2"); 2890 2912 } 2891 2913 … … 2931 2953 connect(this, SIGNAL(sigRemindAboutWrongColorDepth(ulong, ulong)), 2932 2954 this, SLOT(sltRemindAboutWrongColorDepth(ulong, ulong)), Qt::QueuedConnection); 2955 connect(this, SIGNAL(sigRemindAboutUnsupportedUSB2(const QString&, QWidget*)), 2956 this, SLOT(sltRemindAboutUnsupportedUSB2(const QString&, QWidget*)), Qt::QueuedConnection); 2933 2957 } 2934 2958 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxProblemReporter.h
r36011 r36393 411 411 const QString &strPath, QWidget *pParent = 0); 412 412 void remindAboutWrongColorDepth(ulong uRealBPP, ulong uWantedBPP); 413 void remindAboutUnsupportedUSB2(const QString &strExtPackName, QWidget *pParent = 0); 413 414 414 415 signals: … … 433 434 const QString &strPath, QWidget *pParent); 434 435 void sigRemindAboutWrongColorDepth(ulong uRealBPP, ulong uWantedBPP); 436 void sigRemindAboutUnsupportedUSB2(const QString &strExtPackName, QWidget *pParent); 435 437 436 438 public slots: … … 460 462 const QString &strPath, QWidget *pParent); 461 463 void sltRemindAboutWrongColorDepth(ulong uRealBPP, ulong uWantedBPP); 464 void sltRemindAboutUnsupportedUSB2(const QString &strExtPackName, QWidget *pParent); 462 465 463 466 private: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp
r36357 r36393 22 22 #include "UIIconPool.h" 23 23 #include "VBoxGlobal.h" 24 #include "VBoxProblemReporter.h" 24 25 #include "UIToolBar.h" 25 26 #include "UIMachineSettingsUSB.h" … … 280 281 { 281 282 /* Gather internal variables data from QWidget(s): */ 283 /* USB 1.0 (OHCI): */ 282 284 m_cache.m_fUSBEnabled = mGbUSB->isChecked(); 283 m_cache.m_fEHCIEnabled = mCbUSB2->isChecked(); 285 /* USB 2.0 (EHCI): */ 286 QString strExtPackName = "Oracle VM VirtualBox Extension Pack"; 287 CExtPack extPack = vboxGlobal().virtualBox().GetExtensionPackManager().Find(strExtPackName); 288 m_cache.m_fEHCIEnabled = extPack.isNull() ? false : mCbUSB2->isChecked(); 284 289 break; 285 290 } … … 408 413 mValidator = aVal; 409 414 connect (mGbUSB, SIGNAL (stateChanged (int)), mValidator, SLOT (revalidate())); 415 connect(mCbUSB2, SIGNAL(stateChanged(int)), mValidator, SLOT(revalidate())); 416 } 417 418 bool UIMachineSettingsUSB::revalidate(QString &strWarningText, QString& /* strTitle */) 419 { 420 /* USB 2.0 Extension Pack presence test: */ 421 QString strExtPackName = "Oracle VM VirtualBox Extension Pack"; 422 CExtPack extPack = vboxGlobal().virtualBox().GetExtensionPackManager().Find(strExtPackName); 423 if (mCbUSB2->isChecked() && extPack.isNull()) 424 { 425 strWarningText = tr("USB 2.0 is currently enabled for this virtual machine. " 426 "However this requires the <b>%1</b> to be installed. " 427 "Please install the Extension Pack from the VirtualBox download site. " 428 "After this you will be able to re-enable USB 2.0. " 429 "It will be disabled in the meantime unless you cancel the current settings changes.") 430 .arg(strExtPackName); 431 vboxProblem().remindAboutUnsupportedUSB2(strExtPackName, this); 432 return true; 433 } 434 return true; 410 435 } 411 436 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.h
r36357 r36393 91 91 92 92 void setValidator (QIWidgetValidator *aVal); 93 bool revalidate(QString &strWarningText, QString &strTitle); 93 94 94 95 void setOrderAfter (QWidget *aWidget);
Note:
See TracChangeset
for help on using the changeset viewer.