summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-21 23:21:52 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-21 23:21:52 (GMT)
commit8b059a78b2632e31492fa25cfaae99b111a041a6 (patch)
treee30c11849ffc99ceee0c52a3951aa732db715ec0 /tests/auto
parent7f3d9a76e9d956d9e7e4398ac20785070e214958 (diff)
parentc3eeb227360343ccb34365e384e085b358d81f21 (diff)
downloadQt-8b059a78b2632e31492fa25cfaae99b111a041a6.zip
Qt-8b059a78b2632e31492fa25cfaae99b111a041a6.tar.gz
Qt-8b059a78b2632e31492fa25cfaae99b111a041a6.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: (26 commits) Fix incorrect usage of _HB_OPEN_Free_Device() in CaretValue cleanup Fix null HB_Device** dereference on exit in Harfbuzz GPOS code Doc: Relicensed the documentation under the GNU FDL version 1.3. doc: Added more DITA output to the XML generator Designer: Prevent QButtonGroup from being added for Q3ButtonGroup. Fix for a leak in the mac style. Doc: Fixing bugs to style and script doc: Added more DITA output to the XML generator Make sure that <br/> is seen as a valid tag in Qt::mightBeRichText() Fix compiler warnings in QtGui (text,painting). Allow Unix to generate unique UUIDs if /dev/urandom exists. Allow GNU Free Documentation license header. Add missing license header. Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to ab9a897b688e991a8405cf938dea9d6a2f1ac072 Fix example compile and runtime warnings, webkit examples not built. qgl_cl_p.h is no longer existent Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to 5699175f55acbdfa4ac95ab6c727ebd4a201f3a2 Doc: Fixed documentation errors. doc: Added more DITA output to the XML generator doc: Fixed type of Package::name ...
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/headers/tst_headers.cpp2
-rw-r--r--tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp2
-rw-r--r--tests/auto/qtextdocument/tst_qtextdocument.cpp22
3 files changed, 23 insertions, 3 deletions
diff --git a/tests/auto/headers/tst_headers.cpp b/tests/auto/headers/tst_headers.cpp
index 0538607..06c70f9 100644
--- a/tests/auto/headers/tst_headers.cpp
+++ b/tests/auto/headers/tst_headers.cpp
@@ -79,7 +79,7 @@ private:
tst_Headers::tst_Headers() :
copyrightPattern("\\*\\* Copyright \\(C\\) 20[0-9][0-9] Nokia Corporation and/or its subsidiary\\(-ies\\)."),
- licensePattern("\\*\\* \\$QT_BEGIN_LICENSE:(LGPL|BSD|3RDPARTY|LGPL-ONLY)\\$"),
+ licensePattern("\\*\\* \\$QT_BEGIN_LICENSE:(LGPL|BSD|3RDPARTY|LGPL-ONLY|FDL)\\$"),
moduleTest(QLatin1String("\\*\\* This file is part of the .+ of the Qt Toolkit."))
{
}
diff --git a/tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp b/tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
index 5bbe8f6..245a5c6 100644
--- a/tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
+++ b/tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
@@ -642,7 +642,7 @@ void tst_QNetworkDiskCache::crashWhenParentingCache()
QNetworkAccessManager *manager = new QNetworkAccessManager();
QNetworkDiskCache *diskCache = new QNetworkDiskCache(manager); // parent to qnam!
// we expect the temp dir to be cleaned at some point anyway
- diskCache->setCacheDirectory(QDir::tempPath() + "/cacheDir_" + QCoreApplication::applicationPid());
+ diskCache->setCacheDirectory(QString("%1/cacheDir_%2").arg(QDir::tempPath()).arg(QCoreApplication::applicationPid()));
manager->setCache(diskCache);
QUrl url("http://127.0.0.1:" + QString::number(server.serverPort()));
diff --git a/tests/auto/qtextdocument/tst_qtextdocument.cpp b/tests/auto/qtextdocument/tst_qtextdocument.cpp
index 51aee74..808299b 100644
--- a/tests/auto/qtextdocument/tst_qtextdocument.cpp
+++ b/tests/auto/qtextdocument/tst_qtextdocument.cpp
@@ -98,6 +98,7 @@ private slots:
void noundo_isModified2();
void noundo_isModified3();
void mightBeRichText();
+ void mightBeRichText_data();
void task240325();
@@ -679,13 +680,32 @@ void tst_QTextDocument::noundo_isModified3()
QVERIFY(doc->isModified());
}
-void tst_QTextDocument::mightBeRichText()
+void tst_QTextDocument::mightBeRichText_data()
{
const char qtDocuHeader[] = "<?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\">";
QVERIFY(Qt::mightBeRichText(QString::fromLatin1(qtDocuHeader)));
+ QTest::addColumn<QString>("input");
+ QTest::addColumn<bool>("result");
+
+ 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;
+}
+
+void tst_QTextDocument::mightBeRichText()
+{
+ QFETCH(QString, input);
+ QFETCH(bool, result);
+ QVERIFY(result == Qt::mightBeRichText(input));
}
Q_DECLARE_METATYPE(QTextDocumentFragment)