diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-04-30 09:39:26 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-05-06 13:57:14 +0200 |
commit | a8284209f33eee8a5ecdbb2cce7798e689bc8b5d (patch) | |
tree | 8825fcf628b15de088676079ab8aed400a03ea3a /src | |
parent | 7a6472a6d6c600698858de59e3f1dd1424ca32dd (diff) |
Restructure the libraries
Establish QtAxContainer and QtAxServer as proper modules.
Add QtAxBase as a static helper lib containing
qaxtypefunctions.cpp and qaxutils.cpp from the shared
directory.
qaxtypes.cpp remains in the shared directory as it is
used by both modules with differing defines. The VARIANT
<-> QVariant conversion is exposed via QAxBasePrivate
for testcon.
Add activeqt as a header-only module modeled after
platformheaders.
This makes it easier for the cmake conversion tools.
Task-number: QTBUG-78167
Task-number: QTBUG-27776
Change-Id: I3e7956ea91f2177b8c2596402908351b4d99c510
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src')
24 files changed, 100 insertions, 58 deletions
diff --git a/src/activeqt/activeqt.pro b/src/activeqt/activeqt.pro index 82b60d1..0df9463 100644 --- a/src/activeqt/activeqt.pro +++ b/src/activeqt/activeqt.pro @@ -2,8 +2,8 @@ win32:!winrt { TEMPLATE = subdirs CONFIG += ordered - axshared.file = axshared.prx - SUBDIRS = axshared container control + activeqt.file = activeqt.prx + SUBDIRS = axbase control container activeqt } else { # fake project for creating the documentation message("ActiveQt is a Windows Desktop-only module. Will just generate a docs target.") diff --git a/src/activeqt/activeqt.prx b/src/activeqt/activeqt.prx new file mode 100644 index 0000000..86d4e36 --- /dev/null +++ b/src/activeqt/activeqt.prx @@ -0,0 +1,11 @@ +# Only headers here, no library is wanted. +TEMPLATE = subdirs +VERSION = $$MODULE_VERSION +MODULE_INCNAME = ActiveQt + +QMAKE_DOCS = $$PWD/doc/activeqt.qdocconf +QMAKE_DOCS_TARGETDIR = # Make qt_docs.prf default to activeqt instead of qtaxbase + +load(qt_module_headers) +load(qt_docs) +load(qt_installs) diff --git a/src/activeqt/axbase/axbase.pro b/src/activeqt/axbase/axbase.pro new file mode 100644 index 0000000..2c53614 --- /dev/null +++ b/src/activeqt/axbase/axbase.pro @@ -0,0 +1,18 @@ +TARGET = QtAxBase +MODULE = axbase + +QT += core-private gui-private widgets +CONFIG += static internal_module + +load(qt_module) + +LIBS_PRIVATE += -lole32 -loleaut32 -luser32 -lgdi32 -ladvapi32 +mingw: LIBS_PRIVATE += -luuid + +HEADERS = \ + qaxtypefunctions_p.h \ + qaxutils_p.h + +SOURCES = \ + qaxtypefunctions.cpp \ + qaxutils.cpp diff --git a/src/activeqt/shared/qaxtypefunctions.cpp b/src/activeqt/axbase/qaxtypefunctions.cpp index db54ecb..c1b76f5 100644 --- a/src/activeqt/shared/qaxtypefunctions.cpp +++ b/src/activeqt/axbase/qaxtypefunctions.cpp @@ -49,7 +49,7 @@ ****************************************************************************/ #include <qt_windows.h> -#include "qaxtypefunctions.h" +#include "qaxtypefunctions_p.h" #include <qcursor.h> #include <qpixmap.h> #include <qsize.h> diff --git a/src/activeqt/shared/qaxtypefunctions.h b/src/activeqt/axbase/qaxtypefunctions_p.h index 13a6eaa..7ce9067 100644 --- a/src/activeqt/shared/qaxtypefunctions.h +++ b/src/activeqt/axbase/qaxtypefunctions_p.h @@ -47,9 +47,21 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ + #ifndef QAXTYPEFUNCTIONS_P_H #define QAXTYPEFUNCTIONS_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 <QtCore/qt_windows.h> #include <QtGui/qcolor.h> diff --git a/src/activeqt/shared/qaxutils.cpp b/src/activeqt/axbase/qaxutils.cpp index 3514558..3514558 100644 --- a/src/activeqt/shared/qaxutils.cpp +++ b/src/activeqt/axbase/qaxutils.cpp diff --git a/src/activeqt/shared/qaxutils_p.h b/src/activeqt/axbase/qaxutils_p.h index f56644b..f56644b 100644 --- a/src/activeqt/shared/qaxutils_p.h +++ b/src/activeqt/axbase/qaxutils_p.h diff --git a/src/activeqt/axshared.prx b/src/activeqt/axshared.prx deleted file mode 100644 index 6d335e9..0000000 --- a/src/activeqt/axshared.prx +++ /dev/null @@ -1,23 +0,0 @@ -# This modules provides the header files, installed under "ActiveQt/". -# It also contains shared code that is used by axcontainer and axserver. - -TARGET = QtAxBase -QMAKE_DOCS = $$PWD/doc/activeqt.qdocconf -MODULE_INCNAME = ActiveQt -CONFIG += static -QT += gui-private widgets - -LIBS_PRIVATE += -lole32 -loleaut32 -luser32 -lgdi32 -ladvapi32 -mingw: LIBS_PRIVATE += -luuid - -HEADERS = \ - shared/qaxtypefunctions.h \ - shared/qaxutils_p.h - -SOURCES = \ - shared/qaxtypefunctions.cpp \ - shared/qaxutils.cpp - -MODULE = axbase -load(qt_module) -QMAKE_DOCS_TARGETDIR = # Make qt_docs.prf default to activeqt instead of qtaxbase diff --git a/src/activeqt/container/container.pro b/src/activeqt/container/container.pro index 442005f..3606e87 100644 --- a/src/activeqt/container/container.pro +++ b/src/activeqt/container/container.pro @@ -1,6 +1,7 @@ TARGET = QtAxContainer -QT += core-private gui gui-private widgets widgets-private axbase +QT += widgets +QT_PRIVATE += core-private gui-private widgets-private axbase-private CONFIG += static HEADERS = ../control/qaxaggregated.h \ @@ -10,8 +11,7 @@ HEADERS = ../control/qaxaggregated.h \ qaxobject.h \ qaxscript.h \ qaxselect.h \ - ../shared/qaxtypes.h \ - ../shared/qaxutils_p.h + ../shared/qaxtypes_p.h SOURCES = qaxbase.cpp \ qaxdump.cpp \ @@ -20,13 +20,10 @@ SOURCES = qaxbase.cpp \ qaxscript.cpp \ qaxscriptwrapper.cpp \ qaxselect.cpp \ - ../shared/qaxtypes.cpp \ - ../shared/qaxutils.cpp + ../shared/qaxtypes.cpp FORMS = qaxselect.ui MODULE = axcontainer MODULE_CONFIG = dumpcpp -MODULE_MASTER_HEADER = ActiveQt -CONFIG += no_module_headers load(qt_module) diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp index 5b6c481..53fbe81 100644 --- a/src/activeqt/container/qaxbase.cpp +++ b/src/activeqt/container/qaxbase.cpp @@ -55,6 +55,8 @@ #include "qaxobject.h" #include "qaxbase_p.h" +#include <QtAxBase/private/qaxtypefunctions_p.h> + #include <qfile.h> #include <qwidget.h> #include <quuid.h> @@ -80,8 +82,8 @@ #include <ocidl.h> #include <ctype.h> -#include "../shared/qaxtypes.h" -#include "../shared/qaxutils_p.h" +#include "../shared/qaxtypes_p.h" +#include <QtAxBase/private/qaxutils_p.h> QT_BEGIN_NAMESPACE @@ -645,6 +647,11 @@ QByteArray QAxEventSink::findProperty(DISPID dispID) return propname; } +QVariant QAxBasePrivate::VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName, uint type) +{ + return ::VARIANTToQVariant(arg, typeName, type); +} + /*! \class QAxBase \brief The QAxBase class is an abstract class that provides an API diff --git a/src/activeqt/container/qaxbase_p.h b/src/activeqt/container/qaxbase_p.h index f9baaf9..fc347b7 100644 --- a/src/activeqt/container/qaxbase_p.h +++ b/src/activeqt/container/qaxbase_p.h @@ -98,6 +98,8 @@ public: bool checkHRESULT(long hres, tagEXCEPINFO *exc, const QString &name, uint argerr); void handleException(tagEXCEPINFO *exc, const QString &name); + static QVariant VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName, uint type = 0); + QAxBase *q; QString ctrl; UuidEventSinkHash eventSink; diff --git a/src/activeqt/container/qaxdump.cpp b/src/activeqt/container/qaxdump.cpp index bc74e0f..5adbb6a 100644 --- a/src/activeqt/container/qaxdump.cpp +++ b/src/activeqt/container/qaxdump.cpp @@ -50,6 +50,8 @@ #include "qaxbase.h" +#include <QtAxBase/private/qaxtypefunctions_p.h> + #include <qmetaobject.h> #include <quuid.h> #include <qt_windows.h> @@ -57,7 +59,7 @@ #include <ctype.h> -#include "../shared/qaxtypes.h" +#include "../shared/qaxtypes_p.h" QT_BEGIN_NAMESPACE diff --git a/src/activeqt/container/qaxobject.h b/src/activeqt/container/qaxobject.h index 587b532..049747c 100644 --- a/src/activeqt/container/qaxobject.h +++ b/src/activeqt/container/qaxobject.h @@ -51,7 +51,7 @@ #ifndef QAXOBJECT_H #define QAXOBJECT_H -#include <ActiveQt/qaxbase.h> +#include <QtAxContainer/qaxbase.h> QT_BEGIN_NAMESPACE diff --git a/src/activeqt/container/qaxscript.cpp b/src/activeqt/container/qaxscript.cpp index 07c0669..7477e79 100644 --- a/src/activeqt/container/qaxscript.cpp +++ b/src/activeqt/container/qaxscript.cpp @@ -49,7 +49,8 @@ ****************************************************************************/ #include "qaxscript.h" -#include "../shared/qaxutils_p.h" +#include <QtAxBase/private/qaxutils_p.h> +#include <QtAxBase/private/qaxtypefunctions_p.h> #if defined(Q_CC_GNU) && (__MINGW64_VERSION_MAJOR == 3 && __MINGW64_VERSION_MINOR > 0 || __MINGW64_VERSION_MAJOR >= 4) // Workaround for mingw-w64 bug #464 @@ -71,7 +72,7 @@ #include <activscp.h> #endif -#include "../shared/qaxtypes.h" +#include "../shared/qaxtypes_p.h" QT_BEGIN_NAMESPACE diff --git a/src/activeqt/container/qaxscript.h b/src/activeqt/container/qaxscript.h index 17449d4..3997d9d 100644 --- a/src/activeqt/container/qaxscript.h +++ b/src/activeqt/container/qaxscript.h @@ -51,7 +51,7 @@ #ifndef QAXSCRIPT_H #define QAXSCRIPT_H -#include <ActiveQt/qaxobject.h> +#include <QtAxContainer/qaxobject.h> struct IActiveScript; diff --git a/src/activeqt/container/qaxscriptwrapper.cpp b/src/activeqt/container/qaxscriptwrapper.cpp index 31a082f..e548880 100644 --- a/src/activeqt/container/qaxscriptwrapper.cpp +++ b/src/activeqt/container/qaxscriptwrapper.cpp @@ -50,7 +50,7 @@ #include "qaxobject.h" -#include <ActiveQt/qaxfactory.h> +#include <QtAxServer/qaxfactory.h> #include <qt_windows.h> diff --git a/src/activeqt/container/qaxselect.ui b/src/activeqt/container/qaxselect.ui index af5f973..4fb7741 100644 --- a/src/activeqt/container/qaxselect.ui +++ b/src/activeqt/container/qaxselect.ui @@ -134,9 +134,6 @@ </layout> </widget> <layoutdefault spacing="6" margin="11"/> - <includes> - <include location="local">qaxwidget.h</include> - </includes> <resources/> <connections/> </ui> diff --git a/src/activeqt/container/qaxwidget.cpp b/src/activeqt/container/qaxwidget.cpp index 1512fe1..abc9948 100644 --- a/src/activeqt/container/qaxwidget.cpp +++ b/src/activeqt/container/qaxwidget.cpp @@ -49,9 +49,10 @@ ****************************************************************************/ #include "qaxwidget.h" -#include "../shared/qaxutils_p.h" +#include <QtAxBase/private/qaxutils_p.h> +#include <QtAxBase/private/qaxtypefunctions_p.h> -#include <ActiveQt/qaxaggregated.h> +#include <QtAxServer/qaxaggregated.h> #include <qabstracteventdispatcher.h> #include <qapplication.h> @@ -104,7 +105,7 @@ }; #endif -#include "../shared/qaxtypes.h" +#include "../shared/qaxtypes_p.h" QT_BEGIN_NAMESPACE diff --git a/src/activeqt/container/qaxwidget.h b/src/activeqt/container/qaxwidget.h index 14c4290..2bcf3c7 100644 --- a/src/activeqt/container/qaxwidget.h +++ b/src/activeqt/container/qaxwidget.h @@ -51,7 +51,7 @@ #ifndef QAXWIDGET_H #define QAXWIDGET_H -#include <ActiveQt/qaxbase.h> +#include <QtAxContainer/qaxbase.h> #include <QtWidgets/qwidget.h> QT_BEGIN_NAMESPACE diff --git a/src/activeqt/control/control.pro b/src/activeqt/control/control.pro index efdf224..e5f251e 100644 --- a/src/activeqt/control/control.pro +++ b/src/activeqt/control/control.pro @@ -1,6 +1,7 @@ TARGET = QtAxServer -QT += core-private gui-private widgets axbase +QT += widgets +QT_PRIVATE += core-private gui-private widgets-private axbase-private CONFIG += static DEFINES += QAX_SERVER @@ -11,7 +12,7 @@ HEADERS = qaxaggregated.h \ qaxbindable.h \ qaxfactory.h \ qclassfactory_p.h \ - ../shared/qaxtypes.h + ../shared/qaxtypes_p.h SOURCES = qaxaggregated.cpp \ qaxserver.cpp \ @@ -28,6 +29,4 @@ LIBS += -lshell32 MODULE = axserver MODULE_DEFINES = QAXSERVER MODULE_CONFIG = idcidl force_import_plugins -MODULE_MASTER_HEADER = ActiveQt -CONFIG += no_module_headers load(qt_module) diff --git a/src/activeqt/control/qaxbindable.cpp b/src/activeqt/control/qaxbindable.cpp index f74122d..96a34cd 100644 --- a/src/activeqt/control/qaxbindable.cpp +++ b/src/activeqt/control/qaxbindable.cpp @@ -53,7 +53,9 @@ #include <qmetaobject.h> #include <qt_windows.h> // for IUnknown -#include "../shared/qaxtypes.h" +#include "../shared/qaxtypes_p.h" + +#include <QtAxBase/private/qaxtypefunctions_p.h> QT_BEGIN_NAMESPACE diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp index 3dad740..eb07d2b 100644 --- a/src/activeqt/control/qaxserverbase.cpp +++ b/src/activeqt/control/qaxserverbase.cpp @@ -83,8 +83,9 @@ #include "qaxbindable.h" #include "qaxaggregated.h" -#include "../shared/qaxtypes.h" -#include "../shared/qaxutils_p.h" +#include "../shared/qaxtypes_p.h" +#include <QtAxBase/private/qaxutils_p.h> +#include <QtAxBase/private/qaxtypefunctions_p.h> #include "qclassfactory_p.h" diff --git a/src/activeqt/shared/qaxtypes.cpp b/src/activeqt/shared/qaxtypes.cpp index 3ee12c3..40f5e0a 100644 --- a/src/activeqt/shared/qaxtypes.cpp +++ b/src/activeqt/shared/qaxtypes.cpp @@ -53,8 +53,9 @@ #include <ocidl.h> #include <olectl.h> -#include "qaxtypes.h" -#include "qaxutils_p.h" +#include "qaxtypes_p.h" +#include <QtAxBase/private/qaxutils_p.h> +#include <QtAxBase/private/qaxtypefunctions_p.h> #include <qcursor.h> #include <qpixmap.h> diff --git a/src/activeqt/shared/qaxtypes.h b/src/activeqt/shared/qaxtypes_p.h index 147e261..2ce8a3f 100644 --- a/src/activeqt/shared/qaxtypes.h +++ b/src/activeqt/shared/qaxtypes_p.h @@ -51,7 +51,21 @@ #ifndef QAXTYPES_H #define QAXTYPES_H -#include <ActiveQt/qaxtypefunctions.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 <QtCore/qbytearray.h> +#include <QtCore/qvariant.h> + +#include <QtCore/qt_windows.h> QT_BEGIN_NAMESPACE |