VirtualBox

Changeset 90491 in vbox for trunk


Ignore:
Timestamp:
Aug 3, 2021 9:56:48 AM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10067: Remove Network Access Manager references from Modal Window Manager as well.

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

Legend:

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

    r90086 r90491  
    28902890bool UIMessageCenter::confirmCancelingAllNetworkRequests() const
    28912891{
    2892     return questionBinary(windowManager().networkManagerOrMainWindowShown(), MessageType_Question,
     2892    return questionBinary(windowManager().mainWindowShown(), MessageType_Question,
    28932893                          tr("Do you wish to cancel all current network operations?"));
    28942894}
     
    28962896void UIMessageCenter::showUpdateSuccess(const QString &strVersion, const QString &strLink) const
    28972897{
    2898     alert(windowManager().networkManagerOrMainWindowShown(), MessageType_Info,
     2898    alert(windowManager().mainWindowShown(), MessageType_Info,
    28992899          tr("<p>A new version of VirtualBox has been released! Version <b>%1</b> is available "
    29002900             "at <a href=\"https://www.virtualbox.org/\">virtualbox.org</a>.</p>"
     
    29062906void UIMessageCenter::showUpdateNotFound() const
    29072907{
    2908     alert(windowManager().networkManagerOrMainWindowShown(), MessageType_Info,
     2908    alert(windowManager().mainWindowShown(), MessageType_Info,
    29092909          tr("You are already running the most recent version of VirtualBox."));
    29102910}
     
    29122912void UIMessageCenter::askUserToDownloadExtensionPack(const QString &strExtPackName, const QString &strExtPackVersion, const QString &strVBoxVersion) const
    29132913{
    2914     alert(windowManager().networkManagerOrMainWindowShown(), MessageType_Info,
     2914    alert(windowManager().mainWindowShown(), MessageType_Info,
    29152915          tr("<p>You have version %1 of the <b><nobr>%2</nobr></b> installed.</p>"
    29162916             "<p>You should download and install version %3 of this extension pack from Oracle!</p>")
     
    29292929bool UIMessageCenter::confirmDownloadGuestAdditions(const QString &strUrl, qulonglong uSize) const
    29302930{
    2931     return questionBinary(windowManager().networkManagerOrMainWindowShown(), MessageType_Question,
     2931    return questionBinary(windowManager().mainWindowShown(), MessageType_Question,
    29322932                          tr("<p>Are you sure you want to download the <b>VirtualBox Guest Additions</b> disk image file "
    29332933                             "from <nobr><a href=\"%1\">%1</a></nobr> (size %2 bytes)?</p>")
     
    29392939void UIMessageCenter::cannotSaveGuestAdditions(const QString &strURL, const QString &strTarget) const
    29402940{
    2941     alert(windowManager().networkManagerOrMainWindowShown(), MessageType_Error,
     2941    alert(windowManager().mainWindowShown(), MessageType_Error,
    29422942          tr("<p>The <b>VirtualBox Guest Additions</b> disk image file has been successfully downloaded "
    29432943             "from <nobr><a href=\"%1\">%1</a></nobr> "
     
    29492949bool UIMessageCenter::proposeMountGuestAdditions(const QString &strUrl, const QString &strSrc) const
    29502950{
    2951     return questionBinary(windowManager().networkManagerOrMainWindowShown(), MessageType_Question,
     2951    return questionBinary(windowManager().mainWindowShown(), MessageType_Question,
    29522952                          tr("<p>The <b>VirtualBox Guest Additions</b> disk image file has been successfully downloaded "
    29532953                             "from <nobr><a href=\"%1\">%1</a></nobr> "
     
    29612961void UIMessageCenter::cannotValidateGuestAdditionsSHA256Sum(const QString &strUrl, const QString &strSrc) const
    29622962{
    2963     alert(windowManager().networkManagerOrMainWindowShown(), MessageType_Error,
     2963    alert(windowManager().mainWindowShown(), MessageType_Error,
    29642964          tr("<p>The <b>VirtualBox Guest Additions</b> disk image file has been successfully downloaded "
    29652965             "from <nobr><a href=\"%1\">%1</a></nobr> "
     
    29902990bool UIMessageCenter::confirmDownloadUserManual(const QString &strURL, qulonglong uSize) const
    29912991{
    2992     return questionBinary(windowManager().networkManagerOrMainWindowShown(), MessageType_Question,
     2992    return questionBinary(windowManager().mainWindowShown(), MessageType_Question,
    29932993                          tr("<p>Are you sure you want to download the <b>VirtualBox User Manual</b> "
    29942994                             "from <nobr><a href=\"%1\">%1</a></nobr> (size %2 bytes)?</p>")
     
    30003000void UIMessageCenter::cannotSaveUserManual(const QString &strURL, const QString &strTarget) const
    30013001{
    3002     alert(windowManager().networkManagerOrMainWindowShown(), MessageType_Error,
     3002    alert(windowManager().mainWindowShown(), MessageType_Error,
    30033003          tr("<p>The VirtualBox User Manual has been successfully downloaded "
    30043004             "from <nobr><a href=\"%1\">%1</a></nobr> "
     
    30103010void UIMessageCenter::warnAboutUserManualDownloaded(const QString &strURL, const QString &strTarget) const
    30113011{
    3012     alert(windowManager().networkManagerOrMainWindowShown(), MessageType_Warning,
     3012    alert(windowManager().mainWindowShown(), MessageType_Warning,
    30133013          tr("<p>The VirtualBox User Manual has been successfully downloaded "
    30143014             "from <nobr><a href=\"%1\">%1</a></nobr> "
     
    30193019bool UIMessageCenter::warnAboutOutdatedExtensionPack(const QString &strExtPackName, const QString &strExtPackVersion) const
    30203020{
    3021     return questionBinary(windowManager().networkManagerOrMainWindowShown(), MessageType_Question,
     3021    return questionBinary(windowManager().mainWindowShown(), MessageType_Question,
    30223022                          tr("<p>You have an old version (%1) of the <b><nobr>%2</nobr></b> installed.</p>"
    30233023                             "<p>Do you wish to download latest one from the Internet?</p>")
     
    30293029bool UIMessageCenter::confirmDownloadExtensionPack(const QString &strExtPackName, const QString &strURL, qulonglong uSize) const
    30303030{
    3031     return questionBinary(windowManager().networkManagerOrMainWindowShown(), MessageType_Question,
     3031    return questionBinary(windowManager().mainWindowShown(), MessageType_Question,
    30323032                          tr("<p>Are you sure you want to download the <b><nobr>%1</nobr></b> "
    30333033                             "from <nobr><a href=\"%2\">%2</a></nobr> (size %3 bytes)?</p>")
     
    30393039void UIMessageCenter::cannotSaveExtensionPack(const QString &strExtPackName, const QString &strFrom, const QString &strTo) const
    30403040{
    3041     alert(windowManager().networkManagerOrMainWindowShown(), MessageType_Error,
     3041    alert(windowManager().mainWindowShown(), MessageType_Error,
    30423042          tr("<p>The <b><nobr>%1</nobr></b> has been successfully downloaded "
    30433043             "from <nobr><a href=\"%2\">%2</a></nobr> "
     
    30493049bool UIMessageCenter::proposeInstallExtentionPack(const QString &strExtPackName, const QString &strFrom, const QString &strTo) const
    30503050{
    3051     return questionBinary(windowManager().networkManagerOrMainWindowShown(), MessageType_Question,
     3051    return questionBinary(windowManager().mainWindowShown(), MessageType_Question,
    30523052                          tr("<p>The <b><nobr>%1</nobr></b> has been successfully downloaded "
    30533053                             "from <nobr><a href=\"%2\">%2</a></nobr> "
     
    30613061void UIMessageCenter::cannotValidateExtentionPackSHA256Sum(const QString &strExtPackName, const QString &strFrom, const QString &strTo) const
    30623062{
    3063     alert(windowManager().networkManagerOrMainWindowShown(), MessageType_Error,
     3063    alert(windowManager().mainWindowShown(), MessageType_Error,
    30643064          tr("<p>The <b><nobr>%1</nobr></b> has been successfully downloaded "
    30653065             "from <nobr><a href=\"%2\">%2</a></nobr> "
     
    30723072bool UIMessageCenter::proposeDeleteExtentionPack(const QString &strTo) const
    30733073{
    3074     return questionBinary(windowManager().networkManagerOrMainWindowShown(), MessageType_Question,
     3074    return questionBinary(windowManager().mainWindowShown(), MessageType_Question,
    30753075                          tr("Do you want to delete the downloaded file <nobr><b>%1</b></nobr>?")
    30763076                             .arg(strTo),
     
    30813081bool UIMessageCenter::proposeDeleteOldExtentionPacks(const QStringList &strFiles) const
    30823082{
    3083     return questionBinary(windowManager().networkManagerOrMainWindowShown(), MessageType_Question,
     3083    return questionBinary(windowManager().mainWindowShown(), MessageType_Question,
    30843084                          tr("Do you want to delete following list of files <nobr><b>%1</b></nobr>?")
    30853085                             .arg(strFiles.join(",")),
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIModalWindowManager.cpp

    r86996 r90491  
    7272    s_pInstance = 0;
    7373}
    74 
    75 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER
    76 QWidget *UIModalWindowManager::networkManagerOrMainWindowShown() const
    77 {
    78     /* Return main application window before network-manager initialization: */
    79     return gNetworkManager && gNetworkManager->window()->isVisible() ? gNetworkManager->window() : mainWindowShown();
    80 }
    81 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
    8274
    8375QWidget *UIModalWindowManager::realParentWindow(QWidget *pWidget)
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIModalWindowManager.h

    r82968 r90491  
    6262    /** Returns the main application window shown. */
    6363    QWidget *mainWindowShown() const { return m_pMainWindowShown; }
    64 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER
    65     /** Returns network manager or main window shown. */
    66     QWidget* networkManagerOrMainWindowShown() const;
    67 #endif
    6864
    6965private slots:
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderAdditions.cpp

    r82968 r90491  
    193193            /* Ask the user for another location for the additions-image file: */
    194194            const QString strTarget = QIFileDialog::getExistingDirectory(QFileInfo(target()).absolutePath(),
    195                                                                          windowManager().networkManagerOrMainWindowShown(),
     195                                                                         windowManager().mainWindowShown(),
    196196                                                                         tr("Select folder to save Guest Additions image to"), true);
    197197
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderExtensionPack.cpp

    r82968 r90491  
    177177        /* Ask the user for another location for the extension-pack file: */
    178178        QString strTarget = QIFileDialog::getExistingDirectory(QFileInfo(target()).absolutePath(),
    179                                                                windowManager().networkManagerOrMainWindowShown(),
     179                                                               windowManager().mainWindowShown(),
    180180                                                               tr("Select folder to save %1 to").arg(GUI_ExtPackName), true);
    181181
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderUserManual.cpp

    r82968 r90491  
    120120        /* Ask the user for another location for the user-manual file: */
    121121        QString strTarget = QIFileDialog::getExistingDirectory(QFileInfo(target()).absolutePath(),
    122                                                                windowManager().networkManagerOrMainWindowShown(),
     122                                                               windowManager().mainWindowShown(),
    123123                                                               tr("Select folder to save User Manual to"), true);
    124124
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UIUpdateManager.cpp

    r87251 r90491  
    491491    /* Warn the user about extension pack was downloaded and saved, propose to install it: */
    492492    if (msgCenter().proposeInstallExtentionPack(GUI_ExtPackName, strSource, QDir::toNativeSeparators(strTarget)))
    493         uiCommon().doExtPackInstallation(strTarget, strDigest, windowManager().networkManagerOrMainWindowShown(), NULL);
     493        uiCommon().doExtPackInstallation(strTarget, strDigest, windowManager().mainWindowShown(), NULL);
    494494    /* Propose to delete the downloaded extension pack: */
    495495    if (msgCenter().proposeDeleteExtentionPack(QDir::toNativeSeparators(strTarget)))
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