aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libs/3rdparty/syntax-highlighting/src/lib/syntaxhighlighter.cpp2
-rw-r--r--src/plugins/cmakeprojectmanager/cmakebuildstep.cpp2
-rw-r--r--src/plugins/cpaster/stickynotespasteprotocol.h1
-rw-r--r--src/plugins/git/gitclient.cpp4
-rw-r--r--src/plugins/mcusupport/test/unittest.cpp10
-rw-r--r--src/plugins/qmldesigner/designercore/include/qmlobjectnode.h1
-rw-r--r--src/plugins/qmldesigner/designercore/projectstorage/qmltypesparser.h2
-rw-r--r--src/plugins/qmldesigner/utils/multifiledownloader.cpp5
-rw-r--r--src/plugins/qmldesigner/utils/multifiledownloader.h3
-rw-r--r--src/plugins/qmlpreview/qmlpreviewruncontrol.cpp15
-rw-r--r--src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp2
-rw-r--r--src/plugins/squish/squishnavigationwidget.cpp2
-rw-r--r--tests/auto/qml/qmldesigner/wizard/userpresets-test.cpp2
-rw-r--r--tests/unit/unittest/sqlitedatabasemock.h2
-rw-r--r--tests/unit/unittest/sqlitereadwritestatementmock.h2
15 files changed, 29 insertions, 26 deletions
diff --git a/src/libs/3rdparty/syntax-highlighting/src/lib/syntaxhighlighter.cpp b/src/libs/3rdparty/syntax-highlighting/src/lib/syntaxhighlighter.cpp
index 41551e96da..4754da22c6 100644
--- a/src/libs/3rdparty/syntax-highlighting/src/lib/syntaxhighlighter.cpp
+++ b/src/libs/3rdparty/syntax-highlighting/src/lib/syntaxhighlighter.cpp
@@ -179,7 +179,7 @@ void SyntaxHighlighter::applyFolding(int offset, int length, FoldingRegion regio
{
Q_UNUSED(offset);
Q_UNUSED(length);
- Q_D(SyntaxHighlighter);
+ [[maybe_unused]] Q_D(SyntaxHighlighter);
if (region.type() == FoldingRegion::Begin) {
d->foldingRegions.push_back(region);
diff --git a/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp b/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp
index bbf321cd70..da5cf42e04 100644
--- a/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp
@@ -764,7 +764,7 @@ void CMakeBuildStep::updateDeploymentData()
const auto appFileNames = transform<QSet<QString>>(buildSystem()->applicationTargets(),
[](const BuildTargetInfo &appTarget) { return appTarget.targetFilePath.fileName(); });
- auto handleFile = [this, &appFileNames, startPos, &deploymentData](const FilePath &filePath) {
+ auto handleFile = [&appFileNames, startPos, &deploymentData](const FilePath &filePath) {
const DeployableFile::Type type = appFileNames.contains(filePath.fileName())
? DeployableFile::TypeExecutable
: DeployableFile::TypeNormal;
diff --git a/src/plugins/cpaster/stickynotespasteprotocol.h b/src/plugins/cpaster/stickynotespasteprotocol.h
index e17508e084..f212c883ef 100644
--- a/src/plugins/cpaster/stickynotespasteprotocol.h
+++ b/src/plugins/cpaster/stickynotespasteprotocol.h
@@ -38,7 +38,6 @@ private:
QNetworkReply *m_listReply = nullptr;
QString m_fetchId;
- int m_postId = -1;
bool m_hostChecked = false;
};
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp
index 66f03aa974..6ac72e8946 100644
--- a/src/plugins/git/gitclient.cpp
+++ b/src/plugins/git/gitclient.cpp
@@ -60,7 +60,7 @@
const char GIT_DIRECTORY[] = ".git";
const char HEAD[] = "HEAD";
const char CHERRY_PICK_HEAD[] = "CHERRY_PICK_HEAD";
-const char BRANCHES_PREFIX[] = "Branches: ";
+[[maybe_unused]] const char BRANCHES_PREFIX[] = "Branches: ";
const char stashNamePrefix[] = "stash@{";
const char noColorOption[] = "--no-color";
const char colorOption[] = "--color=always";
@@ -92,7 +92,7 @@ static QString branchesDisplay(const QString &prefix, QStringList *branches, boo
if (*first)
*first = false;
else
- output += QString(sizeof(BRANCHES_PREFIX) - 1, ' '); // Align
+ output += QString(sizeof(BRANCHES_PREFIX) - 1 /* the \0 */, ' '); // Align
output += prefix + ": ";
// If there are more than 'limit' branches, list limit/2 (first limit/4 and last limit/4)
if (count > limit) {
diff --git a/src/plugins/mcusupport/test/unittest.cpp b/src/plugins/mcusupport/test/unittest.cpp
index b9fc108ef7..a8a8f09139 100644
--- a/src/plugins/mcusupport/test/unittest.cpp
+++ b/src/plugins/mcusupport/test/unittest.cpp
@@ -152,11 +152,7 @@ const QString renesasProgrammerEnvVar{"RenesasFlashProgrammer_PATH"};
const char renesasProgrammerLabel[]{"Renesas Flash Programmer"};
const QString renesasProgrammerDetectionPath{HostOsInfo::withExecutableSuffix("rfp-cli")};
-const char renesasE2StudioCmakeVar[]{"EK_RA6M3G_E2_PROJECT_PATH"};
-const char renesasE2StudioDefaultPath[]{"%{Env:HOME}/e2_studio/workspace"};
const QString renesasE2StudioPath{(FileUtils::homePath() / "/e2_studio/workspace").toUserOutput()};
-const char renesasE2StudioLabel[]{"Path to project for Renesas e2 Studio"};
-const char renesasE2StudioSetting[]{"RenesasE2StudioPath"};
const char cypressProgrammerSetting[]{"CypressAutoFlashUtil"};
const char cypressProgrammerCmakeVar[]{"INFINEON_AUTO_FLASH_UTILITY_DIR"};
@@ -1760,9 +1756,9 @@ void McuSupportTest::test_nonemptyVersionDetector()
// pkgDesc.versionDetection.xmlAttribute left empty
pkgDesc.shouldAddToSystemPath = false;
const auto package = targetFactory.createPackage(pkgDesc);
- QVERIFY(package->getVersionDetector() != nullptr);
- QCOMPARE(typeid(*package->getVersionDetector()).name(),
- typeid(McuPackageExecutableVersionDetector).name());
+ const McuPackageVersionDetector *detector = package->getVersionDetector();
+ QVERIFY(detector != nullptr);
+ QCOMPARE(typeid(*detector).name(), typeid(McuPackageExecutableVersionDetector).name());
}
void McuSupportTest::test_emptyVersionDetector()
diff --git a/src/plugins/qmldesigner/designercore/include/qmlobjectnode.h b/src/plugins/qmldesigner/designercore/include/qmlobjectnode.h
index c4e0c55a9e..1eea5063c9 100644
--- a/src/plugins/qmldesigner/designercore/include/qmlobjectnode.h
+++ b/src/plugins/qmldesigner/designercore/include/qmlobjectnode.h
@@ -29,6 +29,7 @@ public:
QmlObjectNode(const ModelNode &modelNode)
: QmlModelNodeFacade(modelNode)
{}
+ virtual ~QmlObjectNode() = default;
static bool isValidQmlObjectNode(const ModelNode &modelNode);
bool isValid() const override;
diff --git a/src/plugins/qmldesigner/designercore/projectstorage/qmltypesparser.h b/src/plugins/qmldesigner/designercore/projectstorage/qmltypesparser.h
index 902d3c5a44..09513bb74e 100644
--- a/src/plugins/qmldesigner/designercore/projectstorage/qmltypesparser.h
+++ b/src/plugins/qmldesigner/designercore/projectstorage/qmltypesparser.h
@@ -42,7 +42,7 @@ public:
private:
// m_pathCache and m_storage are only used when compiled for QDS
#ifdef QDS_HAS_QMLDOM
- PathCache &m_pathCache;
+ [[maybe_unused]] PathCache &m_pathCache;
ProjectStorage &m_storage;
#endif
};
diff --git a/src/plugins/qmldesigner/utils/multifiledownloader.cpp b/src/plugins/qmldesigner/utils/multifiledownloader.cpp
index 346c1675f6..c36476f05d 100644
--- a/src/plugins/qmldesigner/utils/multifiledownloader.cpp
+++ b/src/plugins/qmldesigner/utils/multifiledownloader.cpp
@@ -41,6 +41,11 @@ void MultiFileDownloader::setDownloader(FileDownloader *downloader)
});
}
+FileDownloader *MultiFileDownloader::downloader()
+{
+ return m_downloader;
+}
+
void MultiFileDownloader::start()
{
emit downloadStarting();
diff --git a/src/plugins/qmldesigner/utils/multifiledownloader.h b/src/plugins/qmldesigner/utils/multifiledownloader.h
index 548896dbc8..794f85538c 100644
--- a/src/plugins/qmldesigner/utils/multifiledownloader.h
+++ b/src/plugins/qmldesigner/utils/multifiledownloader.h
@@ -13,7 +13,7 @@ class MultiFileDownloader : public QObject
{
Q_OBJECT
- Q_PROPERTY(FileDownloader *downloader WRITE setDownloader)
+ Q_PROPERTY(FileDownloader *downloader READ downloader WRITE setDownloader)
Q_PROPERTY(bool finished READ finished NOTIFY finishedChanged)
Q_PROPERTY(int progress READ progress NOTIFY progressChanged)
Q_PROPERTY(QUrl baseUrl READ baseUrl WRITE setBaseUrl NOTIFY baseUrlChanged)
@@ -34,6 +34,7 @@ public:
void setTargetDirPath(const QString &path);
QString targetDirPath() const;
void setDownloader(FileDownloader *downloader);
+ FileDownloader *downloader();
bool finished() const;
int progress() const;
diff --git a/src/plugins/qmlpreview/qmlpreviewruncontrol.cpp b/src/plugins/qmlpreview/qmlpreviewruncontrol.cpp
index 3aa935db74..6b886389e6 100644
--- a/src/plugins/qmlpreview/qmlpreviewruncontrol.cpp
+++ b/src/plugins/qmlpreview/qmlpreviewruncontrol.cpp
@@ -88,11 +88,14 @@ QmlPreviewRunner::QmlPreviewRunner(RunControl *runControl, const QmlPreviewRunne
if (!runControl->isRunning())
return;
- this->connect(runControl, &RunControl::stopped, [this, runControl] {
- auto rc = new RunControl(ProjectExplorer::Constants::QML_PREVIEW_RUN_MODE);
- rc->copyDataFromRunControl(runControl);
- ProjectExplorerPlugin::startRunControl(rc);
- });
+ this->connect(runControl,
+ &RunControl::stopped,
+ ProjectExplorerPlugin::instance(),
+ [runControl] {
+ auto rc = new RunControl(ProjectExplorer::Constants::QML_PREVIEW_RUN_MODE);
+ rc->copyDataFromRunControl(runControl);
+ ProjectExplorerPlugin::startRunControl(rc);
+ });
runControl->initiateStop();
});
@@ -124,7 +127,7 @@ QUrl QmlPreviewRunner::serverUrl() const
QmlPreviewRunWorkerFactory::QmlPreviewRunWorkerFactory(QmlPreviewPlugin *plugin,
const QmlPreviewRunnerSetting *runnerSettings)
{
- setProducer([this, plugin, runnerSettings](RunControl *runControl) {
+ setProducer([plugin, runnerSettings](RunControl *runControl) {
auto runner = new QmlPreviewRunner(runControl, *runnerSettings);
QObject::connect(plugin, &QmlPreviewPlugin::updatePreviews,
runner, &QmlPreviewRunner::loadFile);
diff --git a/src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp b/src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp
index cc13e51273..1be0624490 100644
--- a/src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp
+++ b/src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp
@@ -40,7 +40,7 @@ public:
connect(target, &Target::kitChanged, [aspect] { aspect->setRemoteEnvironment({}); });
- connect(fetchButton, &QPushButton::clicked, this, [this, aspect, target] {
+ connect(fetchButton, &QPushButton::clicked, this, [aspect, target] {
if (IDevice::ConstPtr device = DeviceKitAspect::device(target->kit())) {
DeviceFileAccess *access = device->fileAccess();
QTC_ASSERT(access, return);
diff --git a/src/plugins/squish/squishnavigationwidget.cpp b/src/plugins/squish/squishnavigationwidget.cpp
index ce96501398..829b2312cc 100644
--- a/src/plugins/squish/squishnavigationwidget.cpp
+++ b/src/plugins/squish/squishnavigationwidget.cpp
@@ -185,7 +185,7 @@ void SquishNavigationWidget::contextMenuEvent(QContextMenuEvent *event)
QAction *closeAllSuites = new QAction(Tr::tr("Close All Test Suites"), &menu);
menu.addAction(closeAllSuites);
- connect(closeAllSuites, &QAction::triggered, this, [this] {
+ connect(closeAllSuites, &QAction::triggered, this, [] {
if (SquishMessages::simpleQuestion(Tr::tr("Close All Test Suites"),
Tr::tr("Close all test suites?"
/*"\nThis will close all related files as well."*/))
diff --git a/tests/auto/qml/qmldesigner/wizard/userpresets-test.cpp b/tests/auto/qml/qmldesigner/wizard/userpresets-test.cpp
index 7dffbef416..0605791315 100644
--- a/tests/auto/qml/qmldesigner/wizard/userpresets-test.cpp
+++ b/tests/auto/qml/qmldesigner/wizard/userpresets-test.cpp
@@ -44,8 +44,6 @@ void PrintTo(const std::vector<UserPresetData> &presets, std::ostream *os)
using namespace StudioWelcome;
-constexpr char ARRAY_NAME[] = "UserPresets";
-
class FakeStoreIo : public StoreIo
{
public:
diff --git a/tests/unit/unittest/sqlitedatabasemock.h b/tests/unit/unittest/sqlitedatabasemock.h
index 62a1d6585b..658a0ec88b 100644
--- a/tests/unit/unittest/sqlitedatabasemock.h
+++ b/tests/unit/unittest/sqlitedatabasemock.h
@@ -28,7 +28,7 @@ public:
MOCK_METHOD(void, prepare, (Utils::SmallStringView sqlStatement), ());
- MOCK_METHOD(void, execute, (Utils::SmallStringView sqlStatement), ());
+ MOCK_METHOD(void, execute, (Utils::SmallStringView sqlStatement), (override));
MOCK_METHOD(int64_t, lastInsertedRowId, (), (const));
diff --git a/tests/unit/unittest/sqlitereadwritestatementmock.h b/tests/unit/unittest/sqlitereadwritestatementmock.h
index 3dab28d994..aaf5953074 100644
--- a/tests/unit/unittest/sqlitereadwritestatementmock.h
+++ b/tests/unit/unittest/sqlitereadwritestatementmock.h
@@ -43,7 +43,7 @@ public:
());
template<typename ResultType, typename... QueryTypes>
- auto optionalValue(const QueryTypes &...queryValues)
+ auto optionalValue([[maybe_unused]] const QueryTypes &...queryValues)
{
static_assert(!std::is_same_v<ResultType, ResultType>,
"SqliteReadStatementMock::value does not handle result type!");