summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-08-18 19:49:05 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-08-18 19:49:05 (GMT)
commitea56dd75575dd48651a13724f45c45053b4d390d (patch)
treececc74a3b54a10396fb3fb42b63febefff832283 /tests
parentceb068261e326f38b4049becd75c7160a6b84f87 (diff)
parent2eba19cdaa859dc9b06eb12f2dea9da27b69ea74 (diff)
downloadQt-ea56dd75575dd48651a13724f45c45053b4d390d.zip
Qt-ea56dd75575dd48651a13724f45c45053b4d390d.tar.gz
Qt-ea56dd75575dd48651a13724f45c45053b4d390d.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: use intel linker and librarian with icc create missing output directories for substituted files fix shadow builds with scratchbox QMake/Win32/MinGW: Fix ar script generating with absolute paths Crash in QWidgetPrivate::init on QApplication::quit() using a modal dialog on Mac Crash in QX11PaintEngine::drawPixmap Revert "Fix the rendering of lines with the X11 paint engine" Revert "Outline / fill inconsistency in X11 paint engine."
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qapplication/modal/base.cpp21
-rw-r--r--tests/auto/qapplication/modal/base.h23
-rw-r--r--tests/auto/qapplication/modal/main.cpp11
-rw-r--r--tests/auto/qapplication/modal/modal.pro8
-rw-r--r--tests/auto/qapplication/qapplication.pro1
-rw-r--r--tests/auto/qapplication/tst_qapplication.cpp18
-rw-r--r--tests/auto/qmake/testdata/substitutes/test.pro3
-rw-r--r--tests/auto/qmake/tst_qmake.cpp4
-rw-r--r--tests/auto/qpainter/tst_qpainter.cpp65
9 files changed, 85 insertions, 69 deletions
diff --git a/tests/auto/qapplication/modal/base.cpp b/tests/auto/qapplication/modal/base.cpp
new file mode 100644
index 0000000..d3a7de6
--- /dev/null
+++ b/tests/auto/qapplication/modal/base.cpp
@@ -0,0 +1,21 @@
+#include "base.h"
+
+base::base(QWidget *parent) :
+ QWidget(parent)
+{
+ m_timer = new QTimer(this);
+ m_modalStarted = false;
+ m_timer->setSingleShot(false);
+ connect(m_timer, SIGNAL(timeout()), this, SLOT(periodicTimer()));
+ m_timer->start(5000);
+}
+
+void base::periodicTimer()
+{
+ if(m_modalStarted)
+ exit(0);
+ m_modalDialog = new QDialog(this);
+ m_modalDialog->setModal(true);
+ m_modalDialog->show();
+ m_modalStarted = true;
+}
diff --git a/tests/auto/qapplication/modal/base.h b/tests/auto/qapplication/modal/base.h
new file mode 100644
index 0000000..ebf1198
--- /dev/null
+++ b/tests/auto/qapplication/modal/base.h
@@ -0,0 +1,23 @@
+#ifndef BASE_H
+#define BASE_H
+
+#include <QWidget>
+#include <QTimer>
+#include <QDialog>
+
+class base : public QWidget
+{
+Q_OBJECT
+ QTimer *m_timer;
+ bool m_modalStarted;
+ QDialog *m_modalDialog;
+public:
+ explicit base(QWidget *parent = 0);
+
+signals:
+
+public slots:
+ void periodicTimer();
+};
+
+#endif // BASE_H
diff --git a/tests/auto/qapplication/modal/main.cpp b/tests/auto/qapplication/modal/main.cpp
new file mode 100644
index 0000000..e1d39cf
--- /dev/null
+++ b/tests/auto/qapplication/modal/main.cpp
@@ -0,0 +1,11 @@
+#include <QtGui>
+
+#include <QApplication>
+#include "base.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ base *b = new base();
+ return app.exec();
+}
diff --git a/tests/auto/qapplication/modal/modal.pro b/tests/auto/qapplication/modal/modal.pro
new file mode 100644
index 0000000..836f6ff
--- /dev/null
+++ b/tests/auto/qapplication/modal/modal.pro
@@ -0,0 +1,8 @@
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+SOURCES += main.cpp \
+ base.cpp
+DESTDIR = ./
+HEADERS += base.h
diff --git a/tests/auto/qapplication/qapplication.pro b/tests/auto/qapplication/qapplication.pro
index 7814ad3..becc6c6 100644
--- a/tests/auto/qapplication/qapplication.pro
+++ b/tests/auto/qapplication/qapplication.pro
@@ -1,6 +1,7 @@
TEMPLATE = subdirs
SUBDIRS = test \
desktopsettingsaware \
+ modal \
wincmdline
diff --git a/tests/auto/qapplication/tst_qapplication.cpp b/tests/auto/qapplication/tst_qapplication.cpp
index 1a38070..91ae921 100644
--- a/tests/auto/qapplication/tst_qapplication.cpp
+++ b/tests/auto/qapplication/tst_qapplication.cpp
@@ -146,6 +146,7 @@ private slots:
void symbianNeedForTraps();
void symbianLeaveThroughMain();
+ void qtbug_12673();
};
class EventSpy : public QObject
@@ -2239,6 +2240,23 @@ void tst_QApplication::symbianLeaveThroughMain()
#endif
}
+void tst_QApplication::qtbug_12673()
+{
+#ifdef Q_OS_SYMBIAN
+ QSKIP("This might not make sense in Symbian, but since I do not know how to test it I'll just skip it for now.", SkipAll);
+#else
+ QProcess testProcess;
+ QStringList arguments;
+#ifdef Q_OS_MAC
+ testProcess.start("modal/modal.app", arguments);
+#else
+ testProcess.start("modal/modal", arguments);
+#endif
+ QVERIFY(testProcess.waitForFinished(20000));
+ QCOMPARE(testProcess.exitStatus(), QProcess::NormalExit);
+#endif // Q_OS_SYMBIAN
+}
+
//QTEST_APPLESS_MAIN(tst_QApplication)
int main(int argc, char *argv[])
{
diff --git a/tests/auto/qmake/testdata/substitutes/test.pro b/tests/auto/qmake/testdata/substitutes/test.pro
index 5bce312..ddad93f 100644
--- a/tests/auto/qmake/testdata/substitutes/test.pro
+++ b/tests/auto/qmake/testdata/substitutes/test.pro
@@ -1,2 +1 @@
-QMAKE_SUBSTITUTES += test.in
-# doesn't work for the time being: sub/test2.in
+QMAKE_SUBSTITUTES += test.in sub/test2.in
diff --git a/tests/auto/qmake/tst_qmake.cpp b/tests/auto/qmake/tst_qmake.cpp
index 1a3f843..060fa01 100644
--- a/tests/auto/qmake/tst_qmake.cpp
+++ b/tests/auto/qmake/tst_qmake.cpp
@@ -483,13 +483,13 @@ void tst_qmake::substitutes()
QString workDir = base_path + "/testdata/substitutes";
QVERIFY( test_compiler.qmake( workDir, "test" ));
QVERIFY( test_compiler.exists( workDir, "test", Plain, "" ));
- //QVERIFY( test_compiler.exists( workDir, "sub/test2", Plain, "" ));
+ QVERIFY( test_compiler.exists( workDir, "sub/test2", Plain, "" ));
QVERIFY( test_compiler.makeDistClean( workDir ));
QString buildDir = base_path + "/testdata/substitutes_build";
QVERIFY( test_compiler.qmake( workDir, "test", buildDir ));
QVERIFY( test_compiler.exists( buildDir, "test", Plain, "" ));
- //QVERIFY( test_compiler.exists( buildDir, "sub/test2", Plain, "" ));
+ QVERIFY( test_compiler.exists( buildDir, "sub/test2", Plain, "" ));
QVERIFY( test_compiler.makeDistClean( buildDir ));
}
diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp
index 2cbb9b2..f358681 100644
--- a/tests/auto/qpainter/tst_qpainter.cpp
+++ b/tests/auto/qpainter/tst_qpainter.cpp
@@ -118,12 +118,10 @@ private slots:
void drawLine_task190634();
void drawLine_task229459();
void drawLine_task234891();
- void drawHorizontalLineF();
void drawRect_data() { fillData(); }
void drawRect();
void drawRect2();
- void drawRectFHorizontalLine();
void fillRect();
void fillRect2();
@@ -253,7 +251,6 @@ private slots:
void setPenColorOnPixmap();
void QTBUG5939_attachPainterPrivate();
- void drawHorizontalLine();
private:
void fillData();
@@ -1221,26 +1218,6 @@ void tst_QPainter::drawLine_task234891()
QCOMPARE(expected, img);
}
-void tst_QPainter::drawHorizontalLineF()
-{
- QPixmap pixmap(100, 3);
- pixmap.fill();
-
- {
- QPainter painter(&pixmap);
- painter.drawLine(QLineF(1.5f, 1.5f, 98.5f, 1.5f));
- }
-
- QImage refImage(100, 3, QImage::Format_ARGB32);
- refImage.fill(0xFFFFFFFF);
- {
- QPainter painter(&refImage);
- painter.drawLine(QLineF(1.5f, 1.5f, 98.5f, 1.5f));
- }
-
- QCOMPARE(pixmap.toImage().convertToFormat(QImage::Format_ARGB32), refImage);
-}
-
void tst_QPainter::drawLine_task216948()
{
QImage img(1, 10, QImage::Format_ARGB32_Premultiplied);
@@ -1325,26 +1302,6 @@ void tst_QPainter::drawRect2()
}
}
-void tst_QPainter::drawRectFHorizontalLine()
-{
- QPixmap pixmap(100, 3);
- pixmap.fill();
-
- {
- QPainter painter(&pixmap);
- painter.drawRect(QRectF(1.5f, 1.5f, 98.5f, 1.5f));
- }
-
- QImage refImage(100, 3, QImage::Format_ARGB32);
- refImage.fill(0xFFFFFFFF);
- {
- QPainter painter(&refImage);
- painter.drawRect(QRectF(1.5f, 1.5f, 98.5f, 1.5f));
- }
-
- QCOMPARE(pixmap.toImage().convertToFormat(QImage::Format_ARGB32), refImage);
-}
-
void tst_QPainter::fillRect()
{
QImage image(100, 100, QImage::Format_ARGB32_Premultiplied);
@@ -4565,28 +4522,6 @@ void tst_QPainter::QTBUG5939_attachPainterPrivate()
QCOMPARE(widget->deviceTransform, proxy->deviceTransform);
}
-void tst_QPainter::drawHorizontalLine()
-{
- QPixmap pixmap(100, 3);
- pixmap.fill();
-
- {
- QPainter painter(&pixmap);
- painter.translate(0.3, 0.3);
- painter.drawLine(QLine(1, 1, 99, 1));
- }
-
- QImage refImage(100, 3, QImage::Format_ARGB32);
- refImage.fill(0xFFFFFFFF);
- {
- QPainter painter(&refImage);
- painter.translate(0.3, 0.3);
- painter.drawLine(QLine(1, 1, 99, 1));
- }
-
- QCOMPARE(pixmap.toImage().convertToFormat(QImage::Format_ARGB32), refImage);
-}
-
QTEST_MAIN(tst_QPainter)
#include "tst_qpainter.moc"