summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-12-24 01:12:57 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-12-24 01:12:57 (GMT)
commit9d26b5ad31a946ef631ca29da7379571267efddf (patch)
tree133092cc0d8a4b2e96f04c0d1c7ee689dd996536 /tests/auto
parentb270e0f4f3db56a4854782036cdb4ceacb7874ff (diff)
parentce432e1799111cbed492e46bb62d8dfb40585a10 (diff)
downloadQt-9d26b5ad31a946ef631ca29da7379571267efddf.zip
Qt-9d26b5ad31a946ef631ca29da7379571267efddf.tar.gz
Qt-9d26b5ad31a946ef631ca29da7379571267efddf.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Prevented infinite loop in QMoviePrivate::next(). Added int overloads to QPoint operator* and operator*=. tst_qmessagebox: add debug to know why it fails QMessageBox wrong Show/Hide Details button label
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qmessagebox/tst_qmessagebox.cpp24
-rw-r--r--tests/auto/qmovie/animations/corrupt.gifbin0 -> 847 bytes
-rw-r--r--tests/auto/qmovie/qmovie.pro1
-rw-r--r--tests/auto/qmovie/resources.qrc5
-rw-r--r--tests/auto/qmovie/tst_qmovie.cpp13
5 files changed, 43 insertions, 0 deletions
diff --git a/tests/auto/qmessagebox/tst_qmessagebox.cpp b/tests/auto/qmessagebox/tst_qmessagebox.cpp
index d4ca064..f6ee764 100644
--- a/tests/auto/qmessagebox/tst_qmessagebox.cpp
+++ b/tests/auto/qmessagebox/tst_qmessagebox.cpp
@@ -47,6 +47,7 @@
#include <QTimer>
#include <QApplication>
#include <QPushButton>
+#include <QDialogButtonBox>
#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC)
#include <QMacStyle>
#endif
@@ -119,6 +120,7 @@ private slots:
void statics();
void about();
void detailsText();
+ void detailsButtonText();
void shortcut();
@@ -661,6 +663,28 @@ void tst_QMessageBox::detailsText()
QCOMPARE(box.detailedText(), text);
}
+void tst_QMessageBox::detailsButtonText()
+{
+ QMessageBox box;
+ box.setDetailedText("bla");
+ box.open();
+ QApplication::postEvent(&box, new QEvent(QEvent::LanguageChange));
+ QApplication::processEvents();
+ QDialogButtonBox* bb = box.findChild<QDialogButtonBox*>("qt_msgbox_buttonbox");
+ QVERIFY(bb); //get the detail button
+
+ QList<QAbstractButton *> list = bb->buttons();
+ QAbstractButton* btn = NULL;
+ foreach(btn, list) {
+ if (btn && (btn->inherits("QPushButton"))) {
+ if (btn->text() != QMessageBox::tr("OK") && btn->text() != QMessageBox::tr("Show Details...")) {
+ qDebug() << btn->text();
+ QFAIL("Incorrect messagebox button text!");
+ }
+ }
+ }
+}
+
void tst_QMessageBox::incorrectDefaultButton()
{
keyToSend = Qt::Key_Escape;
diff --git a/tests/auto/qmovie/animations/corrupt.gif b/tests/auto/qmovie/animations/corrupt.gif
new file mode 100644
index 0000000..c1545eb
--- /dev/null
+++ b/tests/auto/qmovie/animations/corrupt.gif
Binary files differ
diff --git a/tests/auto/qmovie/qmovie.pro b/tests/auto/qmovie/qmovie.pro
index 6973955..855eb9e 100644
--- a/tests/auto/qmovie/qmovie.pro
+++ b/tests/auto/qmovie/qmovie.pro
@@ -12,6 +12,7 @@ wince*: {
DEPLOYMENT += addFiles
}
+RESOURCES += resources.qrc
symbian: {
addFiles.files = animations\\*
diff --git a/tests/auto/qmovie/resources.qrc b/tests/auto/qmovie/resources.qrc
new file mode 100644
index 0000000..ce459a0
--- /dev/null
+++ b/tests/auto/qmovie/resources.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>animations/corrupt.gif</file>
+</qresource>
+</RCC>
diff --git a/tests/auto/qmovie/tst_qmovie.cpp b/tests/auto/qmovie/tst_qmovie.cpp
index 80a551b..d43d4cb 100644
--- a/tests/auto/qmovie/tst_qmovie.cpp
+++ b/tests/auto/qmovie/tst_qmovie.cpp
@@ -72,6 +72,7 @@ private slots:
void jumpToFrame_data();
void jumpToFrame();
void changeMovieFile();
+ void infiniteLoop();
};
// Testing get/set functions
@@ -208,5 +209,17 @@ void tst_QMovie::changeMovieFile()
QVERIFY(movie.currentFrameNumber() == -1);
}
+void tst_QMovie::infiniteLoop()
+{
+ QLabel label;
+ label.show();
+ QMovie *movie = new QMovie(QLatin1String(":animations/corrupt.gif"), QByteArray(), &label);
+ label.setMovie(movie);
+ movie->start();
+
+ QTestEventLoop::instance().enterLoop(1);
+ QTestEventLoop::instance().timeout();
+}
+
QTEST_MAIN(tst_QMovie)
#include "tst_qmovie.moc"