summaryrefslogtreecommitdiffstats
path: root/src/gui/doc
diff options
context:
space:
mode:
authorNico Vertriest <nico.vertriest@qt.io>2020-08-04 09:29:40 +0200
committerPaul Wicking <paul.wicking@qt.io>2020-09-01 06:13:03 +0200
commit2be708b801e116029492fda0d5435fc04fe783fd (patch)
tree0e4b4acde7f3bb86bc799b15b5ec7cbf129ecb79 /src/gui/doc
parent6283f447cd06ea71c73225db59f9173b0a2f06ef (diff)
Doc: Make snippets Qt Gui compilable - textdocument-imagedrop
Task-number: QTBUG-81486 Change-Id: I80b66fce31ba5ee511690283cf56ce4306702b14 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/gui/doc')
-rw-r--r--src/gui/doc/snippets/snippets.pro4
-rw-r--r--src/gui/doc/snippets/textdocument-imagedrop/main.cpp9
-rw-r--r--src/gui/doc/snippets/textdocument-imagedrop/textdocument-imagedrop.pro10
3 files changed, 15 insertions, 8 deletions
diff --git a/src/gui/doc/snippets/snippets.pro b/src/gui/doc/snippets/snippets.pro
index 4a004d5781..03a3f10fdb 100644
--- a/src/gui/doc/snippets/snippets.pro
+++ b/src/gui/doc/snippets/snippets.pro
@@ -13,5 +13,7 @@ contains(QT_BUILD_PARTS, tests) {
textdocument-css \
textdocument-cursors \
textdocument-end \
- textdocument-find
+ textdocument-find \
+ textdocument-frames \
+ textdocument-imagedrop
}
diff --git a/src/gui/doc/snippets/textdocument-imagedrop/main.cpp b/src/gui/doc/snippets/textdocument-imagedrop/main.cpp
index 198555c579..c7f7e2df45 100644
--- a/src/gui/doc/snippets/textdocument-imagedrop/main.cpp
+++ b/src/gui/doc/snippets/textdocument-imagedrop/main.cpp
@@ -47,16 +47,15 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
-#include <QtGui>
#include "textedit.h"
+#include <QApplication>
int main(int argc, char * argv[])
{
QApplication app(argc, argv);
- TextEdit *textEdit = new TextEdit;
- textEdit->show();
+ TextEdit textEdit;
+ textEdit.show();
return app.exec();
-} \ No newline at end of file
+}
diff --git a/src/gui/doc/snippets/textdocument-imagedrop/textdocument-imagedrop.pro b/src/gui/doc/snippets/textdocument-imagedrop/textdocument-imagedrop.pro
index 96d3038a09..5f1c55f038 100644
--- a/src/gui/doc/snippets/textdocument-imagedrop/textdocument-imagedrop.pro
+++ b/src/gui/doc/snippets/textdocument-imagedrop/textdocument-imagedrop.pro
@@ -1,2 +1,8 @@
-SOURCES = textedit.cpp main.cpp
-HEADERS = textedit.h \ No newline at end of file
+TEMPLATE = lib
+TARGET = textdocument-imagedrop
+QT += core gui widgets
+
+HEADERS = \
+ textedit.h
+SOURCES = \
+ main.cpp