diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/q3table/tst_q3table.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qaudioinput/qaudioinput.pro | 12 | ||||
-rw-r--r-- | tests/auto/qaudiooutput/qaudiooutput.pro | 12 | ||||
-rw-r--r-- | tests/auto/qaudiooutput/tst_qaudiooutput.cpp | 24 | ||||
-rw-r--r-- | tests/auto/qcombobox/tst_qcombobox.cpp | 11 | ||||
-rw-r--r-- | tests/auto/qprogressbar/tst_qprogressbar.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qscriptengine/qscriptengine.pro | 1 | ||||
-rw-r--r-- | tests/auto/qscriptextqobject/qscriptextqobject.pro | 4 | ||||
-rw-r--r-- | tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro | 10 | ||||
-rw-r--r-- | tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro | 2 |
10 files changed, 45 insertions, 35 deletions
diff --git a/tests/auto/q3table/tst_q3table.cpp b/tests/auto/q3table/tst_q3table.cpp index 1fe4412..ca65852 100644 --- a/tests/auto/q3table/tst_q3table.cpp +++ b/tests/auto/q3table/tst_q3table.cpp @@ -1379,7 +1379,7 @@ void tst_Q3Table::dateTimeEdit() TimeTableItem *ti = new TimeTableItem(testWidget); testWidget->setItem(0, 0, ti); testWidget->show(); - QTest::qWaitForWindowShown(&testWidget); + QTest::qWaitForWindowShown(testWidget); #ifdef WAITS QTest::qWait(50); #endif diff --git a/tests/auto/qaudioinput/qaudioinput.pro b/tests/auto/qaudioinput/qaudioinput.pro index 8a03749..f545a11 100644 --- a/tests/auto/qaudioinput/qaudioinput.pro +++ b/tests/auto/qaudioinput/qaudioinput.pro @@ -1,7 +1,15 @@ load(qttest_p4) -DEFINES += SRCDIR=\\\"$$PWD/\\\" - SOURCES += tst_qaudioinput.cpp QT = core multimedia + +wince* { + deploy.sources += 4.wav + DEPLOYMENT = deploy + DEFINES += SRCDIR=\\\"\\\" + QT += gui +} else { + DEFINES += SRCDIR=\\\"$$PWD/\\\" +} + diff --git a/tests/auto/qaudiooutput/qaudiooutput.pro b/tests/auto/qaudiooutput/qaudiooutput.pro index 6c07c64..8657edb 100644 --- a/tests/auto/qaudiooutput/qaudiooutput.pro +++ b/tests/auto/qaudiooutput/qaudiooutput.pro @@ -1,12 +1,14 @@ load(qttest_p4) -DEFINES += SRCDIR=\\\"$$PWD/\\\" - SOURCES += tst_qaudiooutput.cpp QT = core multimedia -wince*: { - deploy.sources += 4.wav - DEPLOYMENT = deploy +wince* { + deploy.sources += 4.wav + DEPLOYMENT = deploy + DEFINES += SRCDIR=\\\"\\\" + QT += gui +} else { + DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp index 6356fb3..db2444b 100644 --- a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp +++ b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp @@ -117,37 +117,37 @@ void tst_QAudioOutput::notifyInterval() void tst_QAudioOutput::pullFile() { if(available) { - QFile filename(SRCDIR "4.wav"); - QVERIFY(filename.exists()); - filename.open(QIODevice::ReadOnly); + QFile file(SRCDIR "4.wav"); + QVERIFY(file.exists()); + file.open(QIODevice::ReadOnly); QSignalSpy readSignal(audio, SIGNAL(notify())); audio->setNotifyInterval(100); - audio->start(&filename); + audio->start(&file); QTestEventLoop::instance().enterLoop(1); + QCOMPARE(audio->totalTime(), qint64(692250)); // 4.wav is a little less than 700ms, so notify should fire 6 times! QVERIFY(readSignal.count() >= 6); - QVERIFY(audio->totalTime() == 692250); audio->stop(); - filename.close(); + file.close(); } } void tst_QAudioOutput::pushFile() { if(available) { - QFile filename(SRCDIR "4.wav"); - QVERIFY(filename.exists()); - filename.open(QIODevice::ReadOnly); + QFile file(SRCDIR "4.wav"); + QVERIFY(file.exists()); + file.open(QIODevice::ReadOnly); - const qint64 fileSize = filename.size(); + const qint64 fileSize = file.size(); QIODevice* feed = audio->start(0); char* buffer = new char[fileSize]; - filename.read(buffer, fileSize); + file.read(buffer, fileSize); qint64 counter=0; qint64 written=0; @@ -162,7 +162,7 @@ void tst_QAudioOutput::pushFile() QVERIFY(audio->totalTime() == 692250); audio->stop(); - filename.close(); + file.close(); delete [] buffer; delete audio; } diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp index b549af6..8dfe836 100644 --- a/tests/auto/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/qcombobox/tst_qcombobox.cpp @@ -77,6 +77,9 @@ #include <qabstractitemview.h> #include "../../shared/util.h" #include <qstyleditemdelegate.h> +#ifndef QT_NO_STYLE_WINDOWS +#include <qwindowsstyle.h> +#endif //TESTED_CLASS= //TESTED_FILES= @@ -2140,7 +2143,7 @@ void tst_QComboBox::task247863_keyBoardSelection() combo.addItem( QLatin1String("222")); combo.show(); QApplication::setActiveWindow(&combo); - QTRY_COMPARE(QApplication::activeWindow(), &combo); + QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&combo)); QSignalSpy spy(&combo, SIGNAL(activated(const QString &))); qApp->setEffectEnabled(Qt::UI_AnimateCombo, false); @@ -2161,7 +2164,7 @@ void tst_QComboBox::task220195_keyBoardSelection2() combo.addItem( QLatin1String("foo3")); combo.show(); QApplication::setActiveWindow(&combo); - QTRY_COMPARE(QApplication::activeWindow(), &combo); + QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&combo)); combo.setCurrentIndex(-1); QVERIFY(combo.currentText().isNull()); @@ -2353,6 +2356,9 @@ void tst_QComboBox::subControlRectsWithOffset() void tst_QComboBox::task260974_menuItemRectangleForComboBoxPopup() { +#ifdef QT_NO_STYLE_WINDOWS + QSKIP("test depends on windows style", QTest::SkipAll); +#else class TestStyle: public QWindowsStyle { public: @@ -2385,6 +2391,7 @@ void tst_QComboBox::task260974_menuItemRectangleForComboBoxPopup() QTRY_VERIFY(style.discoveredRect.width() <= comboBox.width()); } +#endif } QTEST_MAIN(tst_QComboBox) diff --git a/tests/auto/qprogressbar/tst_qprogressbar.cpp b/tests/auto/qprogressbar/tst_qprogressbar.cpp index ea9798b..d86094d 100644 --- a/tests/auto/qprogressbar/tst_qprogressbar.cpp +++ b/tests/auto/qprogressbar/tst_qprogressbar.cpp @@ -48,6 +48,8 @@ #include <qtimer.h> #include <QStyleFactory> +#include "../../shared/util.h" + //TESTED_CLASS= //TESTED_FILES= diff --git a/tests/auto/qscriptengine/qscriptengine.pro b/tests/auto/qscriptengine/qscriptengine.pro index f72c070..d4c0f4c 100644 --- a/tests/auto/qscriptengine/qscriptengine.pro +++ b/tests/auto/qscriptengine/qscriptengine.pro @@ -12,5 +12,4 @@ wince*|symbian*: { symbian: { TARGET.UID3 = 0xE0340006 DEFINES += SYMBIAN_SRCDIR_UID=$$lower($$replace(TARGET.UID3,"0x","")) - TARGET.EPOCHEAPSIZE="0x100000 0x1000000 // Min 1Mb, max 16Mb" } diff --git a/tests/auto/qscriptextqobject/qscriptextqobject.pro b/tests/auto/qscriptextqobject/qscriptextqobject.pro index 9da7f47..140a4e6 100644 --- a/tests/auto/qscriptextqobject/qscriptextqobject.pro +++ b/tests/auto/qscriptextqobject/qscriptextqobject.pro @@ -1,7 +1,3 @@ load(qttest_p4) QT = core gui script SOURCES += tst_qscriptextqobject.cpp - -symbian: { - TARGET.EPOCHEAPSIZE="0x100000 0x1000000 // Min 1Mb, max 16Mb" -} diff --git a/tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro b/tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro index 06b861e..07a4672 100644 --- a/tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro +++ b/tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro @@ -1,12 +1,10 @@ load(qttest_p4) QT = core script SOURCES += tst_qscriptjstestsuite.cpp -symbian { - TARGET.EPOCHEAPSIZE = 0x020000 0xA00000 -} else { - DEFINES += SRCDIR=\\\"$$PWD\\\" -} -wince*|symbian*: { + +!symbian: DEFINES += SRCDIR=\\\"$$PWD\\\" + +wince*|symbian: { testFiles.sources = tests testFiles.path = . DEPLOYMENT += testFiles diff --git a/tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro b/tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro index 3f641b5..03e26bd 100644 --- a/tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro +++ b/tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro @@ -8,5 +8,3 @@ testFiles.sources = tests testFiles.path = . DEPLOYMENT += testFiles } - -symbian:TARGET.EPOCHEAPSIZE = 0x00020000 0x02000000 |