diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2012-04-27 22:05:32 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-04 15:31:02 +0200 |
commit | ac300a166f801a6f6c0b15278e6893720a5726f8 (patch) | |
tree | 8fe61b473b8372d05f21fb457710267a8c95ec8c /src/gui/text/qtextdocument.h | |
parent | e563ca1a7512a48e4d3e205ac8807d61c070d3f7 (diff) |
Load resources in in QTextDocument correctly
In Qt 4, we loaded resources through the QTextEdit or
QTextControl if they were the parent of the document.
Modularization for Qt 5 broke this, as we can't cast
the parent to a QTextEdit anymore.
The fix is to make the loadResource() methods in QTextControl
and QTextEdit invokable and discover and invoke them at
runtime on the parent object.
Task-number: QTBUG-25116
Change-Id: Iba04bc16849b0c5ddcd275f12d1a386a8fe591bf
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Diffstat (limited to 'src/gui/text/qtextdocument.h')
-rw-r--r-- | src/gui/text/qtextdocument.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qtextdocument.h b/src/gui/text/qtextdocument.h index aeb431c2bc..65ea1c8fd6 100644 --- a/src/gui/text/qtextdocument.h +++ b/src/gui/text/qtextdocument.h @@ -45,6 +45,7 @@ #include <QtCore/qobject.h> #include <QtCore/qsize.h> #include <QtCore/qrect.h> +#include <QtCore/qvariant.h> #include <QtGui/qfont.h> QT_BEGIN_HEADER @@ -288,7 +289,7 @@ public Q_SLOTS: protected: virtual QTextObject *createObject(const QTextFormat &f); - virtual QVariant loadResource(int type, const QUrl &name); + Q_INVOKABLE virtual QVariant loadResource(int type, const QUrl &name); QTextDocument(QTextDocumentPrivate &dd, QObject *parent); public: |