summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-11-04 05:34:17 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-11-19 00:56:13 (GMT)
commit3c05109ce609574f1525c465f68817d3af39397e (patch)
tree1be8599c63ee9e4f659123d1d503b29e7f0b3197 /src
parent530b052bed6fd74699fead438035dc4684d83335 (diff)
downloadQt-3c05109ce609574f1525c465f68817d3af39397e.zip
Qt-3c05109ce609574f1525c465f68817d3af39397e.tar.gz
Qt-3c05109ce609574f1525c465f68817d3af39397e.tar.bz2
Support directly setting string range data.
Diffstat (limited to 'src')
-rw-r--r--src/declarative/debugger/qdeclarativedebugtrace.cpp8
-rw-r--r--src/declarative/debugger/qdeclarativedebugtrace_p.h4
-rw-r--r--src/declarative/qml/qdeclarativebinding.cpp5
3 files changed, 9 insertions, 8 deletions
diff --git a/src/declarative/debugger/qdeclarativedebugtrace.cpp b/src/declarative/debugger/qdeclarativedebugtrace.cpp
index 5edc3b6..cd4306b 100644
--- a/src/declarative/debugger/qdeclarativedebugtrace.cpp
+++ b/src/declarative/debugger/qdeclarativedebugtrace.cpp
@@ -66,10 +66,10 @@ void QDeclarativeDebugTrace::startRange(RangeType t)
traceInstance()->startRangeImpl(t);
}
-void QDeclarativeDebugTrace::rangeData(RangeType t, const QUrl &url)
+void QDeclarativeDebugTrace::rangeData(RangeType t, const QString &data)
{
if (QDeclarativeDebugService::isDebuggingEnabled())
- traceInstance()->rangeDataImpl(t, url);
+ traceInstance()->rangeDataImpl(t, data);
}
void QDeclarativeDebugTrace::endRange(RangeType t)
@@ -100,14 +100,14 @@ void QDeclarativeDebugTrace::startRangeImpl(RangeType range)
processMessage(data);
}
-void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QUrl &u)
+void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QString &rData)
{
if (status() != Enabled || !m_enabled)
return;
QByteArray data;
QDataStream ds(&data, QIODevice::WriteOnly);
- ds << m_timer.elapsed() << (int)RangeData << (int)range << (QString)u.toString();
+ ds << m_timer.elapsed() << (int)RangeData << (int)range << rData;
processMessage(data);
}
diff --git a/src/declarative/debugger/qdeclarativedebugtrace_p.h b/src/declarative/debugger/qdeclarativedebugtrace_p.h
index d0e776e..b935fbe 100644
--- a/src/declarative/debugger/qdeclarativedebugtrace_p.h
+++ b/src/declarative/debugger/qdeclarativedebugtrace_p.h
@@ -83,7 +83,7 @@ public:
static void addEvent(EventType);
static void startRange(RangeType);
- static void rangeData(RangeType, const QUrl &);
+ static void rangeData(RangeType, const QString &);
static void endRange(RangeType);
QDeclarativeDebugTrace();
@@ -92,7 +92,7 @@ protected:
private:
void addEventImpl(EventType);
void startRangeImpl(RangeType);
- void rangeDataImpl(RangeType, const QUrl &);
+ void rangeDataImpl(RangeType, const QString &);
void endRangeImpl(RangeType);
void processMessage(const QByteArray &);
void sendMessages();
diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp
index 2a1abd0..055d009 100644
--- a/src/declarative/qml/qdeclarativebinding.cpp
+++ b/src/declarative/qml/qdeclarativebinding.cpp
@@ -117,9 +117,10 @@ QDeclarativeProperty QDeclarativeBinding::property() const
class QDeclarativeBindingProfiler {
public:
- QDeclarativeBindingProfiler()
+ QDeclarativeBindingProfiler(QDeclarativeBinding *bind)
{
QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Binding);
+ //QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::Binding, bind->expression());
}
~QDeclarativeBindingProfiler()
@@ -136,7 +137,7 @@ void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags)
return;
if (!d->updating) {
- QDeclarativeBindingProfiler prof;
+ QDeclarativeBindingProfiler prof(this);
d->updating = true;
bool wasDeleted = false;
d->deleted = &wasDeleted;