Doc: Make snippets Qt Gui compilable - textblock-fragments
Task-number: QTBUG-81486 Change-Id: I3a6ee6ef744abb694d1cc7ef409f8bb584854395 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>bb10
parent
37fbffee81
commit
e1915cd83e
|
|
@ -10,6 +10,7 @@ contains(QT_BUILD_PARTS, tests) {
|
|||
droparea \
|
||||
qfontdatabase \
|
||||
textblock-formats \
|
||||
textblock-fragments \
|
||||
textdocument-blocks \
|
||||
textdocument-charformats \
|
||||
textdocument-css \
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
QT += xml
|
||||
HEADERS = mainwindow.h \
|
||||
xmlwriter.h
|
||||
SOURCES = main.cpp \
|
||||
mainwindow.cpp \
|
||||
xmlwriter.cpp
|
||||
TEMPLATE = lib
|
||||
TARGET = gui_snippets_textblock_fragments
|
||||
QT += core gui widgets xml
|
||||
|
||||
HEADERS = \
|
||||
xmlwriter.h
|
||||
SOURCES = \
|
||||
xmlwriter.cpp
|
||||
|
|
|
|||
|
|
@ -47,11 +47,10 @@
|
|||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtGui>
|
||||
|
||||
#include "xmlwriter.h"
|
||||
|
||||
#include <QTextDocument>
|
||||
|
||||
QDomDocument *XmlWriter::toXml()
|
||||
{
|
||||
QDomImplementation implementation;
|
||||
|
|
@ -120,8 +119,15 @@ void XmlWriter::readFragment(const QTextBlock ¤tBlock,
|
|||
|
||||
void XmlWriter::processBlock(const QTextBlock ¤tBlock)
|
||||
{
|
||||
// Dummy use of specified parameter currentBlock
|
||||
QTextBlock localBlock;
|
||||
localBlock = currentBlock;
|
||||
|
||||
}
|
||||
|
||||
void XmlWriter::processFragment(const QTextFragment ¤tFragment)
|
||||
{
|
||||
// Dummy use of specified parameter currentFragment
|
||||
QTextFragment localFragment;
|
||||
localFragment = currentFragment;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@
|
|||
#define XMLWRITER_H
|
||||
|
||||
#include <QDomDocument>
|
||||
#include <QTextBlock>
|
||||
|
||||
class QTextDocument;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue