summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-05-12 09:12:23 +0200
committerMarc Mutz <marc.mutz@kdab.com>2016-05-12 16:19:29 +0000
commitb6e019b912f94730b9661f5f676bad529f1569fd (patch)
treee069ec4aac0c5a288aad5073c59d9a64c68cb9d9 /src
parentc1779f2e70dd67ae3dab1683d9189ab1556139c0 (diff)
De-inline QScxmlDataModel hierarchy dtors
By making the destructor (usually the first non-inline, non-pure, virtual function, and therefore the trigger for most compilers to emit the vtable and type_info structures for the class in that TU) out-of-line, vtables and, more importantly, type_info strucures for the class are pinned to a single TU. This prevents false negative dynamic_cast and catch evaluation. Since they are already exported, users of the classes are unaffected by the change. Task-number: QTBUG-45582 Change-Id: Ie4336b592f7e1f4f25fd87b95289efc9d10e5553 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/scxml/qscxmlcppdatamodel.cpp5
-rw-r--r--src/scxml/qscxmlcppdatamodel.h1
-rw-r--r--src/scxml/qscxmldatamodel.cpp5
-rw-r--r--src/scxml/qscxmldatamodel.h1
-rw-r--r--src/scxml/qscxmlecmascriptdatamodel.cpp5
-rw-r--r--src/scxml/qscxmlecmascriptdatamodel.h1
-rw-r--r--src/scxml/qscxmlnulldatamodel.cpp5
-rw-r--r--src/scxml/qscxmlnulldatamodel.h1
8 files changed, 24 insertions, 0 deletions
diff --git a/src/scxml/qscxmlcppdatamodel.cpp b/src/scxml/qscxmlcppdatamodel.cpp
index 9f00b75..9efc1c3 100644
--- a/src/scxml/qscxmlcppdatamodel.cpp
+++ b/src/scxml/qscxmlcppdatamodel.cpp
@@ -134,6 +134,11 @@ QScxmlCppDataModel::QScxmlCppDataModel(QObject *parent)
: QScxmlDataModel(*(new QScxmlCppDataModelPrivate), parent)
{}
+/*! \internal */
+QScxmlCppDataModel::~QScxmlCppDataModel()
+{
+}
+
/*!
* Called during state machine initialization to set up a state machine using the initial values
* for data model variables specified by their keys, \a initialDataValues. These
diff --git a/src/scxml/qscxmlcppdatamodel.h b/src/scxml/qscxmlcppdatamodel.h
index 48c5178..328dee8 100644
--- a/src/scxml/qscxmlcppdatamodel.h
+++ b/src/scxml/qscxmlcppdatamodel.h
@@ -59,6 +59,7 @@ class Q_SCXML_EXPORT QScxmlCppDataModel: public QScxmlDataModel
Q_DECLARE_PRIVATE(QScxmlCppDataModel)
public:
explicit QScxmlCppDataModel(QObject *parent = nullptr);
+ ~QScxmlCppDataModel();
bool setup(const QVariantMap &initialDataValues) Q_DECL_OVERRIDE;
diff --git a/src/scxml/qscxmldatamodel.cpp b/src/scxml/qscxmldatamodel.cpp
index 6e6d62b..9762e92 100644
--- a/src/scxml/qscxmldatamodel.cpp
+++ b/src/scxml/qscxmldatamodel.cpp
@@ -96,6 +96,11 @@ QScxmlDataModel::QScxmlDataModel(QScxmlDataModelPrivate &dd, QObject *parent) :
{
}
+/*! \internal */
+QScxmlDataModel::~QScxmlDataModel()
+{
+}
+
/*!
* Sets the state machine this model belongs to to \a stateMachine. There is a
* 1:1 relation between state machines and models. After setting the state
diff --git a/src/scxml/qscxmldatamodel.h b/src/scxml/qscxmldatamodel.h
index 63143d1..d3ade56 100644
--- a/src/scxml/qscxmldatamodel.h
+++ b/src/scxml/qscxmldatamodel.h
@@ -69,6 +69,7 @@ public:
public:
explicit QScxmlDataModel(QObject *parent = nullptr);
+ ~QScxmlDataModel();
void setStateMachine(QScxmlStateMachine *stateMachine);
QScxmlStateMachine *stateMachine() const;
diff --git a/src/scxml/qscxmlecmascriptdatamodel.cpp b/src/scxml/qscxmlecmascriptdatamodel.cpp
index 6b6dc60..ef64e48 100644
--- a/src/scxml/qscxmlecmascriptdatamodel.cpp
+++ b/src/scxml/qscxmlecmascriptdatamodel.cpp
@@ -361,6 +361,11 @@ QScxmlEcmaScriptDataModel::QScxmlEcmaScriptDataModel(QObject *parent)
: QScxmlDataModel(*(new QScxmlEcmaScriptDataModelPrivate), parent)
{}
+/*! \internal */
+QScxmlEcmaScriptDataModel::~QScxmlEcmaScriptDataModel()
+{
+}
+
/*!
\reimp
*/
diff --git a/src/scxml/qscxmlecmascriptdatamodel.h b/src/scxml/qscxmlecmascriptdatamodel.h
index 0db8533..4c484f2 100644
--- a/src/scxml/qscxmlecmascriptdatamodel.h
+++ b/src/scxml/qscxmlecmascriptdatamodel.h
@@ -52,6 +52,7 @@ class Q_SCXML_EXPORT QScxmlEcmaScriptDataModel: public QScxmlDataModel
Q_DECLARE_PRIVATE(QScxmlEcmaScriptDataModel)
public:
explicit QScxmlEcmaScriptDataModel(QObject *parent = nullptr);
+ ~QScxmlEcmaScriptDataModel();
bool setup(const QVariantMap &initialDataValues) Q_DECL_OVERRIDE;
diff --git a/src/scxml/qscxmlnulldatamodel.cpp b/src/scxml/qscxmlnulldatamodel.cpp
index bd5d7d2..08a9333 100644
--- a/src/scxml/qscxmlnulldatamodel.cpp
+++ b/src/scxml/qscxmlnulldatamodel.cpp
@@ -135,6 +135,11 @@ QScxmlNullDataModel::QScxmlNullDataModel(QObject *parent)
: QScxmlDataModel(*(new QScxmlNullDataModelPrivate), parent)
{}
+/*! \internal */
+QScxmlNullDataModel::~QScxmlNullDataModel()
+{
+}
+
/*!
\reimp
*/
diff --git a/src/scxml/qscxmlnulldatamodel.h b/src/scxml/qscxmlnulldatamodel.h
index cb47e4e..ee6f4ea 100644
--- a/src/scxml/qscxmlnulldatamodel.h
+++ b/src/scxml/qscxmlnulldatamodel.h
@@ -51,6 +51,7 @@ class Q_SCXML_EXPORT QScxmlNullDataModel: public QScxmlDataModel
Q_DECLARE_PRIVATE(QScxmlNullDataModel)
public:
explicit QScxmlNullDataModel(QObject *parent = nullptr);
+ ~QScxmlNullDataModel();
bool setup(const QVariantMap &initialDataValues) Q_DECL_OVERRIDE;