forked from qt-creator/qt-creator
Fix some warnings
Change-Id: I2991f0ab84b26c93c0dbe2ec79f7638d299e3d39 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -179,6 +179,8 @@ QImage Quick3DNodeInstance::renderPreviewImage(const QSize &previewImageSize) co
|
||||
return transparentImage;
|
||||
}
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(previewImageSize)
|
||||
#endif
|
||||
return {};
|
||||
}
|
||||
|
@@ -488,14 +488,14 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
|
||||
if (m_buildConfiguration->isEnabled())
|
||||
setError(QString());
|
||||
});
|
||||
connect(this, &QObject::destroyed, this, [this](const QObject *obj) {
|
||||
connect(this, &QObject::destroyed, this, [this] {
|
||||
updateInitialCMakeArguments();
|
||||
});
|
||||
|
||||
connect(bc->aspect<InitialCMakeArgumentsAspect>(),
|
||||
&Utils::BaseAspect::labelLinkActivated,
|
||||
this,
|
||||
[this](const QString &link) {
|
||||
[this](const QString &) {
|
||||
const CMakeTool *tool = CMakeKitAspect::cmakeTool(
|
||||
m_buildConfiguration->target()->kit());
|
||||
CMakeTool::openCMakeHelpUrl(tool, "%1/manual/cmake.1.html#options");
|
||||
@@ -503,7 +503,7 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
|
||||
connect(bc->aspect<AdditionalCMakeOptionsAspect>(),
|
||||
&Utils::BaseAspect::labelLinkActivated,
|
||||
this,
|
||||
[this](const QString &link) {
|
||||
[this](const QString &) {
|
||||
const CMakeTool *tool = CMakeKitAspect::cmakeTool(
|
||||
m_buildConfiguration->target()->kit());
|
||||
CMakeTool::openCMakeHelpUrl(tool, "%1/manual/cmake.1.html#options");
|
||||
@@ -527,7 +527,7 @@ void CMakeBuildSettingsWidget::batchEditConfiguration()
|
||||
"To set or change a variable, use -D<variable>:<type>=<value>.<br/>"
|
||||
"<type> can have one of the following values: FILEPATH, PATH, BOOL, INTERNAL, or STRING.<br/>"
|
||||
"To unset a variable, use -U<variable>.<br/>"));
|
||||
connect(label, &QLabel::linkActivated, this, [this](const QString &link) {
|
||||
connect(label, &QLabel::linkActivated, this, [this](const QString &) {
|
||||
const CMakeTool *tool = CMakeKitAspect::cmakeTool(m_buildConfiguration->target()->kit());
|
||||
CMakeTool::openCMakeHelpUrl(tool, "%1/manual/cmake-variables.7.html");
|
||||
});
|
||||
|
@@ -353,7 +353,7 @@ public:
|
||||
m_changeButton(createSubWidget<QPushButton>())
|
||||
{
|
||||
const CMakeTool *tool = CMakeKitAspect::cmakeTool(kit);
|
||||
connect(this, &KitAspectWidget::labelLinkActivated, this, [=](const QString &link) {
|
||||
connect(this, &KitAspectWidget::labelLinkActivated, this, [=](const QString &) {
|
||||
CMakeTool::openCMakeHelpUrl(tool, "%1/manual/cmake-generators.7.html");
|
||||
});
|
||||
|
||||
@@ -972,7 +972,7 @@ private:
|
||||
"To set a variable, use -D<variable>:<type>=<value>.<br/>"
|
||||
"<type> can have one of the following values: FILEPATH, PATH, "
|
||||
"BOOL, INTERNAL, or STRING."));
|
||||
connect(editorLabel, &QLabel::linkActivated, this, [=](const QString &link) {
|
||||
connect(editorLabel, &QLabel::linkActivated, this, [=](const QString &) {
|
||||
CMakeTool::openCMakeHelpUrl(tool, "%1/manual/cmake-variables.7.html");
|
||||
});
|
||||
m_editor->setMinimumSize(800, 200);
|
||||
@@ -984,7 +984,7 @@ private:
|
||||
m_additionalEditor = new QLineEdit;
|
||||
auto additionalLabel = new QLabel(m_dialog);
|
||||
additionalLabel->setText(tr("Additional CMake <a href=\"options\">options</a>:"));
|
||||
connect(additionalLabel, &QLabel::linkActivated, this, [=](const QString &link) {
|
||||
connect(additionalLabel, &QLabel::linkActivated, this, [=](const QString &) {
|
||||
CMakeTool::openCMakeHelpUrl(tool, "%1/manual/cmake.1.html#options");
|
||||
});
|
||||
|
||||
|
@@ -1026,6 +1026,7 @@ FilePath DockerDevice::mapToLocalAccess(const FilePath &filePath) const
|
||||
return FilePath::fromString(d->m_mergedDir + '/' + path);
|
||||
#else
|
||||
QTC_CHECK(false);
|
||||
Q_UNUSED(filePath)
|
||||
return {};
|
||||
#endif
|
||||
}
|
||||
@@ -1043,6 +1044,7 @@ FilePath DockerDevice::mapFromLocalAccess(const QString &filePath) const
|
||||
QTC_ASSERT(filePath.startsWith(d->m_mergedDir), return FilePath::fromString(filePath));
|
||||
return mapToGlobalPath(FilePath::fromString(filePath.mid(d->m_mergedDir.size())));
|
||||
#else
|
||||
Q_UNUSED(filePath)
|
||||
QTC_CHECK(false);
|
||||
return {};
|
||||
#endif
|
||||
|
@@ -161,6 +161,8 @@ ItemLibraryWidget::ItemLibraryWidget(AsynchronousImageCache &imageCache,
|
||||
, m_itemsWidget(new QQuickWidget(this))
|
||||
, m_imageCache{imageCache}
|
||||
{
|
||||
Q_UNUSED(asynchronousFontImageCache)
|
||||
|
||||
m_compressionTimer.setInterval(200);
|
||||
m_compressionTimer.setSingleShot(true);
|
||||
ItemLibraryModel::registerQmlTypes();
|
||||
|
@@ -865,7 +865,7 @@ ModelNode RewriterView::nodeAtTextCursorPositionHelper(const ModelNode &root, in
|
||||
for (const myPair &pair : data) {
|
||||
ModelNode node = pair.first;
|
||||
i++;
|
||||
if (i >= data.size()) {
|
||||
if (i >= int(data.size())) {
|
||||
lastNode = node;
|
||||
break;
|
||||
}
|
||||
|
@@ -58,7 +58,7 @@ QStringList RecentPresetsStore::addRecentToExisting(const RecentPreset &preset,
|
||||
Utils::erase_one(recents, preset);
|
||||
Utils::prepend(recents, preset);
|
||||
|
||||
if (recents.size() > m_max)
|
||||
if (int(recents.size()) > m_max)
|
||||
recents.pop_back();
|
||||
|
||||
return encodeRecentPresets(recents);
|
||||
|
Reference in New Issue
Block a user