summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/doc/src/threads.qdoc5
-rw-r--r--src/gui/painting/qpainter.cpp6
-rw-r--r--src/gui/text/qfontdatabase.cpp3
-rw-r--r--src/gui/text/qfontdatabase.h4
-rw-r--r--src/gui/text/qfontdatabase_qpa.cpp5
-rw-r--r--tests/auto/gui/painting/qpainter/tst_qpainter.cpp3
6 files changed, 6 insertions, 20 deletions
diff --git a/src/corelib/doc/src/threads.qdoc b/src/corelib/doc/src/threads.qdoc
index 160b717715..67a986d73e 100644
--- a/src/corelib/doc/src/threads.qdoc
+++ b/src/corelib/doc/src/threads.qdoc
@@ -655,11 +655,6 @@
separate QImages, but the two threads cannot paint onto the same
QImage at the same time.
- Note that on X11 systems without FontConfig support, Qt cannot
- render text outside of the GUI thread. You can use the
- QFontDatabase::supportsThreadedFontRendering() function to detect
- whether or not font rendering can be used outside the GUI thread.
-
\section1 Threads and Rich Text Processing
The QTextDocument, QTextCursor, and \l{richtext.html}{all related classes} are reentrant.
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 64c07a8f4e..b315017d6d 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -6349,12 +6349,6 @@ void QPainterPrivate::drawTextItem(const QPointF &p, const QTextItem &_ti, QText
if (!engine)
return;
-#ifndef QT_NO_DEBUG
- qt_painter_thread_test(device->devType(),
- "text and fonts",
- QFontDatabase::supportsThreadedFontRendering());
-#endif
-
QTextItemInt &ti = const_cast<QTextItemInt &>(static_cast<const QTextItemInt &>(_ti));
if (!extended && state->bgMode == Qt::OpaqueMode) {
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index 6da103e931..6703f66e29 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -2167,12 +2167,15 @@ QFont QFontDatabase::systemFont(QFontDatabase::SystemFont type)
/*!
\fn bool QFontDatabase::supportsThreadedFontRendering()
\since 4.4
+ \deprecated
Returns true if font rendering is supported outside the GUI
thread, false otherwise. In other words, a return value of false
means that all QPainter::drawText() calls outside the GUI thread
will not produce readable output.
+ As of 5.0, always returns true.
+
\sa {Thread-Support in Qt Modules#Painting In Threads}{Painting In Threads}
*/
diff --git a/src/gui/text/qfontdatabase.h b/src/gui/text/qfontdatabase.h
index bd603c3c4a..4e8f718962 100644
--- a/src/gui/text/qfontdatabase.h
+++ b/src/gui/text/qfontdatabase.h
@@ -150,7 +150,9 @@ public:
static bool removeApplicationFont(int id);
static bool removeAllApplicationFonts();
- static bool supportsThreadedFontRendering();
+#if QT_DEPRECATED_SINCE(5, 2)
+ QT_DEPRECATED static inline bool supportsThreadedFontRendering() { return true; }
+#endif
static QFont systemFont(SystemFont type);
diff --git a/src/gui/text/qfontdatabase_qpa.cpp b/src/gui/text/qfontdatabase_qpa.cpp
index 8e6ad7cd97..0e9c21799b 100644
--- a/src/gui/text/qfontdatabase_qpa.cpp
+++ b/src/gui/text/qfontdatabase_qpa.cpp
@@ -267,11 +267,6 @@ bool QFontDatabase::removeAllApplicationFonts()
return true;
}
-bool QFontDatabase::supportsThreadedFontRendering()
-{
- return true;
-}
-
/*!
\internal
*/
diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
index 5a1ca855a1..3a5e890076 100644
--- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
@@ -4444,9 +4444,6 @@ void TextDrawerThread::run()
void tst_QPainter::drawTextOutsideGuiThread()
{
- if (!QFontDatabase::supportsThreadedFontRendering())
- QSKIP("No threaded font rendering");
-
QImage referenceRendering(100, 100, QImage::Format_ARGB32_Premultiplied);
referenceRendering.fill(0);
QPainter p(&referenceRendering);