Commit ec51b2f0 authored by Albert Astals Cid's avatar Albert Astals Cid

Remove QFontDatabase::supportsThreadedFontRendering checks

We require Qt 5.8 and there (and up) it returns true unconditionally and
it's now marked as deprecated
parent 69ec1755
......@@ -262,8 +262,7 @@ void TextDocumentGeneratorPrivate::initializeGenerator()
q->setFeature( Generator::PrintNative );
q->setFeature( Generator::PrintToFile );
#ifdef OKULAR_TEXTDOCUMENT_THREADED_RENDERING
if ( QFontDatabase::supportsThreadedFontRendering() )
q->setFeature( Generator::Threaded );
q->setFeature( Generator::Threaded );
#endif
QObject::connect( mConverter, SIGNAL(addAction(Action*,int,int)),
......
......@@ -426,13 +426,11 @@ void dviRenderer::epsf_special(const QString& cp)
the call to drawText() in the non-GUI thread will produce a crash.
Ensure that the rendering of the text is performed only if
the threaded font rendering is available */
if (QFontDatabase::supportsThreadedFontRendering()) {
if (QFile::exists(EPSfilename))
foreGroundPainter->drawText (bbox, (int)(Qt::AlignCenter), EPSfilename);
else
foreGroundPainter->drawText (bbox, (int)(Qt::AlignCenter),
i18n("File not found: \n %1", EPSfilename_orig));
}
if (QFile::exists(EPSfilename))
foreGroundPainter->drawText (bbox, (int)(Qt::AlignCenter), EPSfilename);
else
foreGroundPainter->drawText (bbox, (int)(Qt::AlignCenter),
i18n("File not found: \n %1", EPSfilename_orig));
foreGroundPainter->restore();
}
......
......@@ -2068,12 +2068,7 @@ XpsGenerator::XpsGenerator( QObject *parent, const QVariantList &args )
setFeature( TextExtraction );
setFeature( PrintNative );
setFeature( PrintToFile );
// activate the threaded rendering iif:
// 1) QFontDatabase says so
// 2) Qt >= 4.4.0 (see Trolltech task ID: 169502)
// 3) Qt >= 4.4.2 (see Trolltech task ID: 215090)
if ( QFontDatabase::supportsThreadedFontRendering() )
setFeature( Threaded );
setFeature( Threaded );
userMutex();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment