From 935ce5e41ddce299a58259ae61df6d941c1a033f Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Tue, 4 Aug 2020 09:36:28 +0200 Subject: [PATCH] Doc: Make snippets Qt Gui compilable - textdocument-imageformat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-81486 Change-Id: I9bf94bb8c82d7751a8615c6e1e3278400e77ce3a Reviewed-by: Topi Reiniƶ --- src/gui/doc/snippets/snippets.pro | 3 ++- .../doc/snippets/textdocument-imageformat/main.cpp | 5 +++-- .../textdocument-imageformat.pro | 11 +++++++++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/gui/doc/snippets/snippets.pro b/src/gui/doc/snippets/snippets.pro index 03a3f10fdb..5468421df1 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 89b09dc9b1..b69d75eb0a 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 +#include +#include +#include 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 1c6437050a..f770f68593 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