linux: try fix segfault further

Related reports: #201 #202

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2023-02-06 15:12:12 +08:00
parent 8b6dd746eb
commit c56aa7b594
1 changed files with 2 additions and 2 deletions

View File

@ -179,9 +179,9 @@ void initialize()
// enough, that is, before the construction of any Q(Gui)Application
// instances. QCoreApplication won't instantiate the platform plugin.
qputenv(QT_QPA_ENV_VAR, kxcb);
// Fedora and Arch users report segfault of calling XInitThreads().
// Fedora and Arch users report segfault when calling XInitThreads() and gtk_init().
//XInitThreads(); // Users report that GTK is crashing without this.
gtk_init(nullptr, nullptr); // Users report that GTK functionalities won't work without this.
//gtk_init(nullptr, nullptr); // Users report that GTK functionalities won't work without this.
#endif
#if (defined(Q_OS_MACOS) && (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)))