summaryrefslogtreecommitdiffstats
path: root/src/gui/doc/snippets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/doc/snippets')
-rw-r--r--src/gui/doc/snippets/snippets.pro3
-rw-r--r--src/gui/doc/snippets/textdocument-imageformat/main.cpp5
-rw-r--r--src/gui/doc/snippets/textdocument-imageformat/textdocument-imageformat.pro11
3 files changed, 14 insertions, 5 deletions
diff --git a/src/gui/doc/snippets/snippets.pro b/src/gui/doc/snippets/snippets.pro
index 03a3f10fdbc..5468421df11 100644
--- a/src/gui/doc/snippets/snippets.pro
+++ b/src/gui/doc/snippets/snippets.pro
@@ -15,5 +15,6 @@ contains(QT_BUILD_PARTS, tests) {
textdocument-end \
textdocument-find \
textdocument-frames \
- textdocument-imagedrop
+ textdocument-imagedrop \
+ textdocument-imageformat
}
diff --git a/src/gui/doc/snippets/textdocument-imageformat/main.cpp b/src/gui/doc/snippets/textdocument-imageformat/main.cpp
index 89b09dc9b13..b69d75eb0aa 100644
--- a/src/gui/doc/snippets/textdocument-imageformat/main.cpp
+++ b/src/gui/doc/snippets/textdocument-imageformat/main.cpp
@@ -47,8 +47,9 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
-#include <QtGui>
+#include <QApplication>
+#include <QTextBlock>
+#include <QTextEdit>
QString tr(const char *text)
{
diff --git a/src/gui/doc/snippets/textdocument-imageformat/textdocument-imageformat.pro b/src/gui/doc/snippets/textdocument-imageformat/textdocument-imageformat.pro
index 1c6437050ab..f770f68593f 100644
--- a/src/gui/doc/snippets/textdocument-imageformat/textdocument-imageformat.pro
+++ b/src/gui/doc/snippets/textdocument-imageformat/textdocument-imageformat.pro
@@ -1,2 +1,9 @@
-SOURCES = main.cpp
-RESOURCES += images.qrc
+TEMPLATE = lib
+TARGET = textdocument-imageformat
+QT += widgets core gui
+
+SOURCES = \
+ main.cpp
+
+RESOURCES = \
+ images.qrc