diff options
Diffstat (limited to 'src/gui/platform/unix/qgenericunixeventdispatcher.cpp')
-rw-r--r-- | src/gui/platform/unix/qgenericunixeventdispatcher.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gui/platform/unix/qgenericunixeventdispatcher.cpp b/src/gui/platform/unix/qgenericunixeventdispatcher.cpp new file mode 100644 index 0000000000..b551aefe99 --- /dev/null +++ b/src/gui/platform/unix/qgenericunixeventdispatcher.cpp @@ -0,0 +1,21 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#include "qgenericunixeventdispatcher_p.h" +#include "qunixeventdispatcher_qpa_p.h" +#if QT_CONFIG(glib) +# include "qeventdispatcher_glib_p.h" +#endif +QT_BEGIN_NAMESPACE + +class QAbstractEventDispatcher *QtGenericUnixDispatcher::createUnixEventDispatcher() +{ +#if !defined(QT_NO_GLIB) && !defined(Q_OS_WIN) + if (qEnvironmentVariableIsEmpty("QT_NO_GLIB") && QEventDispatcherGlib::versionSupported()) + return new QPAEventDispatcherGlib(); + else +#endif + return new QUnixEventDispatcherQPA(); +} + +QT_END_NAMESPACE |