diff options
Diffstat (limited to 'tests/auto/gui')
18 files changed, 25 insertions, 51 deletions
diff --git a/tests/auto/gui/image/qicon/tst_qicon.cpp b/tests/auto/gui/image/qicon/tst_qicon.cpp index acbb50d8f3..148bec705e 100644 --- a/tests/auto/gui/image/qicon/tst_qicon.cpp +++ b/tests/auto/gui/image/qicon/tst_qicon.cpp @@ -45,7 +45,6 @@ #include <qicon.h> #include <qiconengine.h> -Q_DECLARE_METATYPE(QSize) class tst_QIcon : public QObject { diff --git a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp index 57aaeb965e..10d850ccb8 100644 --- a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp @@ -57,13 +57,6 @@ typedef QMap<QString, QString> QStringMap; typedef QList<int> QIntList; -Q_DECLARE_METATYPE(QImage) -Q_DECLARE_METATYPE(QRect) -Q_DECLARE_METATYPE(QSize) -Q_DECLARE_METATYPE(QColor) -Q_DECLARE_METATYPE(QStringMap) -Q_DECLARE_METATYPE(QIntList) -Q_DECLARE_METATYPE(QIODevice *) Q_DECLARE_METATYPE(QImage::Format) class tst_QImageReader : public QObject diff --git a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp index 6ec4918b73..76b1542576 100644 --- a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp +++ b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp @@ -58,11 +58,7 @@ typedef QMap<QString, QString> QStringMap; typedef QList<int> QIntList; -Q_DECLARE_METATYPE(QImage) -Q_DECLARE_METATYPE(QStringMap) -Q_DECLARE_METATYPE(QIntList) Q_DECLARE_METATYPE(QImageWriter::ImageWriterError) -Q_DECLARE_METATYPE(QIODevice *) Q_DECLARE_METATYPE(QImage::Format) class tst_QImageWriter : public QObject diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp index 6a7ce66bd7..576519e2ca 100644 --- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp @@ -200,10 +200,6 @@ static bool lenientCompare(const QPixmap &actual, const QPixmap &expected) return true; } -Q_DECLARE_METATYPE(QImage) -Q_DECLARE_METATYPE(QPixmap) -Q_DECLARE_METATYPE(QMatrix) -Q_DECLARE_METATYPE(QBitmap) tst_QPixmap::tst_QPixmap() { diff --git a/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp b/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp index d28e4298b4..ab113b95b2 100644 --- a/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp +++ b/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp @@ -153,10 +153,8 @@ private: static const int defaultSize = 3; -Q_DECLARE_METATYPE(QModelIndex) Q_DECLARE_METATYPE(QStandardItem*) Q_DECLARE_METATYPE(Qt::Orientation) -Q_DECLARE_METATYPE(QVariantList) tst_QStandardItemModel::tst_QStandardItemModel() : m_model(0), rcParent(8), rcFirst(8,0), rcLast(8,0) { @@ -178,7 +176,6 @@ tst_QStandardItemModel::~tst_QStandardItemModel() */ void tst_QStandardItemModel::init() { - qRegisterMetaType<QModelIndex>("QModelIndex"); qRegisterMetaType<QStandardItem*>("QStandardItem*"); qRegisterMetaType<Qt::Orientation>("Qt::Orientation"); diff --git a/tests/auto/gui/painting/qbrush/tst_qbrush.cpp b/tests/auto/gui/painting/qbrush/tst_qbrush.cpp index 3ade9d32ad..1d710d226b 100644 --- a/tests/auto/gui/painting/qbrush/tst_qbrush.cpp +++ b/tests/auto/gui/painting/qbrush/tst_qbrush.cpp @@ -79,7 +79,6 @@ private slots: void debug(); }; -Q_DECLARE_METATYPE(QBrush) tst_QBrush::tst_QBrush() { diff --git a/tests/auto/gui/painting/qcolor/tst_qcolor.cpp b/tests/auto/gui/painting/qcolor/tst_qcolor.cpp index e80727e19c..e2da86a4ed 100644 --- a/tests/auto/gui/painting/qcolor/tst_qcolor.cpp +++ b/tests/auto/gui/painting/qcolor/tst_qcolor.cpp @@ -224,7 +224,6 @@ void tst_QColor::getSetCheck() QCOMPARE(obj1.rgb(), qRgb(0, 0, 0)); } -Q_DECLARE_METATYPE(QColor) tst_QColor::tst_QColor() diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp index 085aef6019..c177cd2d5a 100644 --- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp @@ -81,10 +81,6 @@ #include <qfontdatabase.h> Q_DECLARE_METATYPE(QGradientStops) -Q_DECLARE_METATYPE(QLine) -Q_DECLARE_METATYPE(QRect) -Q_DECLARE_METATYPE(QSize) -Q_DECLARE_METATYPE(QPoint) Q_DECLARE_METATYPE(QPainterPath) class tst_QPainter : public QObject @@ -365,13 +361,6 @@ void tst_QPainter::getSetCheck() QCOMPARE(true, obj1.viewTransformEnabled()); } -Q_DECLARE_METATYPE(QPixmap) -Q_DECLARE_METATYPE(QPolygon) -Q_DECLARE_METATYPE(QBrush) -Q_DECLARE_METATYPE(QPen) -Q_DECLARE_METATYPE(QFont) -Q_DECLARE_METATYPE(QColor) -Q_DECLARE_METATYPE(QRegion) tst_QPainter::tst_QPainter() { diff --git a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp index 7ccc47f4fe..5cd8288a69 100644 --- a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp +++ b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp @@ -161,8 +161,6 @@ void tst_QPainterPath::swap() } Q_DECLARE_METATYPE(QPainterPath) -Q_DECLARE_METATYPE(QPointF) -Q_DECLARE_METATYPE(QRectF) void tst_QPainterPath::currentPosition() { diff --git a/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp b/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp index 4172076f6a..18424af02b 100644 --- a/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp +++ b/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp @@ -1165,7 +1165,6 @@ static bool strictContains(const QPainterPath &a, const QPainterPath &b) return b.subtracted(a) == QPainterPath(); } -Q_DECLARE_METATYPE(QPolygonF) void tst_QPathClipper::task204301_data() { diff --git a/tests/auto/gui/painting/qpen/tst_qpen.cpp b/tests/auto/gui/painting/qpen/tst_qpen.cpp index 1ef7a4d0c4..6a516c4756 100644 --- a/tests/auto/gui/painting/qpen/tst_qpen.cpp +++ b/tests/auto/gui/painting/qpen/tst_qpen.cpp @@ -101,8 +101,6 @@ void tst_QPen::swap() QCOMPARE(p2.color(), QColor(Qt::black)); } -Q_DECLARE_METATYPE(QPen) -Q_DECLARE_METATYPE(QBrush) tst_QPen::tst_QPen() diff --git a/tests/auto/gui/painting/qregion/tst_qregion.cpp b/tests/auto/gui/painting/qregion/tst_qregion.cpp index 43e36df397..b0e716b5be 100644 --- a/tests/auto/gui/painting/qregion/tst_qregion.cpp +++ b/tests/auto/gui/painting/qregion/tst_qregion.cpp @@ -102,10 +102,6 @@ private slots: #endif }; -Q_DECLARE_METATYPE(QPolygon) -Q_DECLARE_METATYPE(QVector<QRect>) -Q_DECLARE_METATYPE(QRegion) - tst_QRegion::tst_QRegion() { } diff --git a/tests/auto/gui/painting/qtransform/tst_qtransform.cpp b/tests/auto/gui/painting/qtransform/tst_qtransform.cpp index eda7929a96..f24827c55e 100644 --- a/tests/auto/gui/painting/qtransform/tst_qtransform.cpp +++ b/tests/auto/gui/painting/qtransform/tst_qtransform.cpp @@ -46,7 +46,6 @@ #include <qpolygon.h> #include <qdebug.h> -Q_DECLARE_METATYPE(QRect) class tst_QTransform : public QObject { @@ -87,7 +86,6 @@ private: }; Q_DECLARE_METATYPE(QTransform) -Q_DECLARE_METATYPE(QPolygon) tst_QTransform::tst_QTransform() { diff --git a/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp b/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp index e863aa68ee..3be6331c2b 100644 --- a/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp +++ b/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp @@ -45,7 +45,6 @@ #include <qmath.h> #include <qpolygon.h> -Q_DECLARE_METATYPE(QRect) class tst_QWMatrix : public QObject { @@ -74,8 +73,6 @@ private: void mapping_data(); }; -Q_DECLARE_METATYPE(QMatrix) -Q_DECLARE_METATYPE(QPolygon) tst_QWMatrix::tst_QWMatrix() { 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) |