path: root/src/gui/text/qtextdocument_p.cpp
diff options
authorVolker Hilsheimer <>2021-03-27 12:29:24 +0100
committerVolker Hilsheimer <>2021-03-30 08:11:27 +0200
commitccf1a1a9536be7b904494f5b3243202d71a33b06 (patch)
tree7fa14e4c2f0322f0d32a1fcecf00564afd00e82e /src/gui/text/qtextdocument_p.cpp
parentb050d4867f68c3d35493221d65d343749504c988 (diff)
Replace QTextDocumentResourceProvider with a std::function
376e3bd8ecf40881685714f6f19e12d68e92127e added the new class for Qt 6.1, but during header review we concluded that using a class introduces complexity wrt instance ownership and API design that can be avoided by using a std::function instead. The functionality is tied to QTextDocument, so the type definition and the default provider API is added there. Since std::function is not trivially copyable, the atomicity of the previous implementation is not maintained, and concurrent modifications of and access to the global default provider from multiple threads is not allowed. The relevant use case can be supported by implementing a resource provider that is thread safe. Task-number: QTBUG-90211 Fixes: QTBUG-92208 Pick-to: 6.1 Change-Id: I39215c5e51c7bd27f1dd29e1d9d908aecf754fb7 Reviewed-by: Kai Koehne <>
Diffstat (limited to 'src/gui/text/qtextdocument_p.cpp')
1 files changed, 0 insertions, 1 deletions
diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp
index eb62168a31..c902b878bf 100644
--- a/src/gui/text/qtextdocument_p.cpp
+++ b/src/gui/text/qtextdocument_p.cpp
@@ -52,7 +52,6 @@
#include "qtextdocumentlayout_p.h"
#include "qtexttable.h"
#include "qtextengine_p.h"
-#include "qtextdocumentresourceprovider.h"
#include <stdlib.h>