summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNico Vertriest <nico.vertriest@qt.io>2020-08-04 09:14:50 +0200
committerPaul Wicking <paul.wicking@qt.io>2020-09-01 06:13:01 +0200
commitd76d37fd1a1c0e6baa07c6d559ec5093faae5871 (patch)
treee9e0e6319ffcb00ef79295513574813253c38a10 /src
parent0f1c8d437ffc24615fbf53c270ae88097b2a8125 (diff)
Doc: Make snippets Qt Gui compilable - textdocument-cursors
Task-number: QTBUG-81486 Change-Id: If02da7248b6c0299909fad83681fd5f08f3e29d9 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/gui/doc/snippets/snippets.pro1
-rw-r--r--src/gui/doc/snippets/textdocument-cursors/main.cpp4
-rw-r--r--src/gui/doc/snippets/textdocument-cursors/textdocument-cursors.pro7
3 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/doc/snippets/snippets.pro b/src/gui/doc/snippets/snippets.pro
index d97e243bcb..1cc21235d5 100644
--- a/src/gui/doc/snippets/snippets.pro
+++ b/src/gui/doc/snippets/snippets.pro
@@ -11,5 +11,6 @@ contains(QT_BUILD_PARTS, tests) {
textdocument-blocks \
textdocument-charformats \
textdocument-css \
+ textdocument-cursors \
textdocument-end
}
diff --git a/src/gui/doc/snippets/textdocument-cursors/main.cpp b/src/gui/doc/snippets/textdocument-cursors/main.cpp
index c19047b4e3..8d20d66c2e 100644
--- a/src/gui/doc/snippets/textdocument-cursors/main.cpp
+++ b/src/gui/doc/snippets/textdocument-cursors/main.cpp
@@ -47,8 +47,8 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
-#include <QtGui>
+#include <QApplication>
+#include <QTextEdit>
QString tr(const char *text)
{
diff --git a/src/gui/doc/snippets/textdocument-cursors/textdocument-cursors.pro b/src/gui/doc/snippets/textdocument-cursors/textdocument-cursors.pro
index 16181f21cf..6e27f32dc4 100644
--- a/src/gui/doc/snippets/textdocument-cursors/textdocument-cursors.pro
+++ b/src/gui/doc/snippets/textdocument-cursors/textdocument-cursors.pro
@@ -1 +1,6 @@
-SOURCES = main.cpp
+TEMPLATE = lib
+TARGET = textdocument-cursors
+QT += core gui widgets
+
+SOURCES = \
+ main.cpp