summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui/text')
-rw-r--r--tests/auto/gui/text/qcssparser/tst_qcssparser.cpp3
-rw-r--r--tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp1
-rw-r--r--tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp25
-rw-r--r--tests/auto/gui/text/qtexttable/tst_qtexttable.cpp1
4 files changed, 25 insertions, 5 deletions
diff --git a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
index 0e2378fd4c..7e2aa77456 100644
--- a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
+++ b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
@@ -383,8 +383,6 @@ void tst_QCssParser::term()
}
}
-Q_DECLARE_METATYPE(QVector<QCss::Value>)
-
void tst_QCssParser::expr_data()
{
QTest::addColumn<bool>("parseSuccess");
@@ -842,7 +840,6 @@ void tst_QCssParser::invalidAtKeywords()
QCOMPARE(rule.declarations.at(0).d->values.at(0).variant.toString(), QString("blue"));
}
-Q_DECLARE_METATYPE(QColor)
void tst_QCssParser::colorValue_data()
{
diff --git a/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp b/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp
index 50fb558d94..4105c2ad54 100644
--- a/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp
+++ b/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp
@@ -162,7 +162,6 @@ private:
QTextCursor cursor;
};
-Q_DECLARE_METATYPE(QList<QVariant>)
tst_QTextCursor::tst_QTextCursor()
{}
diff --git a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
index cf3265d446..966102033c 100644
--- a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
+++ b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
@@ -184,6 +184,8 @@ private slots:
void htmlExportImportBlockCount();
+ void QTBUG27354_spaceAndSoftSpace();
+
private:
void backgroundImage_checkExpectedHtml(const QTextDocument &doc);
@@ -2900,5 +2902,28 @@ void tst_QTextDocument::htmlExportImportBlockCount()
QCOMPARE(document.blockCount(), 5);
}
+void tst_QTextDocument::QTBUG27354_spaceAndSoftSpace()
+{
+ QTextDocument document;
+ {
+ QTextCursor cursor(&document);
+ QTextBlockFormat blockFormat;
+ blockFormat.setAlignment(Qt::AlignJustify);
+ cursor.mergeBlockFormat(blockFormat);
+ cursor.insertText("ac");
+ cursor.insertBlock();
+ cursor.insertText(" ");
+ cursor.insertText(QChar(0x2028));
+ }
+
+ // Trigger justification of text
+ QImage image(1000, 1000, QImage::Format_ARGB32);
+ image.fill(0);
+ {
+ QPainter p(&image);
+ document.drawContents(&p, image.rect());
+ }
+}
+
QTEST_MAIN(tst_QTextDocument)
#include "tst_qtextdocument.moc"
diff --git a/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp b/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp
index 4d27c406f2..4303d0fb4d 100644
--- a/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp
+++ b/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp
@@ -54,7 +54,6 @@
#endif
typedef QList<int> IntList;
-Q_DECLARE_METATYPE(IntList)
QT_FORWARD_DECLARE_CLASS(QTextDocument)