Commit ecb4e2be authored by Daniel Teske's avatar Daniel Teske
Browse files

ProMessageHandler: Adjust to MessageManager api change



Change-Id: I047b6562765f981735c04f35d5f76efc288d0de1
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 05d90a62
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include "profilereader.h" #include "profilereader.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/messagemanager.h>
#include <QDir> #include <QDir>
#include <QDebug> #include <QDebug>
...@@ -50,15 +49,15 @@ static QString format(const QString &fileName, int lineNo, const QString &msg) ...@@ -50,15 +49,15 @@ static QString format(const QString &fileName, int lineNo, const QString &msg)
ProMessageHandler::ProMessageHandler(bool verbose) ProMessageHandler::ProMessageHandler(bool verbose)
: m_verbose(verbose) : m_verbose(verbose)
{ {
QObject::connect(this, SIGNAL(errorFound(QString)), QObject::connect(this, SIGNAL(errorFound(QString,Core::MessageManager::PrintToOutputPaneFlags)),
Core::ICore::messageManager(), SLOT(printToOutputPane(QString)), Core::ICore::messageManager(), SLOT(printToOutputPane(QString,Core::MessageManager::PrintToOutputPaneFlags)),
Qt::QueuedConnection); Qt::QueuedConnection);
} }
void ProMessageHandler::message(int type, const QString &msg, const QString &fileName, int lineNo) void ProMessageHandler::message(int type, const QString &msg, const QString &fileName, int lineNo)
{ {
if ((type & CategoryMask) == ErrorMessage && ((type & SourceMask) == SourceParser || m_verbose)) if ((type & CategoryMask) == ErrorMessage && ((type & SourceMask) == SourceParser || m_verbose))
emit errorFound(format(fileName, lineNo, msg)); emit errorFound(format(fileName, lineNo, msg), Core::MessageManager::NoModeSwitch);
} }
void ProMessageHandler::fileMessage(const QString &) void ProMessageHandler::fileMessage(const QString &)
......
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
#include "proparser/qmakeevaluator.h" #include "proparser/qmakeevaluator.h"
#include "proparser/profileevaluator.h" #include "proparser/profileevaluator.h"
#include <coreplugin/messagemanager.h>
#include <QObject> #include <QObject>
#include <QMap> #include <QMap>
#include <QTimer> #include <QTimer>
...@@ -59,7 +61,7 @@ public: ...@@ -59,7 +61,7 @@ public:
virtual void fileMessage(const QString &msg); virtual void fileMessage(const QString &msg);
signals: signals:
void errorFound(const QString &error); void errorFound(const QString &error, Core::MessageManager::PrintToOutputPaneFlags flag);
private: private:
bool m_verbose; bool m_verbose;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment