aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/qt/wireshark_application.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/ui/qt/wireshark_application.cpp b/ui/qt/wireshark_application.cpp
index af1f8e0..143cd65 100644
--- a/ui/qt/wireshark_application.cpp
+++ b/ui/qt/wireshark_application.cpp
@@ -98,6 +98,7 @@
#include <qmath.h>
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QFontDatabase>
#include <QMimeDatabase>
#include <QThreadPool>
#endif
@@ -133,6 +134,16 @@ private:
mime_db.mimeTypeForData(QByteArray());
}
};
+
+// Populating the font database can be slow as well.
+class FontDatabaseInitThread : public QRunnable
+{
+private:
+ void run()
+ {
+ QFontDatabase font_db;
+ }
+};
#endif
void
@@ -751,6 +762,8 @@ WiresharkApplication::WiresharkApplication(int &argc, char **argv) :
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
MimeDatabaseInitThread *mime_db_init_thread = new(MimeDatabaseInitThread);
QThreadPool::globalInstance()->start(mime_db_init_thread);
+ FontDatabaseInitThread *font_db_init_thread = new (FontDatabaseInitThread);
+ QThreadPool::globalInstance()->start(font_db_init_thread);
#endif
Q_INIT_RESOURCE(about);