VirtualBox

Changeset 53449 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Dec 5, 2014 9:48:21 AM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: cache the home folder and don't call IVirtualBox::GetHomeFolder() from an alien thread

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r53447 r53449  
    953953
    954954    /* Compose initial file-name: */
    955     const CVirtualBox vbox = vboxGlobal().virtualBox();
    956     const QString strInitialFileName = QDir(vbox.GetHomeFolder()).absoluteFilePath(QString("%1_ExtraData.xml").arg(currentChooserName()));
     955    const QString strInitialFileName = QDir(vboxGlobal().HomeFolder()).absoluteFilePath(QString("%1_ExtraData.xml").arg(currentChooserName()));
    957956    /* Open file-save dialog to choose file to save extra-data into: */
    958957    const QString strFileName = QIFileDialog::getSaveFileName(strInitialFileName, "XML files (*.xml)", this,
     
    10411040
    10421041    /* Compose initial file-name: */
    1043     const CVirtualBox vbox = vboxGlobal().virtualBox();
    1044     const QString strInitialFileName = QDir(vbox.GetHomeFolder()).absoluteFilePath(QString("%1_ExtraData.xml").arg(currentChooserName()));
     1042    const QString strInitialFileName = QDir(vboxGlobal().HomeFolder()).absoluteFilePath(QString("%1_ExtraData.xml").arg(currentChooserName()));
    10451043    /* Open file-open dialog to choose file to open extra-data into: */
    10461044    const QString strFileName = QIFileDialog::getOpenFileName(strInitialFileName, "XML files (*.xml)", this,
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp

    r53328 r53449  
    25232523    QString strUserManualFileName1 = vboxGlobal().helpFile();
    25242524    QString strShortFileName = QFileInfo(strUserManualFileName1).fileName();
    2525     QString strUserManualFileName2 = QDir(vboxGlobal().virtualBox().GetHomeFolder()).absoluteFilePath(strShortFileName);
     2525    QString strUserManualFileName2 = QDir(vboxGlobal().HomeFolder()).absoluteFilePath(strShortFileName);
    25262526    /* Show if user manual already present: */
    25272527    if (QFile::exists(strUserManualFileName1))
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r53012 r53449  
    16021602    }
    16031603    QString strHomeFolder = fUseLastFolder && !strLastFolder.isEmpty() ? strLastFolder :
    1604                             strDefaultFolder.isEmpty() ? vboxGlobal().virtualBox().GetHomeFolder() : strDefaultFolder;
     1604                            strDefaultFolder.isEmpty() ? vboxGlobal().homeFolder() : strDefaultFolder;
    16051605
    16061606    /* Prepare filters and backends: */
     
    38773877    }
    38783878    mHost = virtualBox().GetHost();
     3879    mHomeFolder = virtualBox().GetHomeFolder();
    38793880
    38803881    /* create default non-null global settings */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h

    r52991 r53449  
    104104    CVirtualBox virtualBox() const { return mVBox; }
    105105    CHost host() const { return mHost; }
     106    QString homeFolder() const { return mHomeFolder; }
    106107
    107108    VBoxGlobalSettings &settings() { return gset; }
     
    431432    CVirtualBox mVBox;
    432433    CHost mHost;
     434    QString mHomeFolder;
    433435
    434436    VBoxGlobalSettings gset;
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderAdditions.cpp

    r52730 r53449  
    6464    const QString &strName = QString("VBoxGuestAdditions_%1.iso").arg(vboxGlobal().vboxVersionStringNormalized());
    6565    const QString &strSource = QString("http://download.virtualbox.org/virtualbox/%1/").arg(vboxGlobal().vboxVersionStringNormalized()) + strName;
    66     const QString &strTarget = QDir(vboxGlobal().virtualBox().GetHomeFolder()).absoluteFilePath(strName);
     66    const QString &strTarget = QDir(vboxGlobal().homeFolder()).absoluteFilePath(strName);
    6767
    6868    /* Set source/target: */
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.cpp

    r52733 r53449  
    7070    QString strSourceName(strTemplateSourceName.arg(vboxGlobal().vboxVersionStringNormalized()));
    7171    QString strSource(strSourcePath + strSourceName);
    72     QString strTargetPath(vboxGlobal().virtualBox().GetHomeFolder());
     72    QString strTargetPath(vboxGlobal().homeFolder());
    7373    QString strTargetName(strSourceName);
    7474    QString strTarget(QDir(strTargetPath).absoluteFilePath(strTargetName));
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderUserManual.cpp

    r52730 r53449  
    7070
    7171    /* Set target: */
    72     QString strUserManualDestination = QDir(vboxGlobal().virtualBox().GetHomeFolder()).absoluteFilePath(strUserManualShortFileName);
     72    QString strUserManualDestination = QDir(vboxGlobal().homeFolder()).absoluteFilePath(strUserManualShortFileName);
    7373    setTarget(strUserManualDestination);
    7474}
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.cpp

    r52733 r53449  
    207207QString UINetworkReplyPrivateThread::fullCertificateFileName()
    208208{
    209     const QDir homeDir(QDir::toNativeSeparators(vboxGlobal().virtualBox().GetHomeFolder()));
     209    const QDir homeDir(QDir::toNativeSeparators(vboxGlobal().homeFolder()));
    210210    return QDir::toNativeSeparators(homeDir.absoluteFilePath(m_strCertificateFileName));
    211211}
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.cpp

    r52730 r53449  
    4444
    4545    /* Setup widgets: */
    46     m_pSelectorMachineFolder->setHomeDir(vboxGlobal().virtualBox().GetHomeFolder());
    47     m_pSelectorVRDPLibName->setHomeDir(vboxGlobal().virtualBox().GetHomeFolder());
     46    m_pSelectorMachineFolder->setHomeDir(vboxGlobal().homeFolder());
     47    m_pSelectorVRDPLibName->setHomeDir(vboxGlobal().homeFolder());
    4848    m_pSelectorVRDPLibName->setMode(VBoxFilePathSelectorWidget::Mode_File_Open);
    4949
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