summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/gui
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks/gui')
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp3
-rw-r--r--tests/benchmarks/gui/image/qimageconversion/qimageconversion.pro4
-rw-r--r--tests/benchmarks/gui/image/qimagereader/qimagereader.pro20
-rw-r--r--tests/benchmarks/gui/text/qtextdocument/main.cpp71
-rw-r--r--tests/benchmarks/gui/text/qtextdocument/qtextdocument.pro7
-rw-r--r--tests/benchmarks/gui/text/text.pro3
6 files changed, 84 insertions, 24 deletions
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index 7f52bb0eba..0064ecbaaf 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -401,9 +401,6 @@ void tst_QGraphicsView::chipTester_data()
void tst_QGraphicsView::chipTester()
{
-#ifdef Q_OS_WINCE_WM
- QSKIP("WinCE WM: Fails on Windows Mobile w/o OpenGL");
-#endif
QFETCH(bool, antialias);
QFETCH(bool, opengl);
QFETCH(int, operation);
diff --git a/tests/benchmarks/gui/image/qimageconversion/qimageconversion.pro b/tests/benchmarks/gui/image/qimageconversion/qimageconversion.pro
index 9e47f979e1..7da38e8e60 100644
--- a/tests/benchmarks/gui/image/qimageconversion/qimageconversion.pro
+++ b/tests/benchmarks/gui/image/qimageconversion/qimageconversion.pro
@@ -3,6 +3,6 @@ TARGET = tst_bench_imageConversion
QT += testlib
SOURCES += tst_qimageconversion.cpp
-!contains(QT_CONFIG, no-gif):DEFINES += QTEST_HAVE_GIF
-!contains(QT_CONFIG, no-jpeg):DEFINES += QTEST_HAVE_JPEG
+contains(QT_CONFIG, gif):DEFINES += QTEST_HAVE_GIF
+contains(QT_CONFIG, jpeg):DEFINES += QTEST_HAVE_JPEG
contains(QT_CONFIG, c++11): CONFIG += c++11
diff --git a/tests/benchmarks/gui/image/qimagereader/qimagereader.pro b/tests/benchmarks/gui/image/qimagereader/qimagereader.pro
index e54e2ffce5..b60618d7ec 100644
--- a/tests/benchmarks/gui/image/qimagereader/qimagereader.pro
+++ b/tests/benchmarks/gui/image/qimagereader/qimagereader.pro
@@ -5,22 +5,6 @@ TARGET = tst_bench_qimagereader
SOURCES += tst_qimagereader.cpp
-!contains(QT_CONFIG, no-gif):DEFINES += QTEST_HAVE_GIF
-!contains(QT_CONFIG, no-jpeg):DEFINES += QTEST_HAVE_JPEG
+contains(QT_CONFIG, gif):DEFINES += QTEST_HAVE_GIF
+contains(QT_CONFIG, jpeg):DEFINES += QTEST_HAVE_JPEG
QT += network
-
-wince {
- addFiles.files = images
- addFiles.path = .
-
- CONFIG(debug, debug|release):{
- imageFormatsPlugins.files = $$QT_BUILD_TREE/plugins/imageformats/*d4.dll
- }
-
- CONFIG(release, debug|release):{
- imageFormatsPlugins.files = $$QT_BUILD_TREE/plugins/imageformats/*[^d]4.dll
- }
- imageFormatsPlugins.path = imageformats
- DEPLOYMENT += addFiles imageFormatsPlugins
-}
-
diff --git a/tests/benchmarks/gui/text/qtextdocument/main.cpp b/tests/benchmarks/gui/text/qtextdocument/main.cpp
new file mode 100644
index 0000000000..17fee3b2eb
--- /dev/null
+++ b/tests/benchmarks/gui/text/qtextdocument/main.cpp
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 Robin Burchell <robin.burchell@viroteck.net>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QDebug>
+#include <QTextDocument>
+#include <qtest.h>
+
+class tst_QTextDocument : public QObject
+{
+ Q_OBJECT
+private slots:
+ void mightBeRichText_data();
+ void mightBeRichText();
+};
+
+void tst_QTextDocument::mightBeRichText_data()
+{
+ QTest::addColumn<QString>("source");
+ QTest::addColumn<bool>("isMaybeRichText");
+ QTest::newRow("empty") << QString() << false;
+ QTest::newRow("simple") << QString::fromLatin1("<html><b>Foo</b></html>") << true;
+ QTest::newRow("simple2") << QString::fromLatin1("<b>Foo</b>") << true;
+ QTest::newRow("documentation-header") << QString("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n"
+ "<!DOCTYPE html\n"
+ " PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN\" \"DTD/xhtml1-strict.dtd\">\n"
+ "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">")
+ << true;
+ QTest::newRow("br-nospace") << QString("Test <br/> new line") << true;
+ QTest::newRow("br-space") << QString("Test <br /> new line") << true;
+ QTest::newRow("br-invalidspace") << QString("Test <br/ > new line") << false;
+ QTest::newRow("invalid closing tag") << QString("Test <br/ line") << false;
+ QTest::newRow("no tags") << QString("Test line") << false;
+}
+
+void tst_QTextDocument::mightBeRichText()
+{
+ QFETCH(QString, source);
+ QFETCH(bool, isMaybeRichText);
+ QBENCHMARK {
+ QCOMPARE(isMaybeRichText, Qt::mightBeRichText(source));
+ }
+}
+
+QTEST_MAIN(tst_QTextDocument)
+
+#include "main.moc"
diff --git a/tests/benchmarks/gui/text/qtextdocument/qtextdocument.pro b/tests/benchmarks/gui/text/qtextdocument/qtextdocument.pro
new file mode 100644
index 0000000000..67cef8b25c
--- /dev/null
+++ b/tests/benchmarks/gui/text/qtextdocument/qtextdocument.pro
@@ -0,0 +1,7 @@
+QT += testlib
+QT += gui-private
+
+TEMPLATE = app
+TARGET = tst_bench_QTextDocument
+
+SOURCES += main.cpp
diff --git a/tests/benchmarks/gui/text/text.pro b/tests/benchmarks/gui/text/text.pro
index 34e548b4d3..6dc4f5d16e 100644
--- a/tests/benchmarks/gui/text/text.pro
+++ b/tests/benchmarks/gui/text/text.pro
@@ -1,4 +1,5 @@
TEMPLATE = subdirs
SUBDIRS = \
qfontmetrics \
- qtext
+ qtext \
+ qtextdocument