Commit 7d962189 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

make ProMessageHandler connect directly to the message manager

that way the users don't have to duplicate the connect everywhere.
as a side effect, MaemoPackageContents will have error reporting now.
parent 058354ce
......@@ -29,6 +29,9 @@
#include "profilereader.h"
#include <coreplugin/icore.h>
#include <coreplugin/messagemanager.h>
#include <QtCore/QDir>
#include <QtCore/QDebug>
......@@ -43,6 +46,14 @@ static QString format(const QString &fileName, int lineNo, const QString &msg)
return msg;
}
ProMessageHandler::ProMessageHandler(bool verbose)
: m_verbose(verbose)
{
QObject::connect(this, SIGNAL(errorFound(QString)),
Core::ICore::instance()->messageManager(), SLOT(printToOutputPane(QString)),
Qt::QueuedConnection);
}
void ProMessageHandler::parseError(const QString &fileName, int lineNo, const QString &msg)
{
emit errorFound(format(fileName, lineNo, msg));
......
......@@ -46,7 +46,7 @@ class ProMessageHandler : public QObject,
Q_OBJECT
public:
ProMessageHandler(bool verbose = false) : m_verbose(verbose) {}
ProMessageHandler(bool verbose = false);
virtual ~ProMessageHandler() {}
virtual void aboutToEval(ProFile *, ProFile *, EvalFileType) {}
......
......@@ -937,9 +937,6 @@ ProFileReader *Qt4Project::createProFileReader(Qt4ProFileNode *qt4ProFileNode)
++m_proFileOptionRefCnt;
ProFileReader *reader = new ProFileReader(m_proFileOption);
connect(reader, SIGNAL(errorFound(QString)),
this, SLOT(proFileParseError(QString)),
Qt::QueuedConnection);
reader->setOutputDir(qt4ProFileNode->buildDir());
......
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