summaryrefslogtreecommitdiffstats
path: root/src/corelib/statemachine
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-02-02 15:57:44 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2016-02-02 15:57:44 +0100
commitd3e6e732c70ebc2340d6376d727b3c623be23810 (patch)
tree18d469f02ac36edd04b87a9bfa4886ceef0490f0 /src/corelib/statemachine
parentfdfd63053ae6b10af06553be3c1b15de274bebf7 (diff)
parentba8d3430029d8c4342e9a47c110ee8c9879818f4 (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts: config.tests/unix/compile.test src/plugins/platforms/cocoa/qcocoahelpers.mm src/tools/qlalr/cppgenerator.cpp Change-Id: I0103ca076a9aca7118b2fd99f0fdaf81055998c3
Diffstat (limited to 'src/corelib/statemachine')
-rw-r--r--src/corelib/statemachine/qfinalstate.cpp26
-rw-r--r--src/corelib/statemachine/qfinalstate.h4
-rw-r--r--src/corelib/statemachine/qfinalstate_p.h68
-rw-r--r--src/corelib/statemachine/qstate.cpp3
-rw-r--r--src/corelib/statemachine/qstate_p.h7
-rw-r--r--src/corelib/statemachine/statemachine.pri1
6 files changed, 94 insertions, 15 deletions
diff --git a/src/corelib/statemachine/qfinalstate.cpp b/src/corelib/statemachine/qfinalstate.cpp
index 61eca2c74d..efcb364794 100644
--- a/src/corelib/statemachine/qfinalstate.cpp
+++ b/src/corelib/statemachine/qfinalstate.cpp
@@ -37,12 +37,10 @@
**
****************************************************************************/
-#include "qfinalstate.h"
+#include "qfinalstate_p.h"
#ifndef QT_NO_STATEMACHINE
-#include "qabstractstate_p.h"
-
QT_BEGIN_NAMESPACE
/*!
@@ -82,19 +80,16 @@ QT_BEGIN_NAMESPACE
\sa QState::finished()
*/
-class QFinalStatePrivate : public QAbstractStatePrivate
-{
- Q_DECLARE_PUBLIC(QFinalState)
-
-public:
- QFinalStatePrivate();
-};
-
QFinalStatePrivate::QFinalStatePrivate()
: QAbstractStatePrivate(FinalState)
{
}
+QFinalStatePrivate::~QFinalStatePrivate()
+{
+ // to prevent vtables being generated in every file that includes the private header
+}
+
/*!
Constructs a new QFinalState object with the given \a parent state.
*/
@@ -104,6 +99,15 @@ QFinalState::QFinalState(QState *parent)
}
/*!
+ \internal
+ */
+QFinalState::QFinalState(QFinalStatePrivate &dd, QState *parent)
+ : QAbstractState(dd, parent)
+{
+}
+
+
+/*!
Destroys this final state.
*/
QFinalState::~QFinalState()
diff --git a/src/corelib/statemachine/qfinalstate.h b/src/corelib/statemachine/qfinalstate.h
index f9b32ef128..9b6b193231 100644
--- a/src/corelib/statemachine/qfinalstate.h
+++ b/src/corelib/statemachine/qfinalstate.h
@@ -44,7 +44,6 @@
QT_BEGIN_NAMESPACE
-
#ifndef QT_NO_STATEMACHINE
class QFinalStatePrivate;
@@ -61,6 +60,9 @@ protected:
bool event(QEvent *e) Q_DECL_OVERRIDE;
+protected:
+ explicit QFinalState(QFinalStatePrivate &dd, QState *parent);
+
private:
Q_DISABLE_COPY(QFinalState)
Q_DECLARE_PRIVATE(QFinalState)
diff --git a/src/corelib/statemachine/qfinalstate_p.h b/src/corelib/statemachine/qfinalstate_p.h
new file mode 100644
index 0000000000..74640289f1
--- /dev/null
+++ b/src/corelib/statemachine/qfinalstate_p.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://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 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QFINALSTATE_P_H
+#define QFINALSTATE_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 "qfinalstate.h"
+#include "private/qabstractstate_p.h"
+
+#ifndef QT_NO_STATEMACHINE
+
+QT_BEGIN_NAMESPACE
+
+class Q_CORE_EXPORT QFinalStatePrivate : public QAbstractStatePrivate
+{
+ Q_DECLARE_PUBLIC(QFinalState)
+
+public:
+ QFinalStatePrivate();
+ ~QFinalStatePrivate();
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_STATEMACHINE
+
+#endif // QFINALSTATE_P_H
diff --git a/src/corelib/statemachine/qstate.cpp b/src/corelib/statemachine/qstate.cpp
index bcfff1e462..cae6474c32 100644
--- a/src/corelib/statemachine/qstate.cpp
+++ b/src/corelib/statemachine/qstate.cpp
@@ -37,11 +37,10 @@
**
****************************************************************************/
-#include "qstate.h"
+#include "qstate_p.h"
#ifndef QT_NO_STATEMACHINE
-#include "qstate_p.h"
#include "qhistorystate.h"
#include "qhistorystate_p.h"
#include "qabstracttransition.h"
diff --git a/src/corelib/statemachine/qstate_p.h b/src/corelib/statemachine/qstate_p.h
index 438de427f5..913657e53b 100644
--- a/src/corelib/statemachine/qstate_p.h
+++ b/src/corelib/statemachine/qstate_p.h
@@ -51,6 +51,7 @@
// We mean it.
//
+#include "qstate.h"
#include "private/qabstractstate_p.h"
#include <QtCore/qlist.h>
@@ -58,6 +59,8 @@
#include <QtCore/qpointer.h>
#include <QtCore/qvariant.h>
+#ifndef QT_NO_STATEMACHINE
+
QT_BEGIN_NAMESPACE
#ifndef QT_NO_PROPERTIES
@@ -89,7 +92,7 @@ class QAbstractTransition;
class QHistoryState;
class QState;
-class Q_AUTOTEST_EXPORT QStatePrivate : public QAbstractStatePrivate
+class Q_CORE_EXPORT QStatePrivate : public QAbstractStatePrivate
{
Q_DECLARE_PUBLIC(QState)
public:
@@ -121,4 +124,6 @@ public:
QT_END_NAMESPACE
+#endif // QT_NO_STATEMACHINE
+
#endif
diff --git a/src/corelib/statemachine/statemachine.pri b/src/corelib/statemachine/statemachine.pri
index 910cf5e9b3..c5396a2ef8 100644
--- a/src/corelib/statemachine/statemachine.pri
+++ b/src/corelib/statemachine/statemachine.pri
@@ -6,6 +6,7 @@ HEADERS += $$PWD/qstatemachine.h \
$$PWD/qstate.h \
$$PWD/qstate_p.h \
$$PWD/qfinalstate.h \
+ $$PWD/qfinalstate_p.h \
$$PWD/qhistorystate.h \
$$PWD/qhistorystate_p.h \
$$PWD/qabstracttransition.h \