diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2021-02-15 00:49:15 +0100 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2021-02-24 08:27:10 +0000 |
commit | b2b6c64e6ae0fbaa6de8a6756c80a1287c762e84 (patch) | |
tree | 8f977adf3cba07726ac04775a730a732944d02c4 | |
parent | 925c4a3198f3b903575af6c9aabf280c1087c9ff (diff) |
Don't detach temporary containers
Change-Id: I736cfc61c81995a81b056b3e3e5703ded5912525
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
-rw-r--r-- | src/plugins/clangtools/clangtoolsunittests.cpp | 2 | ||||
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp | 2 | ||||
-rw-r--r-- | src/plugins/projectexplorer/outputparser_test.cpp | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/clangtools/clangtoolsunittests.cpp b/src/plugins/clangtools/clangtoolsunittests.cpp index 512e6e7135..9d416f07cc 100644 --- a/src/plugins/clangtools/clangtoolsunittests.cpp +++ b/src/plugins/clangtools/clangtoolsunittests.cpp @@ -128,7 +128,7 @@ void ClangToolsUnitTests::testProject() QVERIFY(waitForFinishedTool.wait(m_timeout)); // Check for errors - const QString errorText = waitForFinishedTool.takeFirst().first().toString(); + const QString errorText = waitForFinishedTool.takeFirst().constFirst().toString(); const bool finishedSuccessfully = errorText.isEmpty(); if (!finishedSuccessfully) qWarning("Error: %s", qPrintable(errorText)); diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp index 03f5ecb51b..4e31bad6b3 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp @@ -245,7 +245,7 @@ static FilePath qmakeFromCMakeCache(const CMakeConfig &config) if (!qmakeLocationTxt.open(QIODevice::ReadOnly)) { return FilePath(); } - FilePath qmakeLocation = FilePath::fromUtf8(qmakeLocationTxt.readLine().data()); + FilePath qmakeLocation = FilePath::fromUtf8(qmakeLocationTxt.readLine().constData()); qCDebug(cmInputLog) << "qmake location: " << qmakeLocation.toUserOutput(); return qmakeLocation; diff --git a/src/plugins/projectexplorer/outputparser_test.cpp b/src/plugins/projectexplorer/outputparser_test.cpp index d1d25a3c67..a70a33a8d8 100644 --- a/src/plugins/projectexplorer/outputparser_test.cpp +++ b/src/plugins/projectexplorer/outputparser_test.cpp @@ -62,7 +62,7 @@ void OutputParserTester::testParsing(const QString &lines, { const auto terminator = new TestTerminator(this); if (!lineParsers().isEmpty()) - terminator->setRedirectionDetector(lineParsers().last()); + terminator->setRedirectionDetector(lineParsers().constLast()); addLineParser(terminator); reset(); @@ -113,7 +113,7 @@ TestTerminator::TestTerminator(OutputParserTester *t) : m_tester(t) { if (!t->lineParsers().isEmpty()) { - for (const Utils::FilePath &searchDir : t->lineParsers().first()->searchDirectories()) + for (const Utils::FilePath &searchDir : t->lineParsers().constFirst()->searchDirectories()) addSearchDir(searchDir); } } |