Deprecate QFontDatabase::supportsThreadedFontRendering()

As of 5.0, this always return true.

Change-Id: If225c7219e283da97e870f0d66a87b21c3cacfc0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
bb10
Konstantin Ritt 2013-09-09 03:46:48 +03:00 committed by The Qt Project
parent 8c58640fdf
commit b0b786a2f0
6 changed files with 6 additions and 20 deletions

View File

@ -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.

View File

@ -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) {

View File

@ -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}
*/

View File

@ -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);

View File

@ -267,11 +267,6 @@ bool QFontDatabase::removeAllApplicationFonts()
return true;
}
bool QFontDatabase::supportsThreadedFontRendering()
{
return true;
}
/*!
\internal
*/

View File

@ -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);