QmlDebug: Properly set the debug messages feature

We get notified about debug messages, after all.

Change-Id: Ie6fcdfa68b36969c264ebc6e54e6359c8d723584
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2016-04-27 16:10:31 +02:00
parent 93b25618cc
commit 95ccc23ada

View File

@@ -147,6 +147,7 @@ void QmlProfilerTraceClient::setRequestedFeatures(quint64 features)
connect(d->messageClient.data(), &QDebugMessageClient::message, this, [this](QtMsgType type,
const QString &text, const QmlDebug::QDebugContextInfo &context)
{
d->updateFeatures(ProfileDebugMessages);
emit debugMessage(type, context.timestamp, text,
QmlDebug::QmlEventLocation(context.file, context.line, 1));
});
@@ -174,7 +175,7 @@ bool QmlProfilerTraceClientPrivate::updateFeatures(ProfileFeature feature)
if (!(requestedFeatures & flag))
return false;
if (!(recordedFeatures & flag)) {
recordedFeatures |= (flag | 1ULL << ProfileDebugMessages);
recordedFeatures |= flag;
emit q->recordedFeaturesChanged(recordedFeatures);
}
return true;