QmlProfiler: Don't import QtQuick if we don't use it

This enables some of the tests to run in QML-only environments, without
QtQuick.

Change-Id: Icc7250b6ddab43730cb4744ffc4e0bade8574d26
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
This commit is contained in:
Ulf Hermann 2016-05-09 17:15:37 +02:00
parent 7234a59e03
commit f829f12d3d
7 changed files with 24 additions and 24 deletions

View File

@ -26,10 +26,10 @@
**
****************************************************************************/
import QtQuick 2.0
import QtQml 2.0
Rectangle {
Timer {
QtObject {
property var timer: Timer {
running: true
interval: 1
onTriggered: {
@ -38,7 +38,7 @@ Rectangle {
}
}
Timer {
property var stopTimer: Timer {
id: stopTimer
interval: 1000
onTriggered: {
@ -47,7 +47,7 @@ Rectangle {
}
}
Timer {
property var endTimer: Timer {
id: endTimer
interval: 1000
onTriggered: Qt.quit();

View File

@ -1,6 +1,6 @@
import QtQuick 2.0
import QtQml 2.0
Item {
QtObject {
Timer {
running: true
interval: 1

View File

@ -1,6 +1,6 @@
import QtQuick 2.0
import QtQml 2.0
Rectangle {
QtObject {
function something(i) {
if (i > 10) {
something(i / 4);
@ -9,8 +9,8 @@ Rectangle {
}
}
width: 400
height: 400
property int width: 400
property int height: 400
onWidthChanged: something(width);
Component.onCompleted: width = 500;

View File

@ -1,8 +1,8 @@
import QtQuick 2.0
import QtQml 2.0
Rectangle {
width: 400
height: 400
QtObject {
property int width: 400
property int height: 400
onWidthChanged: console.log(width);
Component.onCompleted: width = 500;

View File

@ -1,5 +1,5 @@
import QtQuick 2.0
import QtQml 2.0
Item {
QtObject {
}

View File

@ -1,10 +1,10 @@
import QtQuick 2.0
import QtQml 2.0
Rectangle {
width: 100
height: 62
QtObject {
property int width: 100
property int height: 62
Timer {
property var timer: Timer {
running: true
repeat: true
interval: 50

View File

@ -662,11 +662,11 @@ void tst_QQmlProfilerService::signalSourceLocation()
QLatin1String("signalSourceLocation.qml"));
expected.line = 8;
expected.column = 28;
VERIFY(MessageListQML, 13, expected, CheckAll);
VERIFY(MessageListQML, 9, expected, CheckAll);
expected.line = 7;
expected.column = 21;
VERIFY(MessageListQML, 15, expected, CheckAll);
VERIFY(MessageListQML, 11, expected, CheckAll);
}
void tst_QQmlProfilerService::javascript()