VirtualBox

Changeset 1902 in vbox for trunk


Ignore:
Timestamp:
Apr 3, 2007 5:21:56 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
20151
Message:

FE/Qt: Spelling.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h

    r1889 r1902  
    407407                                    bool resolveSymLinks = true);
    408408
    409     static QString getStartingDir (const QString &);
     409    static QString getFirstExistingDir (const QString &);
    410410
    411411signals:
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp

    r1889 r1902  
    21982198
    21992199/**
    2200  *  Reimplementation of QFileDialog::getExistingDirectory() which is runs
    2201  *  "open existing directory" dialog.
    2202  *
    2203  *  On Win32, this function makes sure a native dialog will be launched in
    2204  *  another thread to avoid dialog visualization errors occured due to
     2200 *  Reimplementation of QFileDialog::getExistingDirectory() that removes some
     2201 *  oddities and limitations.
     2202 *
     2203 *  On Win32, this function makes sure a native dialog is launched in
     2204 *  another thread to avoid dialog visualization errors occuring due to
    22052205 *  multi-threaded COM apartment initialization on the main UI thread while
    22062206 *  the appropriate native dialog function expects a single-threaded one.
     
    22452245    public:
    22462246
    2247         Thread (const WId &aId, QObject *aTarget,
     2247        Thread (QWidget *aParent, QObject *aTarget,
    22482248                const QString &aDir, const QString &aCaption)
    2249             : mId (aId), mTarget (aTarget), mDir (aDir), mCaption (aCaption) {}
     2249            : mParent (aParent), mTarget (aTarget), mDir (aDir), mCaption (aCaption) {}
    22502250
    22512251        virtual void run()
     
    22532253            QString result;
    22542254
    2255             QWidget *parent = QWidget::find (mId);
    2256             QWidget *topParent = parent ? parent->topLevelWidget() : qApp->mainWidget();
    2257             QString title = mCaption.isNull() ? tr ("Select a Directory") : mCaption;
     2255            QWidget *topParent = mParent ? mParent->topLevelWidget() : qApp->mainWidget();
     2256            QString title = mCaption.isNull() ? tr ("Select a directory") : mCaption;
    22582257
    22592258            TCHAR path[MAX_PATH];
     
    22702269            bi.lpfn = winGetExistDirCallbackProc;
    22712270            bi.lParam = Q_ULONG (&mDir);
    2272             if (parent) parent->setEnabled (false);
     2271            if (mParent) mParent->setEnabled (false);
    22732272            LPITEMIDLIST itemIdList = SHBrowseForFolder (&bi);
    22742273            if (itemIdList)
     
    22882287                result = QString::null;
    22892288            QApplication::postEvent (mTarget, new VBoxGetExistDirectoryEvent (result));
    2290             if (parent) parent->setEnabled (true);
     2289            if (mParent) mParent->setEnabled (true);
    22912290        }
    22922291
    22932292    private:
    22942293
    2295         WId mId;
     2294        QWidget *mParent;
    22962295        QObject *mTarget;
    22972296        QString mDir;
     
    23282327    };
    23292328
    2330     /* this dialog is proposed to be a modal */
    2331     if (!aParent) return QString::null;
    23322329    QString dir = QDir::convertSeparators (aDir);
    23332330    LoopObject loopObject;
    2334     Thread openDirThread (aParent->winId(), &loopObject, dir, aCaption);
     2331    Thread openDirThread (aParent, &loopObject, dir, aCaption);
    23352332    openDirThread.start();
    23362333    qApp->eventLoop()->enterLoop();
     
    23912388        workDir += "\\";
    23922389
    2393     QString title = caption.isNull() ? tr ("Select file to open") : caption;
     2390    QString title = caption.isNull() ? tr ("Select a file") : caption;
    23942391
    23952392    if (parent)
     
    24532450
    24542451/**
    2455  *  Search for the first directory that exists starting from the passed one.
    2456  *  In case of there is no directory (and all of its parent except root) exist
    2457  *  the function returns QString::null.
     2452 *  Search for the first directory that exists starting from the passed one
     2453 *  and going up through its parents.  In case if none of the directories
     2454 *  exist (except the root one), the function returns QString::null.
    24582455 */
    24592456/* static */
    2460 QString VBoxGlobal::getStartingDir (const QString &aStartDir)
     2457QString VBoxGlobal::getFirstExistingDir (const QString &aStartDir)
    24612458{
    24622459    QString result = QString::null;
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxGlobalSettingsDlg.ui.h

    r1889 r1902  
    501501    Assert (le);
    502502
    503     QString initDir = VBoxGlobal::getStartingDir (le->text());
     503    QString initDir = VBoxGlobal::getFirstExistingDir (le->text());
    504504    if (initDir.isNull())
    505505        initDir = vboxGlobal().virtualBox().GetHomeFolder();
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h

    r1889 r1902  
    18471847void VBoxVMSettingsDlg::tbSelectSavedStateFolder_clicked()
    18481848{
    1849     QString settingsFolder = VBoxGlobal::getStartingDir (leSnapshotFolder->text());
     1849    QString settingsFolder = VBoxGlobal::getFirstExistingDir (leSnapshotFolder->text());
    18501850    if (settingsFolder.isNull())
    18511851        settingsFolder = QFileInfo (cmachine.GetSettingsFilePath()).dirPath (true);
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