Skip to content
Snippets Groups Projects
Commit e6c16815 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

make ProFileReader verbose in precise mode


we rely on successful completion and accurate output from it, so it is
counterproductive to suppress error messages from it.

Change-Id: I35a5e085ff9813ba774f6f24feccb4d0f04019fe
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent a7ccb310
No related branches found
No related tags found
No related merge requests found
...@@ -59,9 +59,10 @@ void ProMessageHandler::message(int type, const QString &msg, const QString &fil ...@@ -59,9 +59,10 @@ void ProMessageHandler::message(int type, const QString &msg, const QString &fil
emit writeMessage(format(fileName, lineNo, msg), Core::MessageManager::NoModeSwitch); emit writeMessage(format(fileName, lineNo, msg), Core::MessageManager::NoModeSwitch);
} }
void ProMessageHandler::fileMessage(const QString &) void ProMessageHandler::fileMessage(const QString &msg)
{ {
// we ignore these... if (m_verbose)
emit writeMessage(msg, Core::MessageManager::NoModeSwitch);
} }
...@@ -78,6 +79,12 @@ ProFileReader::~ProFileReader() ...@@ -78,6 +79,12 @@ ProFileReader::~ProFileReader()
pf->deref(); pf->deref();
} }
void ProFileReader::setCumulative(bool on)
{
ProMessageHandler::setVerbose(!on);
ProFileEvaluator::setCumulative(on);
}
void ProFileReader::aboutToEval(ProFile *, ProFile *pro, EvalFileType type) void ProFileReader::aboutToEval(ProFile *, ProFile *pro, EvalFileType type)
{ {
if (m_ignoreLevel || (type != EvalProjectFile && type != EvalIncludeFile)) { if (m_ignoreLevel || (type != EvalProjectFile && type != EvalIncludeFile)) {
......
...@@ -49,7 +49,7 @@ class QTSUPPORT_EXPORT ProMessageHandler : public QObject, public QMakeHandler ...@@ -49,7 +49,7 @@ class QTSUPPORT_EXPORT ProMessageHandler : public QObject, public QMakeHandler
Q_OBJECT Q_OBJECT
public: public:
ProMessageHandler(bool verbose = false); ProMessageHandler(bool verbose = true);
virtual ~ProMessageHandler() {} virtual ~ProMessageHandler() {}
virtual void aboutToEval(ProFile *, ProFile *, EvalFileType) {} virtual void aboutToEval(ProFile *, ProFile *, EvalFileType) {}
...@@ -57,6 +57,8 @@ public: ...@@ -57,6 +57,8 @@ public:
virtual void message(int type, const QString &msg, const QString &fileName, int lineNo); virtual void message(int type, const QString &msg, const QString &fileName, int lineNo);
virtual void fileMessage(const QString &msg); virtual void fileMessage(const QString &msg);
void setVerbose(bool on) { m_verbose = on; }
signals: signals:
void writeMessage(const QString &error, Core::MessageManager::PrintToOutputPaneFlags flag); void writeMessage(const QString &error, Core::MessageManager::PrintToOutputPaneFlags flag);
...@@ -72,6 +74,8 @@ public: ...@@ -72,6 +74,8 @@ public:
ProFileReader(ProFileGlobals *option, QMakeVfs *vfs); ProFileReader(ProFileGlobals *option, QMakeVfs *vfs);
~ProFileReader(); ~ProFileReader();
void setCumulative(bool on);
QList<ProFile*> includeFiles() const; QList<ProFile*> includeFiles() const;
ProFile *proFileFor(const QString &name); ProFile *proFileFor(const QString &name);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment