disable code that does not preload the font cache with Qt6
This commit is contained in:
parent
caf75721d4
commit
5a25804cec
@ -86,8 +86,28 @@ static bool pluginPath = initPluginPath();
|
||||
|
||||
#if defined( ENSURE_FONTS )
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
|
||||
#include <QFontDatabase>
|
||||
#include <QElapsedTimer>
|
||||
#endif
|
||||
|
||||
static void preloadFonts()
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
|
||||
QElapsedTimer timer;
|
||||
timer.start();
|
||||
|
||||
QFontDatabase(); // deprecated and doing nothing since Qt6
|
||||
|
||||
const auto elapsed = timer.elapsed();
|
||||
|
||||
if ( elapsed > 20 )
|
||||
{
|
||||
qWarning() << "Loading fonts needed" << elapsed << "ms"
|
||||
<< "- usually because of creating a font cache.";
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void initFonts()
|
||||
{
|
||||
@ -100,18 +120,7 @@ static bool pluginPath = initPluginPath();
|
||||
qputenv( env, STRING( FONTCONFIG_FILE ) );
|
||||
#endif
|
||||
|
||||
QElapsedTimer timer;
|
||||
timer.start();
|
||||
|
||||
QFontDatabase();
|
||||
|
||||
const auto elapsed = timer.elapsed();
|
||||
|
||||
if ( elapsed > 20 )
|
||||
{
|
||||
qWarning() << "Loading fonts needed" << elapsed << "ms"
|
||||
<< "- usually because of creating a font cache.";
|
||||
}
|
||||
preloadFonts();
|
||||
|
||||
/*
|
||||
The default initialization in QskSkin sets up its font table
|
||||
|
Loading…
x
Reference in New Issue
Block a user