VirtualBox

Changeset 91076 in vbox for trunk/src


Ignore:
Timestamp:
Sep 1, 2021 6:52:17 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10067: Moving USB device enumeration stuff related warning from UIMessageCenter to UINotificationCenter.

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

Legend:

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

    r91029 r91076  
    600600{
    601601    alert(0, MessageType_Error, QString("<p>%1:</p>%2").arg(tr("Failed to find the following help file")).arg(strFileLocation));
    602 }
    603 
    604 void UIMessageCenter::cannotEnumerateHostUSBDevices(const CHost &comHost, QWidget *pParent  /* = 0 */) const
    605 {
    606     QString strHelpKeyword;
    607     /* Refer users to manual's trouble shooting section depending on the host platform: */
    608 #if defined(RT_OS_LINUX)
    609     strHelpKeyword = "ts_usb-linux";
    610 #elif defined(RT_OS_WINDOWS)
    611     strHelpKeyword = "ts_win-guests";
    612 #elif defined(RT_OS_SOLARIS)
    613     strHelpKeyword = "ts_sol-guests";
    614 #elif defined(RT_OS_DARWIN)
    615 #endif
    616     error(pParent, MessageType_Warning,
    617           tr("Failed to enumerate host USB devices."),
    618           UIErrorString::formatErrorInfo(comHost), "USBEnumerationWarning",
    619           strHelpKeyword);
    620602}
    621603
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h

    r91029 r91076  
    276276    void cannotAcquireSnapshotParameter(const CSnapshot &comSnapshot, QWidget *pParent = 0) const;
    277277    void cannotFindHelpFile(const QString &strFileLocation) const;
    278     void cannotEnumerateHostUSBDevices(const CHost &comHost, QWidget *pParent = 0) const;
    279278
    280279    /* API: Selector warnings: */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp

    r91066 r91076  
    709709        return;
    710710    if (comHost.GetUSBDevices().isEmpty() && comHost.isWarning())
    711         msgCenter().cannotEnumerateHostUSBDevices(comHost, this);
     711        UINotificationMessage::cannotEnumerateHostUSBDevices(comHost);
    712712}
    713713
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp

    r91075 r91076  
    289289
    290290/* static */
     291void UINotificationMessage::cannotEnumerateHostUSBDevices(const CHost &comHost)
     292{
     293    /* Refer users to manual's trouble shooting section depending on the host platform: */
     294    QString strHelpKeyword;
     295#if defined(RT_OS_LINUX)
     296    strHelpKeyword = "ts_usb-linux";
     297#elif defined(RT_OS_WINDOWS)
     298    strHelpKeyword = "ts_win-guests";
     299#elif defined(RT_OS_SOLARIS)
     300    strHelpKeyword = "ts_sol-guests";
     301#elif defined(RT_OS_DARWIN)
     302#endif
     303
     304    createMessage(
     305        QApplication::translate("UIMessageCenter", "Can't enumerate USB devices ..."),
     306        QApplication::translate("UIMessageCenter", "Failed to enumerate host USB devices.") +
     307        UIErrorString::formatErrorInfo(comHost),
     308        QString(),
     309        strHelpKeyword);
     310}
     311
     312/* static */
    291313void UINotificationMessage::cannotOpenMedium(const CVirtualBox &comVBox, const QString &strLocation)
    292314{
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h

    r91075 r91076  
    127127    static void cannotDetachWebCam(const CEmulatedUSB &comDispatcher,
    128128                                   const QString &strWebCamName, const QString &strMachineName);
     129    /** Notifies about inability to enumerate host USB devices.
     130      * @param  comHost  Brings the host devices enumerated for. */
     131    static void cannotEnumerateHostUSBDevices(const CHost &comHost);
    129132    /** Notifies about inability to open medium.
    130133      * @param  comVBox      Brings common VBox object trying to open medium.
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r90925 r91076  
    18321832            /* Do not bitch if there are no filters (check if enabled too?): */
    18331833            if (!machine().GetUSBDeviceFilters().GetDeviceFilters().isEmpty())
    1834                 msgCenter().cannotEnumerateHostUSBDevices(comHost, activeMachineWindow());
     1834                UINotificationMessage::cannotEnumerateHostUSBDevices(comHost);
    18351835        }
    18361836    }
Note: See TracChangeset for help on using the changeset viewer.

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