forked from qt-creator/qt-creator
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: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -59,9 +59,10 @@ void ProMessageHandler::message(int type, const QString &msg, const QString &fil
|
||||
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()
|
||||
pf->deref();
|
||||
}
|
||||
|
||||
void ProFileReader::setCumulative(bool on)
|
||||
{
|
||||
ProMessageHandler::setVerbose(!on);
|
||||
ProFileEvaluator::setCumulative(on);
|
||||
}
|
||||
|
||||
void ProFileReader::aboutToEval(ProFile *, ProFile *pro, EvalFileType type)
|
||||
{
|
||||
if (m_ignoreLevel || (type != EvalProjectFile && type != EvalIncludeFile)) {
|
||||
|
||||
@@ -49,7 +49,7 @@ class QTSUPPORT_EXPORT ProMessageHandler : public QObject, public QMakeHandler
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ProMessageHandler(bool verbose = false);
|
||||
ProMessageHandler(bool verbose = true);
|
||||
virtual ~ProMessageHandler() {}
|
||||
|
||||
virtual void aboutToEval(ProFile *, ProFile *, EvalFileType) {}
|
||||
@@ -57,6 +57,8 @@ public:
|
||||
virtual void message(int type, const QString &msg, const QString &fileName, int lineNo);
|
||||
virtual void fileMessage(const QString &msg);
|
||||
|
||||
void setVerbose(bool on) { m_verbose = on; }
|
||||
|
||||
signals:
|
||||
void writeMessage(const QString &error, Core::MessageManager::PrintToOutputPaneFlags flag);
|
||||
|
||||
@@ -72,6 +74,8 @@ public:
|
||||
ProFileReader(ProFileGlobals *option, QMakeVfs *vfs);
|
||||
~ProFileReader();
|
||||
|
||||
void setCumulative(bool on);
|
||||
|
||||
QList<ProFile*> includeFiles() const;
|
||||
|
||||
ProFile *proFileFor(const QString &name);
|
||||
|
||||
Reference in New Issue
Block a user