summaryrefslogtreecommitdiffstats
path: root/tests/auto/qcompleter/tst_qcompleter.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-12-22 00:56:20 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-12-22 00:56:20 (GMT)
commit6db81533a21b08e9dffd7ef4431443732bda2f28 (patch)
treeaaec35a072f3062c8e2335a006ac6a251196f67a /tests/auto/qcompleter/tst_qcompleter.cpp
parentd37a3529ec883985b2967265f0797d749db74308 (diff)
parent435eeaac07e50db4938066e36cd1a778c4523493 (diff)
downloadQt-6db81533a21b08e9dffd7ef4431443732bda2f28.zip
Qt-6db81533a21b08e9dffd7ef4431443732bda2f28.tar.gz
Qt-6db81533a21b08e9dffd7ef4431443732bda2f28.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (33 commits) Add inter-process binary shader cache for MeeGo Track average wait times under our maximum spin time threshold Store and track spin times in nanosecond resolution Optimize adaptive spinning mutex code Improve QMutex contention performance on Linux Improve QMutex contention performance on Mac OS X Disable spinning under lock contention on single CPU machines Remove unnecessary testAndSetAcquire from QMutex::lockInternal() Move contender count maintenance to QMutexPrivate test contention when using 2 mutexes Ensure that every thread does contend in the contention tests Add baseline test data to measure test overhead Test contention performance for long (10ms) critical sections Add a benchmark for contended and uncontended QMutex performance Removed QMutexPrivate::self() declaration Add QElapsedTimer::nsecsElapsed() const Delay creation of the process manager Make the QRasterPaintEngineState copy constructor cheaper. Micro-optimization for QSpanData::setup() define FSCTL_SET_REPARSE_POINT in test header ...
Diffstat (limited to 'tests/auto/qcompleter/tst_qcompleter.cpp')
-rw-r--r--tests/auto/qcompleter/tst_qcompleter.cpp27
1 files changed, 10 insertions, 17 deletions
diff --git a/tests/auto/qcompleter/tst_qcompleter.cpp b/tests/auto/qcompleter/tst_qcompleter.cpp
index 650c328..62e64be 100644
--- a/tests/auto/qcompleter/tst_qcompleter.cpp
+++ b/tests/auto/qcompleter/tst_qcompleter.cpp
@@ -49,6 +49,7 @@
#include <QPointer>
#include "../../shared/util.h"
+#include "../../shared/filesystem.h"
//TESTED_CLASS=
//TESTED_FILES=
@@ -1455,24 +1456,16 @@ void tst_QCompleter::task247560_keyboardNavigation()
void tst_QCompleter::QTBUG_14292_filesystem()
{
- QDir tmpDir = QDir::temp();
+ FileSystem fs;
+ QDir tmpDir = QDir::currentPath();
+
qsrand(QTime::currentTime().msec());
QString d = "tst_QCompleter_" + QString::number(qrand());
- QVERIFY(tmpDir.mkdir(d));
-
-#if 0
- struct Cleanup {
- QString dir;
- ~Cleanup() {
- qDebug() << dir <<
- QFile::remove(dir); }
- } cleanup;
- cleanup.dir = tmpDir.absolutePath()+"/" +d;
-#endif
+ QVERIFY(fs.createDirectory(tmpDir.filePath(d)));
QVERIFY(tmpDir.cd(d));
- QVERIFY(tmpDir.mkdir("hello"));
- QVERIFY(tmpDir.mkdir("holla"));
+ QVERIFY(fs.createDirectory(tmpDir.filePath("hello")));
+ QVERIFY(fs.createDirectory(tmpDir.filePath("holla")));
QLineEdit edit;
QCompleter comp;
@@ -1500,12 +1493,12 @@ void tst_QCompleter::QTBUG_14292_filesystem()
QCOMPARE(comp.popup()->model()->rowCount(), 1);
QTest::keyClick(&edit, 'r');
QTRY_VERIFY(!comp.popup()->isVisible());
- QVERIFY(tmpDir.mkdir("hero"));
+ QVERIFY(fs.createDirectory(tmpDir.filePath("hero")));
QTRY_VERIFY(comp.popup()->isVisible());
QCOMPARE(comp.popup()->model()->rowCount(), 1);
QTest::keyClick(comp.popup(), Qt::Key_Escape);
QTRY_VERIFY(!comp.popup()->isVisible());
- QVERIFY(tmpDir.mkdir("nothingThere"));
+ QVERIFY(fs.createDirectory(tmpDir.filePath("nothingThere")));
//there is no reason creating a file should open a popup, it did in Qt 4.7.0
QTest::qWait(60);
QVERIFY(!comp.popup()->isVisible());
@@ -1522,7 +1515,7 @@ void tst_QCompleter::QTBUG_14292_filesystem()
QTest::qWaitForWindowShown(&w);
QTRY_VERIFY(!edit.hasFocus() && !comp.popup()->hasFocus());
- QVERIFY(tmpDir.mkdir("hemo"));
+ QVERIFY(fs.createDirectory(tmpDir.filePath("hemo")));
//there is no reason creating a file should open a popup, it did in Qt 4.7.0
QTest::qWait(60);
QVERIFY(!comp.popup()->isVisible());