From bab2eaf3da299c471dd898c89cf356984b077412 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Mon, 16 Jan 2012 16:40:13 +1000 Subject: Don't load embedded images from the current working directory. Override QTextImageHandler's image loading as it will attempt to resolve relative paths and load the image itself if the document returns an invalid image from loadResource, which we don't want as it bypasses the pixmap cache and resolves against the application and current working directory instead of the Text items context. Change-Id: Ia1d3633036f96d902e1ac03dae5d5b203fba7ff1 Reviewed-by: Martin Jones --- src/quick/items/qquicktextedit_p.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/quick/items/qquicktextedit_p.h') diff --git a/src/quick/items/qquicktextedit_p.h b/src/quick/items/qquicktextedit_p.h index 508f564c88..8cdd984735 100644 --- a/src/quick/items/qquicktextedit_p.h +++ b/src/quick/items/qquicktextedit_p.h @@ -214,6 +214,10 @@ public: qreal paintedWidth() const; qreal paintedHeight() const; + QUrl baseUrl() const; + void setBaseUrl(const QUrl &url); + void resetBaseUrl(); + Q_INVOKABLE QRectF positionToRectangle(int) const; Q_INVOKABLE int positionAt(int x, int y) const; Q_INVOKABLE void moveCursorSelection(int pos); @@ -283,9 +287,9 @@ private Q_SLOTS: void updateDocument(); void updateCursor(); void q_updateAlignment(); + void updateSize(); private: - void updateSize(); void updateTotalLines(); void updateImageCache(const QRectF &rect = QRectF()); -- cgit v1.2.3