VirtualBox

Changeset 38421 in vbox


Ignore:
Timestamp:
Aug 11, 2011 2:55:02 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
73462
Message:

FE/Qt: 5800: Rework GUI networking support to use latest Qt networking classes: Networking stuff moved into the src/net sub-folder. Global UINetworkManager created. It will be used by all the downloaders and other network purposes.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
3 added
3 edited
6 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r38412 r38421  
    185185        ./src/wizards/importappliance \
    186186        ./src/widgets \
     187        ./src/net \
    187188        ./src/selector \
    188189        ./src/runtime \
     
    336337        src/widgets/UIBar.h \
    337338        src/widgets/UIBootTable.h \
    338         src/widgets/UIDownloader.h \
    339         src/widgets/UIDownloaderAdditions.h \
    340         src/widgets/UIDownloaderUserManual.h \
    341339        src/widgets/UIHotKeyEditor.h \
    342340        src/widgets/UIPopupBox.h \
     
    354352        src/widgets/VBoxOSTypeSelectorWidget.h \
    355353        src/widgets/VBoxWarningPane.h \
     354        src/net/UINetworkManager.h \
     355        src/net/UIDownloader.h \
     356        src/net/UIDownloaderAdditions.h \
     357        src/net/UIDownloaderUserManual.h \
    356358        src/selector/UIActionPoolSelector.h \
    357359        src/selector/UIVMDesktop.h \
     
    507509        src/widgets/UIBar.cpp \
    508510        src/widgets/UIBootTable.cpp \
    509         src/widgets/UIDownloader.cpp \
    510         src/widgets/UIDownloaderAdditions.cpp \
    511         src/widgets/UIDownloaderUserManual.cpp \
    512511        src/widgets/UIHotKeyEditor.cpp \
    513512        src/widgets/UIPopupBox.cpp \
     
    526525        src/widgets/VBoxOSTypeSelectorWidget.cpp \
    527526        src/widgets/VBoxWarningPane.cpp \
     527        src/net/UINetworkManager.cpp \
     528        src/net/UIDownloader.cpp \
     529        src/net/UIDownloaderAdditions.cpp \
     530        src/net/UIDownloaderUserManual.cpp \
    528531        src/selector/UIActionPoolSelector.cpp \
    529532        src/selector/UISelectorShortcuts.cpp \
  • trunk/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ja.ts

    r38412 r38421  
    11781178    </message>
    11791179    <message>
    1180         <location filename="../src/widgets/UIDownloader.cpp" line="262"/>
     1180        <location filename="../src/net/UIDownloader.cpp" line="262"/>
    11811181        <source>The download process has been canceled by the user.</source>
    11821182        <translation>ダウンロード処理がユーザーによってキャンセルされました。</translation>
     
    11981198    </message>
    11991199    <message>
    1200         <location filename="../src/widgets/UIDownloaderAdditions.cpp" line="120"/>
     1200        <location filename="../src/net/UIDownloaderAdditions.cpp" line="120"/>
    12011201        <source>&lt;p&gt;Failed to save the downloaded file as &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;.&lt;/nobr&gt;&lt;/p&gt;</source>
    12021202        <translation>&lt;p&gt;ダウンロードしたファイル(&lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;&lt;/nobr&gt;)の保存に失敗しました。&lt;/p&gt;</translation>
    12031203    </message>
    12041204    <message>
    1205         <location filename="../src/widgets/UIDownloaderAdditions.cpp" line="126"/>
     1205        <location filename="../src/net/UIDownloaderAdditions.cpp" line="107"/>
    12061206        <source>Select folder to save Guest Additions image to</source>
    12071207        <translation>Guest Additionsイメージを保存するフォルダを選択</translation>
     
    12111211    <name>UIDownloaderUserManual</name>
    12121212    <message>
    1213         <location filename="../src/widgets/UIDownloaderUserManual.cpp" line="151"/>
     1213        <location filename="../src/net/UIDownloaderUserManual.cpp" line="137"/>
    12141214        <source>Select folder to save User Manual to</source>
    12151215        <translation>ユーザーマニュアルを保存するフォルダを選択</translation>
     
    53605360    <name>UIMiniProcessWidgetAdditions</name>
    53615361    <message>
    5362         <location filename="../src/widgets/UIDownloaderAdditions.h" line="46"/>
     5362        <location filename="../src/net/UIDownloaderAdditions.h" line="46"/>
    53635363        <source>Cancel</source>
    53645364        <translation>キャンセル</translation>
    53655365    </message>
    53665366    <message>
    5367         <location filename="../src/widgets/UIDownloaderAdditions.h" line="47"/>
     5367        <location filename="../src/net/UIDownloaderAdditions.h" line="47"/>
    53685368        <source>Cancel the VirtualBox Guest Additions CD image download</source>
    53695369        <translation>VirtualBox Guest Additions CDイメージのダウンロードをキャンセル</translation>
    53705370    </message>
    53715371    <message>
    5372         <location filename="../src/widgets/UIDownloaderAdditions.h" line="49"/>
     5372        <location filename="../src/net/UIDownloaderAdditions.h" line="49"/>
    53735373        <source>Downloading the VirtualBox Guest Additions CD image from &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</source>
    53745374        <translation>VirtualBox Guest Additions CDイメージを&lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;からダウンロード...&lt;/nobr&gt;</translation>
     
    53785378    <name>UIMiniProcessWidgetUserManual</name>
    53795379    <message>
    5380         <location filename="../src/widgets/UIDownloaderUserManual.h" line="53"/>
     5380        <location filename="../src/net/UIDownloaderUserManual.h" line="53"/>
    53815381        <source>Cancel</source>
    53825382        <translation>キャンセル</translation>
    53835383    </message>
    53845384    <message>
    5385         <location filename="../src/widgets/UIDownloaderUserManual.h" line="54"/>
     5385        <location filename="../src/net/UIDownloaderUserManual.h" line="54"/>
    53865386        <source>Cancel the VirtualBox User Manual download</source>
    53875387        <translation>VirtualBox ユーザーマニュアルのダウンロードをキャンセル</translation>
    53885388    </message>
    53895389    <message>
    5390         <location filename="../src/widgets/UIDownloaderUserManual.h" line="55"/>
     5390        <location filename="../src/net/UIDownloaderUserManual.h" line="55"/>
    53915391        <source>Downloading the VirtualBox User Manual</source>
    53925392        <translation>VirtualBox ユーザーマニュアルのダウンロード</translation>
    53935393    </message>
    53945394    <message>
    5395         <location filename="../src/widgets/UIDownloaderUserManual.h" line="56"/>
     5395        <location filename="../src/net/UIDownloaderUserManual.h" line="56"/>
    53965396        <source>Downloading the VirtualBox User Manual &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</source>
    53975397        <translation>VirtualBox ユーザーマニュアルを&lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;からダウンロード...&lt;/nobr&gt;</translation>
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r38324 r38421  
    3131#include "UIExtraDataEventHandler.h"
    3232#include "QIFileDialog.h"
     33#include "UINetworkManager.h"
    3334
    3435#include "UIMachine.h"
     
    52425243    /* Handle global settings change for the first time: */
    52435244    sltProcessGlobalSettingChange();
     5245
     5246    /* Create network manager: */
     5247    UINetworkManager::create();
    52445248}
    52455249
     
    52525256void VBoxGlobal::cleanup()
    52535257{
     5258    /* Destroy network manager: */
     5259    UINetworkManager::destroy();
     5260
    52545261    /* sanity check */
    52555262    if (!sVBoxGlobalInCleanup)
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloader.cpp

    r38415 r38421  
    2424/* Local includes: */
    2525#include "UIDownloader.h"
     26#include "UINetworkManager.h"
    2627#include "VBoxGlobal.h"
    2728#include "UIMessageCenter.h"
     
    123124
    124125UIDownloader::UIDownloader()
    125     : m_pNetworkManager(new QNetworkAccessManager(this))
    126126{
    127127    connect(this, SIGNAL(sigToStartAcknowledging()), this, SLOT(sltStartAcknowledging()), Qt::QueuedConnection);
     
    135135    QNetworkRequest request;
    136136    request.setUrl(m_source);
    137     QNetworkReply *pReply = m_pNetworkManager->head(request);
     137    QNetworkReply *pReply = gNetworkManager->head(request);
    138138    connect(pReply, SIGNAL(sslErrors(QList<QSslError>)), pReply, SLOT(ignoreSslErrors()));
    139139    connect(pReply, SIGNAL(finished()), this, SLOT(sltFinishAcknowledging()));
     
    188188    QNetworkRequest request;
    189189    request.setUrl(m_source);
    190     QNetworkReply *pReply = m_pNetworkManager->get(request);
     190    QNetworkReply *pReply = gNetworkManager->get(request);
    191191    connect(pReply, SIGNAL(sslErrors(QList<QSslError>)), pReply, SLOT(ignoreSslErrors()));
    192192    connect(pReply, SIGNAL(downloadProgress(qint64, qint64)), this, SIGNAL(sigDownloadProgress(qint64, qint64)));
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloader.h

    r38415 r38421  
    2828class QProgressBar;
    2929class UIMiniCancelButton;
    30 class QNetworkAccessManager;
    3130class QNetworkReply;
    3231
     
    167166
    168167    /* Private variables: */
    169     QNetworkAccessManager *m_pNetworkManager;
    170168    QUrl m_source;
    171169    QString m_strTarget;
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