forked from qt-creator/qt-creator
ExtensionManager: Fix MSVC warnings
Implicit size_t -> int conversions. Change-Id: I162470312b2711d2df890793da5667ec8b177c4d Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
97a9a563eb
commit
6892696e09
@@ -225,7 +225,7 @@ ExtensionsModel::~ExtensionsModel()
|
|||||||
|
|
||||||
int ExtensionsModel::rowCount([[maybe_unused]] const QModelIndex &parent) const
|
int ExtensionsModel::rowCount([[maybe_unused]] const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
return d->remotePlugins.size() + d->localPlugins.count();
|
return int(d->remotePlugins.size() + d->localPlugins.count());
|
||||||
}
|
}
|
||||||
|
|
||||||
static QString badgeText(const QModelIndex &index)
|
static QString badgeText(const QModelIndex &index)
|
||||||
@@ -280,7 +280,7 @@ QVariant ExtensionsModel::data(const QModelIndex &index, int role) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
const bool isRemoteExtension = size_t(index.row()) < d->remotePlugins.size();
|
const bool isRemoteExtension = size_t(index.row()) < d->remotePlugins.size();
|
||||||
const int itemIndex = index.row() - (isRemoteExtension ? 0 : d->remotePlugins.size());
|
const int itemIndex = int(index.row() - (isRemoteExtension ? 0 : d->remotePlugins.size()));
|
||||||
|
|
||||||
return isRemoteExtension ? d->dataFromRemoteExtension(itemIndex, role)
|
return isRemoteExtension ? d->dataFromRemoteExtension(itemIndex, role)
|
||||||
: d->dataFromLocalPlugin(itemIndex, role);
|
: d->dataFromLocalPlugin(itemIndex, role);
|
||||||
@@ -290,7 +290,7 @@ QModelIndex ExtensionsModel::indexOfId(const QString &extensionId) const
|
|||||||
{
|
{
|
||||||
const int localIndex = indexOf(d->localPlugins, equal(&PluginSpec::id, extensionId));
|
const int localIndex = indexOf(d->localPlugins, equal(&PluginSpec::id, extensionId));
|
||||||
if (localIndex >= 0)
|
if (localIndex >= 0)
|
||||||
return index(d->remotePlugins.size() + localIndex);
|
return index(int(d->remotePlugins.size() + localIndex));
|
||||||
|
|
||||||
for (int remoteIndex = 0;
|
for (int remoteIndex = 0;
|
||||||
const std::unique_ptr<RemoteSpec> &spec : std::as_const(d->remotePlugins)) {
|
const std::unique_ptr<RemoteSpec> &spec : std::as_const(d->remotePlugins)) {
|
||||||
|
Reference in New Issue
Block a user