summaryrefslogtreecommitdiffstats
path: root/src/input
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-05-14 09:17:23 +0200
committerSean Harmer <sean.harmer@kdab.com>2016-05-19 07:03:21 +0000
commit77cf73d8516ded4c9f76271907ab49be74efcdd3 (patch)
tree855dfc5eb24beb33b883a42f6e2c579220dbae5b /src/input
parent6f6207fadc1a334d1aed98f840a0d074acf18d06 (diff)
Introduce QAbstractActionInputPrivate
We need to have an unbroken chain of Private classes for BC reasons. Adding one in the middle after a BC release is going to be much harder, since, in this case, we already have an exported function that names QNodePrivate instead of QAbstractActionInputPrivate. Change-Id: Iaf3730f7a30a13b388d632c068d7c80319672057 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/input')
-rw-r--r--src/input/frontend/frontend.pri1
-rw-r--r--src/input/frontend/qabstractactioninput.cpp4
-rw-r--r--src/input/frontend/qabstractactioninput.h4
-rw-r--r--src/input/frontend/qabstractactioninput_p.h68
-rw-r--r--src/input/frontend/qactioninput.cpp6
-rw-r--r--src/input/frontend/qactioninput_p.h9
-rw-r--r--src/input/frontend/qinputchord.cpp6
-rw-r--r--src/input/frontend/qinputchord_p.h9
-rw-r--r--src/input/frontend/qinputsequence.cpp7
-rw-r--r--src/input/frontend/qinputsequence_p.h10
10 files changed, 101 insertions, 23 deletions
diff --git a/src/input/frontend/frontend.pri b/src/input/frontend/frontend.pri
index 829dbc74d..93b3e0839 100644
--- a/src/input/frontend/frontend.pri
+++ b/src/input/frontend/frontend.pri
@@ -27,6 +27,7 @@ HEADERS += \
$$PWD/qabstractphysicaldevice_p.h \
$$PWD/qgenericinputdevice_p.h \
$$PWD/qabstractactioninput.h \
+ $$PWD/qabstractactioninput_p.h \
$$PWD/qinputchord.h \
$$PWD/qinputsequence.h \
$$PWD/qinputsettings.h \
diff --git a/src/input/frontend/qabstractactioninput.cpp b/src/input/frontend/qabstractactioninput.cpp
index 2e7a4cb51..5d8f76fab 100644
--- a/src/input/frontend/qabstractactioninput.cpp
+++ b/src/input/frontend/qabstractactioninput.cpp
@@ -36,7 +36,7 @@
** $QT_END_LICENSE$
****************************************************************************/
-#include "qabstractactioninput.h"
+#include "qabstractactioninput_p.h"
#include <Qt3DCore/private/qnode_p.h>
QT_BEGIN_NAMESPACE
@@ -65,7 +65,7 @@ namespace Qt3DInput {
/*!
\internal
*/
-QAbstractActionInput::QAbstractActionInput(Qt3DCore::QNodePrivate &dd, Qt3DCore::QNode *parent)
+QAbstractActionInput::QAbstractActionInput(QAbstractActionInputPrivate &dd, Qt3DCore::QNode *parent)
: Qt3DCore::QNode(dd, parent)
{
}
diff --git a/src/input/frontend/qabstractactioninput.h b/src/input/frontend/qabstractactioninput.h
index 7c39004af..a0c18cb54 100644
--- a/src/input/frontend/qabstractactioninput.h
+++ b/src/input/frontend/qabstractactioninput.h
@@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE
namespace Qt3DInput {
-class QNodePrivate;
+class QAbstractActionInputPrivate;
class QT3DINPUTSHARED_EXPORT QAbstractActionInput : public Qt3DCore::QNode
{
@@ -55,7 +55,7 @@ public:
~QAbstractActionInput();
protected:
- explicit QAbstractActionInput(Qt3DCore::QNodePrivate &dd, Qt3DCore::QNode *parent = nullptr);
+ explicit QAbstractActionInput(QAbstractActionInputPrivate &dd, Qt3DCore::QNode *parent = nullptr);
};
} // Qt3DInput
diff --git a/src/input/frontend/qabstractactioninput_p.h b/src/input/frontend/qabstractactioninput_p.h
new file mode 100644
index 000000000..6741bc4dc
--- /dev/null
+++ b/src/input/frontend/qabstractactioninput_p.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB).
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt3D module 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$
+****************************************************************************/
+
+#ifndef QT3DINPUT_QABSTRACTACTIONINPUT_P_H
+#define QT3DINPUT_QABSTRACTACTIONINPUT_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <Qt3DInput/qabstractactioninput.h>
+#include <Qt3DCore/private/qnode_p.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3DInput {
+
+class QAbstractActionInputPrivate : public Qt3DCore::QNodePrivate
+{
+};
+
+} // Qt3DInput
+
+QT_END_NAMESPACE
+
+#endif // QT3DINPUT_QABSTRACTACTIONINPUT_H
diff --git a/src/input/frontend/qactioninput.cpp b/src/input/frontend/qactioninput.cpp
index 466277028..d3441d284 100644
--- a/src/input/frontend/qactioninput.cpp
+++ b/src/input/frontend/qactioninput.cpp
@@ -46,6 +46,12 @@ QT_BEGIN_NAMESPACE
namespace Qt3DInput {
+QActionInputPrivate::QActionInputPrivate()
+ : QAbstractActionInputPrivate(),
+ m_sourceDevice(nullptr)
+{
+}
+
/*!
\class Qt3DInput::QActionInput
\inmodule Qt3DInput
diff --git a/src/input/frontend/qactioninput_p.h b/src/input/frontend/qactioninput_p.h
index dba3a08bb..d1e9f88dc 100644
--- a/src/input/frontend/qactioninput_p.h
+++ b/src/input/frontend/qactioninput_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <Qt3DCore/private/qnode_p.h>
+#include <Qt3DInput/private/qabstractactioninput_p.h>
#include <QtCore/qvariant.h>
QT_BEGIN_NAMESPACE
@@ -64,13 +64,10 @@ class QAbstractPhysicalDevice;
\class Qt3DInput::QActionInputPrivate
\internal
*/
-class QActionInputPrivate : public Qt3DCore::QNodePrivate
+class QActionInputPrivate : public QAbstractActionInputPrivate
{
public:
- QActionInputPrivate()
- : Qt3DCore::QNodePrivate()
- , m_sourceDevice(nullptr)
- {}
+ QActionInputPrivate();
QVector<int> m_buttons;
QAbstractPhysicalDevice *m_sourceDevice;
diff --git a/src/input/frontend/qinputchord.cpp b/src/input/frontend/qinputchord.cpp
index b5953498e..a85efa0d2 100644
--- a/src/input/frontend/qinputchord.cpp
+++ b/src/input/frontend/qinputchord.cpp
@@ -204,6 +204,12 @@ Qt3DCore::QNodeCreatedChangeBasePtr QInputChord::createNodeCreationChange() cons
return creationChange;
}
+QInputChordPrivate::QInputChordPrivate()
+ : QAbstractActionInputPrivate(),
+ m_timeout(0)
+{
+}
+
} // Qt3DInput
QT_END_NAMESPACE
diff --git a/src/input/frontend/qinputchord_p.h b/src/input/frontend/qinputchord_p.h
index 1248616e4..bd49f93d6 100644
--- a/src/input/frontend/qinputchord_p.h
+++ b/src/input/frontend/qinputchord_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <Qt3DCore/private/qnode_p.h>
+#include <Qt3DInput/private/qabstractactioninput_p.h>
#include <Qt3DCore/qnodeid.h>
QT_BEGIN_NAMESPACE
@@ -64,13 +64,10 @@ class QAbstractActionInput;
\class Qt3DInput::QInputChordPrivate
\internal
*/
-class QInputChordPrivate : public Qt3DCore::QNodePrivate
+class QInputChordPrivate : public QAbstractActionInputPrivate
{
public:
- QInputChordPrivate()
- : Qt3DCore::QNodePrivate()
- , m_timeout(0)
- {}
+ QInputChordPrivate();
int m_timeout;
QVector<QAbstractActionInput *> m_chords;
diff --git a/src/input/frontend/qinputsequence.cpp b/src/input/frontend/qinputsequence.cpp
index 2f89cd844..1786a9584 100644
--- a/src/input/frontend/qinputsequence.cpp
+++ b/src/input/frontend/qinputsequence.cpp
@@ -50,6 +50,13 @@ QT_BEGIN_NAMESPACE
namespace Qt3DInput {
+QInputSequencePrivate::QInputSequencePrivate()
+ : QAbstractActionInputPrivate(),
+ m_timeout(0),
+ m_buttonInterval(0)
+{
+}
+
/*!
\class Qt3DInput::QInputSequence
\inmodule Qt3DInput
diff --git a/src/input/frontend/qinputsequence_p.h b/src/input/frontend/qinputsequence_p.h
index 571c003fc..3290e4dcc 100644
--- a/src/input/frontend/qinputsequence_p.h
+++ b/src/input/frontend/qinputsequence_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <Qt3DCore/private/qnode_p.h>
+#include <Qt3DInput/private/qabstractactioninput_p.h>
#include <Qt3DCore/qnodeid.h>
QT_BEGIN_NAMESPACE
@@ -64,14 +64,10 @@ class QAbstractActionInput;
\class Qt3DInput::QInputChordSequence
\internal
*/
-class QInputSequencePrivate : public Qt3DCore::QNodePrivate
+class QInputSequencePrivate : public QAbstractActionInputPrivate
{
public:
- QInputSequencePrivate()
- : Qt3DCore::QNodePrivate()
- , m_timeout(0)
- , m_buttonInterval(0)
- {}
+ QInputSequencePrivate();
int m_timeout;
int m_buttonInterval;