Changeset 39184 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Nov 3, 2011 9:58:30 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp
r39182 r39184 51 51 52 52 /* Version, Revision, Edition: */ 53 QString strVersion(m_data.m_strVersion); 54 QString strEdition; 55 56 if (strVersion.endsWith("-ENTERPRISE")) 57 { 58 strEdition = "-ENTERPRISE"; 59 strVersion.chop(strEdition.size()); 60 } 61 62 setText(2, QString("%1r%2%3").arg(strVersion).arg(m_data.m_strRevision).arg(strEdition)); 53 QString strVersion(m_data.m_strVersion.section(QRegExp("[-_]"), 0, 0)); 54 QString strAppend(m_data.m_strVersion.section(QRegExp("[-_]"), 1, -1, QString::SectionIncludeLeadingSep)); 55 setText(2, QString("%1r%2%3").arg(strVersion).arg(m_data.m_strRevision).arg(strAppend)); 63 56 64 57 /* Tool-tip: */ … … 144 137 QString strPackName = extPackFile.GetName(); 145 138 QString strPackDescription = extPackFile.GetDescription(); 146 QString strVersion(extPackFile.GetVersion()); 147 QString strEdition; 148 if (strVersion.endsWith("-ENTERPRISE")) 149 { 150 strEdition = "-ENTERPRISE"; 151 strVersion.chop(strEdition.size()); 152 } 153 QString strPackVersion = QString("%1r%2%3").arg(strVersion).arg(extPackFile.GetRevision()).arg(strEdition); 139 QString strVersion(extPackFile.GetVersion().section(QRegExp("[-_]"), 0, 0)); 140 QString strAppend(extPackFile.GetVersion().section(QRegExp("[-_]"), 1, -1, QString::SectionIncludeLeadingSep)); 141 QString strPackVersion = QString("%1r%2%3").arg(strVersion).arg(extPackFile.GetRevision()).arg(strAppend); 154 142 155 143 /* … … 162 150 if (fReplaceIt) 163 151 { 164 QString strVersionCur(extPackCur.GetVersion()); 165 QString strEditionCur; 166 if (strVersionCur.endsWith("-ENTERPRISE")) 167 { 168 strEditionCur = "-ENTERPRISE"; 169 strVersionCur.chop(strEditionCur.size()); 170 } 171 QString strPackVersionCur = QString("%1r%2%3").arg(strVersionCur).arg(extPackCur.GetRevision()).arg(strEditionCur); 152 QString strVersionCur(extPackCur.GetVersion().section(QRegExp("[-_]"), 0, 0)); 153 QString strAppendCur(extPackCur.GetVersion().section(QRegExp("[-_]"), 1, -1, QString::SectionIncludeLeadingSep)); 154 QString strPackVersionCur = QString("%1r%2%3").arg(strVersionCur).arg(extPackCur.GetRevision()).arg(strAppendCur); 172 155 if (!msgCenter().confirmReplacePackage(strPackName, strPackVersion, strPackVersionCur, strPackDescription, pParent)) 173 156 return;
Note:
See TracChangeset
for help on using the changeset viewer.