summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets/qtextedit
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@nokia.com>2012-09-04 12:40:16 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-14 06:24:38 +0200
commit34cd8fd566cd61385db12112d9515b0d5388dad3 (patch)
tree0f311e165c03c040f2c32261f96d80965443d4c6 /tests/auto/widgets/widgets/qtextedit
parent6fd1895b918c45d8404ff38319f508f0357cba27 (diff)
tests: Don't omit the body of a test function with QT_BUILD_INTERNAL
Changing it outside of the test function definition to avoid running empty/inapplicable test functions. Change-Id: I713560cde7f715696984ed082d682900f5f1bcdd Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Caroline Chao <caroline.chao@nokia.com>
Diffstat (limited to 'tests/auto/widgets/widgets/qtextedit')
-rw-r--r--tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
index 7d6428211f..1351395c56 100644
--- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
+++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
@@ -189,11 +189,13 @@ private slots:
void selectionChanged();
void copyPasteBackgroundImage();
void setText();
+ void cursorRect();
+#ifdef QT_BUILD_INTERNAL
void fullWidthSelection_data();
void fullWidthSelection();
void fullWidthSelection2();
- void cursorRect();
void setDocumentPreservesPalette();
+#endif
void pasteFromQt3RichText();
void noWrapBackgrounds();
void preserveCharFormatAfterUnchangingSetPosition();
@@ -1939,6 +1941,7 @@ QT_BEGIN_NAMESPACE
extern void qt_setQtEnableTestFont(bool value);
QT_END_NAMESPACE
+#ifdef QT_BUILD_INTERNAL
void tst_QTextEdit::fullWidthSelection_data()
{
QTest::addColumn<int>("cursorFrom");
@@ -1958,7 +1961,9 @@ void tst_QTextEdit::fullWidthSelection_data()
QTest::newRow("single full width line")
<< 20 << 30 << (m_fullWidthSelectionImagesFolder + QStringLiteral("/single-full-width-line.png"));
}
+#endif
+#ifdef QT_BUILD_INTERNAL
void tst_QTextEdit::fullWidthSelection()
{
QFETCH(int, cursorFrom);
@@ -2024,7 +2029,9 @@ void tst_QTextEdit::fullWidthSelection()
compareWidgetAndImage(widget, imageFileName);
}
+#endif
+#ifdef QT_BUILD_INTERNAL
void tst_QTextEdit::fullWidthSelection2()
{
QPalette myPalette;
@@ -2060,6 +2067,7 @@ void tst_QTextEdit::fullWidthSelection2()
compareWidgetAndImage(widget, "fullWidthSelection/nowrap_long.png");
}
+#endif
void tst_QTextEdit::compareWidgetAndImage(QTextEdit &widget, const QString &imageFileName)
{
@@ -2120,9 +2128,9 @@ void tst_QTextEdit::cursorRect()
QCOMPARE(ed->cursorRect().width(), 10);
}
+#ifdef QT_BUILD_INTERNAL
void tst_QTextEdit::setDocumentPreservesPalette()
{
-#ifdef QT_BUILD_INTERNAL
QWidgetTextControl *control = qFindChild<QWidgetTextControl *>(ed);
QVERIFY(control);
@@ -2143,8 +2151,8 @@ void tst_QTextEdit::setDocumentPreservesPalette()
QVERIFY(control->document() == newDoc);
QVERIFY(whitePal.color(QPalette::Active, QPalette::Text)
== control->palette().color(QPalette::Active, QPalette::Text));
-#endif
}
+#endif
class PublicTextEdit : public QTextEdit
{