forked from qt-creator/qt-creator
ExtensionManager: Add updated badge
Change-Id: I90464900106835dd2ea819309241b7563920b909 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -248,7 +248,15 @@ static QString badgeText(const QModelIndex &index)
|
||||
{
|
||||
if (index.data(RoleDownloadUrl).isNull())
|
||||
return {};
|
||||
|
||||
const PluginSpec *ps = pluginSpecForId(index.data(RoleId).toString());
|
||||
if (!ps)
|
||||
return Tr::tr("New");
|
||||
|
||||
const QVersionNumber remoteVersion = QVersionNumber::fromString(
|
||||
index.data(RoleVersion).toString());
|
||||
const QVersionNumber localVersion = QVersionNumber::fromString(ps->version());
|
||||
return remoteVersion > localVersion ? Tr::tr("Updated") : QString();
|
||||
}
|
||||
|
||||
ExtensionState extensionState(const QModelIndex &index)
|
||||
|
Reference in New Issue
Block a user