diff options
author | hjk <hjk@qt.io> | 2019-05-28 13:49:26 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-05-28 12:23:26 +0000 |
commit | 473a741c9fcf09febba312464fab8385e2351181 (patch) | |
tree | 2d328a090993cb5c5fd34b43e9468bcbf7e4d4d0 /src/plugins/cmakeprojectmanager/cmakeparser.cpp | |
parent | 4704f49fbb1201ebf10ab9dbaed0275ff25faba8 (diff) | |
download | qt-creator-473a741c9fcf09febba312464fab8385e2351181.tar.gz |
Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.
Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/cmakeprojectmanager/cmakeparser.cpp')
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakeparser.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeparser.cpp b/src/plugins/cmakeprojectmanager/cmakeparser.cpp index ac3a55dfe4..be67db464f 100644 --- a/src/plugins/cmakeprojectmanager/cmakeparser.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeparser.cpp @@ -67,12 +67,12 @@ void CMakeParser::stdError(const QString &line) m_skippedFirstEmptyLine = false; if (m_commonError.indexIn(trimmedLine) != -1) { - m_lastTask = Task(Task::Error, QString(), Utils::FileName::fromUserInput(m_commonError.cap(1)), + m_lastTask = Task(Task::Error, QString(), Utils::FilePath::fromUserInput(m_commonError.cap(1)), m_commonError.cap(2).toInt(), Constants::TASK_CATEGORY_BUILDSYSTEM); m_lines = 1; return; } else if (m_nextSubError.indexIn(trimmedLine) != -1) { - m_lastTask = Task(Task::Error, QString(), Utils::FileName::fromUserInput(m_nextSubError.cap(1)), -1, + m_lastTask = Task(Task::Error, QString(), Utils::FilePath::fromUserInput(m_nextSubError.cap(1)), -1, Constants::TASK_CATEGORY_BUILDSYSTEM); m_lines = 1; return; @@ -86,11 +86,11 @@ void CMakeParser::stdError(const QString &line) m_expectTripleLineErrorData = LINE_LOCATION; doFlush(); m_lastTask = Task(trimmedLine.contains(QLatin1String("Error")) ? Task::Error : Task::Warning, - QString(), Utils::FileName(), -1, Constants::TASK_CATEGORY_BUILDSYSTEM); + QString(), Utils::FilePath(), -1, Constants::TASK_CATEGORY_BUILDSYSTEM); return; } else if (trimmedLine.startsWith("CMake Error: ")) { m_lastTask = Task(Task::Error, trimmedLine.mid(13), - Utils::FileName(), -1, Constants::TASK_CATEGORY_BUILDSYSTEM); + Utils::FilePath(), -1, Constants::TASK_CATEGORY_BUILDSYSTEM); m_lines = 1; return; } @@ -100,7 +100,7 @@ void CMakeParser::stdError(const QString &line) { QRegularExpressionMatch m = m_locationLine.match(trimmedLine); QTC_CHECK(m.hasMatch()); - m_lastTask.file = Utils::FileName::fromUserInput(trimmedLine.mid(0, m.capturedStart())); + m_lastTask.file = Utils::FilePath::fromUserInput(trimmedLine.mid(0, m.capturedStart())); m_lastTask.line = m.captured(1).toInt(); m_expectTripleLineErrorData = LINE_DESCRIPTION; } @@ -180,11 +180,11 @@ void Internal::CMakeProjectPlugin::testCMakeParser_data() << (Tasks() << Task(Task::Error, QLatin1String("Cannot find source file: unknownFile.qml Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx"), - Utils::FileName::fromUserInput(QLatin1String("src/1/app/CMakeLists.txt")), 70, + Utils::FilePath::fromUserInput(QLatin1String("src/1/app/CMakeLists.txt")), 70, categoryBuild) << Task(Task::Error, QLatin1String("Cannot find source file: CMakeLists.txt2 Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx"), - Utils::FileName::fromUserInput(QLatin1String("src/1/app/CMakeLists.txt")), -1, + Utils::FilePath::fromUserInput(QLatin1String("src/1/app/CMakeLists.txt")), -1, categoryBuild)) << QString(); @@ -196,7 +196,7 @@ void Internal::CMakeProjectPlugin::testCMakeParser_data() << (Tasks() << Task(Task::Error, QLatin1String("add_subdirectory given source \"app1\" which is not an existing directory."), - Utils::FileName::fromUserInput(QLatin1String("src/1/CMakeLists.txt")), 8, + Utils::FilePath::fromUserInput(QLatin1String("src/1/CMakeLists.txt")), 8, categoryBuild)) << QString(); @@ -208,7 +208,7 @@ void Internal::CMakeProjectPlugin::testCMakeParser_data() << (Tasks() << Task(Task::Error, QLatin1String("Unknown CMake command \"i_am_wrong_command\"."), - Utils::FileName::fromUserInput(QLatin1String("src/1/CMakeLists.txt")), 8, + Utils::FilePath::fromUserInput(QLatin1String("src/1/CMakeLists.txt")), 8, categoryBuild)) << QString(); @@ -220,7 +220,7 @@ void Internal::CMakeProjectPlugin::testCMakeParser_data() << (Tasks() << Task(Task::Error, QLatin1String("message called with incorrect number of arguments"), - Utils::FileName::fromUserInput(QLatin1String("src/1/CMakeLists.txt")), 8, + Utils::FilePath::fromUserInput(QLatin1String("src/1/CMakeLists.txt")), 8, categoryBuild)) << QString(); @@ -234,7 +234,7 @@ void Internal::CMakeProjectPlugin::testCMakeParser_data() << (Tasks() << Task(Task::Error, QLatin1String("Parse error. Expected \"(\", got newline with text \"\n\"."), - Utils::FileName::fromUserInput(QLatin1String("/test/path/CMakeLists.txt")), 9, + Utils::FilePath::fromUserInput(QLatin1String("/test/path/CMakeLists.txt")), 9, categoryBuild)) << QString(); @@ -247,7 +247,7 @@ void Internal::CMakeProjectPlugin::testCMakeParser_data() << (Tasks() << Task(Task::Error, QLatin1String("Error required internal CMake variable not set, cmake may be not be built correctly."), - Utils::FileName(), -1, categoryBuild)) + Utils::FilePath(), -1, categoryBuild)) << QString(); QTest::newRow("cmake error at") @@ -260,7 +260,7 @@ void Internal::CMakeProjectPlugin::testCMakeParser_data() << (Tasks() << Task(Task::Error, QLatin1String("Parse error. Expected \"(\", got newline with text \" \"."), - Utils::FileName::fromUserInput(QLatin1String("CMakeLists.txt")), 4, + Utils::FilePath::fromUserInput(QLatin1String("CMakeLists.txt")), 4, categoryBuild)) << QString(); @@ -273,7 +273,7 @@ void Internal::CMakeProjectPlugin::testCMakeParser_data() << (Tasks() << Task(Task::Warning, QLatin1String("Argument not separated from preceding token by whitespace."), - Utils::FileName::fromUserInput(QLatin1String("/test/path/CMakeLists.txt")), 9, + Utils::FilePath::fromUserInput(QLatin1String("/test/path/CMakeLists.txt")), 9, categoryBuild)) << QString(); } |