Warn if incompatible event loop is detected

This commit is contained in:
Ilya Fedin 2023-05-06 02:35:46 +04:00 committed by John Preston
parent 0a011db483
commit 0b4ebcbae4
1 changed files with 7 additions and 0 deletions

View File

@ -35,6 +35,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtWidgets/QSystemTrayIcon>
#include <QtCore/QStandardPaths>
#include <QtCore/QProcess>
#include <QtCore/QAbstractEventDispatcher>
#include <kshell.h>
#include <ksandbox.h>
@ -854,6 +855,12 @@ void start() {
LOG(("Icon theme: %1").arg(QIcon::themeName()));
LOG(("Fallback icon theme: %1").arg(QIcon::fallbackThemeName()));
if (!QCoreApplication::eventDispatcher()->inherits(
"QEventDispatcherGlib")) {
g_warning("Qt is running without GLib event loop integration, "
"except various functionality to not to work.");
}
#ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION
// tdesktop doesn't use xlib by itself,
// but some libraries it depends on may do