VirtualBox

Changeset 38501 in vbox


Ignore:
Timestamp:
Aug 19, 2011 2:45:46 PM (13 years ago)
Author:
vboxsync
Message:

FE/Qt4:_makes the image format list unique

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r38479 r38501  
    891891    /* Build a filters list out of it. */
    892892    for (int i = 0; i < formats.size(); ++i)
    893         filters << formats.at(i) + " (*." + formats.at(i).toLower() + ")";
     893    {
     894        const QString &s = formats.at(i) + " (*." + formats.at(i).toLower() + ")";
     895        /* Check there isn't an entry already (even if it just uses another capitalization) */
     896        if (filters.indexOf(QRegExp(QRegExp::escape(s), Qt::CaseInsensitive)) == -1)
     897            filters << s;
     898    }
    894899    /* Try to select some common defaults. */
    895900    QString strFilter;
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