forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user