diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-01-26 18:33:02 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-01-26 19:40:45 +0000 |
commit | f3060312c89344744832e3352fe4f53efcb94c9b (patch) | |
tree | de69be5e25a1acd3207a8952376f634fe94fefcc /tests/auto/gui/text | |
parent | c29d3692d700f7ef6d5833242878b4ec6f81c928 (diff) | |
parent | a15c3d086dafea83e4760f0b447be43d26b80697 (diff) |
Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev
Diffstat (limited to 'tests/auto/gui/text')
-rw-r--r-- | tests/auto/gui/text/qtextcursor/qtextcursor.pro | 2 | ||||
-rw-r--r-- | tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/gui/text/qtextcursor/qtextcursor.pro b/tests/auto/gui/text/qtextcursor/qtextcursor.pro index bae85d9c37..1660ecf35d 100644 --- a/tests/auto/gui/text/qtextcursor/qtextcursor.pro +++ b/tests/auto/gui/text/qtextcursor/qtextcursor.pro @@ -1,4 +1,4 @@ CONFIG += testcase TARGET = tst_qtextcursor SOURCES += tst_qtextcursor.cpp -QT += testlib +QT += core-private gui-private testlib diff --git a/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp b/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp index d4bd9c26db..d2c4adb888 100644 --- a/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp +++ b/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp @@ -29,7 +29,6 @@ #include <QtTest/QtTest> - #include <qtextdocument.h> #include <qtexttable.h> #include <qvariant.h> @@ -40,6 +39,8 @@ #include <qtextobject.h> #include <qdebug.h> +#include <private/qtextcursor_p.h> + QT_FORWARD_DECLARE_CLASS(QTextDocument) class tst_QTextCursor : public QObject @@ -1278,7 +1279,7 @@ void tst_QTextCursor::anchorInitialized1() void tst_QTextCursor::anchorInitialized2() { cursor.insertBlock(); - cursor = QTextCursor(cursor.block().docHandle(), 1); + cursor = QTextCursorPrivate::fromPosition(cursor.block().docHandle(), 1); QCOMPARE(cursor.position(), 1); QCOMPARE(cursor.anchor(), 1); QCOMPARE(cursor.selectionStart(), 1); |