summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/devicediscovery
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport/devicediscovery')
-rw-r--r--src/platformsupport/devicediscovery/CMakeLists.txt18
-rw-r--r--src/platformsupport/devicediscovery/qdevicediscovery_dummy.cpp40
-rw-r--r--src/platformsupport/devicediscovery/qdevicediscovery_dummy_p.h40
-rw-r--r--src/platformsupport/devicediscovery/qdevicediscovery_p.h41
-rw-r--r--src/platformsupport/devicediscovery/qdevicediscovery_static.cpp48
-rw-r--r--src/platformsupport/devicediscovery/qdevicediscovery_static_p.h40
-rw-r--r--src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp56
-rw-r--r--src/platformsupport/devicediscovery/qdevicediscovery_udev_p.h46
8 files changed, 41 insertions, 288 deletions
diff --git a/src/platformsupport/devicediscovery/CMakeLists.txt b/src/platformsupport/devicediscovery/CMakeLists.txt
index e113786e32..19c35f6660 100644
--- a/src/platformsupport/devicediscovery/CMakeLists.txt
+++ b/src/platformsupport/devicediscovery/CMakeLists.txt
@@ -1,10 +1,11 @@
-# Generated from devicediscovery.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
#####################################################################
-## DeviceDiscoverySupport Module:
+## DeviceDiscoverySupportPrivate Module:
#####################################################################
-qt_internal_add_module(DeviceDiscoverySupport
+qt_internal_add_module(DeviceDiscoverySupportPrivate
CONFIG_MODULE_NAME devicediscovery_support
STATIC
INTERNAL_MODULE
@@ -14,28 +15,25 @@ qt_internal_add_module(DeviceDiscoverySupport
QT_NO_CAST_FROM_ASCII
PUBLIC_LIBRARIES
Qt::CorePrivate
+ NO_GENERATE_CPP_EXPORTS
)
-#### Keys ignored in scope 1:.:.:devicediscovery.pro:<TRUE>:
-# MODULE = "devicediscovery_support"
-# QT_FOR_CONFIG = "gui-private"
-
## Scopes:
#####################################################################
-qt_internal_extend_target(DeviceDiscoverySupport CONDITION QT_FEATURE_libudev
+qt_internal_extend_target(DeviceDiscoverySupportPrivate CONDITION QT_FEATURE_libudev
SOURCES
qdevicediscovery_udev.cpp qdevicediscovery_udev_p.h
LIBRARIES
PkgConfig::Libudev
)
-qt_internal_extend_target(DeviceDiscoverySupport CONDITION QT_FEATURE_evdev AND NOT QT_FEATURE_libudev
+qt_internal_extend_target(DeviceDiscoverySupportPrivate CONDITION QT_FEATURE_evdev AND NOT QT_FEATURE_libudev
SOURCES
qdevicediscovery_static.cpp qdevicediscovery_static_p.h
)
-qt_internal_extend_target(DeviceDiscoverySupport CONDITION NOT QT_FEATURE_evdev AND NOT QT_FEATURE_libudev
+qt_internal_extend_target(DeviceDiscoverySupportPrivate CONDITION NOT QT_FEATURE_evdev AND NOT QT_FEATURE_libudev
SOURCES
qdevicediscovery_dummy.cpp qdevicediscovery_dummy_p.h
)
diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_dummy.cpp b/src/platformsupport/devicediscovery/qdevicediscovery_dummy.cpp
index a04b91b438..f94f7be3b2 100644
--- a/src/platformsupport/devicediscovery/qdevicediscovery_dummy.cpp
+++ b/src/platformsupport/devicediscovery/qdevicediscovery_dummy.cpp
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// 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 "qdevicediscovery_dummy_p.h"
diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_dummy_p.h b/src/platformsupport/devicediscovery/qdevicediscovery_dummy_p.h
index 92a9351f2e..9ac6fbe921 100644
--- a/src/platformsupport/devicediscovery/qdevicediscovery_dummy_p.h
+++ b/src/platformsupport/devicediscovery/qdevicediscovery_dummy_p.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// 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
#ifndef QDEVICEDISCOVERY_DUMMY_H
#define QDEVICEDISCOVERY_DUMMY_H
diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_p.h b/src/platformsupport/devicediscovery/qdevicediscovery_p.h
index f1f50e9708..59ce3cd889 100644
--- a/src/platformsupport/devicediscovery/qdevicediscovery_p.h
+++ b/src/platformsupport/devicediscovery/qdevicediscovery_p.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2018 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
#ifndef QDEVICEDISCOVERY_H
#define QDEVICEDISCOVERY_H
@@ -54,6 +18,7 @@
#include <QObject>
#include <QSocketNotifier>
#include <QStringList>
+#include <private/qglobal_p.h>
#define QT_EVDEV_DEVICE_PATH "/dev/input/"
#define QT_EVDEV_DEVICE_PREFIX "event"
diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp b/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp
index a1575677f5..03a77aaae7 100644
--- a/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp
+++ b/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// 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 "qdevicediscovery_static_p.h"
@@ -83,6 +47,8 @@ static bool testBit(long bit, const long *field)
QT_BEGIN_NAMESPACE
+using namespace Qt::StringLiterals;
+
Q_LOGGING_CATEGORY(lcDD, "qt.qpa.input")
QDeviceDiscovery *QDeviceDiscovery::create(QDeviceTypes types, QObject *parent)
@@ -107,7 +73,7 @@ QStringList QDeviceDiscoveryStatic::scanConnectedDevices()
dir.setPath(QString::fromLatin1(QT_EVDEV_DEVICE_PATH));
const auto deviceFiles = dir.entryList();
for (const QString &deviceFile : deviceFiles) {
- QString absoluteFilePath = dir.absolutePath() + QLatin1Char('/') + deviceFile;
+ QString absoluteFilePath = dir.absolutePath() + u'/' + deviceFile;
if (checkDeviceType(absoluteFilePath))
devices << absoluteFilePath;
}
@@ -118,7 +84,7 @@ QStringList QDeviceDiscoveryStatic::scanConnectedDevices()
dir.setPath(QString::fromLatin1(QT_DRM_DEVICE_PATH));
const auto deviceFiles = dir.entryList();
for (const QString &deviceFile : deviceFiles) {
- QString absoluteFilePath = dir.absolutePath() + QLatin1Char('/') + deviceFile;
+ QString absoluteFilePath = dir.absolutePath() + u'/' + deviceFile;
if (checkDeviceType(absoluteFilePath))
devices << absoluteFilePath;
}
@@ -139,7 +105,7 @@ bool QDeviceDiscoveryStatic::checkDeviceType(const QString &device)
qCDebug(lcDD) << "doing static device discovery for " << device;
- if ((m_types & Device_DRM) && device.contains(QLatin1String(QT_DRM_DEVICE_PREFIX))) {
+ if ((m_types & Device_DRM) && device.contains(QT_DRM_DEVICE_PREFIX ""_L1)) {
QT_CLOSE(fd);
return true;
}
diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_static_p.h b/src/platformsupport/devicediscovery/qdevicediscovery_static_p.h
index 0cf70a32a8..fb698c9022 100644
--- a/src/platformsupport/devicediscovery/qdevicediscovery_static_p.h
+++ b/src/platformsupport/devicediscovery/qdevicediscovery_static_p.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// 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
#ifndef QDEVICEDISCOVERY_STATIC_H
#define QDEVICEDISCOVERY_STATIC_H
diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp b/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp
index 1853c2260a..45043818a4 100644
--- a/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp
+++ b/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// 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 "qdevicediscovery_udev_p.h"
@@ -54,6 +18,8 @@
QT_BEGIN_NAMESPACE
+using namespace Qt::StringLiterals;
+
Q_LOGGING_CATEGORY(lcDD, "qt.qpa.input")
QDeviceDiscovery *QDeviceDiscovery::create(QDeviceTypes types, QObject *parent)
@@ -75,7 +41,7 @@ QDeviceDiscovery *QDeviceDiscovery::create(QDeviceTypes types, QObject *parent)
QDeviceDiscoveryUDev::QDeviceDiscoveryUDev(QDeviceTypes types, struct udev *udev, QObject *parent) :
QDeviceDiscovery(types, parent),
- m_udev(udev), m_udevMonitor(0), m_udevMonitorFileDescriptor(-1), m_udevSocketNotifier(0)
+ m_udev(udev)
{
if (!m_udev)
return;
@@ -140,9 +106,9 @@ QStringList QDeviceDiscoveryUDev::scanConnectedDevices()
const char *syspath = udev_list_entry_get_name(entry);
udev_device *udevice = udev_device_new_from_syspath(m_udev, syspath);
QString candidate = QString::fromUtf8(udev_device_get_devnode(udevice));
- if ((m_types & Device_InputMask) && candidate.startsWith(QLatin1String(QT_EVDEV_DEVICE)))
+ if ((m_types & Device_InputMask) && candidate.startsWith(QT_EVDEV_DEVICE ""_L1))
devices << candidate;
- if ((m_types & Device_VideoMask) && candidate.startsWith(QLatin1String(QT_DRM_DEVICE))) {
+ if ((m_types & Device_VideoMask) && candidate.startsWith(QT_DRM_DEVICE ""_L1)) {
if (m_types & Device_DRM_PrimaryGPU) {
udev_device *pci = udev_device_get_parent_with_subsystem_devtype(udevice, "pci", 0);
if (pci) {
@@ -186,9 +152,9 @@ void QDeviceDiscoveryUDev::handleUDevNotification()
const char *subsystem;
devNode = QString::fromUtf8(str);
- if (devNode.startsWith(QLatin1String(QT_EVDEV_DEVICE)))
+ if (devNode.startsWith(QT_EVDEV_DEVICE ""_L1))
subsystem = "input";
- else if (devNode.startsWith(QLatin1String(QT_DRM_DEVICE)))
+ else if (devNode.startsWith(QT_DRM_DEVICE ""_L1))
subsystem = "drm";
else goto cleanup;
@@ -220,7 +186,7 @@ bool QDeviceDiscoveryUDev::checkDeviceType(udev_device *dev)
if ((m_types & Device_Keyboard) && (qstrcmp(udev_device_get_property_value(dev, "ID_INPUT_KEYBOARD"), "1") == 0 )) {
const QString capabilities_key = QString::fromUtf8(udev_device_get_sysattr_value(dev, "capabilities/key"));
- const auto val = QStringView{capabilities_key}.split(QLatin1Char(' '), Qt::SkipEmptyParts);
+ const auto val = QStringView{capabilities_key}.split(u' ', Qt::SkipEmptyParts);
if (!val.isEmpty()) {
bool ok;
unsigned long long keys = val.last().toULongLong(&ok, 16);
@@ -258,3 +224,5 @@ bool QDeviceDiscoveryUDev::checkDeviceType(udev_device *dev)
}
QT_END_NAMESPACE
+
+#include "moc_qdevicediscovery_udev_p.cpp"
diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_udev_p.h b/src/platformsupport/devicediscovery/qdevicediscovery_udev_p.h
index 8489cf5f34..3074877b5a 100644
--- a/src/platformsupport/devicediscovery/qdevicediscovery_udev_p.h
+++ b/src/platformsupport/devicediscovery/qdevicediscovery_udev_p.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// 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
#ifndef QDEVICEDISCOVERY_UDEV_H
#define QDEVICEDISCOVERY_UDEV_H
@@ -77,9 +41,9 @@ private:
void startWatching();
void stopWatching();
- struct udev_monitor *m_udevMonitor;
- int m_udevMonitorFileDescriptor;
- QSocketNotifier *m_udevSocketNotifier;
+ struct udev_monitor *m_udevMonitor = nullptr;
+ int m_udevMonitorFileDescriptor = -1;
+ QSocketNotifier *m_udevSocketNotifier = nullptr;
};
QT_END_NAMESPACE