VirtualBox

Changeset 81737 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 7, 2019 4:10:43 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: UIEmptyFilePathSelector: When chooser is opened we should try to propagate file-name information if available to QIFileDialog static stuff.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIEmptyFilePathSelector.cpp

    r80955 r81737  
    217217    QString path = mPath;
    218218
     219    /* Check whether we have file-name information available: */
     220    const QString strFileName = QFileInfo(path).fileName();
     221
    219222    /* Preparing initial directory. */
    220223    QString initDir = path.isNull() ? mHomeDir :
     
    222225    if (initDir.isNull())
    223226        initDir = mHomeDir;
     227
     228    /* Append file-name information if any: */
     229    if (!strFileName.isEmpty())
     230        initDir = QDir(initDir).absoluteFilePath(strFileName);
    224231
    225232    switch (mMode)
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