1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "qgenericunixeventdispatcher_p.h"
5#include "qunixeventdispatcher_qpa_p.h"
6#if QT_CONFIG(glib)
7# include "qeventdispatcher_glib_p.h"
8#endif
9QT_BEGIN_NAMESPACE
10
11class QAbstractEventDispatcher *QtGenericUnixDispatcher::createUnixEventDispatcher()
12{
13#if !defined(QT_NO_GLIB) && !defined(Q_OS_WIN)
14 if (qEnvironmentVariableIsEmpty(varName: "QT_NO_GLIB") && QEventDispatcherGlib::versionSupported())
15 return new QPAEventDispatcherGlib();
16 else
17#endif
18 return new QUnixEventDispatcherQPA();
19}
20
21QT_END_NAMESPACE
22

source code of qtbase/src/gui/platform/unix/qgenericunixeventdispatcher.cpp