VirtualBox

Changeset 39210 in vbox


Ignore:
Timestamp:
Nov 4, 2011 10:17:38 PM (13 years ago)
Author:
vboxsync
Message:

FE/Qt: workaround for Qt bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp

    r39184 r39210  
    5252        /* Version, Revision, Edition: */
    5353        QString strVersion(m_data.m_strVersion.section(QRegExp("[-_]"), 0, 0));
    54         QString strAppend(m_data.m_strVersion.section(QRegExp("[-_]"), 1, -1, QString::SectionIncludeLeadingSep));
     54        QString strAppend;
     55        /* workaround for http://qt.gitorious.org/qt/qt/commit/7fc63dd0ff368a637dcd17e692b9d6b26278b538this */
     56        if (m_data.m_strVersion.contains(QRegExp("[-_]")))
     57            strAppend = m_data.m_strVersion.section(QRegExp("[-_]"), 1, -1, QString::SectionIncludeLeadingSep);
    5558        setText(2, QString("%1r%2%3").arg(strVersion).arg(m_data.m_strRevision).arg(strAppend));
    5659
     
    138141    QString strPackDescription = extPackFile.GetDescription();
    139142    QString strVersion(extPackFile.GetVersion().section(QRegExp("[-_]"), 0, 0));
    140     QString strAppend(extPackFile.GetVersion().section(QRegExp("[-_]"), 1, -1, QString::SectionIncludeLeadingSep));
     143    QString strAppend;
     144    /* workaround for http://qt.gitorious.org/qt/qt/commit/7fc63dd0ff368a637dcd17e692b9d6b26278b538this */
     145    if (extPackFile.GetVersion().contains(QRegExp("[-_]")))
     146        strAppend = extPackFile.GetVersion().section(QRegExp("[-_]"), 1, -1, QString::SectionIncludeLeadingSep);
    141147    QString strPackVersion = QString("%1r%2%3").arg(strVersion).arg(extPackFile.GetRevision()).arg(strAppend);
    142148
     
    151157    {
    152158        QString strVersionCur(extPackCur.GetVersion().section(QRegExp("[-_]"), 0, 0));
    153         QString strAppendCur(extPackCur.GetVersion().section(QRegExp("[-_]"), 1, -1, QString::SectionIncludeLeadingSep));
     159        QString strAppendCur;
     160        /* workaround for http://qt.gitorious.org/qt/qt/commit/7fc63dd0ff368a637dcd17e692b9d6b26278b538this */
     161        if (extPackCur.GetVersion().contains(QRegExp("[-_]")))
     162            strAppendCur = extPackCur.GetVersion().section(QRegExp("[-_]"), 1, -1, QString::SectionIncludeLeadingSep);
    154163        QString strPackVersionCur = QString("%1r%2%3").arg(strVersionCur).arg(extPackCur.GetRevision()).arg(strAppendCur);
    155164        if (!msgCenter().confirmReplacePackage(strPackName, strPackVersion, strPackVersionCur, strPackDescription, pParent))
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