aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-04-07 10:56:42 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2016-04-08 13:03:25 +0200
commit68ba8fe3ccf7abe8d24ba3614f8d7ceb3778de74 (patch)
tree8fdc2922aa5375203fef05746691e88632a92bbe /src/imports
parent0d8de448ef746aea7215f6f654660500dc9601d2 (diff)
parenta676e4e2dae945c02521691c7018f5a5534feff9 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
This change also fixes the build of two benchmarks, tst_affectors and tst_emission. Conflicts: src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro src/qml/qml/ftw/qhashfield_p.h tests/benchmarks/particles/affectors/tst_affectors.cpp tests/benchmarks/particles/emission/tst_emission.cpp tests/benchmarks/qml/pointers/pointers.pro tests/benchmarks/qml/pointers/tst_pointers.cpp tests/benchmarks/qml/qmltime/qmltime.pro tests/benchmarks/qml/qquickwindow/qquickwindow.pro Change-Id: I595309d1e183c18371cb9b07af6e4681059de3b2
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/folderlistmodel/fileinfothread.cpp1
-rw-r--r--src/imports/folderlistmodel/qquickfolderlistmodel.cpp1
-rw-r--r--src/imports/testlib/TestCase.qml24
3 files changed, 25 insertions, 1 deletions
diff --git a/src/imports/folderlistmodel/fileinfothread.cpp b/src/imports/folderlistmodel/fileinfothread.cpp
index 7338636784..5d911eec1e 100644
--- a/src/imports/folderlistmodel/fileinfothread.cpp
+++ b/src/imports/folderlistmodel/fileinfothread.cpp
@@ -66,7 +66,6 @@ FileInfoThread::FileInfoThread(QObject *parent)
connect(watcher, SIGNAL(directoryChanged(QString)), this, SLOT(dirChanged(QString)));
connect(watcher, SIGNAL(fileChanged(QString)), this, SLOT(updateFile(QString)));
#endif // !QT_NO_FILESYSTEMWATCHER
- start(LowPriority);
}
FileInfoThread::~FileInfoThread()
diff --git a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
index 9b0571a402..66af37c40c 100644
--- a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
+++ b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
@@ -538,6 +538,7 @@ void QQuickFolderListModel::componentComplete()
QString localPath = QQmlFile::urlToLocalFileOrQrc(d->currentDir);
if (localPath.isEmpty() || !QDir(localPath).exists())
setFolder(QUrl::fromLocalFile(QDir::currentPath()));
+ d->fileInfoThread.start(QThread::LowPriority);
}
/*!
diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml
index 0f73d97c1b..046ce507d4 100644
--- a/src/imports/testlib/TestCase.qml
+++ b/src/imports/testlib/TestCase.qml
@@ -972,6 +972,9 @@ Item {
\sa mouseRelease(), mouseClick(), mouseDoubleClick(), mouseDoubleClickSequence(), mouseMove(), mouseDrag(), mouseWheel()
*/
function mousePress(item, x, y, button, modifiers, delay) {
+ if (!item)
+ qtest_fail("No item given to mousePress", 1)
+
if (button === undefined)
button = Qt.LeftButton
if (modifiers === undefined)
@@ -1003,6 +1006,9 @@ Item {
\sa mousePress(), mouseClick(), mouseDoubleClick(), mouseDoubleClickSequence(), mouseMove(), mouseDrag(), mouseWheel()
*/
function mouseRelease(item, x, y, button, modifiers, delay) {
+ if (!item)
+ qtest_fail("No item given to mouseRelease", 1)
+
if (button === undefined)
button = Qt.LeftButton
if (modifiers === undefined)
@@ -1036,6 +1042,9 @@ Item {
\sa mousePress(), mouseClick(), mouseDoubleClick(), mouseDoubleClickSequence(), mouseMove(), mouseRelease(), mouseWheel()
*/
function mouseDrag(item, x, y, dx, dy, button, modifiers, delay) {
+ if (!item)
+ qtest_fail("No item given to mouseDrag", 1)
+
if (item.x === undefined || item.y === undefined)
return
if (button === undefined)
@@ -1083,6 +1092,9 @@ Item {
\sa mousePress(), mouseRelease(), mouseDoubleClick(), mouseDoubleClickSequence(), mouseMove(), mouseDrag(), mouseWheel()
*/
function mouseClick(item, x, y, button, modifiers, delay) {
+ if (!item)
+ qtest_fail("No item given to mouseClick", 1)
+
if (button === undefined)
button = Qt.LeftButton
if (modifiers === undefined)
@@ -1114,6 +1126,9 @@ Item {
\sa mouseDoubleClickSequence(), mousePress(), mouseRelease(), mouseClick(), mouseMove(), mouseDrag(), mouseWheel()
*/
function mouseDoubleClick(item, x, y, button, modifiers, delay) {
+ if (!item)
+ qtest_fail("No item given to mouseDoubleClick", 1)
+
if (button === undefined)
button = Qt.LeftButton
if (modifiers === undefined)
@@ -1152,6 +1167,9 @@ Item {
\sa mouseDoubleClick(), mousePress(), mouseRelease(), mouseClick(), mouseMove(), mouseDrag(), mouseWheel()
*/
function mouseDoubleClickSequence(item, x, y, button, modifiers, delay) {
+ if (!item)
+ qtest_fail("No item given to mouseDoubleClickSequence", 1)
+
if (button === undefined)
button = Qt.LeftButton
if (modifiers === undefined)
@@ -1181,6 +1199,9 @@ Item {
\sa mousePress(), mouseRelease(), mouseClick(), mouseDoubleClick(), mouseDoubleClickSequence(), mouseDrag(), mouseWheel()
*/
function mouseMove(item, x, y, delay, buttons) {
+ if (!item)
+ qtest_fail("No item given to mouseMove", 1)
+
if (delay == undefined)
delay = -1
if (buttons == undefined)
@@ -1206,6 +1227,9 @@ Item {
\sa mousePress(), mouseClick(), mouseDoubleClick(), mouseDoubleClickSequence(), mouseMove(), mouseRelease(), mouseDrag(), QWheelEvent::angleDelta()
*/
function mouseWheel(item, x, y, xDelta, yDelta, buttons, modifiers, delay) {
+ if (!item)
+ qtest_fail("No item given to mouseWheel", 1)
+
if (delay == undefined)
delay = -1
if (buttons == undefined)