summaryrefslogtreecommitdiffstats
path: root/src/declarative/debugger
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-07-14 12:07:33 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-07-16 13:11:56 (GMT)
commit0f4dc1226bcc1204a2b11d737fbcb4b58acfaf08 (patch)
treee609b6d146c51697f71768ea0cbe16088ab6f06e /src/declarative/debugger
parent636698a5f97401a9aeb18cd690d7f08b05dcd5e6 (diff)
downloadQt-0f4dc1226bcc1204a2b11d737fbcb4b58acfaf08.zip
Qt-0f4dc1226bcc1204a2b11d737fbcb4b58acfaf08.tar.gz
Qt-0f4dc1226bcc1204a2b11d737fbcb4b58acfaf08.tar.bz2
QDeclarativeDebugTrace: Do not send message if the client did not enabled CanvasFrameRate
This silents a lot of warnings in creator. Reviewed-by: Aaron Kennedy
Diffstat (limited to 'src/declarative/debugger')
-rw-r--r--src/declarative/debugger/qdeclarativedebugtrace.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/declarative/debugger/qdeclarativedebugtrace.cpp b/src/declarative/debugger/qdeclarativedebugtrace.cpp
index 5e6d5e7..b2b0c8a 100644
--- a/src/declarative/debugger/qdeclarativedebugtrace.cpp
+++ b/src/declarative/debugger/qdeclarativedebugtrace.cpp
@@ -78,6 +78,9 @@ void QDeclarativeDebugTrace::endRange(RangeType t)
void QDeclarativeDebugTrace::addEventImpl(EventType event)
{
+ if (!isEnabled())
+ return;
+
QByteArray data;
QDataStream ds(&data, QIODevice::WriteOnly);
ds << m_timer.elapsed() << (int)Event << (int)event;
@@ -86,6 +89,9 @@ void QDeclarativeDebugTrace::addEventImpl(EventType event)
void QDeclarativeDebugTrace::startRangeImpl(RangeType range)
{
+ if (!isEnabled())
+ return;
+
QByteArray data;
QDataStream ds(&data, QIODevice::WriteOnly);
ds << m_timer.elapsed() << (int)RangeStart << (int)range;
@@ -94,6 +100,9 @@ void QDeclarativeDebugTrace::startRangeImpl(RangeType range)
void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QUrl &u)
{
+ if (!isEnabled())
+ return;
+
QByteArray data;
QDataStream ds(&data, QIODevice::WriteOnly);
ds << m_timer.elapsed() << (int)RangeData << (int)range << (QString)u.toString();
@@ -102,6 +111,9 @@ void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QUrl &u)
void QDeclarativeDebugTrace::endRangeImpl(RangeType range)
{
+ if (!isEnabled())
+ return;
+
QByteArray data;
QDataStream ds(&data, QIODevice::WriteOnly);
ds << m_timer.elapsed() << (int)RangeEnd << (int)range;