diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-04 15:24:37 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-04 15:47:31 +0200 |
commit | be86ffcb985e34dcd802bac9ff17a8930b11f9c9 (patch) | |
tree | 833d30bc9904aee931f90700ca711c71af2d7826 /src | |
parent | 0e128824e54a4994682023b7fd0fbb4c1938892c (diff) | |
download | qtactiveqt-be86ffcb985e34dcd802bac9ff17a8930b11f9c9.tar.gz |
Fix class structure and definitions
- Add override
- Use "= default" for trivial constructors/destructors
- Q_DISABLE_COPY_MOVE to delete move constructors and assignment
Change-Id: If773ad8c092ab8000b268c4231f7f27e5f484e56
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/activeqt/container/qaxbase.cpp | 6 | ||||
-rw-r--r-- | src/activeqt/container/qaxscript.cpp | 2 | ||||
-rw-r--r-- | src/activeqt/container/qaxwidget.cpp | 4 | ||||
-rw-r--r-- | src/activeqt/control/qaxaggregated.h | 2 | ||||
-rw-r--r-- | src/activeqt/control/qaxbindable.h | 2 | ||||
-rw-r--r-- | src/activeqt/control/qaxfactory.h | 2 | ||||
-rw-r--r-- | src/activeqt/control/qaxserverbase.cpp | 6 | ||||
-rw-r--r-- | src/activeqt/control/qclassfactory_p.h | 2 |
8 files changed, 13 insertions, 13 deletions
diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp index 526a272..909d0d4 100644 --- a/src/activeqt/container/qaxbase.cpp +++ b/src/activeqt/container/qaxbase.cpp @@ -257,7 +257,7 @@ static const char *const type_conversion[][2] = class QAxEventSink : public IDispatch, public IPropertyNotifySink { - Q_DISABLE_COPY(QAxEventSink) + Q_DISABLE_COPY_MOVE(QAxEventSink) public: explicit QAxEventSink(QAxBase *com) : combase(com) {} virtual ~QAxEventSink() @@ -587,7 +587,7 @@ public: class QAxBasePrivate { - Q_DISABLE_COPY(QAxBasePrivate) + Q_DISABLE_COPY_MOVE(QAxBasePrivate) public: using UuidEventSinkHash = QHash<QUuid, QAxEventSink*>; @@ -4293,7 +4293,7 @@ QAxObject *QAxBase::querySubObject(const char *name, QList<QVariant> &vars) class QtPropertyBag : public IPropertyBag { - Q_DISABLE_COPY(QtPropertyBag) + Q_DISABLE_COPY_MOVE(QtPropertyBag) public: QtPropertyBag() = default; virtual ~QtPropertyBag() = default; diff --git a/src/activeqt/container/qaxscript.cpp b/src/activeqt/container/qaxscript.cpp index 5ae6c89..5179204 100644 --- a/src/activeqt/container/qaxscript.cpp +++ b/src/activeqt/container/qaxscript.cpp @@ -97,7 +97,7 @@ public: class QAxScriptSite : public IActiveScriptSite, public IActiveScriptSiteWindow { - Q_DISABLE_COPY(QAxScriptSite) + Q_DISABLE_COPY_MOVE(QAxScriptSite) public: QAxScriptSite(QAxScript *script); virtual ~QAxScriptSite() = default; diff --git a/src/activeqt/container/qaxwidget.cpp b/src/activeqt/container/qaxwidget.cpp index 7e5a91b..31882b1 100644 --- a/src/activeqt/container/qaxwidget.cpp +++ b/src/activeqt/container/qaxwidget.cpp @@ -115,7 +115,7 @@ QT_BEGIN_NAMESPACE */ class QAxHostWidget : public QWidget { - Q_DISABLE_COPY(QAxHostWidget) + Q_DISABLE_COPY_MOVE(QAxHostWidget) friend class QAxClientSite; public: Q_OBJECT_CHECK @@ -178,7 +178,7 @@ class QAxClientSite : public IDispatch, public IOleDocumentSite, public IAdviseSink { - Q_DISABLE_COPY(QAxClientSite) + Q_DISABLE_COPY_MOVE(QAxClientSite) friend class QAxHostWidget; public: QAxClientSite(QAxWidget *c); diff --git a/src/activeqt/control/qaxaggregated.h b/src/activeqt/control/qaxaggregated.h index 61d1f7f..01938be 100644 --- a/src/activeqt/control/qaxaggregated.h +++ b/src/activeqt/control/qaxaggregated.h @@ -65,7 +65,7 @@ class QAxAggregated { friend class QAxServerBase; friend class QAxClientSite; - Q_DISABLE_COPY(QAxAggregated) + Q_DISABLE_COPY_MOVE(QAxAggregated) public: virtual long queryInterface(const QUuid &iid, void **iface) = 0; diff --git a/src/activeqt/control/qaxbindable.h b/src/activeqt/control/qaxbindable.h index d895d1a..5bbc463 100644 --- a/src/activeqt/control/qaxbindable.h +++ b/src/activeqt/control/qaxbindable.h @@ -63,7 +63,7 @@ struct IAxServerBase; class QAxBindable { - Q_DISABLE_COPY(QAxBindable) + Q_DISABLE_COPY_MOVE(QAxBindable) friend class QAxServerBase; public: QAxBindable(); diff --git a/src/activeqt/control/qaxfactory.h b/src/activeqt/control/qaxfactory.h index 05df3c9..d11685a 100644 --- a/src/activeqt/control/qaxfactory.h +++ b/src/activeqt/control/qaxfactory.h @@ -74,7 +74,7 @@ class QSettings; class QAxFactory : public QObject { - Q_DISABLE_COPY(QAxFactory) + Q_DISABLE_COPY_MOVE(QAxFactory) public: QAxFactory(const QUuid &libId, const QUuid &appId); ~QAxFactory() override; diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp index ab73bb5..9c3786b 100644 --- a/src/activeqt/control/qaxserverbase.cpp +++ b/src/activeqt/control/qaxserverbase.cpp @@ -446,7 +446,7 @@ static inline QAxServerBase *axServerBaseFromWindow(HWND hWnd) class QAxServerAggregate : public IUnknown { - Q_DISABLE_COPY(QAxServerAggregate) + Q_DISABLE_COPY_MOVE(QAxServerAggregate) public: QAxServerAggregate(const QString &className, IUnknown *outerUnknown) { @@ -547,11 +547,11 @@ public: DeleteCriticalSection(&refCountSection); } - unsigned long __stdcall AddRef() + unsigned long __stdcall AddRef() override { return InterlockedIncrement(&ref); } - unsigned long __stdcall Release() + unsigned long __stdcall Release() override { LONG refCount = InterlockedDecrement(&ref); if (!refCount) diff --git a/src/activeqt/control/qclassfactory_p.h b/src/activeqt/control/qclassfactory_p.h index b74123f..7133dfc 100644 --- a/src/activeqt/control/qclassfactory_p.h +++ b/src/activeqt/control/qclassfactory_p.h @@ -71,7 +71,7 @@ QT_BEGIN_NAMESPACE // One instance of this class for each ActiveX the server can provide. class QClassFactory : public IClassFactory2 { - Q_DISABLE_COPY(QClassFactory) + Q_DISABLE_COPY_MOVE(QClassFactory) public: QClassFactory(CLSID clsid); |