aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/osparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/projectexplorer/osparser.cpp')
-rw-r--r--src/plugins/projectexplorer/osparser.cpp43
1 files changed, 21 insertions, 22 deletions
diff --git a/src/plugins/projectexplorer/osparser.cpp b/src/plugins/projectexplorer/osparser.cpp
index 6fffa257a5..9a1f11a0ba 100644
--- a/src/plugins/projectexplorer/osparser.cpp
+++ b/src/plugins/projectexplorer/osparser.cpp
@@ -36,31 +36,30 @@ OsParser::OsParser()
setObjectName(QLatin1String("OsParser"));
}
-void OsParser::stdError(const QString &line)
+Utils::OutputLineParser::Result OsParser::handleLine(const QString &line, Utils::OutputFormat type)
{
- if (Utils::HostOsInfo::isLinuxHost()) {
- const QString trimmed = line.trimmed();
- if (trimmed.contains(QLatin1String(": error while loading shared libraries:")))
- emit addTask(CompileTask(Task::Error, trimmed));
+ if (type == Utils::StdOutFormat) {
+ if (Utils::HostOsInfo::isWindowsHost()) {
+ const QString trimmed = line.trimmed();
+ if (trimmed == QLatin1String("The process cannot access the file because it is "
+ "being used by another process.")) {
+ scheduleTask(CompileTask(Task::Error, tr(
+ "The process cannot access the file because it is being used "
+ "by another process.\n"
+ "Please close all running instances of your application before "
+ "starting a build.")), 1);
+ m_hasFatalError = true;
+ return Status::Done;
+ }
+ }
+ return Status::NotHandled;
}
- IOutputParser::stdError(line);
-}
-
-void OsParser::stdOutput(const QString &line)
-{
- if (Utils::HostOsInfo::isWindowsHost()) {
+ if (Utils::HostOsInfo::isLinuxHost()) {
const QString trimmed = line.trimmed();
- if (trimmed == QLatin1String("The process cannot access the file because it is being used by another process.")) {
- emit addTask(CompileTask(Task::Error, tr(
- "The process cannot access the file because it is being used by another process.\n"
- "Please close all running instances of your application before starting a build.")));
- m_hasFatalError = true;
+ if (trimmed.contains(QLatin1String(": error while loading shared libraries:"))) {
+ scheduleTask(CompileTask(Task::Error, trimmed), 1);
+ return Status::Done;
}
}
- IOutputParser::stdOutput(line);
-}
-
-bool OsParser::hasFatalErrors() const
-{
- return m_hasFatalError || IOutputParser::hasFatalErrors();
+ return Status::NotHandled;
}