summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@nokia.com>2012-01-26 13:38:25 +0100
committerTobias Hunger <tobias.hunger@nokia.com>2012-01-30 11:34:43 +0100
commit97496df1bf889c69f686edf707ba71a226064067 (patch)
tree216d2101026dd9f8ca6b19d87a41a14d86490d5e
parent2f021edfddc0483202d1bb434cb30accb8059899 (diff)
downloadqt-creator-97496df1bf889c69f686edf707ba71a226064067.tar.gz
Task: Update Task to use Utils::FileName and Core::Id
Use Utils::FileName and Core::Id in Task structure. Change-Id: Ia0ed459f86df36ffe547abde7c240b0ac409bcf5 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
-rw-r--r--src/plugins/analyzerbase/analyzerplugin.cpp2
-rw-r--r--src/plugins/analyzerbase/analyzerruncontrol.cpp5
-rw-r--r--src/plugins/coreplugin/id.cpp2
-rw-r--r--src/plugins/debugger/debuggerengine.cpp4
-rw-r--r--src/plugins/madde/maemopackagecreationstep.cpp2
-rw-r--r--src/plugins/projectexplorer/abstractprocessstep.cpp6
-rw-r--r--src/plugins/projectexplorer/buildmanager.cpp16
-rw-r--r--src/plugins/projectexplorer/buildprogress.cpp4
-rw-r--r--src/plugins/projectexplorer/clangparser.cpp30
-rw-r--r--src/plugins/projectexplorer/clangparser.h2
-rw-r--r--src/plugins/projectexplorer/copytaskhandler.cpp2
-rw-r--r--src/plugins/projectexplorer/gccparser.cpp154
-rw-r--r--src/plugins/projectexplorer/gnumakeparser.cpp69
-rw-r--r--src/plugins/projectexplorer/ldparser.cpp14
-rw-r--r--src/plugins/projectexplorer/linuxiccparser.cpp18
-rw-r--r--src/plugins/projectexplorer/msvcparser.cpp62
-rw-r--r--src/plugins/projectexplorer/showineditortaskhandler.cpp4
-rw-r--r--src/plugins/projectexplorer/task.cpp9
-rw-r--r--src/plugins/projectexplorer/task.h10
-rw-r--r--src/plugins/projectexplorer/taskhub.cpp6
-rw-r--r--src/plugins/projectexplorer/taskhub.h12
-rw-r--r--src/plugins/projectexplorer/taskmodel.cpp58
-rw-r--r--src/plugins/projectexplorer/taskmodel.h24
-rw-r--r--src/plugins/projectexplorer/taskwindow.cpp51
-rw-r--r--src/plugins/projectexplorer/taskwindow.h13
-rw-r--r--src/plugins/projectexplorer/vcsannotatetaskhandler.cpp4
-rw-r--r--src/plugins/qmljseditor/qmltaskmanager.cpp17
-rw-r--r--src/plugins/qt4projectmanager/makestep.cpp8
-rw-r--r--src/plugins/qt4projectmanager/qmakeparser.cpp22
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/abldparser.cpp40
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp4
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/rvctparser.cpp18
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60createpackageparser.cpp12
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp4
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp8
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/sbsv2parser.cpp31
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/symbianqtversion.cpp2
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/winscwparser.cpp8
-rw-r--r--src/plugins/qtsupport/baseqtversion.cpp16
-rw-r--r--src/plugins/qtsupport/qtparser.cpp12
-rw-r--r--src/plugins/remotelinux/abstractpackagingstep.cpp4
-rw-r--r--src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp8
-rw-r--r--src/plugins/tasklist/stopmonitoringhandler.cpp2
-rw-r--r--src/plugins/tasklist/tasklistplugin.cpp8
44 files changed, 410 insertions, 397 deletions
diff --git a/src/plugins/analyzerbase/analyzerplugin.cpp b/src/plugins/analyzerbase/analyzerplugin.cpp
index 65c2297169..0e0d28f25d 100644
--- a/src/plugins/analyzerbase/analyzerplugin.cpp
+++ b/src/plugins/analyzerbase/analyzerplugin.cpp
@@ -86,7 +86,7 @@ bool AnalyzerPlugin::initialize(const QStringList &arguments, QString *errorStri
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
ProjectExplorer::TaskHub *hub = pm->getObject<ProjectExplorer::TaskHub>();
//: Category under which Analyzer tasks are listed in Issues view
- hub->addCategory(QLatin1String(Constants::ANALYZERTASK_ID), tr("Analyzer"));
+ hub->addCategory(Core::Id(Constants::ANALYZERTASK_ID), tr("Analyzer"));
return true;
}
diff --git a/src/plugins/analyzerbase/analyzerruncontrol.cpp b/src/plugins/analyzerbase/analyzerruncontrol.cpp
index 22afb0d08d..9e5309b78b 100644
--- a/src/plugins/analyzerbase/analyzerruncontrol.cpp
+++ b/src/plugins/analyzerbase/analyzerruncontrol.cpp
@@ -118,7 +118,7 @@ void AnalyzerRunControl::start()
// clear about-to-be-outdated tasks
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
TaskHub *hub = pm->getObject<TaskHub>();
- hub->clearTasks(QLatin1String(Constants::ANALYZERTASK_ID));
+ hub->clearTasks(Core::Id(Constants::ANALYZERTASK_ID));
if (d->m_engine->start()) {
d->m_isRunning = true;
@@ -179,7 +179,8 @@ void AnalyzerRunControl::addTask(Task::TaskType type, const QString &description
{
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
TaskHub *hub = pm->getObject<TaskHub>();
- hub->addTask(Task(type, description, file, line, QLatin1String(Constants::ANALYZERTASK_ID)));
+ hub->addTask(Task(type, description, Utils::FileName::fromUserInput(file), line,
+ Core::Id(Constants::ANALYZERTASK_ID)));
hub->popup(false);
}
diff --git a/src/plugins/coreplugin/id.cpp b/src/plugins/coreplugin/id.cpp
index 2186f8a9af..6abcc5642a 100644
--- a/src/plugins/coreplugin/id.cpp
+++ b/src/plugins/coreplugin/id.cpp
@@ -55,7 +55,7 @@ static QHash<QByteArray, int> idFromString;
static int theId(const QByteArray &ba)
{
- QTC_ASSERT(!ba.isEmpty(), /**/);
+ QTC_CHECK(!ba.isEmpty());
int res = idFromString.value(ba);
if (res == 0) {
if (lastUid == 0)
diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp
index d25e0286f6..ac7f75b2f0 100644
--- a/src/plugins/debugger/debuggerengine.cpp
+++ b/src/plugins/debugger/debuggerengine.cpp
@@ -1787,10 +1787,10 @@ void DebuggerEnginePrivate::reportTestError(const QString &msg, int line)
if (!m_taskHub) {
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
m_taskHub = pm->getObject<TaskHub>();
- m_taskHub->addCategory(QLatin1String("DebuggerTest"), tr("Debugger Test"));
+ m_taskHub->addCategory(Core::Id("DebuggerTest"), tr("Debugger Test"));
}
- Task task(Task::Error, msg, m_testFileName, line + 1, QLatin1String("DebuggerTest"));
+ Task task(Task::Error, msg, Utils::FileName::fromUserInput(m_testFileName), line + 1, Core::Id("DebuggerTest"));
m_taskHub->addTask(task);
}
diff --git a/src/plugins/madde/maemopackagecreationstep.cpp b/src/plugins/madde/maemopackagecreationstep.cpp
index 1be613e5a7..6866dcea69 100644
--- a/src/plugins/madde/maemopackagecreationstep.cpp
+++ b/src/plugins/madde/maemopackagecreationstep.cpp
@@ -367,7 +367,7 @@ void MaemoDebianPackageCreationStep::checkProjectName()
"Debian packages.\nThey must only use lower-case letters, "
"numbers, '-', '+' and '.'.\n""We will try to work around that, "
"but you may experience problems."),
- QString(), -1, TASK_CATEGORY_BUILDSYSTEM));
+ Utils::FileName(), -1, Core::Id(TASK_CATEGORY_BUILDSYSTEM)));
}
}
diff --git a/src/plugins/projectexplorer/abstractprocessstep.cpp b/src/plugins/projectexplorer/abstractprocessstep.cpp
index 2a4f8321bd..7b05a5dfd7 100644
--- a/src/plugins/projectexplorer/abstractprocessstep.cpp
+++ b/src/plugins/projectexplorer/abstractprocessstep.cpp
@@ -371,7 +371,7 @@ void AbstractProcessStep::taskAdded(const ProjectExplorer::Task &task)
return;
Task editable(task);
- QString filePath = QDir::cleanPath(task.file.trimmed());
+ QString filePath = task.file.toString();
if (!filePath.isEmpty() && !QDir::isAbsolutePath(filePath)) {
// We have no save way to decide which file in which subfolder
// is meant. Therefore we apply following heuristics:
@@ -388,7 +388,7 @@ void AbstractProcessStep::taskAdded(const ProjectExplorer::Task &task)
}
if (possibleFiles.count() == 1) {
- editable.file = possibleFiles.first().filePath();
+ editable.file = Utils::FileName(possibleFiles.first());
} else {
// More then one filename, so do a better compare
// Chop of any "../"
@@ -403,7 +403,7 @@ void AbstractProcessStep::taskAdded(const ProjectExplorer::Task &task)
}
}
if (count == 1)
- editable.file = possibleFilePath;
+ editable.file = Utils::FileName::fromString(possibleFilePath);
else
qWarning() << "Could not find absolute location of file " << filePath;
}
diff --git a/src/plugins/projectexplorer/buildmanager.cpp b/src/plugins/projectexplorer/buildmanager.cpp
index bb4e6870f6..3a1d747ed9 100644
--- a/src/plugins/projectexplorer/buildmanager.cpp
+++ b/src/plugins/projectexplorer/buildmanager.cpp
@@ -159,9 +159,9 @@ BuildManager::BuildManager(ProjectExplorerPlugin *parent)
void BuildManager::extensionsInitialized()
{
- d->m_taskHub->addCategory(QLatin1String(Constants::TASK_CATEGORY_COMPILE),
+ d->m_taskHub->addCategory(Core::Id(Constants::TASK_CATEGORY_COMPILE),
tr("Compile", "Category for compiler issues listed under 'Issues'"));
- d->m_taskHub->addCategory(QLatin1String(Constants::TASK_CATEGORY_BUILDSYSTEM),
+ d->m_taskHub->addCategory(Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM),
tr("Build System", "Category for build system issues listed under 'Issues'"));
}
@@ -200,8 +200,8 @@ bool BuildManager::isBuilding() const
int BuildManager::getErrorTaskCount() const
{
const int errors =
- d->m_taskWindow->errorTaskCount(QLatin1String(Constants::TASK_CATEGORY_BUILDSYSTEM))
- + d->m_taskWindow->errorTaskCount(QLatin1String(Constants::TASK_CATEGORY_COMPILE));
+ d->m_taskWindow->errorTaskCount(Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM))
+ + d->m_taskWindow->errorTaskCount(Core::Id(Constants::TASK_CATEGORY_COMPILE));
return errors;
}
@@ -305,8 +305,8 @@ void BuildManager::toggleTaskWindow()
bool BuildManager::tasksAvailable() const
{
const int count =
- d->m_taskWindow->taskCount(QLatin1String(Constants::TASK_CATEGORY_BUILDSYSTEM))
- + d->m_taskWindow->taskCount(QLatin1String(Constants::TASK_CATEGORY_COMPILE));
+ d->m_taskWindow->taskCount(Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM))
+ + d->m_taskWindow->taskCount(Core::Id(Constants::TASK_CATEGORY_COMPILE));
return count > 0;
}
@@ -322,8 +322,8 @@ void BuildManager::startBuildQueue()
d->m_progressFutureInterface = new QFutureInterface<void>;
d->m_progressWatcher.setFuture(d->m_progressFutureInterface->future());
d->m_outputWindow->clearContents();
- d->m_taskHub->clearTasks(QLatin1String(Constants::TASK_CATEGORY_COMPILE));
- d->m_taskHub->clearTasks(QLatin1String(Constants::TASK_CATEGORY_BUILDSYSTEM));
+ d->m_taskHub->clearTasks(Core::Id(Constants::TASK_CATEGORY_COMPILE));
+ d->m_taskHub->clearTasks(Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
progressManager->setApplicationLabel(QString());
d->m_futureProgress = QWeakPointer<Core::FutureProgress>(progressManager->addTask(d->m_progressFutureInterface->future(),
QString(),
diff --git a/src/plugins/projectexplorer/buildprogress.cpp b/src/plugins/projectexplorer/buildprogress.cpp
index f8c37879df..91a02a7e25 100644
--- a/src/plugins/projectexplorer/buildprogress.cpp
+++ b/src/plugins/projectexplorer/buildprogress.cpp
@@ -89,8 +89,8 @@ void BuildProgress::updateState()
{
if (!m_taskWindow)
return;
- int errors = m_taskWindow->errorTaskCount(QLatin1String(Constants::TASK_CATEGORY_BUILDSYSTEM))
- + m_taskWindow->errorTaskCount(QLatin1String(Constants::TASK_CATEGORY_COMPILE));
+ int errors = m_taskWindow->errorTaskCount(Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM))
+ + m_taskWindow->errorTaskCount(Core::Id(Constants::TASK_CATEGORY_COMPILE));
bool haveErrors = (errors > 0);
m_errorIcon->setEnabled(haveErrors);
m_errorLabel->setEnabled(haveErrors);
diff --git a/src/plugins/projectexplorer/clangparser.cpp b/src/plugins/projectexplorer/clangparser.cpp
index 6e55948eab..a0419c5a51 100644
--- a/src/plugins/projectexplorer/clangparser.cpp
+++ b/src/plugins/projectexplorer/clangparser.cpp
@@ -72,9 +72,9 @@ void ClangParser::stdError(const QString &line)
m_expectSnippet = true;
newTask(Task::Error,
m_commandRegExp.cap(4),
- QString(), /* filename */
+ Utils::FileName(), /* filename */
-1, /* line */
- QLatin1String(Constants::TASK_CATEGORY_COMPILE));
+ Core::Id(Constants::TASK_CATEGORY_COMPILE));
if (m_commandRegExp.cap(3) == QLatin1String("warning"))
m_currentTask.type = Task::Warning;
else if (m_commandRegExp.cap(3) == QLatin1String("note"))
@@ -86,9 +86,9 @@ void ClangParser::stdError(const QString &line)
m_expectSnippet = true;
newTask(Task::Unknown,
lne.trimmed(),
- m_inLineRegExp.cap(2), /* filename */
+ Utils::FileName::fromUserInput(m_inLineRegExp.cap(2)), /* filename */
m_inLineRegExp.cap(3).toInt(), /* line */
- QLatin1String(Constants::TASK_CATEGORY_COMPILE));
+ Core::Id(Constants::TASK_CATEGORY_COMPILE));
return;
}
@@ -100,9 +100,9 @@ void ClangParser::stdError(const QString &line)
lineNo = m_messageRegExp.cap(5).toInt(&ok);
newTask(Task::Error,
m_messageRegExp.cap(8),
- m_messageRegExp.cap(1), /* filename */
+ Utils::FileName::fromUserInput(m_messageRegExp.cap(1)), /* filename */
lineNo,
- QLatin1String(Constants::TASK_CATEGORY_COMPILE));
+ Core::Id(Constants::TASK_CATEGORY_COMPILE));
if (m_messageRegExp.cap(7) == QLatin1String("warning"))
m_currentTask.type = Task::Warning;
else if (m_messageRegExp.cap(7) == QLatin1String("note"))
@@ -126,7 +126,7 @@ void ClangParser::stdError(const QString &line)
}
void ClangParser::newTask(Task::TaskType type_, const QString &description_,
- const QString &file_, int line_, const QString &category_)
+ const Utils::FileName &file_, int line_, const Core::Id &category_)
{
emitTask();
m_currentTask = Task(type_, description_, file_, line_, category_);
@@ -157,7 +157,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
QTest::addColumn<QList<ProjectExplorer::Task> >("tasks");
QTest::addColumn<QString>("outputLines");
- const QString categoryCompile = QLatin1String(Constants::TASK_CATEGORY_COMPILE);
+ const Core::Id categoryCompile = Core::Id(Constants::TASK_CATEGORY_COMPILE);
QTest::newRow("pass-through stdout")
<< QString::fromLatin1("Sometext") << OutputParserTester::STDOUT
@@ -177,7 +177,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("argument unused during compilation: '-mthreads'"),
- QString(), -1,
+ Utils::FileName(), -1,
categoryCompile))
<< QString();
QTest::newRow("clang++ error")
@@ -187,7 +187,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("no input files [err_drv_no_input_files]"),
- QString(), -1,
+ Utils::FileName(), -1,
categoryCompile))
<< QString();
QTest::newRow("complex warning")
@@ -200,13 +200,13 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("In file included from ..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qnamespace.h:45:"),
- QLatin1String("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qnamespace.h"), 45,
+ Utils::FileName::fromUserInput("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qnamespace.h"), 45,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("unknown attribute 'dllimport' ignored [-Wunknown-attributes]\n"
"class Q_CORE_EXPORT QSysInfo {\n"
" ^"),
- QLatin1String("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qglobal.h"), 1425,
+ Utils::FileName::fromUserInput("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qglobal.h"), 1425,
categoryCompile))
<< QString();
QTest::newRow("note")
@@ -220,7 +220,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
QLatin1String("instantiated from:\n"
"# define Q_CORE_EXPORT Q_DECL_IMPORT\n"
" ^"),
- QLatin1String("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qglobal.h"), 1289,
+ Utils::FileName::fromUserInput("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qglobal.h"), 1289,
categoryCompile))
<< QString();
QTest::newRow("fatal error")
@@ -234,7 +234,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
QLatin1String("'bits/c++config.h' file not found\n"
"#include <bits/c++config.h>\n"
" ^"),
- QLatin1String("/usr/include/c++/4.6/utility"), 68,
+ Utils::FileName::fromUserInput("/usr/include/c++/4.6/utility"), 68,
categoryCompile))
<< QString();
@@ -249,7 +249,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
QLatin1String("?: has lower precedence than +; + will be evaluated first [-Wparentheses]\n"
" int x = option->rect.x() + horizontal ? 2 : 6;\n"
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^"),
- QLatin1String("/home/code/src/creator/src/plugins/coreplugin/manhattanstyle.cpp"), 567,
+ Utils::FileName::fromUserInput("/home/code/src/creator/src/plugins/coreplugin/manhattanstyle.cpp"), 567,
categoryCompile))
<< QString();
}
diff --git a/src/plugins/projectexplorer/clangparser.h b/src/plugins/projectexplorer/clangparser.h
index c754e8b1c1..2e0051e689 100644
--- a/src/plugins/projectexplorer/clangparser.h
+++ b/src/plugins/projectexplorer/clangparser.h
@@ -51,7 +51,7 @@ public:
private:
void newTask(Task::TaskType type_, const QString &description_,
- const QString &file_, int line_, const QString &category_);
+ const Utils::FileName &file_, int line_, const Core::Id &category_);
void emitTask();
diff --git a/src/plugins/projectexplorer/copytaskhandler.cpp b/src/plugins/projectexplorer/copytaskhandler.cpp
index 9fce4026de..271e2d037a 100644
--- a/src/plugins/projectexplorer/copytaskhandler.cpp
+++ b/src/plugins/projectexplorer/copytaskhandler.cpp
@@ -63,7 +63,7 @@ void CopyTaskHandler::handle(const ProjectExplorer::Task &task)
break;
}
- QApplication::clipboard()->setText(QDir::toNativeSeparators(task.file) + QLatin1Char(':') +
+ QApplication::clipboard()->setText(task.file.toUserOutput() + QLatin1Char(':') +
QString::number(task.line) + QLatin1String(": ")
+ type + task.description);
}
diff --git a/src/plugins/projectexplorer/gccparser.cpp b/src/plugins/projectexplorer/gccparser.cpp
index b62bbe4df3..480f88031b 100644
--- a/src/plugins/projectexplorer/gccparser.cpp
+++ b/src/plugins/projectexplorer/gccparser.cpp
@@ -79,17 +79,17 @@ void GccParser::stdError(const QString &line)
lne == QLatin1String("* cpp failed")) {
emit addTask(Task(Task::Error,
lne /* description */,
- QString() /* filename */,
+ Utils::FileName() /* filename */,
-1 /* linenumber */,
- QLatin1String(Constants::TASK_CATEGORY_COMPILE)));
+ Core::Id(Constants::TASK_CATEGORY_COMPILE)));
return;
} else if (m_regExpGccNames.indexIn(lne) > -1) {
QString description = lne.mid(m_regExpGccNames.matchedLength());
Task task(Task::Error,
description,
- QString(), /* filename */
+ Utils::FileName(), /* filename */
-1, /* line */
- QLatin1String(Constants::TASK_CATEGORY_COMPILE));
+ Core::Id(Constants::TASK_CATEGORY_COMPILE));
if (description.startsWith(QLatin1String("warning: "))) {
task.type = Task::Warning;
task.description = description.mid(9);
@@ -99,12 +99,12 @@ void GccParser::stdError(const QString &line)
emit addTask(task);
return;
} else if (m_regExp.indexIn(lne) > -1) {
- QString filename = m_regExp.cap(1);
+ Utils::FileName filename = Utils::FileName::fromUserInput(m_regExp.cap(1));
int lineno = m_regExp.cap(3).toInt();
Task task(Task::Unknown,
m_regExp.cap(8) /* description */,
filename, lineno,
- QLatin1String(Constants::TASK_CATEGORY_COMPILE));
+ Core::Id(Constants::TASK_CATEGORY_COMPILE));
if (m_regExp.cap(7) == QLatin1String("warning"))
task.type = Task::Warning;
else if (m_regExp.cap(7) == QLatin1String("error") ||
@@ -121,9 +121,9 @@ void GccParser::stdError(const QString &line)
} else if (m_regExpIncluded.indexIn(lne) > -1) {
emit addTask(Task(Task::Unknown,
lne /* description */,
- m_regExpIncluded.cap(1) /* filename */,
+ Utils::FileName::fromUserInput(m_regExpIncluded.cap(1)) /* filename */,
m_regExpIncluded.cap(3).toInt() /* linenumber */,
- QLatin1String(Constants::TASK_CATEGORY_COMPILE)));
+ Core::Id(Constants::TASK_CATEGORY_COMPILE)));
return;
}
IOutputParser::stdError(line);
@@ -147,7 +147,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
QTest::addColumn<QList<ProjectExplorer::Task> >("tasks");
QTest::addColumn<QString>("outputLines");
- const QString categoryCompile = QLatin1String(Constants::TASK_CATEGORY_COMPILE);
+ const Core::Id categoryCompile = Core::Id(Constants::TASK_CATEGORY_COMPILE);
QTest::newRow("pass-through stdout")
<< QString::fromLatin1("Sometext") << OutputParserTester::STDOUT
@@ -169,15 +169,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("In function `int main(int, char**)':"),
- QLatin1String("/temp/test/untitled8/main.cpp"), -1,
+ Utils::FileName::fromUserInput("/temp/test/untitled8/main.cpp"), -1,
categoryCompile)
<< Task(Task::Error,
QLatin1String("`sfasdf' undeclared (first use this function)"),
- QLatin1String("/temp/test/untitled8/main.cpp"), 9,
+ Utils::FileName::fromUserInput("/temp/test/untitled8/main.cpp"), 9,
categoryCompile)
<< Task(Task::Error,
QLatin1String("(Each undeclared identifier is reported only once for each function it appears in.)"),
- QLatin1String("/temp/test/untitled8/main.cpp"), 9,
+ Utils::FileName::fromUserInput("/temp/test/untitled8/main.cpp"), 9,
categoryCompile)
)
<< QString();
@@ -188,7 +188,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("inline function `QDebug qDebug()' used but never defined"),
- QLatin1String("/src/corelib/global/qglobal.h"), 1635,
+ Utils::FileName::fromUserInput("/src/corelib/global/qglobal.h"), 1635,
categoryCompile))
<< QString();
QTest::newRow("warning")
@@ -197,7 +197,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< QString() << QString()
<< (QList<ProjectExplorer::Task>() << Task(Task::Warning,
QLatin1String("Some warning"),
- QLatin1String("main.cpp"), 7,
+ Utils::FileName::fromUserInput("main.cpp"), 7,
categoryCompile))
<< QString();
QTest::newRow("GCCE #error")
@@ -206,7 +206,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< QString() << QString()
<< (QList<ProjectExplorer::Task>() << Task(Task::Error,
QLatin1String("#error Symbian error"),
- QLatin1String("C:\\temp\\test\\untitled8\\main.cpp"), 7,
+ Utils::FileName::fromUserInput("C:\\temp\\test\\untitled8\\main.cpp"), 7,
categoryCompile))
<< QString();
// Symbian reports #warning(s) twice (using different syntax).
@@ -216,7 +216,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< QString() << QString()
<< (QList<ProjectExplorer::Task>() << Task(Task::Warning,
QLatin1String("#warning Symbian warning"),
- QLatin1String("C:\\temp\\test\\untitled8\\main.cpp"), 8,
+ Utils::FileName::fromUserInput("C:\\temp\\test\\untitled8\\main.cpp"), 8,
categoryCompile))
<< QString();
QTest::newRow("GCCE #warning2")
@@ -225,7 +225,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< QString() << QString()
<< (QList<ProjectExplorer::Task>() << Task(Task::Warning,
QLatin1String("#warning Symbian warning"),
- QLatin1String("/temp/test/untitled8/main.cpp"), 8,
+ Utils::FileName::fromUserInput("/temp/test/untitled8/main.cpp"), 8,
categoryCompile))
<< QString();
QTest::newRow("Undefined reference (debug)")
@@ -237,16 +237,16 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("In function `main':"),
- QLatin1String("main.o"), -1,
+ Utils::FileName::fromUserInput("main.o"), -1,
categoryCompile)
<< Task(Task::Error,
QLatin1String("undefined reference to `MainWindow::doSomething()'"),
- QLatin1String("C:\\temp\\test\\untitled8/main.cpp"), 8,
+ Utils::FileName::fromUserInput("C:\\temp\\test\\untitled8/main.cpp"), 8,
categoryCompile)
<< Task(Task::Error,
QLatin1String("collect2: ld returned 1 exit status"),
- QString(), -1,
- categoryCompile)
+ Utils::FileName(), -1,
+ categoryCompile)
)
<< QString();
QTest::newRow("Undefined reference (release)")
@@ -258,15 +258,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("In function `main':"),
- QLatin1String("main.o"), -1,
+ Utils::FileName::fromUserInput("main.o"), -1,
categoryCompile)
<< Task(Task::Error,
QLatin1String("undefined reference to `MainWindow::doSomething()'"),
- QLatin1String("C:\\temp\\test\\untitled8/main.cpp"), -1,
+ Utils::FileName::fromUserInput("C:\\temp\\test\\untitled8/main.cpp"), -1,
categoryCompile)
<< Task(Task::Error,
QLatin1String("collect2: ld returned 1 exit status"),
- QString(), -1,
+ Utils::FileName(), -1,
categoryCompile)
)
<< QString();
@@ -277,7 +277,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("file not recognized: File format not recognized"),
- QLatin1String("c:\\Qt\\4.6\\lib/QtGuid4.dll"), -1,
+ Utils::FileName::fromUserInput("c:\\Qt\\4.6\\lib/QtGuid4.dll"), -1,
categoryCompile))
<< QString();
QTest::newRow("Invalid rpath")
@@ -287,7 +287,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("/usr/local/lib: No such file or directory"),
- QString(), -1,
+ Utils::FileName(), -1,
categoryCompile))
<< QString();
@@ -300,15 +300,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("In member function 'void Debugger::Internal::GdbEngine::handleBreakInsert2(const Debugger::Internal::GdbResponse&)':"),
- QLatin1String("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp"), -1,
+ Utils::FileName::fromUserInput("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp"), -1,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("unused variable 'index'"),
- QLatin1String("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp"), 2114,
+ Utils::FileName::fromUserInput("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp"), 2114,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("unused variable 'handler'"),
- QLatin1String("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp"), 2115,
+ Utils::FileName::fromUserInput("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp"), 2115,
categoryCompile))
<< QString();
QTest::newRow("gnumakeparser.cpp errors")
@@ -320,15 +320,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("In member function 'void ProjectExplorer::ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data()':"),
- QLatin1String("/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp"), -1,
+ Utils::FileName::fromUserInput("/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp"), -1,
categoryCompile)
<< Task(Task::Error,
QLatin1String("expected primary-expression before ':' token"),
- QLatin1String("/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp"), 264,
+ Utils::FileName::fromUserInput("/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp"), 264,
categoryCompile)
<< Task(Task::Error,
QLatin1String("expected ';' before ':' token"),
- QLatin1String("/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp"), 264,
+ Utils::FileName::fromUserInput("/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp"), 264,
categoryCompile))
<< QString();
QTest::newRow("distcc error(QTCREATORBUG-904)")
@@ -346,7 +346,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("Core::IEditor* QVariant::value<Core::IEditor*>() const has different visibility (hidden) in .obj/debug-shared/openeditorsview.o and (default) in .obj/debug-shared/editormanager.o"),
- QString(), -1,
+ Utils::FileName(), -1,
categoryCompile))
<< QString();
QTest::newRow("ld fatal")
@@ -356,7 +356,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("Symbol referencing errors. No output written to testproject"),
- QString(), -1,
+ Utils::FileName(), -1,
categoryCompile))
<< QString();
QTest::newRow("Teambuilder issues")
@@ -372,7 +372,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("initialized from here"),
- QString::fromLatin1("/home/dev/creator/share/qtcreator/dumper/dumper.cpp"), 1079,
+ Utils::FileName::fromUserInput("/home/dev/creator/share/qtcreator/dumper/dumper.cpp"), 1079,
categoryCompile))
<< QString();
QTest::newRow("static member function")
@@ -383,11 +383,11 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("In static member function 'static std::_Rb_tree_node_base* std::_Rb_global<_Dummy>::_Rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*&, std::_Rb_tree_node_base*&, std::_Rb_tree_node_base*&)':"),
- QString::fromLatin1("/Qt/4.6.2-Symbian/s60sdk/epoc32/include/stdapis/stlport/stl/_tree.c"), -1,
+ Utils::FileName::fromUserInput("/Qt/4.6.2-Symbian/s60sdk/epoc32/include/stdapis/stlport/stl/_tree.c"), -1,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("suggest explicit braces to avoid ambiguous 'else'"),
- QString::fromLatin1("/Qt/4.6.2-Symbian/s60sdk/epoc32/include/stdapis/stlport/stl/_tree.c"), 194,
+ Utils::FileName::fromUserInput("/Qt/4.6.2-Symbian/s60sdk/epoc32/include/stdapis/stlport/stl/_tree.c"), 194,
categoryCompile))
<< QString();
QTest::newRow("rm false positive")
@@ -409,7 +409,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("cannot find -ldoesnotexist"),
- QString(), -1,
+ Utils::FileName(), -1,
categoryCompile))
<< QString();
QTest::newRow("In function")
@@ -421,15 +421,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("In function void foo(i) [with i = double]:"),
- QLatin1String("../../scriptbug/main.cpp"), -1,
+ Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), -1,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("instantiated from here"),
- QLatin1String("../../scriptbug/main.cpp"), 22,
+ Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), 22,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("unused variable c"),
- QLatin1String("../../scriptbug/main.cpp"), 8,
+ Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), 8,
categoryCompile))
<< QString();
QTest::newRow("instanciated from here")
@@ -439,7 +439,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("instantiated from here"),
- QLatin1String("main.cpp"), 10,
+ Utils::FileName::fromUserInput("main.cpp"), 10,
categoryCompile))
<< QString();
QTest::newRow("In constructor")
@@ -449,7 +449,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("In constructor 'Find::BaseTextFind::BaseTextFind(QTextEdit*)':"),
- QLatin1String("/dev/creator/src/plugins/find/basetextfind.h"), -1,
+ Utils::FileName::fromUserInput("/dev/creator/src/plugins/find/basetextfind.h"), -1,
categoryCompile))
<< QString();
@@ -464,23 +464,23 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("At global scope:"),
- QLatin1String("../../scriptbug/main.cpp"), -1,
+ Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), -1,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("In instantiation of void bar(i) [with i = double]:"),
- QLatin1String("../../scriptbug/main.cpp"), -1,
+ Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), -1,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("instantiated from void foo(i) [with i = double]"),
- QLatin1String("../../scriptbug/main.cpp"), 8,
+ Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), 8,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("instantiated from here"),
- QLatin1String("../../scriptbug/main.cpp"), 22,
+ Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), 22,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("unused parameter v"),
- QLatin1String("../../scriptbug/main.cpp"), 5,
+ Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), 5,
categoryCompile))
<< QString();
@@ -491,7 +491,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("test.moc: No such file or directory"),
- QLatin1String("/home/code/test.cpp"), 54,
+ Utils::FileName::fromUserInput("/home/code/test.cpp"), 54,
categoryCompile))
<< QString();
@@ -505,19 +505,19 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("In function `QPlotAxis':"),
- QLatin1String("debug/qplotaxis.o"), -1,
+ Utils::FileName::fromUserInput("debug/qplotaxis.o"), -1,
categoryCompile)
<< Task(Task::Error,
QLatin1String("undefined reference to `vtable for QPlotAxis'"),
- QLatin1String("M:\\Development\\x64\\QtPlot/qplotaxis.cpp"), 26,
+ Utils::FileName::fromUserInput("M:\\Development\\x64\\QtPlot/qplotaxis.cpp"), 26,
categoryCompile)
<< Task(Task::Error,
QLatin1String("undefined reference to `vtable for QPlotAxis'"),
- QLatin1String("M:\\Development\\x64\\QtPlot/qplotaxis.cpp"), 26,
+ Utils::FileName::fromUserInput("M:\\Development\\x64\\QtPlot/qplotaxis.cpp"), 26,
categoryCompile)
<< Task(Task::Error,
QLatin1String("collect2: ld returned 1 exit status"),
- QString(), -1,
+ Utils::FileName(), -1,
categoryCompile))
<< QString();
@@ -532,23 +532,23 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("In member function typename _Vector_base<_Tp, _Alloc>::_Tp_alloc_type::const_reference Vector<_Tp, _Alloc>::at(int) [with _Tp = Point, _Alloc = Allocator<Point>]:"),
- QLatin1String("../stl/main.cpp"), -1,
+ Utils::FileName::fromUserInput("../stl/main.cpp"), -1,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("instantiated from here"),
- QLatin1String("../stl/main.cpp"), 38,
+ Utils::FileName::fromUserInput("../stl/main.cpp"), 38,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("returning reference to temporary"),
- QLatin1String("../stl/main.cpp"), 31,
+ Utils::FileName::fromUserInput("../stl/main.cpp"), 31,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("At global scope:"),
- QLatin1String("../stl/main.cpp"), -1,
+ Utils::FileName::fromUserInput("../stl/main.cpp"), -1,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("unused parameter index"),
- QLatin1String("../stl/main.cpp"), 31,
+ Utils::FileName::fromUserInput("../stl/main.cpp"), 31,
categoryCompile))
<< QString();
@@ -562,19 +562,19 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("In file included from C:/Symbian_SDK/epoc32/include/e32cmn.h:6792,"),
- QLatin1String("C:/Symbian_SDK/epoc32/include/e32cmn.h"), 6792,
+ Utils::FileName::fromUserInput("C:/Symbian_SDK/epoc32/include/e32cmn.h"), 6792,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("from C:/Symbian_SDK/epoc32/include/e32std.h:25,"),
- QLatin1String("C:/Symbian_SDK/epoc32/include/e32std.h"), 25,
+ Utils::FileName::fromUserInput("C:/Symbian_SDK/epoc32/include/e32std.h"), 25,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("In member function 'SSecureId::operator const TSecureId&() const':"),
- QLatin1String("C:/Symbian_SDK/epoc32/include/e32cmn.inl"), -1,
+ Utils::FileName::fromUserInput("C:/Symbian_SDK/epoc32/include/e32cmn.inl"), -1,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("returning reference to temporary"),
- QLatin1String("C:/Symbian_SDK/epoc32/include/e32cmn.inl"), 7094,
+ Utils::FileName::fromUserInput("C:/Symbian_SDK/epoc32/include/e32cmn.inl"), 7094,
categoryCompile))
<< QString();
@@ -585,7 +585,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("At top level:"),
- QLatin1String("../../../src/XmlUg/targetdelete.c"), -1,
+ Utils::FileName::fromUserInput("../../../src/XmlUg/targetdelete.c"), -1,
categoryCompile))
<< QString();
@@ -598,15 +598,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("In file included from /Symbian/SDK/EPOC32/INCLUDE/GCCE/GCCE.h:15,"),
- QLatin1String("/Symbian/SDK/EPOC32/INCLUDE/GCCE/GCCE.h"), 15,
+ Utils::FileName::fromUserInput("/Symbian/SDK/EPOC32/INCLUDE/GCCE/GCCE.h"), 15,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("from <command line>:26:"),
- QLatin1String("<command line>"), 26,
+ Utils::FileName::fromUserInput("<command line>"), 26,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("no newline at end of file"),
- QLatin1String("/Symbian/SDK/epoc32/include/variant/Symbian_OS.hrh"), 1134,
+ Utils::FileName::fromUserInput("/Symbian/SDK/epoc32/include/variant/Symbian_OS.hrh"), 1134,
categoryCompile))
<< QString();
@@ -617,7 +617,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("undefined reference to `MainWindow::doSomething()'"),
- QLatin1String("main.cpp"), -1,
+ Utils::FileName::fromUserInput("main.cpp"), -1,
categoryCompile))
<< QString();
@@ -629,11 +629,11 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("In member function 'ProFileEvaluator::Private::VisitReturn ProFileEvaluator::Private::evaluateConditionalFunction(const ProString&, const ProStringList&)':"),
- QLatin1String("../../../src/shared/proparser/profileevaluator.cpp"), -1,
+ Utils::FileName::fromUserInput("../../../src/shared/proparser/profileevaluator.cpp"), -1,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("case value '0' not in enumerated type 'ProFileEvaluator::Private::TestFunc'"),
- QLatin1String("../../../src/shared/proparser/profileevaluator.cpp"), 2817,
+ Utils::FileName::fromUserInput("../../../src/shared/proparser/profileevaluator.cpp"), 2817,
categoryCompile))
<< QString();
@@ -645,11 +645,11 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("In file included from <command-line>:0:0:"),
- QLatin1String("<command-line>"), 0,
+ Utils::FileName::fromUserInput("<command-line>"), 0,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("\"STUPID_DEFINE\" redefined"),
- QLatin1String("./mw.h"), 4,
+ Utils::FileName::fromUserInput("./mw.h"), 4,
categoryCompile))
<< QString();
QTest::newRow("instanciation with line:column info")
@@ -661,15 +661,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("In function 'void UnitTest::CheckEqual(UnitTest::TestResults&, const Expected&, const Actual&, const UnitTest::TestDetails&) [with Expected = unsigned int, Actual = int]':"),
- QLatin1String("file.h"), -1,
+ Utils::FileName::fromUserInput("file.h"), -1,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("instantiated from here"),
- QLatin1String("file.cpp"), 87,
+ Utils::FileName::fromUserInput("file.cpp"), 87,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("comparison between signed and unsigned integer expressions [-Wsign-compare]"),
- QLatin1String("file.h"), 21,
+ Utils::FileName::fromUserInput("file.h"), 21,
categoryCompile))
<< QString();
QTest::newRow("linker error") // QTCREATORBUG-3107
@@ -679,7 +679,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("undefined reference to `CNS5kINSPacket::SOH_BYTE'"),
- QLatin1String("cns5k_ins_parser_tests.cpp"), -1,
+ Utils::FileName::fromUserInput("cns5k_ins_parser_tests.cpp"), -1,
categoryCompile))
<< QString();
@@ -690,7 +690,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("The name 'pushButton' (QPushButton) is already in use, defaulting to 'pushButton1'."),
- QLatin1String("mainwindow.ui"), -1,
+ Utils::FileName::fromUserInput("mainwindow.ui"), -1,
Constants::TASK_CATEGORY_COMPILE))
<< QString();
@@ -701,7 +701,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("warning: feupdateenv is not implemented and will always fail"),
- QLatin1String("libimf.so"), -1,
+ Utils::FileName::fromUserInput("libimf.so"), -1,
Constants::TASK_CATEGORY_COMPILE))
<< QString();
}
diff --git a/src/plugins/projectexplorer/gnumakeparser.cpp b/src/plugins/projectexplorer/gnumakeparser.cpp
index 0027fcf0e0..fab1822c4c 100644
--- a/src/plugins/projectexplorer/gnumakeparser.cpp
+++ b/src/plugins/projectexplorer/gnumakeparser.cpp
@@ -95,9 +95,9 @@ void GnuMakeParser::stdError(const QString &line)
m_suppressIssues = true;
addTask(Task(Task::Error,
m_makefileError.cap(3),
- m_makefileError.cap(1),
+ Utils::FileName::fromUserInput(m_makefileError.cap(1)),
m_makefileError.cap(2).toInt(),
- QLatin1String(Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
}
return;
}
@@ -108,9 +108,9 @@ void GnuMakeParser::stdError(const QString &line)
m_suppressIssues = true;
addTask(Task(Task::Error,
m_makeLine.cap(8),
- QString() /* filename */,
+ Utils::FileName() /* filename */,
-1, /* line */
- QLatin1String(Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
}
return;
}
@@ -139,7 +139,7 @@ void GnuMakeParser::taskAdded(const Task &task)
m_suppressIssues = true;
}
- QString filePath(QDir::cleanPath(task.file.trimmed()));
+ QString filePath(task.file.toString());
if (!filePath.isEmpty() && !QDir::isAbsolutePath(filePath)) {
QList<QFileInfo> possibleFiles;
@@ -151,7 +151,7 @@ void GnuMakeParser::taskAdded(const Task &task)
}
}
if (possibleFiles.size() == 1)
- editable.file = possibleFiles.first().filePath();
+ editable.file = Utils::FileName(possibleFiles.first());
// Let the Makestep apply additional heuristics (based on
// files in ther project) if we can not uniquely
// identify the file!
@@ -261,8 +261,8 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data()
<< (QList<Task>()
<< Task(Task::Error,
QString::fromLatin1("No rule to make target `hello.c', needed by `hello.o'. Stop."),
- QString(), -1,
- QLatin1String(Constants::TASK_CATEGORY_BUILDSYSTEM)))
+ Utils::FileName(), -1,
+ Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString()
<< QStringList();
QTest::newRow("multiple fatals")
@@ -275,8 +275,8 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data()
<< (QList<Task>()
<< Task(Task::Error,
QString::fromLatin1("[.obj/debug-shared/gnumakeparser.o] Error 1"),
- QString(), -1,
- QLatin1String(Constants::TASK_CATEGORY_BUILDSYSTEM)))
+ Utils::FileName(), -1,
+ Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString()
<< QStringList();
QTest::newRow("Makefile error")
@@ -287,8 +287,8 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data()
<< (QList<Task>()
<< Task(Task::Error,
QString::fromLatin1("missing separator (did you mean TAB instead of 8 spaces?). Stop."),
- QString::fromLatin1("Makefile"), 360,
- QLatin1String(Constants::TASK_CATEGORY_BUILDSYSTEM)))
+ Utils::FileName::fromUserInput("Makefile"), 360,
+ Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString()
<< QStringList();
QTest::newRow("mingw32-make error")
@@ -300,8 +300,8 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data()
<< (QList<Task>()
<< Task(Task::Error,
QString::fromLatin1("[debug/qplotaxis.o] Error 1"),
- QString(), -1,
- QLatin1String(Constants::TASK_CATEGORY_BUILDSYSTEM)))
+ Utils::FileName(), -1,
+ Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString()
<< QStringList();
QTest::newRow("mingw64-make error")
@@ -312,8 +312,8 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data()
<< (QList<Task>()
<< Task(Task::Error,
QString::fromLatin1("[dynlib.inst] Error -1073741819"),
- QString(), -1,
- QLatin1String(Constants::TASK_CATEGORY_BUILDSYSTEM)))
+ Utils::FileName(), -1,
+ Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString()
<< QStringList();
QTest::newRow("pass-trough note")
@@ -332,8 +332,8 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data()
<< (QList<Task>()
<< Task(Task::Error,
QString::fromLatin1("[sis] Error 2"),
- QString(), -1,
- QLatin1String(Constants::TASK_CATEGORY_BUILDSYSTEM)))
+ Utils::FileName(), -1,
+ Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString()
<< QStringList();
QTest::newRow("missing g++")
@@ -344,8 +344,8 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data()
<< (QList<Task>()
<< Task(Task::Error,
QString::fromLatin1("g++: Command not found"),
- QString(), -1,
- QLatin1String(Constants::TASK_CATEGORY_BUILDSYSTEM)))
+ Utils::FileName(), -1,
+ Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString()
<< QStringList();
}
@@ -407,40 +407,40 @@ void ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data()
<< QStringList()
<< Task(Task::Error,
QLatin1String("no filename, no mangling"),
- QString(),
+ Utils::FileName(),
-1,
- QLatin1String(Constants::TASK_CATEGORY_COMPILE))
+ Core::Id(Constants::TASK_CATEGORY_COMPILE))
<< Task(Task::Error,
QLatin1String("no filename, no mangling"),
- QString(),
+ Utils::FileName(),
-1,
- QLatin1String(Constants::TASK_CATEGORY_COMPILE));
+ Core::Id(Constants::TASK_CATEGORY_COMPILE));
QTest::newRow("no mangling")
<< QStringList()
<< QStringList()
<< Task(Task::Error,
QLatin1String("unknown filename, no mangling"),
- QString::fromLatin1("some/path/unknown.cpp"),
+ Utils::FileName::fromUserInput("some/path/unknown.cpp"),
-1,
- QLatin1String(Constants::TASK_CATEGORY_COMPILE))
+ Core::Id(Constants::TASK_CATEGORY_COMPILE))
<< Task(Task::Error,
QLatin1String("unknown filename, no mangling"),
- QString::fromLatin1("some/path/unknown.cpp"),
+ Utils::FileName::fromUserInput("some/path/unknown.cpp"),
-1,
- QLatin1String(Constants::TASK_CATEGORY_COMPILE));
+ Core::Id(Constants::TASK_CATEGORY_COMPILE));
QTest::newRow("find file")
<< (QStringList(QLatin1String("test/file.cpp")))
<< (QStringList(QLatin1String("test")))
<< Task(Task::Error,
QLatin1String("mangling"),
- QString::fromLatin1("file.cpp"),
+ Utils::FileName::fromUserInput("file.cpp"),
10,
- QLatin1String(Constants::TASK_CATEGORY_COMPILE))
+ Core::Id(Constants::TASK_CATEGORY_COMPILE))
<< Task(Task::Error,
QLatin1String("mangling"),
- QString::fromLatin1("$TMPDIR/test/file.cpp"),
+ Utils::FileName::fromUserInput("$TMPDIR/test/file.cpp"),
10,
- QLatin1String(Constants::TASK_CATEGORY_COMPILE));
+ Core::Id(Constants::TASK_CATEGORY_COMPILE));
}
void ProjectExplorerPlugin::testGnuMakeParserTaskMangling()
@@ -483,8 +483,9 @@ void ProjectExplorerPlugin::testGnuMakeParserTaskMangling()
}
// fix up output task file:
- if (outputTask.file.startsWith(QLatin1String("$TMPDIR/")))
- outputTask.file = outputTask.file.replace(QLatin1String("$TMPDIR/"), tempdir);
+ QString filePath = outputTask.file.toString();
+ if (filePath.startsWith(QLatin1String("$TMPDIR/")))
+ outputTask.file = Utils::FileName::fromString(filePath.replace(QLatin1String("$TMPDIR/"), tempdir));
// test mangling:
testbench.testTaskMangling(inputTask, outputTask);
diff --git a/src/plugins/projectexplorer/ldparser.cpp b/src/plugins/projectexplorer/ldparser.cpp
index e01dc5c633..351c108a06 100644
--- a/src/plugins/projectexplorer/ldparser.cpp
+++ b/src/plugins/projectexplorer/ldparser.cpp
@@ -70,17 +70,17 @@ void LdParser::stdError(const QString &line)
if (lne.startsWith(QLatin1String("collect2:"))) {
emit addTask(Task(Task::Error,
lne /* description */,
- QString() /* filename */,
+ Utils::FileName() /* filename */,
-1 /* linenumber */,
- QLatin1String(Constants::TASK_CATEGORY_COMPILE)));
+ Core::Id(Constants::TASK_CATEGORY_COMPILE)));
return;
} else if (m_regExpGccNames.indexIn(lne) > -1) {
QString description = lne.mid(m_regExpGccNames.matchedLength());
Task task(Task::Error,
description,
- QString(), /* filename */
+ Utils::FileName(), /* filename */
-1, /* line */
- QLatin1String(Constants::TASK_CATEGORY_COMPILE));
+ Core::Id(Constants::TASK_CATEGORY_COMPILE));
if (description.startsWith(QLatin1String("warning: "))) {
task.type = Task::Warning;
task.description = description.mid(9);
@@ -94,13 +94,13 @@ void LdParser::stdError(const QString &line)
int lineno = m_regExpLinker.cap(7).toInt(&ok);
if (!ok)
lineno = -1;
- QString filename = m_regExpLinker.cap(1);
+ Utils::FileName filename = Utils::FileName::fromUserInput(m_regExpLinker.cap(1));
if (!m_regExpLinker.cap(4).isEmpty()
&& !m_regExpLinker.cap(4).startsWith(QLatin1String("(.text")))
- filename = m_regExpLinker.cap(4);
+ filename = Utils::FileName::fromUserInput(m_regExpLinker.cap(4));
QString description = m_regExpLinker.cap(8).trimmed();
Task task(Task::Error, description, filename, lineno,
- QLatin1String(Constants::TASK_CATEGORY_COMPILE));
+ Core::Id(Constants::TASK_CATEGORY_COMPILE));
if (description.startsWith(QLatin1String("At global scope")) ||
description.startsWith(QLatin1String("At top level")) ||
description.startsWith(QLatin1String("instantiated from ")) ||
diff --git a/src/plugins/projectexplorer/linuxiccparser.cpp b/src/plugins/projectexplorer/linuxiccparser.cpp
index 6a932b4b9b..11abb9859a 100644
--- a/src/plugins/projectexplorer/linuxiccparser.cpp
+++ b/src/plugins/projectexplorer/linuxiccparser.cpp
@@ -73,9 +73,9 @@ void LinuxIccParser::stdError(const QString &line)
if (m_expectFirstLine && m_firstLine.indexIn(line) != -1) {
// Clear out old task
m_temporary = ProjectExplorer::Task(Task::Unknown, m_firstLine.cap(6).trimmed(),
- m_firstLine.cap(1),
+ Utils::FileName::fromUserInput(m_firstLine.cap(1)),
m_firstLine.cap(2).toInt(),
- QLatin1String(Constants::TASK_CATEGORY_COMPILE));
+ Core::Id(Constants::TASK_CATEGORY_COMPILE));
QString category = m_firstLine.cap(4);
if (category == QLatin1String("error"))
m_temporary.type = Task::Error;
@@ -126,8 +126,6 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data()
QTest::addColumn<QList<ProjectExplorer::Task> >("tasks");
QTest::addColumn<QString>("outputLines");
- const QString categoryCompile = QLatin1String(Constants::TASK_CATEGORY_COMPILE);
-
QTest::newRow("pass-through stdout")
<< QString::fromLatin1("Sometext") << OutputParserTester::STDOUT
<< QString::fromLatin1("Sometext\n") << QString()
@@ -149,8 +147,8 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("identifier \"f\" is undefined\nf(0);"),
- QLatin1String("main.cpp"), 13,
- categoryCompile))
+ Utils::FileName::fromUserInput("main.cpp"), 13,
+ Core::Id(Constants::TASK_CATEGORY_COMPILE)))
<< QString();
QTest::newRow("private function")
@@ -163,8 +161,8 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("function \"AClass::privatefunc\" (declared at line 4 of \"main.h\") is inaccessible\nb.privatefunc();"),
- QLatin1String("main.cpp"), 53,
- categoryCompile))
+ Utils::FileName::fromUserInput("main.cpp"), 53,
+ Core::Id(Constants::TASK_CATEGORY_COMPILE)))
<< QString();
QTest::newRow("simple warning")
@@ -177,8 +175,8 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("use of \"=\" where \"==\" may have been intended\nwhile (a = true)"),
- QLatin1String("main.cpp"), 41,
- categoryCompile))
+ Utils::FileName::fromUserInput("main.cpp"), 41,
+ Core::Id(Constants::TASK_CATEGORY_COMPILE)))
<< QString();
}
diff --git a/src/plugins/projectexplorer/msvcparser.cpp b/src/plugins/projectexplorer/msvcparser.cpp
index e0e3078f03..b3ec830192 100644
--- a/src/plugins/projectexplorer/msvcparser.cpp
+++ b/src/plugins/projectexplorer/msvcparser.cpp
@@ -36,12 +36,12 @@
static const char FILE_POS_PATTERN[] = "(cl|LINK|.+) : ";
static const char ERROR_PATTERN[] = "[A-Z]+\\d\\d\\d\\d ?:";
-static QPair<QString, int> parseFileName(const QString &input)
+static QPair<Utils::FileName, int> parseFileName(const QString &input)
{
QString fileName = input;
if (fileName.startsWith(QLatin1String("LINK"))
|| fileName.startsWith(QLatin1String("cl")))
- return qMakePair(QString(), -1);
+ return qMakePair(Utils::FileName(), -1);
// Extract linenumber (if it is there):
int linenumber = -1;
@@ -56,7 +56,7 @@ static QPair<QString, int> parseFileName(const QString &input)
}
}
}
- return qMakePair(fileName, linenumber);
+ return qMakePair(Utils::FileName::fromUserInput(fileName), linenumber);
}
using namespace ProjectExplorer;
@@ -111,9 +111,9 @@ void MsvcParser::stdOutput(const QString &line)
if (infoPos > -1) {
m_lastTask = Task(Task::Unknown,
m_additionalInfoRegExp.cap(3).trimmed(), /* description */
- m_additionalInfoRegExp.cap(1), /* fileName */
+ Utils::FileName::fromUserInput(m_additionalInfoRegExp.cap(1)), /* fileName */
m_additionalInfoRegExp.cap(2).toInt(), /* linenumber */
- QLatin1String(Constants::TASK_CATEGORY_COMPILE));
+ Core::Id(Constants::TASK_CATEGORY_COMPILE));
return;
}
IOutputParser::stdOutput(line);
@@ -131,11 +131,11 @@ bool MsvcParser::processCompileLine(const QString &line)
sendQueuedTask();
if (m_compileRegExp.indexIn(line) > -1) {
- QPair<QString, int> position = parseFileName( m_compileRegExp.cap(1));
+ QPair<Utils::FileName, int> position = parseFileName( m_compileRegExp.cap(1));
m_lastTask = Task(Task::Unknown,
m_compileRegExp.cap(4).trimmed() /* description */,
position.first, position.second,
- QLatin1String(Constants::TASK_CATEGORY_COMPILE));
+ Core::Id(Constants::TASK_CATEGORY_COMPILE));
if (m_compileRegExp.cap(3) == QLatin1String("warning"))
m_lastTask.type = Task::Warning;
else if (m_compileRegExp.cap(3) == QLatin1String("error"))
@@ -192,8 +192,8 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< QString() << QString()
<< (QList<ProjectExplorer::Task>() << Task(Task::Error,
QLatin1String("C4716: 'findUnresolvedModule' : must return a value"),
- QLatin1String("qmlstandalone\\main.cpp"), 54,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
+ Utils::FileName::fromUserInput("qmlstandalone\\main.cpp"), 54,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString();
QTest::newRow("labeled warning")
@@ -201,8 +201,8 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< QString() << QString()
<< (QList<ProjectExplorer::Task>() << Task(Task::Warning,
QLatin1String("C4100: 'something' : unreferenced formal parameter"),
- QLatin1String("x:\\src\\plugins\\projectexplorer\\msvcparser.cpp"), 69,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
+ Utils::FileName::fromUserInput("x:\\src\\plugins\\projectexplorer\\msvcparser.cpp"), 69,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString();
QTest::newRow("additional information")
@@ -213,12 +213,12 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("C4099: 'TextEditor::CompletionItem' : type name first seen using 'struct' now seen using 'class'"),
- QLatin1String("x:\\src\\plugins\\texteditor\\icompletioncollector.h"), 50,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))
+ Utils::FileName::fromUserInput("x:\\src\\plugins\\texteditor\\icompletioncollector.h"), 50,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))
<< Task(Task::Unknown,
QLatin1String("see declaration of 'TextEditor::CompletionItem'"),
- QLatin1String("x:\\src\\plugins\\texteditor\\completionsupport.h"), 39,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
+ Utils::FileName::fromUserInput("x:\\src\\plugins\\texteditor\\completionsupport.h"), 39,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString();
QTest::newRow("fatal linker error")
@@ -228,8 +228,8 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("LNK1146: no argument specified with option '/LIBPATH:'"),
- QString(), -1,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
+ Utils::FileName(), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString();
// This actually comes through stderr!
@@ -240,8 +240,8 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("D9002 : ignoring unknown option '-fopenmp'"),
- QString(), -1,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
+ Utils::FileName(), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString();
QTest::newRow("complex error")
<< QString::fromLatin1("..\\untitled\\main.cpp(19) : error C2440: 'initializing' : cannot convert from 'int' to 'std::_Tree<_Traits>::iterator'\n"
@@ -260,8 +260,8 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
" _Traits=std::_Tmap_traits<int,double,std::less<int>,std::allocator<std::pair<const int,double>>,false>\n"
"]\n"
"No constructor could take the source type, or constructor overload resolution was ambiguous"),
- QLatin1String("..\\untitled\\main.cpp"), 19,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
+ Utils::FileName::fromUserInput("..\\untitled\\main.cpp"), 19,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString();
QTest::newRow("Linker error 1")
<< QString::fromLatin1("main.obj : error LNK2019: unresolved external symbol \"public: void __thiscall Data::doit(void)\" (?doit@Data@@QAEXXZ) referenced in function _main")
@@ -270,8 +270,8 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("LNK2019: unresolved external symbol \"public: void __thiscall Data::doit(void)\" (?doit@Data@@QAEXXZ) referenced in function _main"),
- QLatin1String("main.obj"), -1,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
+ Utils::FileName::fromUserInput("main.obj"), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString();
QTest::newRow("Linker error 2")
<< QString::fromLatin1("debug\\Experimentation.exe : fatal error LNK1120: 1 unresolved externals")
@@ -280,8 +280,8 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("LNK1120: 1 unresolved externals"),
- QLatin1String("debug\\Experimentation.exe"), -1,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
+ Utils::FileName::fromUserInput("debug\\Experimentation.exe"), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString();
QTest::newRow("Multiline error")
<< QString::fromLatin1("c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\xutility(2227) : warning C4996: 'std::_Copy_impl': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'\n"
@@ -297,12 +297,12 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("C4996: 'std::_Copy_impl': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'"),
- QLatin1String("c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\xutility"), 2227,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))
+ Utils::FileName::fromUserInput("c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\xutility"), 2227,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))
<< Task(Task::Unknown,
QLatin1String("see declaration of 'std::_Copy_impl'"),
- QLatin1String("c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\xutility"), 2212,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))
+ Utils::FileName::fromUserInput("c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\xutility"), 2212,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))
<< Task(Task::Unknown,
QLatin1String("see reference to function template instantiation '_OutIt std::copy<const unsigned char*,unsigned short*>(_InIt,_InIt,_OutIt)' being compiled\n"
"with\n"
@@ -310,8 +310,8 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
" _OutIt=unsigned short *,\n"
" _InIt=const unsigned char *\n"
"]"),
- QLatin1String("symbolgroupvalue.cpp"), 2314,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
+ Utils::FileName::fromUserInput("symbolgroupvalue.cpp"), 2314,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString();
}
diff --git a/src/plugins/projectexplorer/showineditortaskhandler.cpp b/src/plugins/projectexplorer/showineditortaskhandler.cpp
index 5d81d8f8a4..1ac6b7ec40 100644
--- a/src/plugins/projectexplorer/showineditortaskhandler.cpp
+++ b/src/plugins/projectexplorer/showineditortaskhandler.cpp
@@ -50,13 +50,13 @@ bool ShowInEditorTaskHandler::canHandle(const ProjectExplorer::Task &task)
{
if (task.file.isEmpty())
return false;
- QFileInfo fi(task.file);
+ QFileInfo fi(task.file.toFileInfo());
return fi.exists() && fi.isFile() && fi.isReadable();
}
void ShowInEditorTaskHandler::handle(const ProjectExplorer::Task &task)
{
- QFileInfo fi(task.file);
+ QFileInfo fi(task.file.toFileInfo());
TextEditor::BaseTextEditorWidget::openEditorAt(fi.canonicalFilePath(), task.line);
}
diff --git a/src/plugins/projectexplorer/task.cpp b/src/plugins/projectexplorer/task.cpp
index ae7b01842e..e5850907f9 100644
--- a/src/plugins/projectexplorer/task.cpp
+++ b/src/plugins/projectexplorer/task.cpp
@@ -49,8 +49,9 @@ Task::Task() : taskId(0), type(Unknown), line(-1)
{ }
Task::Task(TaskType type_, const QString &description_,
- const QString &file_, int line_, const QString &category_) :
- taskId(s_nextId), type(type_), description(description_), file(QDir::fromNativeSeparators(file_)), line(line_), category(category_)
+ const Utils::FileName &file_, int line_, const Core::Id &category_) :
+ taskId(s_nextId), type(type_), description(description_),
+ file(file_), line(line_), category(category_)
{
++s_nextId;
}
@@ -80,9 +81,9 @@ bool operator<(const Task &a, const Task &b)
// Can't happen
return true;
} else {
- if (a.category < b.category)
+ if (a.category.uniqueIdentifier() < b.category.uniqueIdentifier())
return true;
- if (b.category < a.category)
+ if (b.category.uniqueIdentifier() < a.category.uniqueIdentifier())
return false;
return a.taskId < b.taskId;
}
diff --git a/src/plugins/projectexplorer/task.h b/src/plugins/projectexplorer/task.h
index 059246b01c..60e4863534 100644
--- a/src/plugins/projectexplorer/task.h
+++ b/src/plugins/projectexplorer/task.h
@@ -35,6 +35,9 @@
#include "projectexplorer_export.h"
+#include <coreplugin/id.h>
+#include <utils/fileutils.h>
+
#include <QtCore/QMetaType>
#include <QtGui/QTextLayout>
@@ -53,16 +56,17 @@ public:
Task();
Task(TaskType type_, const QString &description_,
- const QString &file_, int line_, const QString &category_);
+ const Utils::FileName &file_, int line_, const Core::Id &category_);
bool isNull() const;
unsigned int taskId;
TaskType type;
QString description;
- QString file;
+ Utils::FileName file;
int line;
- QString category;
+ Core::Id category;
+
// Having a QList<QTextLayout::FormatRange> in Task isn't that great
// It would be cleaner to split up the text into
// the logical hunks and then assemble them again
diff --git a/src/plugins/projectexplorer/taskhub.cpp b/src/plugins/projectexplorer/taskhub.cpp
index 67f41e87b7..28cd6985b2 100644
--- a/src/plugins/projectexplorer/taskhub.cpp
+++ b/src/plugins/projectexplorer/taskhub.cpp
@@ -48,7 +48,7 @@ TaskHub::~TaskHub()
}
-void TaskHub::addCategory(const QString &categoryId, const QString &displayName, bool visible)
+void TaskHub::addCategory(const Core::Id &categoryId, const QString &displayName, bool visible)
{
emit categoryAdded(categoryId, displayName, visible);
}
@@ -58,7 +58,7 @@ void TaskHub::addTask(const Task &task)
emit taskAdded(task);
}
-void TaskHub::clearTasks(const QString &categoryId)
+void TaskHub::clearTasks(const Core::Id &categoryId)
{
emit tasksCleared(categoryId);
}
@@ -68,7 +68,7 @@ void TaskHub::removeTask(const Task &task)
emit taskRemoved(task);
}
-void TaskHub::setCategoryVisibility(const QString &categoryId, bool visible)
+void TaskHub::setCategoryVisibility(const Core::Id &categoryId, bool visible)
{
emit categoryVisibilityChanged(categoryId, visible);
}
diff --git a/src/plugins/projectexplorer/taskhub.h b/src/plugins/projectexplorer/taskhub.h
index 33b73d210a..020ab81c0f 100644
--- a/src/plugins/projectexplorer/taskhub.h
+++ b/src/plugins/projectexplorer/taskhub.h
@@ -48,22 +48,22 @@ public:
TaskHub();
virtual ~TaskHub();
- void addCategory(const QString &categoryId, const QString &displayName, bool visible = true);
+ void addCategory(const Core::Id &categoryId, const QString &displayName, bool visible = true);
void addTask(const Task &task);
- void clearTasks(const QString &categoryId = QString());
+ void clearTasks(const Core::Id &categoryId = Core::Id());
void removeTask(const Task &task);
- void setCategoryVisibility(const QString &categoryId, bool visible);
+ void setCategoryVisibility(const Core::Id &categoryId, bool visible);
void popup(bool withFocus);
// TODO now there are two places for icons
QIcon taskTypeIcon(ProjectExplorer::Task::TaskType t) const;
signals:
- void categoryAdded(const QString &categoryId, const QString &displayName, bool visible);
+ void categoryAdded(const Core::Id &categoryId, const QString &displayName, bool visible);
void taskAdded(const ProjectExplorer::Task &task);
void taskRemoved(const ProjectExplorer::Task &task);
- void tasksCleared(const QString &categoryId);
- void categoryVisibilityChanged(const QString &categoryId, bool visible);
+ void tasksCleared(const Core::Id &categoryId);
+ void categoryVisibilityChanged(const Core::Id &categoryId, bool visible);
void popupRequested(bool withFocus);
private:
const QIcon m_errorIcon;
diff --git a/src/plugins/projectexplorer/taskmodel.cpp b/src/plugins/projectexplorer/taskmodel.cpp
index 84bee37d60..fa9c600637 100644
--- a/src/plugins/projectexplorer/taskmodel.cpp
+++ b/src/plugins/projectexplorer/taskmodel.cpp
@@ -35,7 +35,7 @@
#include "task.h"
#include "taskhub.h"
-#include <QtCore/QDebug>
+#include <utils/qtcassert.h>
#include <QtGui/QFontMetrics>
@@ -54,22 +54,22 @@ TaskModel::TaskModel(QObject *parent) :
m_warningIcon(QLatin1String(":/projectexplorer/images/compile_warning.png")),
m_sizeOfLineNumber(0)
{
- m_categories.insert(QString(), CategoryData());
+ m_categories.insert(Core::Id(), CategoryData());
}
-int TaskModel::taskCount(const QString &category)
+int TaskModel::taskCount(const Core::Id &categoryId)
{
- return m_categories.value(category).count;
+ return m_categories.value(categoryId).count;
}
-int TaskModel::errorTaskCount(const QString &category)
+int TaskModel::errorTaskCount(const Core::Id &categoryId)
{
- return m_categories.value(category).errors;
+ return m_categories.value(categoryId).errors;
}
-int TaskModel::warningTaskCount(const QString &category)
+int TaskModel::warningTaskCount(const Core::Id &categoryId)
{
- return m_categories.value(category).warnings;
+ return m_categories.value(categoryId).warnings;
}
bool TaskModel::hasFile(const QModelIndex &index) const
@@ -93,22 +93,22 @@ QIcon TaskModel::taskTypeIcon(Task::TaskType t) const
return QIcon();
}
-void TaskModel::addCategory(const QString &categoryId, const QString &categoryName)
+void TaskModel::addCategory(const Core::Id &categoryId, const QString &categoryName)
{
- Q_ASSERT(!categoryId.isEmpty());
+ QTC_ASSERT(categoryId.uniqueIdentifier(), return);
CategoryData data;
data.displayName = categoryName;
m_categories.insert(categoryId, data);
}
-QList<Task> TaskModel::tasks(const QString &categoryId) const
+QList<Task> TaskModel::tasks(const Core::Id &categoryId) const
{
- if (categoryId.isEmpty())
+ if (categoryId.uniqueIdentifier() == 0)
return m_tasks;
QList<Task> taskList;
foreach (const Task &t, m_tasks) {
- if (t.category == categoryId)
+ if (t.category.uniqueIdentifier() == categoryId.uniqueIdentifier())
taskList.append(t);
}
return taskList;
@@ -118,7 +118,7 @@ void TaskModel::addTask(const Task &task)
{
Q_ASSERT(m_categories.keys().contains(task.category));
CategoryData &data = m_categories[task.category];
- CategoryData &global = m_categories[QString()];
+ CategoryData &global = m_categories[Core::Id()];
beginInsertRows(QModelIndex(), m_tasks.count(), m_tasks.count());
m_tasks.append(task);
@@ -135,26 +135,26 @@ void TaskModel::removeTask(const Task &task)
beginRemoveRows(QModelIndex(), index, index);
m_categories[task.category].removeTask(t);
- m_categories[QString()].removeTask(t);
+ m_categories[Core::Id()].removeTask(t);
m_tasks.removeAt(index);
endRemoveRows();
}
}
-void TaskModel::clearTasks(const QString &categoryId)
+void TaskModel::clearTasks(const Core::Id &categoryId)
{
- if (categoryId.isEmpty()) {
+ if (categoryId.uniqueIdentifier() != 0) {
if (m_tasks.count() == 0)
return;
beginRemoveRows(QModelIndex(), 0, m_tasks.count() -1);
m_tasks.clear();
- foreach (const QString &key, m_categories.keys())
+ foreach (const Core::Id &key, m_categories.keys())
m_categories[key].clear();
endRemoveRows();
} else {
int index = 0;
int start = 0;
- CategoryData &global = m_categories[QString()];
+ CategoryData &global = m_categories[Core::Id()];
CategoryData &cat = m_categories[categoryId];
while (index < m_tasks.count()) {
@@ -214,7 +214,7 @@ QVariant TaskModel::data(const QModelIndex &index, int role) const
return QVariant();
if (role == TaskModel::File) {
- return m_tasks.at(index.row()).file;
+ return m_tasks.at(index.row()).file.toString();
} else if (role == TaskModel::Line) {
if (m_tasks.at(index.row()).line <= 0)
return QVariant();
@@ -223,11 +223,11 @@ QVariant TaskModel::data(const QModelIndex &index, int role) const
} else if (role == TaskModel::Description) {
return m_tasks.at(index.row()).description;
} else if (role == TaskModel::FileNotFound) {
- return m_fileNotFound.value(m_tasks.at(index.row()).file);
+ return m_fileNotFound.value(m_tasks.at(index.row()).file.toString());
} else if (role == TaskModel::Type) {
return (int)m_tasks.at(index.row()).type;
} else if (role == TaskModel::Category) {
- return m_tasks.at(index.row()).category;
+ return m_tasks.at(index.row()).category.uniqueIdentifier();
} else if (role == TaskModel::Icon) {
return taskTypeIcon(m_tasks.at(index.row()).type);
} else if (role == TaskModel::Task_t) {
@@ -243,14 +243,14 @@ Task TaskModel::task(const QModelIndex &index) const
return m_tasks.at(index.row());
}
-QStringList TaskModel::categoryIds() const
+QList<Core::Id> TaskModel::categoryIds() const
{
- QStringList ids = m_categories.keys();
- ids.removeAll(QString());
- return ids;
+ QList<Core::Id> categories = m_categories.keys();
+ categories.removeAll(Core::Id()); // remove global category we added for bookkeeping
+ return categories;
}
-QString TaskModel::categoryDisplayName(const QString &categoryId) const
+QString TaskModel::categoryDisplayName(const Core::Id &categoryId) const
{
return m_categories.value(categoryId).displayName;
}
@@ -268,7 +268,7 @@ int TaskModel::sizeOfFile(const QFont &font)
m_fileMeasurementFont = font;
for (int i = m_lastMaxSizeIndex; i < count; ++i) {
- QString filename = m_tasks.at(i).file;
+ QString filename = m_tasks.at(i).file.toString();
const int pos = filename.lastIndexOf(QLatin1Char('/'));
if (pos != -1)
filename = filename.mid(pos +1);
@@ -292,7 +292,7 @@ int TaskModel::sizeOfLineNumber(const QFont &font)
void TaskModel::setFileNotFound(const QModelIndex &idx, bool b)
{
if (idx.isValid() && idx.row() < m_tasks.count()) {
- m_fileNotFound.insert(m_tasks[idx.row()].file, b);
+ m_fileNotFound.insert(m_tasks[idx.row()].file.toUserOutput(), b);
emit dataChanged(idx, idx);
}
}
diff --git a/src/plugins/projectexplorer/taskmodel.h b/src/plugins/projectexplorer/taskmodel.h
index 2ec8b22c18..421bc2d60d 100644
--- a/src/plugins/projectexplorer/taskmodel.h
+++ b/src/plugins/projectexplorer/taskmodel.h
@@ -54,14 +54,14 @@ public:
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
Task task(const QModelIndex &index) const;
- QStringList categoryIds() const;
- QString categoryDisplayName(const QString &categoryId) const;
- void addCategory(const QString &categoryId, const QString &categoryName);
+ QList<Core::Id> categoryIds() const;
+ QString categoryDisplayName(const Core::Id &categoryId) const;
+ void addCategory(const Core::Id &categoryId, const QString &categoryName);
- QList<Task> tasks(const QString &categoryId = QString()) const;
+ QList<Task> tasks(const Core::Id &categoryId = Core::Id()) const;
void addTask(const Task &task);
void removeTask(const Task &task);
- void clearTasks(const QString &categoryId = QString());
+ void clearTasks(const Core::Id &categoryId = Core::Id());
int sizeOfFile(const QFont &font);
int sizeOfLineNumber(const QFont &font);
@@ -71,9 +71,9 @@ public:
QIcon taskTypeIcon(Task::TaskType t) const;
- int taskCount(const QString &category);
- int errorTaskCount(const QString &category);
- int warningTaskCount(const QString &category);
+ int taskCount(const Core::Id &categoryId);
+ int errorTaskCount(const Core::Id &categoryId);
+ int warningTaskCount(const Core::Id &categoryId);
bool hasFile(const QModelIndex &index) const;
@@ -114,7 +114,7 @@ private:
int errors;
};
- QHash<QString,CategoryData> m_categories; // category id to data
+ QHash<Core::Id,CategoryData> m_categories; // category id to data
QList<Task> m_tasks; // all tasks (in order of insertion)
QHash<QString,bool> m_fileNotFound;
@@ -151,8 +151,8 @@ public:
bool filterIncludesErrors() const { return m_includeErrors; }
void setFilterIncludesErrors(bool b) { m_includeErrors = b; invalidateFilter(); }
- QStringList filteredCategories() const { return m_categoryIds; }
- void setFilteredCategories(const QStringList &categoryIds) { m_categoryIds = categoryIds; invalidateFilter(); }
+ QList<Core::Id> filteredCategories() const { return m_categoryIds; }
+ void setFilteredCategories(const QList<Core::Id> &categoryIds) { m_categoryIds = categoryIds; invalidateFilter(); }
Task task(const QModelIndex &index) const
{ return m_sourceModel->task(mapToSource(index)); }
@@ -175,7 +175,7 @@ private:
bool m_includeUnknowns;
bool m_includeWarnings;
bool m_includeErrors;
- QStringList m_categoryIds;
+ QList<Core::Id> m_categoryIds;
mutable QList<int> m_mapping;
mutable bool m_mappingUpToDate;
diff --git a/src/plugins/projectexplorer/taskwindow.cpp b/src/plugins/projectexplorer/taskwindow.cpp
index c7ba151ad2..6b3ee13b56 100644
--- a/src/plugins/projectexplorer/taskwindow.cpp
+++ b/src/plugins/projectexplorer/taskwindow.cpp
@@ -44,6 +44,7 @@
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include <extensionsystem/pluginmanager.h>
+#include <utils/qtcassert.h>
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
@@ -289,16 +290,16 @@ TaskWindow::TaskWindow(TaskHub *taskhub) : d(new TaskWindowPrivate)
d->m_categoriesButton->setMenu(d->m_categoriesMenu);
- connect(d->m_taskHub, SIGNAL(categoryAdded(QString, QString, bool)),
- this, SLOT(addCategory(QString, QString, bool)));
+ connect(d->m_taskHub, SIGNAL(categoryAdded(Core::Id,QString,bool)),
+ this, SLOT(addCategory(Core::Id,QString,bool)));
connect(d->m_taskHub, SIGNAL(taskAdded(ProjectExplorer::Task)),
this, SLOT(addTask(ProjectExplorer::Task)));
connect(d->m_taskHub, SIGNAL(taskRemoved(ProjectExplorer::Task)),
this, SLOT(removeTask(ProjectExplorer::Task)));
- connect(d->m_taskHub, SIGNAL(tasksCleared(QString)),
- this, SLOT(clearTasks(QString)));
- connect(d->m_taskHub, SIGNAL(categoryVisibilityChanged(QString,bool)),
- this, SLOT(setCategoryVisibility(QString,bool)));
+ connect(d->m_taskHub, SIGNAL(tasksCleared(Core::Id)),
+ this, SLOT(clearTasks(Core::Id)));
+ connect(d->m_taskHub, SIGNAL(categoryVisibilityChanged(Core::Id,bool)),
+ this, SLOT(setCategoryVisibility(Core::Id,bool)));
connect(d->m_taskHub, SIGNAL(popupRequested(bool)),
this, SLOT(popup(bool)));
}
@@ -324,7 +325,7 @@ QWidget *TaskWindow::outputWidget(QWidget *)
return d->m_listview;
}
-void TaskWindow::clearTasks(const QString &categoryId)
+void TaskWindow::clearTasks(const Core::Id &categoryId)
{
d->m_model->clearTasks(categoryId);
@@ -333,12 +334,12 @@ void TaskWindow::clearTasks(const QString &categoryId)
navigateStateChanged();
}
-void TaskWindow::setCategoryVisibility(const QString &categoryId, bool visible)
+void TaskWindow::setCategoryVisibility(const Core::Id &categoryId, bool visible)
{
- if (categoryId.isEmpty())
+ if (categoryId.uniqueIdentifier() == 0)
return;
- QStringList categories = d->m_filter->filteredCategories();
+ QList<Core::Id> categories = d->m_filter->filteredCategories();
if (visible) {
categories.removeOne(categoryId);
@@ -353,11 +354,11 @@ void TaskWindow::visibilityChanged(bool /* b */)
{
}
-void TaskWindow::addCategory(const QString &categoryId, const QString &displayName, bool visible)
+void TaskWindow::addCategory(const Core::Id &categoryId, const QString &displayName, bool visible)
{
d->m_model->addCategory(categoryId, displayName);
if (!visible) {
- QStringList filters = d->m_filter->filteredCategories();
+ QList<Core::Id> filters = d->m_filter->filteredCategories();
filters += categoryId;
d->m_filter->setFilteredCategories(filters);
}
@@ -402,7 +403,7 @@ void TaskWindow::triggerDefaultHandler(const QModelIndex &index)
if (d->m_defaultHandler->canHandle(task)) {
d->m_defaultHandler->handle(task);
} else {
- if (!QFileInfo(task.file).exists())
+ if (!task.file.toFileInfo().exists())
d->m_model->setFileNotFound(index, true);
}
}
@@ -462,42 +463,42 @@ void TaskWindow::updateCategoriesMenu()
{
d->m_categoriesMenu->clear();
- const QStringList filteredCategories = d->m_filter->filteredCategories();
+ const QList<Core::Id> filteredCategories = d->m_filter->filteredCategories();
- QMap<QString, QString> nameToIds;
- foreach (const QString &categoryId, d->m_model->categoryIds())
- nameToIds.insert(d->m_model->categoryDisplayName(categoryId), categoryId);
+ QMap<QString, QByteArray> nameToIds;
+ foreach (const Core::Id &categoryId, d->m_model->categoryIds())
+ nameToIds.insert(d->m_model->categoryDisplayName(categoryId), categoryId.name());
foreach (const QString &displayName, nameToIds.keys()) {
- const QString categoryId = nameToIds.value(displayName);
+ const QByteArray categoryId = nameToIds.value(displayName);
QAction *action = new QAction(d->m_categoriesMenu);
action->setCheckable(true);
action->setText(displayName);
action->setData(categoryId);
- action->setChecked(!filteredCategories.contains(categoryId));
+ action->setChecked(!filteredCategories.contains(Core::Id(categoryId.constData())));
d->m_categoriesMenu->addAction(action);
}
}
void TaskWindow::filterCategoryTriggered(QAction *action)
{
- QString categoryId = action->data().toString();
- Q_ASSERT(!categoryId.isEmpty());
+ Core::Id categoryId(action->data().toByteArray().constData());
+ QTC_CHECK(categoryId.uniqueIdentifier() != 0);
setCategoryVisibility(categoryId, action->isChecked());
}
-int TaskWindow::taskCount(const QString &category) const
+int TaskWindow::taskCount(const Core::Id &category) const
{
return d->m_model->taskCount(category);
}
-int TaskWindow::errorTaskCount(const QString &category) const
+int TaskWindow::errorTaskCount(const Core::Id &category) const
{
return d->m_model->errorTaskCount(category);
}
-int TaskWindow::warningTaskCount(const QString &category) const
+int TaskWindow::warningTaskCount(const Core::Id &category) const
{
return d->m_model->warningTaskCount(category);
}
@@ -511,7 +512,7 @@ void TaskWindow::clearContents()
{
// clear all tasks in all displays
// Yeah we are that special
- d->m_taskHub->clearTasks(QString());
+ d->m_taskHub->clearTasks();
}
bool TaskWindow::hasFocus() const
diff --git a/src/plugins/projectexplorer/taskwindow.h b/src/plugins/projectexplorer/taskwindow.h
index 39ab967c2c..8bdd6181f1 100644
--- a/src/plugins/projectexplorer/taskwindow.h
+++ b/src/plugins/projectexplorer/taskwindow.h
@@ -33,6 +33,7 @@
#ifndef TASKWINDOW_H
#define TASKWINDOW_H
+#include <coreplugin/id.h>
#include <coreplugin/ioutputpane.h>
QT_BEGIN_NAMESPACE
@@ -57,9 +58,9 @@ public:
TaskWindow(ProjectExplorer::TaskHub *taskHub);
virtual ~TaskWindow();
- int taskCount(const QString &category = QString()) const;
- int warningTaskCount(const QString &category = QString()) const;
- int errorTaskCount(const QString &category = QString()) const;
+ int taskCount(const Core::Id &category = Core::Id()) const;
+ int warningTaskCount(const Core::Id &category = Core::Id()) const;
+ int errorTaskCount(const Core::Id &category = Core::Id()) const;
// IOutputPane
QWidget *outputWidget(QWidget *);
@@ -85,11 +86,11 @@ signals:
void tasksCleared();
private slots:
- void addCategory(const QString &categoryId, const QString &displayName, bool visible);
+ void addCategory(const Core::Id &categoryId, const QString &displayName, bool visible);
void addTask(const ProjectExplorer::Task &task);
void removeTask(const ProjectExplorer::Task &task);
- void clearTasks(const QString &categoryId);
- void setCategoryVisibility(const QString &categoryId, bool visible);
+ void clearTasks(const Core::Id &categoryId);
+ void setCategoryVisibility(const Core::Id &categoryId, bool visible);
void triggerDefaultHandler(const QModelIndex &index);
void showContextMenu(const QPoint &position);
diff --git a/src/plugins/projectexplorer/vcsannotatetaskhandler.cpp b/src/plugins/projectexplorer/vcsannotatetaskhandler.cpp
index 70a396c922..0d99c4622e 100644
--- a/src/plugins/projectexplorer/vcsannotatetaskhandler.cpp
+++ b/src/plugins/projectexplorer/vcsannotatetaskhandler.cpp
@@ -51,7 +51,7 @@ VcsAnnotateTaskHandler::VcsAnnotateTaskHandler() :
bool VcsAnnotateTaskHandler::canHandle(const ProjectExplorer::Task &task)
{
- QFileInfo fi(task.file);
+ QFileInfo fi(task.file.toFileInfo());
if (!fi.exists() || !fi.isFile() || !fi.isReadable())
return false;
Core::IVersionControl *vc = Core::ICore::vcsManager()->findVersionControlForDirectory(fi.absolutePath());
@@ -62,7 +62,7 @@ bool VcsAnnotateTaskHandler::canHandle(const ProjectExplorer::Task &task)
void VcsAnnotateTaskHandler::handle(const ProjectExplorer::Task &task)
{
- QFileInfo fi(task.file);
+ QFileInfo fi(task.file.toFileInfo());
Core::IVersionControl *vc = Core::ICore::vcsManager()->findVersionControlForDirectory(fi.absolutePath());
Q_ASSERT(vc);
Q_ASSERT(vc->supportsOperation(Core::IVersionControl::AnnotateOperation));
diff --git a/src/plugins/qmljseditor/qmltaskmanager.cpp b/src/plugins/qmljseditor/qmltaskmanager.cpp
index 21198ffa76..a6a6dfb44c 100644
--- a/src/plugins/qmljseditor/qmltaskmanager.cpp
+++ b/src/plugins/qmljseditor/qmltaskmanager.cpp
@@ -71,7 +71,7 @@ QmlTaskManager::QmlTaskManager(QObject *parent) :
SLOT(updateMessagesNow()));
}
-static QList<ProjectExplorer::Task> convertToTasks(const QList<DiagnosticMessage> &messages, const QString &fileName, const QString &category)
+static QList<ProjectExplorer::Task> convertToTasks(const QList<DiagnosticMessage> &messages, const Utils::FileName &fileName, const Core::Id &category)
{
QList<ProjectExplorer::Task> result;
foreach (const DiagnosticMessage &msg, messages) {
@@ -87,7 +87,7 @@ static QList<ProjectExplorer::Task> convertToTasks(const QList<DiagnosticMessage
return result;
}
-static QList<ProjectExplorer::Task> convertToTasks(const QList<StaticAnalysis::Message> &messages, const QString &fileName, const QString &category)
+static QList<ProjectExplorer::Task> convertToTasks(const QList<StaticAnalysis::Message> &messages, const Utils::FileName &fileName, const Core::Id &category)
{
QList<DiagnosticMessage> diagnostics;
foreach (const StaticAnalysis::Message &msg, messages)
@@ -116,15 +116,18 @@ void QmlTaskManager::collectMessages(
FileErrorMessages result;
result.fileName = fileName;
result.tasks = convertToTasks(document->diagnosticMessages(),
- fileName, Constants::TASK_CATEGORY_QML);
+ Utils::FileName::fromString(fileName),
+ Core::Id(Constants::TASK_CATEGORY_QML));
if (updateSemantic) {
result.tasks += convertToTasks(linkMessages.value(fileName),
- fileName, Constants::TASK_CATEGORY_QML_ANALYSIS);
+ Utils::FileName::fromString(fileName),
+ Core::Id(Constants::TASK_CATEGORY_QML_ANALYSIS));
Check checker(document, context);
result.tasks += convertToTasks(checker(),
- fileName, Constants::TASK_CATEGORY_QML_ANALYSIS);
+ Utils::FileName::fromString(fileName),
+ Core::Id(Constants::TASK_CATEGORY_QML_ANALYSIS));
}
if (!result.tasks.isEmpty())
@@ -190,9 +193,9 @@ void QmlTaskManager::displayAllResults()
void QmlTaskManager::insertTask(const ProjectExplorer::Task &task)
{
- QList<ProjectExplorer::Task> tasks = m_docsWithTasks.value(task.file);
+ QList<ProjectExplorer::Task> tasks = m_docsWithTasks.value(task.file.toString());
tasks.append(task);
- m_docsWithTasks.insert(task.file, tasks);
+ m_docsWithTasks.insert(task.file.toString(), tasks);
m_taskHub->addTask(task);
}
diff --git a/src/plugins/qt4projectmanager/makestep.cpp b/src/plugins/qt4projectmanager/makestep.cpp
index c4a31a05dd..f54da29d91 100644
--- a/src/plugins/qt4projectmanager/makestep.cpp
+++ b/src/plugins/qt4projectmanager/makestep.cpp
@@ -137,16 +137,16 @@ bool MakeStep::init()
if (!bc) {
m_tasks.append(ProjectExplorer::Task(ProjectExplorer::Task::Error,
tr("Qt Creator needs a buildconfiguration set up to build. Configure a tool chain in Project mode."),
- QString(), -1,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ Utils::FileName(), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
return false;
}
if (!bc->toolChain()) {
m_tasks.append(ProjectExplorer::Task(ProjectExplorer::Task::Error,
tr("Qt Creator needs a tool chain set up to build. Configure a tool chain in Project mode."),
- QString(), -1,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ Utils::FileName(), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
}
ProjectExplorer::ProcessParameters *pp = processParameters();
diff --git a/src/plugins/qt4projectmanager/qmakeparser.cpp b/src/plugins/qt4projectmanager/qmakeparser.cpp
index cf8b9ff185..dfae102117 100644
--- a/src/plugins/qt4projectmanager/qmakeparser.cpp
+++ b/src/plugins/qt4projectmanager/qmakeparser.cpp
@@ -54,18 +54,18 @@ void QMakeParser::stdError(const QString &line)
const QString description = lne.mid(15);
emit addTask(Task(Task::Error,
description,
- QString() /* filename */,
+ Utils::FileName() /* filename */,
-1 /* linenumber */,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
return;
}
if (lne.startsWith(QLatin1String("Project WARNING:"))) {
const QString description = lne.mid(17);
emit addTask(Task(Task::Warning,
description,
- QString() /* filename */,
+ Utils::FileName() /* filename */,
-1 /* linenumber */,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
return;
}
if (m_error.indexIn(lne) > -1) {
@@ -79,9 +79,9 @@ void QMakeParser::stdError(const QString &line)
}
emit addTask(Task(type,
m_error.cap(3) /* description */,
- fileName,
+ Utils::FileName::fromUserInput(fileName),
m_error.cap(2).toInt() /* line */,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
return;
}
IOutputParser::stdError(line);
@@ -102,7 +102,7 @@ using namespace ProjectExplorer;
void Qt4ProjectManagerPlugin::testQmakeOutputParsers_data()
{
- const QString categoryBuildSystem = QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM);
+ const Core::Id categoryBuildSystem = Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM);
QTest::addColumn<QString>("input");
QTest::addColumn<OutputParserTester::Channel>("inputChannel");
QTest::addColumn<QString>("childStdOutLines");
@@ -129,7 +129,7 @@ void Qt4ProjectManagerPlugin::testQmakeOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("undefined file"),
- QString(), -1,
+ Utils::FileName(), -1,
categoryBuildSystem))
<< QString();
@@ -140,7 +140,7 @@ void Qt4ProjectManagerPlugin::testQmakeOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("Parse Error ('sth odd')"),
- QLatin1String("e:\\project.pro"),
+ Utils::FileName::fromUserInput("e:\\project.pro"),
14,
categoryBuildSystem))
<< QString();
@@ -152,7 +152,7 @@ void Qt4ProjectManagerPlugin::testQmakeOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("bearer module might require ReadUserData capability"),
- QString(), -1,
+ Utils::FileName(), -1,
categoryBuildSystem))
<< QString();
@@ -163,7 +163,7 @@ void Qt4ProjectManagerPlugin::testQmakeOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("Unescaped backslashes are deprecated."),
- QLatin1String("e:\\NokiaQtSDK\\Simulator\\Qt\\msvc2008\\lib\\qtmaind.prl"), 1,
+ Utils::FileName::fromUserInput("e:\\NokiaQtSDK\\Simulator\\Qt\\msvc2008\\lib\\qtmaind.prl"), 1,
categoryBuildSystem))
<< QString();
}
diff --git a/src/plugins/qt4projectmanager/qt-s60/abldparser.cpp b/src/plugins/qt4projectmanager/qt-s60/abldparser.cpp
index e5ffb79a18..aff51f4c9b 100644
--- a/src/plugins/qt4projectmanager/qt-s60/abldparser.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/abldparser.cpp
@@ -58,18 +58,18 @@ void AbldParser::stdOutput(const QString &line)
if (lne.startsWith(QLatin1String("Is Perl, version "))) {
emit addTask(Task(Task::Error,
lne /* description */,
- QString() /* filename */,
+ Utils::FileName() /* filename */,
-1 /* linenumber */,
- QLatin1String(TASK_CATEGORY_BUILDSYSTEM)));
+ Core::Id(TASK_CATEGORY_BUILDSYSTEM)));
return;
}
if (lne.startsWith(QLatin1String("FATAL ERROR:")) ||
lne.startsWith(QLatin1String("Error :"))) {
emit addTask(Task(Task::Error,
lne /* description */,
- QString() /* filename */,
+ Utils::FileName() /* filename */,
-1 /* linenumber */,
- QLatin1String(TASK_CATEGORY_BUILDSYSTEM)));
+ Core::Id(TASK_CATEGORY_BUILDSYSTEM)));
m_waitingForStdOutContinuation = false;
return;
}
@@ -81,8 +81,8 @@ void AbldParser::stdOutput(const QString &line)
Task task(Task::Unknown,
m_perlIssue.cap(4) /* description */,
- m_currentFile, m_currentLine,
- QLatin1String(TASK_CATEGORY_BUILDSYSTEM));
+ Utils::FileName::fromUserInput(m_currentFile), m_currentLine,
+ Core::Id(TASK_CATEGORY_BUILDSYSTEM));
if (m_perlIssue.cap(1) == QLatin1String("WARNING"))
task.type = Task::Warning;
@@ -96,8 +96,8 @@ void AbldParser::stdOutput(const QString &line)
if (lne.startsWith(QLatin1String("SIS creation failed!"))) {
m_waitingForStdOutContinuation = false;
emit addTask(Task(Task::Error,
- line, QString(), -1,
- QLatin1String(TASK_CATEGORY_BUILDSYSTEM)));
+ line, Utils::FileName(), -1,
+ Core::Id(TASK_CATEGORY_BUILDSYSTEM)));
return;
}
@@ -109,8 +109,8 @@ void AbldParser::stdOutput(const QString &line)
if (m_waitingForStdOutContinuation) {
emit addTask(Task(Task::Unknown,
lne /* description */,
- m_currentFile, m_currentLine,
- QLatin1String(TASK_CATEGORY_BUILDSYSTEM)));
+ Utils::FileName::fromUserInput(m_currentFile), m_currentLine,
+ Core::Id(TASK_CATEGORY_BUILDSYSTEM)));
m_waitingForStdOutContinuation = true;
return;
}
@@ -129,18 +129,18 @@ void AbldParser::stdError(const QString &line)
lne.startsWith(QLatin1String("Platform "))) {
emit addTask(Task(Task::Error,
lne /* description */,
- QString() /* filename */,
+ Utils::FileName() /* filename */,
-1 /* linenumber */,
- QLatin1String(TASK_CATEGORY_BUILDSYSTEM)));
+ Core::Id(TASK_CATEGORY_BUILDSYSTEM)));
return;
}
if (lne.startsWith(QLatin1String("Died at "))) {
emit addTask(Task(Task::Error,
lne /* description */,
- QString() /* filename */,
+ Utils::FileName() /* filename */,
-1 /* linenumber */,
- QLatin1String(TASK_CATEGORY_BUILDSYSTEM)));
+ Core::Id(TASK_CATEGORY_BUILDSYSTEM)));
m_waitingForStdErrContinuation = false;
return;
}
@@ -157,18 +157,18 @@ void AbldParser::stdError(const QString &line)
if (lne.startsWith(QLatin1String("WARNING: "))) {
QString description = lne.mid(9);
emit addTask(Task(Task::Warning, description,
- m_currentFile,
+ Utils::FileName::fromUserInput(m_currentFile),
-1 /* linenumber */,
- QLatin1String(TASK_CATEGORY_BUILDSYSTEM)));
+ Core::Id(TASK_CATEGORY_BUILDSYSTEM)));
m_waitingForStdErrContinuation = true;
return;
}
if (lne.startsWith(QLatin1String("ERROR: "))) {
QString description = lne.mid(7);
emit addTask(Task(Task::Error, description,
- m_currentFile,
+ Utils::FileName::fromUserInput(m_currentFile),
-1 /* linenumber */,
- QLatin1String(TASK_CATEGORY_BUILDSYSTEM)));
+ Core::Id(TASK_CATEGORY_BUILDSYSTEM)));
m_waitingForStdErrContinuation = true;
return;
}
@@ -176,9 +176,9 @@ void AbldParser::stdError(const QString &line)
{
emit addTask(Task(Task::Unknown,
lne /* description */,
- m_currentFile,
+ Utils::FileName::fromUserInput(m_currentFile),
-1 /* linenumber */,
- QLatin1String(TASK_CATEGORY_BUILDSYSTEM)));
+ Core::Id(TASK_CATEGORY_BUILDSYSTEM)));
m_waitingForStdErrContinuation = true;
return;
}
diff --git a/src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp b/src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp
index 1f8644ec35..8c4446103e 100644
--- a/src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp
@@ -153,7 +153,7 @@ QList<ProjectExplorer::Task> Qt4SymbianTargetFactory::reportIssues(const QString
QCoreApplication::translate("ProjectExplorer::Internal::S60ProjectChecker",
"The Symbian tool chain does not handle spaces "
"in the project path '%1'.").arg(projectPath),
- QString(), -1, QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ Utils::FileName(), -1, Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
}
if (projectName.contains(QRegExp(QLatin1String("[^a-zA-Z0-9.-]")))) {
results.append(Task(Task::Warning,
@@ -161,7 +161,7 @@ QList<ProjectExplorer::Task> Qt4SymbianTargetFactory::reportIssues(const QString
"The Symbian tool chain does not handle special "
"characters in the project name '%1' well.")
.arg(projectName),
- QString(), -1, QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ Utils::FileName(), -1, Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
}
return results;
}
diff --git a/src/plugins/qt4projectmanager/qt-s60/rvctparser.cpp b/src/plugins/qt4projectmanager/qt-s60/rvctparser.cpp
index b2bf58b32b..8329247166 100644
--- a/src/plugins/qt4projectmanager/qt-s60/rvctparser.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/rvctparser.cpp
@@ -68,9 +68,9 @@ void RvctParser::stdError(const QString &line)
m_task = new Task(Task::Error,
m_genericProblem.cap(2) /* description */,
- QString(),
+ Utils::FileName(),
-1 /* linenumber */,
- QLatin1String(TASK_CATEGORY_COMPILE));
+ Core::Id(TASK_CATEGORY_COMPILE));
if (m_warningOrError.cap(4) == QLatin1String("Warning"))
m_task->type = Task::Warning;
else if (m_warningOrError.cap(4) == QLatin1String("Error"))
@@ -83,9 +83,9 @@ void RvctParser::stdError(const QString &line)
m_task = new Task(Task::Unknown,
m_warningOrError.cap(5) /* description */,
- m_warningOrError.cap(1) /* file */,
+ Utils::FileName::fromUserInput(m_warningOrError.cap(1)) /* file */,
m_warningOrError.cap(2).toInt() /* line */,
- QLatin1String(TASK_CATEGORY_COMPILE));
+ Core::Id(TASK_CATEGORY_COMPILE));
if (m_warningOrError.cap(4) == QLatin1String("Warning"))
m_task->type = Task::Warning;
else if (m_warningOrError.cap(4) == QLatin1String("Error"))
@@ -152,7 +152,7 @@ void Qt4ProjectManagerPlugin::testRvctOutputParser_data()
QTest::addColumn<QList<ProjectExplorer::Task> >("tasks");
QTest::addColumn<QString>("outputLines");
- const QString categoryCompile = QLatin1String(Constants::TASK_CATEGORY_COMPILE);
+ const Core::Id categoryCompile = Core::Id(Constants::TASK_CATEGORY_COMPILE);
QTest::newRow("pass-through stdout")
<< QString::fromLatin1("Sometext") << OutputParserTester::STDOUT
<< QString::fromLatin1("Sometext\n") << QString()
@@ -175,7 +175,7 @@ void Qt4ProjectManagerPlugin::testRvctOutputParser_data()
QLatin1String("#68-D: integer conversion resulted in a change of sign\n"
" : public _Integer_limits<char, CHAR_MIN, CHAR_MAX, -1, true>\n"
" ^"),
- QLatin1String("../../../../s60-sdk/epoc32/include/stdapis/stlport/stl/_limits.h"), 256,
+ Utils::FileName::fromUserInput("../../../../s60-sdk/epoc32/include/stdapis/stlport/stl/_limits.h"), 256,
categoryCompile)
)
<< QString();
@@ -190,7 +190,7 @@ void Qt4ProjectManagerPlugin::testRvctOutputParser_data()
QLatin1String("#20: identifier \"e\" is undefined\n"
" delete ui;e\n"
" ^"),
- QLatin1String("mainwindow.cpp"), 22,
+ Utils::FileName::fromUserInput("mainwindow.cpp"), 22,
categoryCompile)
)
<< QString();
@@ -201,7 +201,7 @@ void Qt4ProjectManagerPlugin::testRvctOutputParser_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("L6218E: Undefined symbol MainWindow::sth() (referred from mainwindow.o)"),
- QString(), -1,
+ Utils::FileName(), -1,
categoryCompile)
)
<< QString();
@@ -232,7 +232,7 @@ void Qt4ProjectManagerPlugin::testRvctOutputParser_data()
"FLEXnet Licensing error:-1,359. System Error: 2 \"No such file or directory\"\n"
"For further information, refer to the FLEXnet Licensing End User Guide,\n"
"available at \"www.macrovision.com\"."),
- QString(), -1,
+ Utils::FileName(), -1,
categoryCompile)
)
<< QString();
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60createpackageparser.cpp b/src/plugins/qt4projectmanager/qt-s60/s60createpackageparser.cpp
index 5e6e06d2d5..a0449c1b2a 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60createpackageparser.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60createpackageparser.cpp
@@ -63,8 +63,8 @@ bool S60CreatePackageParser::parseLine(const QString &line)
"Use a developer certificate or any other signing option to prevent "
"this patching from happening.").
arg(m_packageName, lines);
- ProjectExplorer::Task task(ProjectExplorer::Task::Warning, message, QString(), -1,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
+ ProjectExplorer::Task task(ProjectExplorer::Task::Warning, message, Utils::FileName(), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
QTextLayout::FormatRange fr;
fr.start = message.indexOf(lines);
@@ -86,11 +86,11 @@ bool S60CreatePackageParser::parseLine(const QString &line)
tr("Cannot create Smart Installer package "
"as the Smart Installer's base file is missing. "
"Please ensure that it is located in the SDK."),
- QString(), -1,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ Utils::FileName(), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
else
- emit addTask(ProjectExplorer::Task(ProjectExplorer::Task::Error, errorMessage, QString(), -1,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ emit addTask(ProjectExplorer::Task(ProjectExplorer::Task::Error, errorMessage, Utils::FileName(), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
return true;
}
return false;
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp
index 06247502ec..2652e7cf63 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp
@@ -510,8 +510,8 @@ void S60CreatePackageStep::reportPackageStepIssue(const QString &message, bool i
ProjectExplorer::Task::Error:
ProjectExplorer::Task::Warning,
message,
- QString(), -1,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ Utils::FileName(), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
}
void S60CreatePackageStep::packageWarningDialogDone()
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp b/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp
index 3deddf9b2b..949086250a 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp
@@ -195,8 +195,8 @@ void S60DeployStep::reportError(const QString &error)
emit addOutput(error, ProjectExplorer::BuildStep::ErrorMessageOutput);
emit addTask(ProjectExplorer::Task(ProjectExplorer::Task::Error,
error,
- QString(), -1,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ Utils::FileName(), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
emit finished(false);
}
@@ -604,8 +604,8 @@ void S60DeployStep::checkForCancel()
appendMessage(canceledText, true);
emit addTask(ProjectExplorer::Task(ProjectExplorer::Task::Error,
canceledText,
- QString(), -1,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ Utils::FileName(), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
emit finishNow(false);
}
}
diff --git a/src/plugins/qt4projectmanager/qt-s60/sbsv2parser.cpp b/src/plugins/qt4projectmanager/qt-s60/sbsv2parser.cpp
index 6c1eaa30e2..97754fe163 100644
--- a/src/plugins/qt4projectmanager/qt-s60/sbsv2parser.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/sbsv2parser.cpp
@@ -66,8 +66,8 @@ void SbsV2Parser::stdOutput(const QString &line)
QString logfile = QDir::fromNativeSeparators(line.mid(18).trimmed());
parseLogFile(logfile);
addTask(ProjectExplorer::Task(Task::Unknown, tr("SBSv2 build log"),
- logfile, -1,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ Utils::FileName::fromUserInput(logfile), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
}
}
@@ -81,14 +81,15 @@ void SbsV2Parser::taskAdded(const ProjectExplorer::Task &task)
{
// Fix pathes:
ProjectExplorer::Task tmp(task);
+ const QString filename = tmp.file.toString();
if (!tmp.file.isEmpty()) {
- QFileInfo fi(tmp.file);
+ QFileInfo fi(tmp.file.toFileInfo());
if (!fi.isAbsolute()) {
- if (m_currentSource.exists(tmp.file))
- tmp.file = m_currentSource.absoluteFilePath(tmp.file);
- else if (m_currentTarget.exists(tmp.file))
- tmp.file = m_currentTarget.absoluteFilePath(tmp.file);
+ if (m_currentSource.exists(filename))
+ tmp.file = Utils::FileName::fromString(m_currentSource.absoluteFilePath(filename));
+ else if (m_currentTarget.exists(filename))
+ tmp.file = Utils::FileName::fromString(m_currentTarget.absoluteFilePath(filename));
}
}
@@ -132,7 +133,7 @@ void SbsV2Parser::readError()
Q_ASSERT(m_log.isStartElement() && m_log.name() == QLatin1String("error"));
QString error = m_log.readElementText();
- addTask(Task(Task::Error, error, QString(), -1, QLatin1String(Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ addTask(Task(Task::Error, error, Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
}
void SbsV2Parser::readWarning()
@@ -140,7 +141,7 @@ void SbsV2Parser::readWarning()
Q_ASSERT(m_log.isStartElement() && m_log.name() == QLatin1String("warning"));
QString warning = m_log.readElementText();
- addTask(Task(Task::Warning, warning, QString(), -1, QLatin1String(Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ addTask(Task(Task::Warning, warning, Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
}
void SbsV2Parser::readRecipe()
@@ -186,10 +187,10 @@ void SbsV2Parser::readRecipe()
if (returnCode != 0) {
//: %1 is the SBSv2 build recipe name, %2 the return code of the failed command
QString description = tr("Recipe %1 failed with exit code %2.").arg(name).arg(returnCode);
- m_hub->addTask(Task(Task::Error, description, QString(), -1,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
- m_hub->addTask(Task(Task::Unknown, outputText, QString(), -1,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ m_hub->addTask(Task(Task::Error, description, Utils::FileName(), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ m_hub->addTask(Task(Task::Unknown, outputText, Utils::FileName(), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
}
}
@@ -230,8 +231,8 @@ void Qt4ProjectManagerPlugin::testSbsV2OutputParsers_data()
<< QString() << QString()
<< (QList<ProjectExplorer::Task>()
<< ProjectExplorer::Task(Task::Unknown, QLatin1String("SBSv2 build log"),
- QLatin1String("X:/epoc32/build/Makefile.2010-08-10-15-25-52.log"), -1,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)))
+ Utils::FileName::fromUserInput("X:/epoc32/build/Makefile.2010-08-10-15-25-52.log"), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString();
}
diff --git a/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.cpp b/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.cpp
index 0acf96eb9a..1af9843cee 100644
--- a/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.cpp
@@ -344,7 +344,7 @@ QList<ProjectExplorer::Task> SymbianQtVersion::reportIssuesImpl(const QString &p
results.append(ProjectExplorer::Task(ProjectExplorer::Task::Error,
QCoreApplication::translate("ProjectExplorer::Internal::S60ProjectChecker",
"The Symbian SDK and the project sources must reside on the same drive."),
- QString(), -1, QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ Utils::FileName(), -1, Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
}
return results;
}
diff --git a/src/plugins/qt4projectmanager/qt-s60/winscwparser.cpp b/src/plugins/qt4projectmanager/qt-s60/winscwparser.cpp
index c8ef970a14..63786474ee 100644
--- a/src/plugins/qt4projectmanager/qt-s60/winscwparser.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/winscwparser.cpp
@@ -58,9 +58,9 @@ void WinscwParser::stdOutput(const QString &line)
if (m_compilerProblem.indexIn(lne) > -1) {
Task task(Task::Error,
m_compilerProblem.cap(3) /* description */,
- m_compilerProblem.cap(1) /* filename */,
+ Utils::FileName::fromUserInput(m_compilerProblem.cap(1)) /* filename */,
m_compilerProblem.cap(2).toInt() /* linenumber */,
- QLatin1String(TASK_CATEGORY_COMPILE));
+ Core::Id(TASK_CATEGORY_COMPILE));
if (task.description.startsWith(QLatin1String("warning: "))) {
task.type = Task::Warning;
task.description = task.description.mid(9);
@@ -78,9 +78,9 @@ void WinscwParser::stdError(const QString &line)
if (m_linkerProblem.indexIn(lne) > -1) {
emit addTask(Task(Task::Error,
m_linkerProblem.cap(2) /* description */,
- m_linkerProblem.cap(1) /* filename */,
+ Utils::FileName::fromUserInput(m_linkerProblem.cap(1)) /* filename */,
-1 /* linenumber */,
- QLatin1String(TASK_CATEGORY_COMPILE)));
+ Core::Id(TASK_CATEGORY_COMPILE)));
return;
}
IOutputParser::stdError(line);
diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp
index df04fb811c..db1075999d 100644
--- a/src/plugins/qtsupport/baseqtversion.cpp
+++ b/src/plugins/qtsupport/baseqtversion.cpp
@@ -1017,8 +1017,8 @@ QList<ProjectExplorer::Task> BaseQtVersion::reportIssuesImpl(const QString &proF
if (!isValid()) {
//: %1: Reason for being invalid
const QString msg = QCoreApplication::translate("Qt4ProjectManager::QtVersion", "The Qt version is invalid: %1").arg(invalidReason());
- results.append(ProjectExplorer::Task(ProjectExplorer::Task::Error, msg, QString(), -1,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ results.append(ProjectExplorer::Task(ProjectExplorer::Task::Error, msg, Utils::FileName(), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
}
QFileInfo qmakeInfo = qmakeCommand().toFileInfo();
@@ -1027,8 +1027,8 @@ QList<ProjectExplorer::Task> BaseQtVersion::reportIssuesImpl(const QString &proF
//: %1: Path to qmake executable
const QString msg = QCoreApplication::translate("Qt4ProjectManager::QtVersion",
"The qmake command \"%1\" was not found or is not executable.").arg(qmakeCommand().toUserOutput());
- results.append(ProjectExplorer::Task(ProjectExplorer::Task::Error, msg, QString(), -1,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ results.append(ProjectExplorer::Task(ProjectExplorer::Task::Error, msg, Utils::FileName(), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
}
QString sourcePath = QFileInfo(proFile).absolutePath();
@@ -1038,14 +1038,14 @@ QList<ProjectExplorer::Task> BaseQtVersion::reportIssuesImpl(const QString &proF
if ((tmpBuildDir.startsWith(sourcePath)) && (tmpBuildDir != sourcePath)) {
const QString msg = QCoreApplication::translate("Qt4ProjectManager::QtVersion",
"Qmake does not support build directories below the source directory.");
- results.append(ProjectExplorer::Task(ProjectExplorer::Task::Warning, msg, QString(), -1,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ results.append(ProjectExplorer::Task(ProjectExplorer::Task::Warning, msg, Utils::FileName(), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
} else if (tmpBuildDir.count(slash) != sourcePath.count(slash) && qtVersion() < QtVersionNumber(4,8, 0)) {
const QString msg = QCoreApplication::translate("Qt4ProjectManager::QtVersion",
"The build directory needs to be at the same level as the source directory.");
- results.append(ProjectExplorer::Task(ProjectExplorer::Task::Warning, msg, QString(), -1,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ results.append(ProjectExplorer::Task(ProjectExplorer::Task::Warning, msg, Utils::FileName(), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
}
return results;
diff --git a/src/plugins/qtsupport/qtparser.cpp b/src/plugins/qtsupport/qtparser.cpp
index 9388396486..f515a2327c 100644
--- a/src/plugins/qtsupport/qtparser.cpp
+++ b/src/plugins/qtsupport/qtparser.cpp
@@ -60,9 +60,9 @@ void QtParser::stdError(const QString &line)
lineno = -1;
Task task(Task::Error,
m_mocRegExp.cap(5).trimmed(),
- m_mocRegExp.cap(1) /* filename */,
+ Utils::FileName::fromUserInput(m_mocRegExp.cap(1)) /* filename */,
lineno,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE));
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE));
if (m_mocRegExp.cap(4) == QLatin1String("Warning"))
task.type = Task::Warning;
emit addTask(task);
@@ -125,8 +125,8 @@ void QtSupportPlugin::testQtOutputParser_data()
<< QString() << QString()
<< (QList<ProjectExplorer::Task>() << Task(Task::Warning,
QLatin1String("No relevant classes found. No output generated."),
- QLatin1String("..\\untitled\\errorfile.h"), 0,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
+ Utils::FileName::fromUserInput("..\\untitled\\errorfile.h"), 0,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString();
QTest::newRow("moc warning 2")
<< QString::fromLatin1("c:\\code\\test.h(96): Warning: Property declaration ) has no READ accessor function. The property will be invalid.")
@@ -134,8 +134,8 @@ void QtSupportPlugin::testQtOutputParser_data()
<< QString() << QString()
<< (QList<ProjectExplorer::Task>() << Task(Task::Warning,
QLatin1String("Property declaration ) has no READ accessor function. The property will be invalid."),
- QLatin1String("c:\\code\\test.h"), 96,
- QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
+ Utils::FileName::fromUserInput("c:\\code\\test.h"), 96,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString();
}
diff --git a/src/plugins/remotelinux/abstractpackagingstep.cpp b/src/plugins/remotelinux/abstractpackagingstep.cpp
index 7ba42c8691..89e8b96423 100644
--- a/src/plugins/remotelinux/abstractpackagingstep.cpp
+++ b/src/plugins/remotelinux/abstractpackagingstep.cpp
@@ -172,8 +172,8 @@ void AbstractPackagingStep::setDeploymentInfoUnmodified()
void AbstractPackagingStep::raiseError(const QString &errorMessage)
{
emit addOutput(errorMessage, BuildStep::ErrorOutput);
- emit addTask(Task(Task::Error, errorMessage, QString(), -1,
- Constants::TASK_CATEGORY_BUILDSYSTEM));
+ emit addTask(Task(Task::Error, errorMessage, Utils::FileName(), -1,
+ Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
}
} // namespace RemoteLinux
diff --git a/src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp b/src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp
index e1ed4c4d7a..380ab1092e 100644
--- a/src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp
+++ b/src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp
@@ -130,16 +130,16 @@ void AbstractRemoteLinuxDeployStep::handleProgressMessage(const QString &message
void AbstractRemoteLinuxDeployStep::handleErrorMessage(const QString &message)
{
emit addOutput(message, ErrorMessageOutput);
- emit addTask(Task(Task::Error, message, QString(), -1,
- ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
+ emit addTask(Task(Task::Error, message, Utils::FileName(), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
d->hasError = true;
}
void AbstractRemoteLinuxDeployStep::handleWarningMessage(const QString &message)
{
emit addOutput(message, ErrorMessageOutput);
- emit addTask(Task(Task::Warning, message, QString(), -1,
- ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
+ emit addTask(Task(Task::Warning, message, Utils::FileName(), -1,
+ Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
}
void AbstractRemoteLinuxDeployStep::handleFinished()
diff --git a/src/plugins/tasklist/stopmonitoringhandler.cpp b/src/plugins/tasklist/stopmonitoringhandler.cpp
index 7f94b58e44..48f5e13ed6 100644
--- a/src/plugins/tasklist/stopmonitoringhandler.cpp
+++ b/src/plugins/tasklist/stopmonitoringhandler.cpp
@@ -57,7 +57,7 @@ StopMonitoringHandler::~StopMonitoringHandler()
bool StopMonitoringHandler::canHandle(const ProjectExplorer::Task &task)
{
- return task.category == QLatin1String(Constants::TASKLISTTASK_ID);
+ return task.category == Core::Id(Constants::TASKLISTTASK_ID);
}
void StopMonitoringHandler::handle(const ProjectExplorer::Task &task)
diff --git a/src/plugins/tasklist/tasklistplugin.cpp b/src/plugins/tasklist/tasklistplugin.cpp
index e707b4c706..b8690edb83 100644
--- a/src/plugins/tasklist/tasklistplugin.cpp
+++ b/src/plugins/tasklist/tasklistplugin.cpp
@@ -122,7 +122,9 @@ public:
}
description = unescape(description);
- hub->addTask(ProjectExplorer::Task(type, description, file, line, QLatin1String(Constants::TASKLISTTASK_ID)));
+ hub->addTask(ProjectExplorer::Task(type, description,
+ Utils::FileName::fromUserInput(file), line,
+ Core::Id(Constants::TASKLISTTASK_ID)));
}
return true;
}
@@ -196,7 +198,7 @@ bool TaskListPlugin::initialize(const QStringList &arguments, QString *errorMess
d->hub = pm->getObject<ProjectExplorer::TaskHub>();
//: Category under which tasklist tasks are listed in Issues view
- d->hub->addCategory(QLatin1String(Constants::TASKLISTTASK_ID), tr("My Tasks"));
+ d->hub->addCategory(Core::Id(Constants::TASKLISTTASK_ID), tr("My Tasks"));
if (!Core::ICore::mimeDatabase()->addMimeTypes(QLatin1String(":tasklist/TaskList.mimetypes.xml"), errorMessage))
return false;
@@ -228,7 +230,7 @@ void TaskListPlugin::stopMonitoring()
void TaskListPlugin::clearTasks()
{
- d->hub->clearTasks(QLatin1String(Constants::TASKLISTTASK_ID));
+ d->hub->clearTasks(Core::Id(Constants::TASKLISTTASK_ID));
}
Q_EXPORT_PLUGIN(TaskListPlugin)