summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-01-07 14:46:00 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-01-07 14:46:00 +0100
commitfc6eced446e591bf73a048f6a186c5d2909dda6e (patch)
tree215e2e86d78983c28119d984074d87fea5dcbfa0
parentdf3356e74d52f3b61a0cfa85b7689fb0b34d3528 (diff)
parente5cd35c807029d3955c03707874f76b773b445bc (diff)
downloadqtactiveqt-fc6eced446e591bf73a048f6a186c5d2909dda6e.tar.gz
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: sync.profile Change-Id: I1bca8b78106fba1846ad8513f02f650d418b773e
-rw-r--r--.gitignore3
-rw-r--r--.qmake.conf1
-rw-r--r--dist/changes-5.0.161
-rw-r--r--doc/global/qt-html-templates-offline.qdocconf32
-rw-r--r--doc/global/qt-module-defaults.qdocconf97
-rw-r--r--doc/global/style/offline.css622
-rw-r--r--examples/activeqt/activeqt.pro6
-rw-r--r--examples/activeqt/comapp/comapp.pro4
-rw-r--r--examples/activeqt/comapp/doc/snippets/doc_src_examples_activeqt_comapp.qdoc (renamed from doc/src/snippets/code/doc_src_examples_activeqt_comapp.qdoc)0
-rw-r--r--examples/activeqt/comapp/doc/src/comapp.qdoc (renamed from doc/src/examples/comapp.qdoc)42
-rw-r--r--examples/activeqt/hierarchy/doc/snippets/hierarchy-demo-snippet.qdoc (renamed from doc/src/examples/hierarchy-demo-snippet.qdoc)0
-rw-r--r--examples/activeqt/hierarchy/doc/src/hierarchy.qdoc (renamed from doc/src/examples/hierarchy.qdoc)22
-rw-r--r--examples/activeqt/hierarchy/hierarchy.pro6
-rw-r--r--examples/activeqt/menus/doc/snippets/doc_src_examples_activeqt_menus.qdoc (renamed from doc/src/snippets/code/doc_src_examples_activeqt_menus.qdoc)0
-rw-r--r--examples/activeqt/menus/doc/src/menus.qdoc (renamed from doc/src/examples/menus.qdoc)4
-rw-r--r--examples/activeqt/menus/menus.pro6
-rw-r--r--examples/activeqt/multiple/doc/src/multiple.qdoc (renamed from doc/src/examples/multiple.qdoc)10
-rw-r--r--examples/activeqt/multiple/multiple.pro6
-rw-r--r--examples/activeqt/opengl/doc/src/opengl.qdoc (renamed from doc/src/examples/opengl.qdoc)36
-rw-r--r--examples/activeqt/opengl/opengl.pro6
-rw-r--r--examples/activeqt/qutlook/doc/src/qutlook.qdoc (renamed from doc/src/examples/qutlook.qdoc)42
-rw-r--r--examples/activeqt/qutlook/qutlook.pro4
-rw-r--r--examples/activeqt/simple/doc/src/simple.qdoc (renamed from doc/src/examples/simple.qdoc)8
-rw-r--r--examples/activeqt/simple/simple.pro6
-rw-r--r--examples/activeqt/webbrowser/doc/images/activeqt-webbrowser-example.pngbin0 -> 59163 bytes
-rw-r--r--examples/activeqt/webbrowser/doc/src/webbrowser.qdoc (renamed from doc/src/examples/webbrowser.qdoc)22
-rw-r--r--examples/activeqt/webbrowser/webbrowser.pro4
-rw-r--r--examples/activeqt/wrapper/doc/src/wrapper.qdoc (renamed from doc/src/examples/wrapper.qdoc)6
-rw-r--r--examples/activeqt/wrapper/wrapper.pro6
-rw-r--r--qtactiveqt.pro5
-rw-r--r--src/activeqt/activeqt.pro16
-rw-r--r--src/activeqt/axshared.prx7
-rw-r--r--src/activeqt/container/container.pro5
-rw-r--r--src/activeqt/container/qaxbase.cpp59
-rw-r--r--src/activeqt/container/qaxscript.cpp226
-rw-r--r--src/activeqt/container/qaxselect.cpp6
-rw-r--r--src/activeqt/control/control.pro7
-rw-r--r--src/activeqt/control/qaxbindable.cpp10
-rw-r--r--src/activeqt/control/qaxfactory.cpp24
-rw-r--r--src/activeqt/control/qaxserverbase.cpp9
-rw-r--r--src/activeqt/doc/activeqt.qdocconf44
-rw-r--r--src/activeqt/doc/snippets/doc_src_activeqt-dumpcpp.cpp65
-rw-r--r--src/activeqt/doc/snippets/doc_src_examples_activeqt_dotnet.qdoc (renamed from doc/src/snippets/code/doc_src_examples_activeqt_dotnet.qdoc)0
-rw-r--r--src/activeqt/doc/snippets/doc_src_qaxcontainer.pro (renamed from doc/src/snippets/code/doc_src_qaxcontainer.pro)0
-rw-r--r--src/activeqt/doc/snippets/doc_src_qaxserver.cpp (renamed from doc/src/snippets/code/doc_src_qaxserver.cpp)0
-rw-r--r--src/activeqt/doc/snippets/doc_src_qaxserver.pro (renamed from doc/src/snippets/code/doc_src_qaxserver.pro)0
-rw-r--r--src/activeqt/doc/snippets/doc_src_qaxserver.qdoc (renamed from doc/src/snippets/code/doc_src_qaxserver.qdoc)0
-rw-r--r--src/activeqt/doc/snippets/src_activeqt_container_qaxbase.cpp (renamed from doc/src/snippets/code/src_activeqt_container_qaxbase.cpp)0
-rw-r--r--src/activeqt/doc/snippets/src_activeqt_container_qaxscript.cpp (renamed from doc/src/snippets/code/src_activeqt_container_qaxscript.cpp)0
-rw-r--r--src/activeqt/doc/snippets/src_activeqt_container_qaxselect.cpp (renamed from doc/src/snippets/code/src_activeqt_container_qaxselect.cpp)0
-rw-r--r--src/activeqt/doc/snippets/src_activeqt_control_qaxbindable.cpp (renamed from doc/src/snippets/code/src_activeqt_control_qaxbindable.cpp)0
-rw-r--r--src/activeqt/doc/snippets/src_activeqt_control_qaxfactory.cpp (renamed from doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp)0
-rw-r--r--src/activeqt/doc/src/activeqt-dumpcpp.qdoc129
-rw-r--r--src/activeqt/doc/src/activeqt-dumpdoc.qdoc69
-rw-r--r--src/activeqt/doc/src/activeqt-index.qdoc (renamed from doc/src/activeqt.qdoc)46
-rw-r--r--src/activeqt/doc/src/examples/dotnet.qdoc (renamed from doc/src/examples/dotnet.qdoc)32
-rw-r--r--src/activeqt/doc/src/examples/hierarchy-demo.qdocinc (renamed from doc/src/examples/hierarchy-demo.qdocinc)0
-rw-r--r--src/activeqt/doc/src/examples/multiple-demo.qdocinc (renamed from doc/src/examples/multiple-demo.qdocinc)0
-rw-r--r--src/activeqt/doc/src/examples/opengl-demo.qdocinc (renamed from doc/src/examples/opengl-demo.qdocinc)0
-rw-r--r--src/activeqt/doc/src/examples/simple-demo.qdocinc (renamed from doc/src/examples/simple-demo.qdocinc)0
-rw-r--r--src/activeqt/doc/src/examples/wrapper-demo.qdocinc (renamed from doc/src/examples/wrapper-demo.qdocinc)0
-rw-r--r--src/activeqt/doc/src/qtaxcontainer.qdoc (renamed from doc/src/activeqt-container.qdoc)78
-rw-r--r--src/activeqt/doc/src/qtaxserver.qdoc (renamed from doc/src/activeqt-server.qdoc)199
-rw-r--r--src/src.pro4
-rw-r--r--tests/auto/auto.pro3
-rw-r--r--tests/auto/cmake/CMakeLists.txt12
-rw-r--r--tests/auto/cmake/cmake.pro5
-rw-r--r--tests/auto/cmake/test_modules/CMakeLists.txt7
-rw-r--r--tests/auto/cmake/test_modules/container/CMakeLists.txt24
-rw-r--r--tests/auto/cmake/test_modules/container/axcontainer.cpp51
-rw-r--r--tests/auto/cmake/test_modules/server/CMakeLists.txt24
-rw-r--r--tests/auto/cmake/test_modules/server/axserver.cpp60
-rw-r--r--tools/dumpcpp/main.cpp52
73 files changed, 1146 insertions, 1194 deletions
diff --git a/.gitignore b/.gitignore
index 990859d..ecf2b80 100644
--- a/.gitignore
+++ b/.gitignore
@@ -257,3 +257,6 @@ src/xml/lib/
*.dep
*.map
work
+
+# Generated static plugin import sources
+*_plugin_import.cpp
diff --git a/.qmake.conf b/.qmake.conf
index 42ba8e4..5de255c 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -1 +1,2 @@
load(qt_build_config)
+CONFIG += qt_example_installs
diff --git a/dist/changes-5.0.1 b/dist/changes-5.0.1
new file mode 100644
index 0000000..e1c4756
--- /dev/null
+++ b/dist/changes-5.0.1
@@ -0,0 +1,61 @@
+Qt 5.0.1 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.0.0.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+ http://qt-project.org/doc/qt-5.0/
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+ http://bugreports.qt-project.org/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+General Improvements
+--------------------
+
+Third party components
+----------------------
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+AxContainer
+-----------
+
+QAxServer
+---------
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+
+****************************************************************************
+* Compiler Specific Changes *
+****************************************************************************
+
+
+****************************************************************************
+* Tools *
+****************************************************************************
+
+
+****************************************************************************
+* Plugins *
+****************************************************************************
+
+
+****************************************************************************
+* Important Behavior Changes *
+****************************************************************************
+
diff --git a/doc/global/qt-html-templates-offline.qdocconf b/doc/global/qt-html-templates-offline.qdocconf
deleted file mode 100644
index 9f2d28f..0000000
--- a/doc/global/qt-html-templates-offline.qdocconf
+++ /dev/null
@@ -1,32 +0,0 @@
-HTML.nobreadcrumbs = "true"
-
-HTML.stylesheets = global/style/offline.css
-
-HTML.headerstyles = \
- " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n"
-
-HTML.endheader = \
- "</head>\n" \
-
-HTML.footer = \
- "<div class=\"footer\">\n" \
- " <p>\n" \
- " <acronym title=\"Copyright\">&copy;</acronym> 2012 Digia Plc and/or its\n" \
- " subsidiaries. Documentation contributions included herein are the copyrights of\n" \
- " their respective owners.</p>\n" \
- " <br />\n" \
- " <p>\n" \
- " The documentation provided herein is licensed under the terms of the\n" \
- " <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU Free Documentation\n" \
- " License version 1.3</a> as published by the Free Software Foundation.</p>\n" \
- " <p>\n" \
- " Documentation sources may be obtained from <a href=\"http://www.qt-project.org\">\n" \
- " www.qt-project.org</a>.</p>\n" \
- " <br />\n" \
- " <p>\n" \
- " Digia, Qt and their respective logos are trademarks of Digia Plc \n" \
- " in Finland and/or other countries worldwide. All other trademarks are property\n" \
- " of their respective owners. <a title=\"Privacy Policy\"\n" \
- " href=\"http://en.gitorious.org/privacy_policy/\">Privacy Policy</a></p>\n" \
- "</div>\n" \
-
diff --git a/doc/global/qt-module-defaults.qdocconf b/doc/global/qt-module-defaults.qdocconf
deleted file mode 100644
index 4532af5..0000000
--- a/doc/global/qt-module-defaults.qdocconf
+++ /dev/null
@@ -1,97 +0,0 @@
-codeindent = 1
-
-Cpp.ignoretokens = \
- QDBUS_EXPORT \
- QT_ASCII_CAST_WARN \
- QT_ASCII_CAST_WARN_CONSTRUCTOR \
- QT_BEGIN_HEADER \
- QT_BEGIN_INCLUDE_NAMESPACE \
- QT_BEGIN_NAMESPACE \
- QT_BOOTSTRAPPED \
- QT_DESIGNER_STATIC \
- QT_END_HEADER \
- QT_END_INCLUDE_NAMESPACE \
- QT_END_NAMESPACE \
- QT_FASTCALL \
- Q_AUTOTEST_EXPORT \
- Q_COMPAT_EXPORT \
- Q_CORE_EXPORT \
- Q_CORE_EXPORT_INLINE \
- Q_DBUS_EXPORT \
- Q_DECL_CONSTEXPR \
- Q_DECL_NOEXCEPT \
- Q_DECL_NOTHROW \
- Q_EXPORT \
- Q_EXPORT_PLUGIN \
- Q_EXPORT_PLUGIN2 \
- Q_GADGET \
- Q_GUI_EXPORT \
- Q_GUI_EXPORT_INLINE \
- Q_INLINE_TEMPLATE \
- Q_INVOKABLE \
- Q_NETWORK_EXPORT \
- Q_OPENGL_EXPORT \
- Q_OPENVG_EXPORT \
- Q_OUTOFLINE_TEMPLATE \
- Q_PRINTSUPPORT_EXPORT \
- Q_SQL_EXPORT \
- Q_SVG_EXPORT \
- Q_SCRIPT_EXPORT \
- Q_SCRIPTTOOLS_EXPORT \
- Q_WIDGETS_EXPORT \
- Q_XML_EXPORT \
- Q_XMLPATTERNS_EXPORT
-
-Cpp.ignoredirectives = \
- __attribute__ \
- QT_FORWARD_DECLARE_CLASS \
- Q_CLASSINFO \
- Q_DECLARE_INTERFACE \
- Q_DECLARE_METATYPE \
- Q_DECLARE_OPERATORS_FOR_FLAGS \
- Q_DECLARE_PRIVATE \
- Q_DECLARE_PUBLIC \
- Q_DECLARE_PRIVATE_D \
- Q_DECLARE_SHARED \
- Q_DECLARE_TR_FUNCTIONS \
- Q_DECLARE_TYPEINFO \
- Q_DISABLE_COPY \
- Q_DUMMY_COMPARISON_OPERATOR \
- Q_ENUMS \
- Q_FLAGS \
- Q_INTERFACES \
- Q_PRIVATE_PROPERTY
-
-defines = Q_QDOC \
- QT_.*_SUPPORT \
- QT_.*_LIB \
- QT_COMPAT \
- QT_KEYPAD_NAVIGATION \
- QT_NO_EGL \
- Q_OS_.* \
- Q_BYTE_ORDER \
- QT_DEPRECATED \
- QT_DEPRECATED_* \
- Q_NO_USING_KEYWORD \
- __cplusplus \
- Q_COMPILER_INITIALIZER_LISTS
-
-dita.metadata.default.author = Qt Project
-dita.metadata.default.permissions = all
-dita.metadata.default.publisher = Qt Project
-dita.metadata.default.copyryear = 2012
-dita.metadata.default.copyrholder = Digia Plc
-dita.metadata.default.audience = programmer
-
-naturallanguage = en_US
-outputencoding = UTF-8
-sourceencoding = UTF-8
-
-examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml *.css"
-examples.imageextensions = "*.png *.jpg *.gif"
-
-headers.fileextensions = "*.ch *.h *.h++ *.hh *.hpp *.hxx"
-sources.fileextensions = "*.c++ *.cc *.cpp *.cxx *.mm *.qml *.qdoc"
-
-versionsym = QT_VERSION_STR
-
diff --git a/doc/global/style/offline.css b/doc/global/style/offline.css
deleted file mode 100644
index 1b430ab..0000000
--- a/doc/global/style/offline.css
+++ /dev/null
@@ -1,622 +0,0 @@
-body{
-font: normal 400 14px/1.2 Arial;
-margin-top:85px;
-font-family: Arial, Helvetica;
-color:#313131;
-text-align:justify;
-margin-left:5px;
-margin-right:5px;
-}
-
-img{
--moz-box-shadow: 3px 3px 3px #ccc;
--webkit-box-shadow: 3px 3px 3px #ccc;
-box-shadow: 3px 3px 3px #ccc;
-border:#8E8D8D 2px solid;
-margin-left:0px;
-max-width: 800px;
-height: auto
-}
-
-b{
-font-weight:600;
-}
-
-.content{}
-
-.descr{
-margin-top:35px;
-/*max-width: 75%;*/
-margin-left:5px;
-text-align:justify;
-min-height:700px;
-vertical-align:top;
-}
-
-.name{
-max-width: 75%;
-font-weight:100;
-}
-
-tt{
-text-align:left;}
-
-/*
------------
-links
------------
-*/
-
-a:link{
-color: #2C418D;
-text-decoration: none;
-text-align:left;
-}
-
-a:hover{
-color: #869CD1;
-text-decoration:underline;
-text-align:left;
-}
-
-a:visited{
-color: #869CD1;
-text-decoration: none;
-text-align:left;
-}
-
-a:visited:hover{
-text-decoration:underline;
-text-align:left;
-}
-
-a[href*="http://"], a[href*="ftp://"],a[href*="https://"]
-{
-text-decoration: none;
-background-image:url(../images/ico_out.png);
-background-repeat:no-repeat;
-background-position:left;
-padding-left:20px;
-text-align:left;
-}
-
-.flags{
-text-decoration:none;
-text-height:24px;
-}
-
-/*
--------------------------------
-NOTE styles
--------------------------------
-*/
-.notetitle, .tiptitle, .fastpathtitle{
-font-weight:bold;
-}
-
-.attentiontitle,.cautiontitle,.dangertitle,.importanttitle,.remembertitle,.restrictiontitle{
-font-weight:bold;
-}
-
-.note,.tip,.fastpath{
-background: #F2F2F2 url(../images/ico_note.png);
-background-repeat: no-repeat;
-background-position: top left;
-padding:5px;
-padding-left:40px;
-padding-bottom:10px;
-border:#999 1px dotted;
-color:#666666;
-margin:5px;
-}
-
-.attention,.caution,.danger,.important,.remember,.restriction{
-background: #F2F2F2 url(../images/ico_note_attention.png);
-background-repeat:no-repeat;
-background-position:top left;
-padding:5px;
-padding-left:40px;
-padding-bottom:10px;
-border:#999 1px dotted;
-color:#666666;
-margin:5px;
-}
-
-/*
--------------------------------
-Top navigation
--------------------------------
-*/
-
-.header{
-
-height:1px;
-padding:0px;
-margin:0px;
-}
-
-.qtref{
-display: block;
-position: relative;
-top: -76px;
-height:15px;
-z-index: 1;
-font-size:11px;
-padding-right:10px;
-float:right;
-}
-
-.naviNextPrevious{
-display: block;
-position: relative;
-text-align: right;
-top: -53px;
-float:right;
-height:20px;
-z-index:1;
-padding-right:10px;
-padding-top:2px;
-vertical-align:top;
-margin:0px;
-}
-
-
-.naviNextPrevious > a:first-child{
-background-image:url(../images/btn_prev.png);
-background-repeat:no-repeat;
-background-position:left;
-padding-left:20px;
-height:20px;
-padding-left:20px;
-}
-
-.naviNextPrevious > a:last-child{
-background-image:url(../images/btn_next.png);
-background-repeat:no-repeat;
-background-position:right;
-padding-right:20px;
-height:20px;
-margin-left:30px;
-}
-
-.breadcrumb{
-display: block;
-position: relative;
-top:-20px;
-/*border-top:2px solid #ffffff;*/
-border-bottom: 1px solid #cecece;
-background-color:#F2F2F2;
-z-index:1;
-height:20px;
-padding:0px;
-margin:0px;
-padding-left:10px;
-padding-top:2px;
-margin-left:-5px;
-margin-right:-5px;
-}
-
-.breadcrumb ul{
- margin:0px;
- padding:0px;
-}
-
-.breadcrumb ul li{
-background-color:#F2F2F2;
-list-style-type:none;
-padding:0;
-margin:0;
-height:20px;
-}
-
-.breadcrumb li{
-float:left;
-}
-
-.breadcrumb .first {
-background:url(../images/home.png);
-background-position:left;
-background-repeat:no-repeat;
-padding-left:20px;
-}
-
-
-.breadcrumb li a{
-color:#2C418D;
-display:block;
-text-decoration:none;
-background:url(../images/arrow.png);
-background-repeat:no-repeat;
-background-position:right;
-padding-right:25px;
-padding-left:10px;
-}
-
-.breadcrumb li a:hover{
-color:#909090;
-display:block;
-text-decoration:none;
-background:url(../images/arrow.png);
-background-repeat:no-repeat;
-background-position:right;
-padding-right:20px;
-padding-left:10px;
-}
-
-
-/* table of content
-no display
-*/
-
-/*
------------
-headers
------------
-*/
-
-
-@media screen{
-.title{
-color:#313131;
-font-size: 18px;
-font-weight: normal;
-left: 0;
-padding-bottom: 20px;
-padding-left: 10px;
-padding-top: 20px;
-position: absolute;
-right: 0;
-top: 0;
-background-color:#E6E6E6;
-border-bottom: 1px #CCC solid;
-border-top: 2px #CCC solid;
-font-weight:bold;
-margin-left:0px;
-margin-right:0px;
-}
-}
-
-h1 {
-margin: 0;
-}
-
-h2, p.h2 {
-font: 500 16px/1.2 Arial;
-font-weight:100;
-background-color:#F2F3F4;
-padding:4px;
-margin-bottom:30px;
-margin-top:30px;
-border-top:#E0E0DE 1px solid;
-border-bottom: #E0E0DE 1px solid;
-max-width: 99%;
-}
-
-h3{
-
-font: 500 14px/1.2 Arial;
-font-weight:100;
-text-decoration:underline;
-margin-bottom:30px;
-margin-top:30px;
-}
-
-h3.fn,span.fn{
-border-width: 1px;
-border-style: solid;
-border-color: #E6E6E6;
--moz-border-radius: 7px 7px 7px 7px;
--webkit-border-radius: 7px 7px 7px 7px;
-border-radius: 7px 7px 7px 7px;
-background-color: #F6F6F6;
-word-spacing: 3px;
-padding: 5px 5px;
-text-decoration:none;
-font-weight:bold;
-max-width:75%;
-font-size:14px;
-margin:0px;
-margin-top:30px;
-
-}
-
-.name{
-color:#1A1A1A;
-}
-.type{
-color:#808080;
-}
-
-
-
-@media print {
-.title {
-color:#0066CB;
-font-family:Arial, Helvetica;
-font-size: 32px;
-font-weight: normal;
-left: 0;
-position: absolute;
-right: 0;
-top: 0;
-}
-}
-
-
-/*
------------------
-table styles
------------------
-*/
-.table img {
-border:none;
-margin-left:0px;
--moz-box-shadow:0px 0px 0px #fff;
--webkit-box-shadow: 0px 0px 0px #fff;
-box-shadow: 0px 0px 0px #fff;
-}
-
-/* table with border alternative colours*/
-
- table,pre{
--moz-border-radius: 7px 7px 7px 7px;
--webkit-border-radius: 7px 7px 7px 7px;
- border-radius: 7px 7px 7px 7px;
-background-color: #F6F6F6;
-border: 1px solid #E6E6E6;
-border-collapse: separate;
-font-size: 12px;
-line-height: 1.2;
-margin-bottom: 25px;
-margin-left: 15px;
-font-size: 12px;
-line-height: 1.2;
-margin-bottom: 25px;
-margin-left: 15px;
-}
-
-
-table th{
-text-align:left;
-padding-left:20px;
-}
-
-table td {
-padding: 3px 15px 3px 20px;
-border-bottom:#CCC dotted 1px;
-}
-table p { margin:0px;}
-
-table tr.even {
-background-color: white;
-color: #66666E;
-}
-
-table tr.odd {
-background-color: #F6F6F6;
-color: #66666E;
-}
-
-
-table thead {
-text-align:left;
-padding-left:20px;
-background-color:#e1e0e0;
-border-left:none;
-border-right:none;
-}
-
-table thead th {
-padding-top:5px;
-padding-left:10px;
-padding-bottom:5px;
-border-bottom: 2px solid #D1D1D1;
-padding-right:10px;
-}
-
-
-/* table bodless & white*/
-
-.borderless {
-border-radius: 0px 0px 0px 0px;
-background-color: #fff;
-border: 1px solid #fff;
-}
-
-.borderless tr {
-background-color: #FFF;
-color: #66666E;
-}
-
-.borderless td {
-border:none;
-border-bottom:#fff dotted 1px;
-}
-
-/*
------------
-List
------------
-*/
-
-ul{
-padding-bottom:2px;
-}
-
-li {
-margin-bottom: 10px;
-padding-left: 8px;
-list-style:outside;
-list-style-type:square;
-text-align:left;
-}
-
-
-ol{
-margin:10px;
-padding:0;
-}
-
-ol > li{
-margin-left: 30px;
-padding-left:8px;
-list-style:decimal;
-}
-
-.centerAlign{
-text-align: left;
-}
-
-.cpp{
-display: block;
-margin: 10;
-overflow: hidden;
-overflow-x: hidden;
-overflow-y: hidden;
-padding: 20px 0 20px 0;
-}
-
-.footer{
-margin-top: 50px;
-padding-left:5px;
-margin-bottom: 10px;
-font-size:10px;
-border-top: 1px solid #999;
-padding-top:11px;
-}
-
-.footerNavi{
-width:auto;
-text-align:right;
-margin-top:50px;
-z-index:1;
-}
-
-.memItemLeft{
-padding-right: 3px;
-}
-
-.memItemRight{
-padding: 3px 15px 3px 0;
-}
-
-.qml{
-display: block;
-margin: 10;
-overflow: hidden;
-overflow-x: hidden;
-overflow-y: hidden;
-padding: 20px 0 20px 0;
-}
-
-.qmldefault{
-padding-left: 5px;
-float: right;
-color: red;
-}
-
-.qmlreadonly{
-padding-left: 5px;
-float: right;
-color: #254117;
-}
-
-.rightAlign{
-padding: 3px 5px 3px 10px;
-text-align: right;
-}
-
-/*
------------
-Content table
------------
-*/
-
-@media print{
-.toc {
-float: right;
-padding-bottom: 10px;
-padding-top: 50px;
-width: 100%;
-background-image:url(../images/bgrContent.png);
-background-position:top;
-background-repeat:no-repeat;
-}
-}
-
-@media screen{
-.toc{
-clear:both;
-float:right;
-vertical-align:top;
--moz-border-radius: 7px 7px 7px 7px;
--webkit-border-radius: 7px 7px 7px 7px;
-border-radius: 7px 7px 7px 7px;
- background:#FFF url(../images/bgrContent.png);
-background-position:top;
-background-repeat:repeat-x;
-border: 1px solid #E6E6E6;
-padding-left:5px;
-padding-bottom:10px;
-height: auto;
-width: 200px;
-text-align:left;
-z-index:2;
-margin-left:20px;
-margin-right:20px;
-margin-top:0px;
-padding-top:0px;
-}
-}
-
-.toc h3{
-text-decoration:none;
-}
-
-.toc h3{font: 500 14px/1.2 Arial;
-font-weight:100;
-padding:0px;
-margin:0px;
-padding-top:5px;
-padding-left:5px;
-}
-
-
-.toc ul{
-width:160px;
-padding-left:10px;
-padding-right:5px;
-padding-bottom:10px;
-padding-top:10px;
-}
-
-.toc ul li{
-margin-left:20px;
-list-style-image:url(../images/blu_dot.png);
-list-style:outside;
-
-}
-
-
-.toc ul li a:link{
-color: #2C418D;
-text-decoration: none;
-}
-
-.toc ul li a:hover{
-color: #869CD1;
-text-decoration:underline;
-
-}
-
-.toc ul li a:visited{
-color: #869CD1;
-font-weight: bold;
-}
-
-.level1{
-border:none;}
-
-.clearfix{
-clear:both;}
-
diff --git a/examples/activeqt/activeqt.pro b/examples/activeqt/activeqt.pro
index 5d47940..09b58e6 100644
--- a/examples/activeqt/activeqt.pro
+++ b/examples/activeqt/activeqt.pro
@@ -12,9 +12,3 @@ contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles2):SUBDIRS += opengl
# For now only the contain examples with mingw, for the others you need
# an IDL compiler
win32-g++*|wince*:SUBDIRS = webbrowser
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/activeqt
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS activeqt.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt
-INSTALLS += target sources
diff --git a/examples/activeqt/comapp/comapp.pro b/examples/activeqt/comapp/comapp.pro
index f82dcf6..271241b 100644
--- a/examples/activeqt/comapp/comapp.pro
+++ b/examples/activeqt/comapp/comapp.pro
@@ -10,6 +10,4 @@ RC_FILE = comapp.rc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/comapp
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS $$RC_FILE comapp.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/comapp
-INSTALLS += target sources
+INSTALLS += target
diff --git a/doc/src/snippets/code/doc_src_examples_activeqt_comapp.qdoc b/examples/activeqt/comapp/doc/snippets/doc_src_examples_activeqt_comapp.qdoc
index fa6a491..fa6a491 100644
--- a/doc/src/snippets/code/doc_src_examples_activeqt_comapp.qdoc
+++ b/examples/activeqt/comapp/doc/snippets/doc_src_examples_activeqt_comapp.qdoc
diff --git a/doc/src/examples/comapp.qdoc b/examples/activeqt/comapp/doc/src/comapp.qdoc
index 1c26a25..e1a773d 100644
--- a/doc/src/examples/comapp.qdoc
+++ b/examples/activeqt/comapp/doc/src/comapp.qdoc
@@ -29,68 +29,68 @@
\example activeqt/comapp
\title COM App Example (ActiveQt)
- The COM App example shows how to use ActiveQt to develop a Qt
+ \brief The COM App example shows how to use ActiveQt to develop a Qt
application that can be automated via COM. Different QObject
based classes are exposed as COM objects that communicate with the
GUI of the running Qt application. The APIs of those COM objects
has been designed to resemble the APIs of standard COM
applications; i.e. those from Microsoft Office.
- \snippet examples/activeqt/comapp/main.cpp 2
+ \snippet activeqt/comapp/main.cpp 2
The first class \c Application represents the application object. It
exposes read-only properties \c documents and \c id to get access to the
list of documents, and an identifier. A read/write property \c visible
- controls whether the QTabWidget-based user interface of the application
+ controls whether the QTabWidget-based user interface of the application
should be visible, and a slot \c quit() terminates the application.
The \e RegisterObject attribute is set to make sure that instances of this
class are registered in COM's running object table (ROT) - this allows COM
clients to connect to an already instantiated COM object.
- \snippet examples/activeqt/comapp/main.cpp 1
+ \snippet activeqt/comapp/main.cpp 1
The \c DocumentList class stores a list of documents. It provides an API
- to read the number of documents, to access each document by index and to
+ to read the number of documents, to access each document by index and to
create a new document. The \c application property returns the root object.
- \snippet examples/activeqt/comapp/main.cpp 0
+ \snippet activeqt/comapp/main.cpp 0
The \c Document class finally represents a document in the application.
Each document is represented by a page in the application's tab widget, and
has a title that is readable and writable through the document's API.
The \c application property again returns the root object.
- \snippet examples/activeqt/comapp/main.cpp 3
+ \snippet activeqt/comapp/main.cpp 3
The implementation of the \c Document class creates a new page for the tab
- widget, and uses the title of that page for the title property. The page
+ widget, and uses the title of that page for the title property. The page
is deleted when the document is deleted.
- \snippet examples/activeqt/comapp/main.cpp 4
+ \snippet activeqt/comapp/main.cpp 4
The \c DocumentList implementation is straightforward.
- \snippet examples/activeqt/comapp/main.cpp 5
+ \snippet activeqt/comapp/main.cpp 5
The \c Application class initializes the user interface in the constructor,
and shows and hides it in the implementation of \c setVisible(). The object
- name (accessible through the \c id property) is set to \c "From QAxFactory"
- to indicate that this COM object has been created by COM. Note that there is
- no destructor that would delete the QTabWidget - this is instead done in the
- \c quit() slot, before calling QApplication::quit() through a single-shot-timer,
+ name (accessible through the \c id property) is set to \c "From QAxFactory"
+ to indicate that this COM object has been created by COM. Note that there is
+ no destructor that would delete the QTabWidget - this is instead done in the
+ \c quit() slot, before calling QApplication::quit() through a single-shot-timer,
which is necessary ensure that the COM call to the slot is complete.
- \snippet examples/activeqt/comapp/main.cpp 6
+ \snippet activeqt/comapp/main.cpp 6
The classes are exported from the server using the QAxFactory macros. Only
\c Application objects can be instantiated from outside - the other APIs can
only be used after accessing the respective objects throught the \c Application
API.
- \snippet examples/activeqt/comapp/main.cpp 7
+ \snippet activeqt/comapp/main.cpp 7
The main() entry point function creates a QApplication, and just enters the
event loop if the application has been started by COM. If the application
- has been started by the user, then the \c Application object is created and
+ has been started by the user, then the \c Application object is created and
the object name is set to "From Application". Then the COM server is started,
and the application object is registered with COM. It is now accessible to
COM clients through the client-specific APIs.
- Application exiting is controlled explicitly - if COM started the application,
+ Application exiting is controlled explicitly - if COM started the application,
then the client code has to call quit(); if the user started the application,
then the application terminates when the last window has been closed.
@@ -98,11 +98,11 @@
A simple Visual Basic application could now access this Qt application. In VB,
start a new "Standard Exe" project and add a project reference to the comappLib
- type library. Create a form with a listbox "DocumentList", a static label
- "DocumentsCount" and a command button "NewDocument". Finally, implement the code
+ type library. Create a form with a listbox "DocumentList", a static label
+ "DocumentsCount" and a command button "NewDocument". Finally, implement the code
for the form like this:
- \snippet doc/src/snippets/code/doc_src_examples_activeqt_comapp.qdoc 0
+ \snippet activeqt/comapp/doc/snippets/doc_src_examples_activeqt_comapp.qdoc 0
To build the example you must first build the QAxServer library.
Then run \c qmake and your make tool in
diff --git a/doc/src/examples/hierarchy-demo-snippet.qdoc b/examples/activeqt/hierarchy/doc/snippets/hierarchy-demo-snippet.qdoc
index 9e62d2b..9e62d2b 100644
--- a/doc/src/examples/hierarchy-demo-snippet.qdoc
+++ b/examples/activeqt/hierarchy/doc/snippets/hierarchy-demo-snippet.qdoc
diff --git a/doc/src/examples/hierarchy.qdoc b/examples/activeqt/hierarchy/doc/src/hierarchy.qdoc
index ef37856..de5dbf3 100644
--- a/doc/src/examples/hierarchy.qdoc
+++ b/examples/activeqt/hierarchy/doc/src/hierarchy.qdoc
@@ -36,53 +36,53 @@
\example activeqt/hierarchy
\title Hierarchy Example (ActiveQt)
- The Hierarchy example is shows how to write an in-process ActiveX
+ \brief The Hierarchy example is shows how to write an in-process ActiveX
control. The control is a QWidget subclass with child widgets
that are accessible as sub-types.
- \snippet examples/activeqt/hierarchy/objects.h 0
+ \snippet activeqt/hierarchy/objects.h 0
The \c QParentWidget class provides slots to create a widget
with a name, and to return a pointer to a named widget. The class
declaration uses \c Q_CLASSINFO() to provide the COM identifiers for
this class.
- \snippet examples/activeqt/hierarchy/objects.cpp 0
+ \snippet activeqt/hierarchy/objects.cpp 0
The constructor of QParentWidget creates a vertical box layout.
New child widgets are automatically added to the layout.
- \snippet examples/activeqt/hierarchy/objects.cpp 1
+ \snippet activeqt/hierarchy/objects.cpp 1
The \c createSubWidget slot creates a new \c QSubWidget with
the name provided in the parameter, and sets the label to that
name. The widget is also shown explicitly.
- \snippet examples/activeqt/hierarchy/objects.cpp 2
+ \snippet activeqt/hierarchy/objects.cpp 2
The \c subWidget slot uses the \c QObject::child() function and
returns the first child of type \c QSubWidget that has the requested
name.
- \snippet examples/activeqt/hierarchy/objects.h 1
+ \snippet activeqt/hierarchy/objects.h 1
The \c QSubWidget class has a single string-property \c label,
and implements the paintEvent to draw the label. The class uses
again \c Q_CLASSINFO to provide the COM identifiers, and also sets
the \e ToSuperClass attribute to \e QSubWidget, to ensure that only
no slots of any superclasses (i.e. QWidget) are exposed.
- \snippet examples/activeqt/hierarchy/objects.cpp 3
- \snippet examples/activeqt/hierarchy/objects.cpp 4
+ \snippet activeqt/hierarchy/objects.cpp 3
+ \snippet activeqt/hierarchy/objects.cpp 4
The implementation of the QSubWidget class is self-explanatory.
- \snippet examples/activeqt/hierarchy/main.cpp 0
+ \snippet activeqt/hierarchy/main.cpp 0
The classes are then exported using a QAxFactory. \c QParentWidget is
exported as a full class (which can be created ), while \c QSubWidget is
only exported as a type, which can only be created indirectly through
APIs of \c QParentWidget.
To build the example you must first build the QAxServer library.
- Then run qmake and your make tool in \c examples/activeqt/hierarchy.
+ Then run qmake and your make tool in \c activeqt/hierarchy.
The \l{qaxserver-demo-hierarchy.html}{demonstration} requires
your WebBrowser to support ActiveX controls, and scripting to be
enabled.
- \snippet examples/hierarchy-demo-snippet.qdoc script
+ \snippet activeqt/hierarchy/doc/snippets/hierarchy-demo-snippet.qdoc script
*/
diff --git a/examples/activeqt/hierarchy/hierarchy.pro b/examples/activeqt/hierarchy/hierarchy.pro
index 4429ef6..ba8765a 100644
--- a/examples/activeqt/hierarchy/hierarchy.pro
+++ b/examples/activeqt/hierarchy/hierarchy.pro
@@ -1,7 +1,7 @@
TEMPLATE = lib
TARGET = hierarchyax
-CONFIG += qt warn_off dll
+CONFIG += warn_off dll
QT += widgets axserver
SOURCES = objects.cpp main.cpp
@@ -11,6 +11,4 @@ DEF_FILE = hierarchy.def
# install
target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/hierarchy
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS $$RC_FILE $$DEF_FILE hierarchy.ico hierarchy.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/hierarchy
-INSTALLS += target sources
+INSTALLS += target
diff --git a/doc/src/snippets/code/doc_src_examples_activeqt_menus.qdoc b/examples/activeqt/menus/doc/snippets/doc_src_examples_activeqt_menus.qdoc
index 39fd6d6..39fd6d6 100644
--- a/doc/src/snippets/code/doc_src_examples_activeqt_menus.qdoc
+++ b/examples/activeqt/menus/doc/snippets/doc_src_examples_activeqt_menus.qdoc
diff --git a/doc/src/examples/menus.qdoc b/examples/activeqt/menus/doc/src/menus.qdoc
index e1d6c84..aa39019 100644
--- a/doc/src/examples/menus.qdoc
+++ b/examples/activeqt/menus/doc/src/menus.qdoc
@@ -45,7 +45,7 @@
\example activeqt/menus
\title Menus Example (ActiveQt)
- The Menus example demonstrates the use of QMenuBar and QStatusBar
+ \brief The Menus example demonstrates the use of QMenuBar and QStatusBar
in a QMainWindow to implement an in-place active control.
To build the example you must first build the QAxServer library.
@@ -56,5 +56,5 @@
WebBrowser to support ActiveX controls, and scripting to be
enabled.
- \snippet doc/src/snippets/code/doc_src_examples_activeqt_menus.qdoc 0
+ \snippet activeqt/menus/doc/snippets/doc_src_examples_activeqt_menus.qdoc 0
*/
diff --git a/examples/activeqt/menus/menus.pro b/examples/activeqt/menus/menus.pro
index de41ac1..9be1688 100644
--- a/examples/activeqt/menus/menus.pro
+++ b/examples/activeqt/menus/menus.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = menusax
-CONFIG += qt warn_off
+CONFIG += warn_off
QT += widgets axserver
SOURCES = main.cpp menus.cpp
@@ -10,6 +10,4 @@ RC_FILE = menus.rc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/menus
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS $$RC_FILE menus.ico menus.pro *.xpm
-sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/menus
-INSTALLS += target sources
+INSTALLS += target
diff --git a/doc/src/examples/multiple.qdoc b/examples/activeqt/multiple/doc/src/multiple.qdoc
index 99750c5..2f17d4b 100644
--- a/doc/src/examples/multiple.qdoc
+++ b/examples/activeqt/multiple/doc/src/multiple.qdoc
@@ -36,25 +36,25 @@
\example activeqt/multiple
\title Multiple Example (ActiveQt)
- The Multiple example demonstrates the implementation of a
+ \brief The Multiple example demonstrates the implementation of a
QAxFactory to provide multiple ActiveX controls in a single in
process ActiveX server using the \c QAXFACTORY_EXPORT() macro.
The ActiveX controls in this example are simple QWidget
subclasses that reimplement QWidget::paintEvent().
- \snippet examples/activeqt/multiple/ax1.h 0
+ \snippet activeqt/multiple/ax1.h 0
The first control draws a filled rectangle. The fill color is exposed
as a property. \c Q_CLASSINFO() is used to specify the COM identifiers.
- \snippet examples/activeqt/multiple/ax2.h 0
+ \snippet activeqt/multiple/ax2.h 0
The second control draws a circle. The linewith is exposed as a property.
\c Q_CLASSINFO() is used to specify the COM identifiers, and to set the
attributes \e ToSuperClass and \e StockEvents to expose only the API of
the class itself, and to add COM stock events to the ActiveX control.
- \snippet examples/activeqt/multiple/main.cpp 0
+ \snippet activeqt/multiple/main.cpp 0
The classes are exported from the server using the QAxFactory macros.
@@ -62,7 +62,7 @@
Then run \c qmake and your make tool in \c
examples/activeqt/multiple.
- The \l{qaxserver-demo-multiple.html}{demonstration} requires your
+ The \l{Two Simple Qt Widgets} demonstration requires your
WebBrowser to support ActiveX controls, and scripting to be
enabled.
diff --git a/examples/activeqt/multiple/multiple.pro b/examples/activeqt/multiple/multiple.pro
index 3dbf77e..56e413d 100644
--- a/examples/activeqt/multiple/multiple.pro
+++ b/examples/activeqt/multiple/multiple.pro
@@ -1,7 +1,7 @@
TEMPLATE = lib
TARGET = multipleax
-CONFIG += qt warn_off dll
+CONFIG += warn_off dll
QT += widgets axserver
SOURCES = main.cpp
@@ -11,6 +11,4 @@ DEF_FILE = multipleax.def
# install
target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/multiple
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS $$RC_FILE $$DEF_FILE multipleax.ico multiple.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/multiple
-INSTALLS += target sources
+INSTALLS += target
diff --git a/doc/src/examples/opengl.qdoc b/examples/activeqt/opengl/doc/src/opengl.qdoc
index 7d3c68b..2396665 100644
--- a/doc/src/examples/opengl.qdoc
+++ b/examples/activeqt/opengl/doc/src/opengl.qdoc
@@ -25,7 +25,7 @@
**
****************************************************************************/
-/*!
+/*!
\page qaxserver-demo-opengl.html
\title OpenGL in an HTML page
@@ -61,7 +61,7 @@
\example activeqt/opengl
\title OpenGL Example (ActiveQt)
- The OpenGL example demonstrates the use of the default factory
+ \brief The OpenGL example demonstrates the use of the default factory
and QAxFactory::isServer(), and the implementation of an
additional COM interface using QAxBindable and QAxAggregated.
The server executable can run both as an ActiveX server and as a
@@ -71,48 +71,48 @@
Qt to render an OpenGL scene in an ActiveX. The control exposes a few
methods to change the scene.
- The application uses the default factory as provided by the
- QAXFACTORY_DEFAULT macro to expose the \c GLBox widget as an ActiveX
+ The application uses the default factory as provided by the
+ QAXFACTORY_DEFAULT macro to expose the \c GLBox widget as an ActiveX
control.
- \snippet examples/activeqt/opengl/main.cpp 0
+ \snippet activeqt/opengl/main.cpp 0
The implementation of \c main initializes the QApplication object,
and uses \c QAxFactory::isServer() to determine whether or not it is
appropriate to create and show the application interface.
- \snippet examples/activeqt/opengl/main.cpp 1
- \snippet examples/activeqt/opengl/main.cpp 2
- \snippet examples/activeqt/opengl/main.cpp 3
+ \snippet activeqt/opengl/main.cpp 1
+ \snippet activeqt/opengl/main.cpp 2
+ \snippet activeqt/opengl/main.cpp 3
The \c GLBox class inherits from both the \l QGLWidget class to be able
to render OpenGL, and from \l QAxBindable.
- \snippet examples/activeqt/opengl/glbox.h 0
+ \snippet activeqt/opengl/glbox.h 0
The class reimplements the \l QAxBindable::createAggregate() function from QAxBindable
to return the pointer to a \l QAxAggregated object.
- \snippet examples/activeqt/opengl/glbox.h 1
+ \snippet activeqt/opengl/glbox.h 1
The rest of the class declaration and the implementation of the OpenGL
rendering is identical to the original "box" example.
The implementation file of the \c GLBox class includes the \c objsafe.h
system header, in which the \c IObjectSafety COM interface is defined.
- \snippet examples/activeqt/opengl/glbox.cpp 0
+ \snippet activeqt/opengl/glbox.cpp 0
A class \c ObjectSafetyImpl is declared using multiple inheritance
to subclass the QAxAggregated class, and to implement the IObjectSafety
interface.
- \snippet examples/activeqt/opengl/glbox.cpp 1
+ \snippet activeqt/opengl/glbox.cpp 1
The class declares a default constructor, and implements the queryInterface
function to support the IObjectSafety interface.
- \snippet examples/activeqt/opengl/glbox.cpp 2
+ \snippet activeqt/opengl/glbox.cpp 2
Since every COM interface inherits \c IUnknown the \c QAXAGG_IUNKNOWN macro
is used to provide the default implementation of the \c IUnknown interface.
The macro is defined to delegate all calls to \c QueryInterface, \c AddRef
and \c Release to the interface returned by the controllingUnknown() function.
- \snippet examples/activeqt/opengl/glbox.cpp 3
+ \snippet activeqt/opengl/glbox.cpp 3
The implementation of the \c IObjectSafety interface provides the caller
- with information about supported and enabled safety options, and returns
+ with information about supported and enabled safety options, and returns
\c S_OK for all calls to indicate that the ActiveX control is safe.
- \snippet examples/activeqt/opengl/glbox.cpp 4
+ \snippet activeqt/opengl/glbox.cpp 4
The implementation of the \c createAggregate() function just returns a new
\c ObjectSafetyImpl object.
- \snippet examples/activeqt/opengl/glbox.cpp 5
+ \snippet activeqt/opengl/glbox.cpp 5
To build the example you must first build the QAxServer library.
Then run \c qmake and your make tool in \c
@@ -124,7 +124,7 @@
In contrast to the other QAxServer examples Internet Explorer will not
open a dialog box to ask the user whether or not the scripting of the GLBox
- control should be allowed (the exact browser behaviour depends on the security
+ control should be allowed (the exact browser behaviour depends on the security
settings in the Internet Options dialog).
\snippet doc/src/examples/opengl-demo.qdocinc 0
diff --git a/examples/activeqt/opengl/opengl.pro b/examples/activeqt/opengl/opengl.pro
index 283a6e1..1cdd707 100644
--- a/examples/activeqt/opengl/opengl.pro
+++ b/examples/activeqt/opengl/opengl.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = openglax
-CONFIG += qt warn_off
+CONFIG += warn_off
QT += widgets axserver opengl
HEADERS = glbox.h \
@@ -14,6 +14,4 @@ RC_FILE = opengl.rc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/opengl
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS $$RC_FILE opengl.ico opengl.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/opengl
-INSTALLS += target sources
+INSTALLS += target
diff --git a/doc/src/examples/qutlook.qdoc b/examples/activeqt/qutlook/doc/src/qutlook.qdoc
index 12774b4..1842e80 100644
--- a/doc/src/examples/qutlook.qdoc
+++ b/examples/activeqt/qutlook/doc/src/qutlook.qdoc
@@ -25,73 +25,73 @@
**
****************************************************************************/
-/*!
+/*!
\example activeqt/qutlook
\title Qutlook Example (ActiveQt)
- The Qutlook example demonstrates the use of ActiveQt to automate
+ \brief The Qutlook example demonstrates the use of ActiveQt to automate
Outlook. The example makes use of the \l dumpcpp tool to generate
a C++ namespace for the type library describing the Outlook
Object Model.
The project file for the example looks like this:
- \snippet examples/activeqt/qutlook/qutlook.pro 1
- \snippet examples/activeqt/qutlook/qutlook.pro 2
+ \snippet activeqt/qutlook/qutlook.pro 1
+ \snippet activeqt/qutlook/qutlook.pro 2
The project file uses the \c dumpcpp tool to add an MS Outlook type library to the project.
If this fails, then the generated makefile will just print an error message, otherwise
- the build step will now run the \e dumpcpp tool on the type library, and
- generate a header and a cpp file (in this case, \c msoutl.h and \c msoutl.cpp) that
+ the build step will now run the \e dumpcpp tool on the type library, and
+ generate a header and a cpp file (in this case, \c msoutl.h and \c msoutl.cpp) that
declares and implement an easy to use API to the Outlook objects.
- \snippet examples/activeqt/qutlook/addressview.h 0
+ \snippet activeqt/qutlook/addressview.h 0
The AddressView class is a QWidget subclass for the user interface. The QTreeView widget
will display the contents of Outlook's Contact folder as provided by the \c{model}.
- \snippet examples/activeqt/qutlook/addressview.cpp 0
- The AddressBookModel class is a QAbstractListModel subclass that communicates directly with
+ \snippet activeqt/qutlook/addressview.cpp 0
+ The AddressBookModel class is a QAbstractListModel subclass that communicates directly with
Outlook, using a QHash for caching.
- \snippet examples/activeqt/qutlook/addressview.cpp 1
- The constructor initializes Outlook. The various signals Outlook provides to notify about
+ \snippet activeqt/qutlook/addressview.cpp 1
+ The constructor initializes Outlook. The various signals Outlook provides to notify about
contents changes are connected to the \c updateOutlook() slot.
- \snippet examples/activeqt/qutlook/addressview.cpp 2
+ \snippet activeqt/qutlook/addressview.cpp 2
The destructor logs off from the session.
- \snippet examples/activeqt/qutlook/addressview.cpp 3
+ \snippet activeqt/qutlook/addressview.cpp 3
The \c rowCount() implementation returns the number of entries as reported by Outlook. \c columnCount
and \c headerData are implemented to show four columns in the tree view.
- \snippet examples/activeqt/qutlook/addressview.cpp 4
+ \snippet activeqt/qutlook/addressview.cpp 4
The \c headerData() implementation returns hardcoded strings.
- \snippet examples/activeqt/qutlook/addressview.cpp 5
+ \snippet activeqt/qutlook/addressview.cpp 5
The \c data() implementation is the core of the model. If the requested data is in the cache the
cached value is used, otherwise the data is acquired from Outlook.
- \snippet examples/activeqt/qutlook/addressview.cpp 6
+ \snippet activeqt/qutlook/addressview.cpp 6
The \c changeItem() slot is called when the user changes the current entry using the user interface.
The Outlook item is accessed using the Outlook API, and is modified using the property setters.
Finally, the item is saved to Outlook, and removed from the cache. Note that the model does not
signal the view of the data change, as Outlook will emit a signal on its own.
- \snippet examples/activeqt/qutlook/addressview.cpp 7
+ \snippet activeqt/qutlook/addressview.cpp 7
The \c addItem() slot calls the CreateItem method of Outlook to create a new contact item,
sets the properties of the new item to the values entered by the user and saves the item.
- \snippet examples/activeqt/qutlook/addressview.cpp 8
+ \snippet activeqt/qutlook/addressview.cpp 8
The \c update() slot clears the cache, and emits the reset() signal to notify the view about the
data change requiring a redraw of the contents.
- \snippet examples/activeqt/qutlook/addressview.cpp 9
- \snippet examples/activeqt/qutlook/addressview.cpp 10
+ \snippet activeqt/qutlook/addressview.cpp 9
+ \snippet activeqt/qutlook/addressview.cpp 10
The rest of the file implements the user interface using only Qt APIs, i.e. without communicating
with Outlook directly.
- \snippet examples/activeqt/qutlook/main.cpp 0
+ \snippet activeqt/qutlook/main.cpp 0
The \c main() entry point function finally instantiates the user interface and enters the
event loop.
diff --git a/examples/activeqt/qutlook/qutlook.pro b/examples/activeqt/qutlook/qutlook.pro
index 484107d..30d5bc5 100644
--- a/examples/activeqt/qutlook/qutlook.pro
+++ b/examples/activeqt/qutlook/qutlook.pro
@@ -18,6 +18,4 @@ isEmpty(TYPELIBS) {
# install
target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/qutlook
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qutlook.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/qutlook
-INSTALLS += target sources
+INSTALLS += target
diff --git a/doc/src/examples/simple.qdoc b/examples/activeqt/simple/doc/src/simple.qdoc
index e92152b..761f8c3 100644
--- a/doc/src/examples/simple.qdoc
+++ b/examples/activeqt/simple/doc/src/simple.qdoc
@@ -25,7 +25,7 @@
**
****************************************************************************/
-/*!
+/*!
\page qaxserver-demo-simple.html
\title A standard ActiveX and the "simple" ActiveQt widget
@@ -78,7 +78,7 @@
QAxBindable::requestPropertyChange() and
QAxBindable::propertyChanged(), and the use of the default
QAxFactory through the \c QAXFACTORY_DEFAULT() macro.
-
+
The ActiveX control in this example is a laid out QWidget with a
QSlider, a QLCDNumber and a QLineEdit. It provides a
signal/slot/property interface to change the values of the slider
@@ -86,10 +86,10 @@
The Qt implementation of the ActiveX for this example is
- \snippet examples/activeqt/simple/main.cpp 0
+ \snippet activeqt/simple/main.cpp 0
The control is exported using the default QAxFactory
- \snippet examples/activeqt/simple/main.cpp 1
+ \snippet activeqt/simple/main.cpp 1
To build the example you must first build the QAxServer library.
Then run qmake and your make tool in \c examples/activeqt/simple.
diff --git a/examples/activeqt/simple/simple.pro b/examples/activeqt/simple/simple.pro
index 31231d6..da8a317 100644
--- a/examples/activeqt/simple/simple.pro
+++ b/examples/activeqt/simple/simple.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = simpleax
-CONFIG += qt warn_off
+CONFIG += warn_off
QT += widgets axserver
SOURCES = main.cpp
@@ -9,6 +9,4 @@ RC_FILE = simple.rc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/simple
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS $$RC_FILE simple.ico simple.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/simple
-INSTALLS += target sources
+INSTALLS += target
diff --git a/examples/activeqt/webbrowser/doc/images/activeqt-webbrowser-example.png b/examples/activeqt/webbrowser/doc/images/activeqt-webbrowser-example.png
new file mode 100644
index 0000000..4913594
--- /dev/null
+++ b/examples/activeqt/webbrowser/doc/images/activeqt-webbrowser-example.png
Binary files differ
diff --git a/doc/src/examples/webbrowser.qdoc b/examples/activeqt/webbrowser/doc/src/webbrowser.qdoc
index 0117092..a3fd6ca 100644
--- a/doc/src/examples/webbrowser.qdoc
+++ b/examples/activeqt/webbrowser/doc/src/webbrowser.qdoc
@@ -29,38 +29,40 @@
\example activeqt/webbrowser
\title Web Browser Example (ActiveQt)
- The Web Browser example uses the Microsoft Web Browser
+ \brief The Web Browser example uses the Microsoft Web Browser
ActiveX control to implement a fully functional Web Browser
application. The user interface has been developed using the Qt
Designer integration of the QAxWidget class.
- The code demonstrates how the Qt application can communicate
- with the embedded ActiveX controls using signals, slots and the
+ \image activeqt-webbrowser-example.png
+
+ The code demonstrates how the Qt application can communicate
+ with the embedded ActiveX controls using signals, slots and the
dynamicCall() function.
- \snippet examples/activeqt/webbrowser/main.cpp 0
+ \snippet activeqt/webbrowser/main.cpp 0
The \c MainWindow class declares a \c QMainWindow based user interface,
using the \c Ui::MainWindow class generated by Qt Designer. A number
- of slots are implemented to handle events from the various user
+ of slots are implemented to handle events from the various user
interface elements, including the \c WebBrowser object, which is a
QAxWidget hosting the Microsoft Web Browser control.
- \snippet examples/activeqt/webbrowser/main.cpp 1
+ \snippet activeqt/webbrowser/main.cpp 1
The constructor initializes the user interface, installs a
progress bar on the status bar, and uses QAxBase::dynamicCall()
to invoke the \c GoHome() method of Internet Explorer to
navigate to the user's home page.
- \snippet examples/activeqt/webbrowser/main.cpp 2
+ \snippet activeqt/webbrowser/main.cpp 2
Different slots handle the signals emitted by the WebBrowser object.
- Connections that don't require any coding, i.e. connecting the \c back
+ Connections that don't require any coding, i.e. connecting the \c back
action to the \c GoBack() slot, have already been made in Qt Designer.
- \snippet examples/activeqt/webbrowser/main.cpp 3
- \snippet examples/activeqt/webbrowser/main.cpp 4
+ \snippet activeqt/webbrowser/main.cpp 3
+ \snippet activeqt/webbrowser/main.cpp 4
The rest of the implementation is not related to ActiveQt - the actions
are handled by different slots, and the entry point function starts the
diff --git a/examples/activeqt/webbrowser/webbrowser.pro b/examples/activeqt/webbrowser/webbrowser.pro
index 8b29560..995906f 100644
--- a/examples/activeqt/webbrowser/webbrowser.pro
+++ b/examples/activeqt/webbrowser/webbrowser.pro
@@ -10,6 +10,4 @@ wincewm*: FORMS = mainwindow_windowsmobile.ui
# install
target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/webbrowser
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS webbrowser.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/webbrowser
-INSTALLS += target sources
+INSTALLS += target
diff --git a/doc/src/examples/wrapper.qdoc b/examples/activeqt/wrapper/doc/src/wrapper.qdoc
index 3f4b904..4e8eed3 100644
--- a/doc/src/examples/wrapper.qdoc
+++ b/examples/activeqt/wrapper/doc/src/wrapper.qdoc
@@ -37,18 +37,18 @@
\example activeqt/wrapper
\title Wrapper Example (ActiveQt)
- The Wrapper example demonstrates how to export existing QWidget
+ \brief The Wrapper example demonstrates how to export existing QWidget
classes as ActiveX controls, and the use of QAxFactory together
with the \c QAXFACTORY_EXPORT() macro. ActiveX controls in this
example are the standard button classes QPushButton, QCheckBox
and QRadioButton as provided by Qt.
- \snippet examples/activeqt/wrapper/main.cpp 0
+ \snippet activeqt/wrapper/main.cpp 0
The factory implementation returns the list of supported controls,
creates controls on request and provides information about the unique
IDs of the COM classes and interfaces for each control.
- \snippet examples/activeqt/wrapper/main.cpp 1
+ \snippet activeqt/wrapper/main.cpp 1
The factory is exported using the QAXFACTORY_EXPORT macro.
To build the example you must first build the QAxServer library.
diff --git a/examples/activeqt/wrapper/wrapper.pro b/examples/activeqt/wrapper/wrapper.pro
index b07e8f3..8b59eb9 100644
--- a/examples/activeqt/wrapper/wrapper.pro
+++ b/examples/activeqt/wrapper/wrapper.pro
@@ -1,7 +1,7 @@
TEMPLATE = lib
TARGET = wrapperax
-CONFIG += qt warn_off dll
+CONFIG += warn_off dll
QT += widgets axserver
SOURCES = main.cpp
@@ -10,6 +10,4 @@ DEF_FILE = wrapperax.def
# install
target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/wrapper
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS $$RC_FILE $$DEF_FILE wrapperax.ico wrapper.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/wrapper
-INSTALLS += target sources
+INSTALLS += target
diff --git a/qtactiveqt.pro b/qtactiveqt.pro
index 409aad3..5543434 100644
--- a/qtactiveqt.pro
+++ b/qtactiveqt.pro
@@ -1,6 +1,7 @@
+CONFIG += tests_need_tools
load(qt_parts)
!win32 {
- message("ActiveQt is a Windows-only module - will not be built")
- SUBDIRS =
+ message("ActiveQt is a Windows-only module. Will just generate a docs target.")
+ SUBDIRS = src
}
diff --git a/src/activeqt/activeqt.pro b/src/activeqt/activeqt.pro
index b6d45e5..972ce7c 100644
--- a/src/activeqt/activeqt.pro
+++ b/src/activeqt/activeqt.pro
@@ -1,7 +1,13 @@
-TEMPLATE = subdirs
+win32 {
+ TEMPLATE = subdirs
-CONFIG += ordered
-axshared.file = axshared.prx
-SUBDIRS = axshared container
-!wince*: SUBDIRS += control
+ CONFIG += ordered
+ axshared.file = axshared.prx
+ SUBDIRS = axshared container
+ !wince: SUBDIRS += control
+} else {
+ # fake project for creating the documentation
+ TEMPLATE = aux
+ QMAKE_DOCS = $$PWD/doc/activeqt.qdocconf
+}
diff --git a/src/activeqt/axshared.prx b/src/activeqt/axshared.prx
index 5c8273e..a81afa3 100644
--- a/src/activeqt/axshared.prx
+++ b/src/activeqt/axshared.prx
@@ -1,7 +1,9 @@
# This modules provides the header files, installed under "ActiveQt/".
# It also contains shared code that is used by axcontainer and axserver.
-TARGET = ActiveQt
+TARGET = QtAxBase
+QMAKE_DOCS = $$PWD/doc/activeqt.qdocconf
+MODULE_INCNAME = ActiveQt
CONFIG += static
QT += gui-private
@@ -19,6 +21,3 @@ SOURCES = \
MODULE = axbase
load(qt_module)
-# QtActiveQt is too inconsistent with other Qt modules
-# to use the generic cmake config files generator
-CONFIG -= create_cmake
diff --git a/src/activeqt/container/container.pro b/src/activeqt/container/container.pro
index 9c9d5e2..3972e5b 100644
--- a/src/activeqt/container/container.pro
+++ b/src/activeqt/container/container.pro
@@ -1,4 +1,4 @@
-TARGET = QAxContainer
+TARGET = QtAxContainer
QT += core-private gui gui-private widgets widgets-private axbase
CONFIG += static
@@ -26,7 +26,4 @@ MODULE = axcontainer
MODULE_CONFIG = dumpcpp
CONFIG += no_module_headers
load(qt_module)
-# QtActiveQt is too inconsistent with other Qt modules
-# to use the generic cmake config files generator
-CONFIG -= create_cmake
DEFINES -= QT_NO_CAST_TO_ASCII QT_USE_QSTRINGBUILDER
diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp
index a212f2c..52f0169 100644
--- a/src/activeqt/container/qaxbase.cpp
+++ b/src/activeqt/container/qaxbase.cpp
@@ -705,7 +705,7 @@ QByteArray QAxEventSink::findProperty(DISPID dispID)
the IDispatch interface, the properties and methods of that object
become available as Qt properties and slots.
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 0
+ \snippet src_activeqt_container_qaxbase.cpp 0
Properties exposed by the object's IDispatch implementation can
be read and written through the property system provided by the
@@ -713,18 +713,18 @@ QByteArray QAxEventSink::findProperty(DISPID dispID)
QObject::setProperty() and QObject::property()). Properties with
multiple parameters are not supported.
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 1
+ \snippet src_activeqt_container_qaxbase.cpp 1
Write-functions for properties and other methods exposed by the
object's IDispatch implementation can be called directly using
dynamicCall(), or indirectly as slots connected to a signal.
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 2
+ \snippet src_activeqt_container_qaxbase.cpp 2
Outgoing events supported by the COM object are emitted as
standard Qt signals.
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 3
+ \snippet src_activeqt_container_qaxbase.cpp 3
QAxBase transparently converts between COM data types and the
equivalent Qt data types. Some COM types have no equivalent Qt data structure.
@@ -841,11 +841,11 @@ QByteArray QAxEventSink::findProperty(DISPID dispID)
To call the methods of a COM interface described by the following IDL
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 4
+ \snippet src_activeqt_container_qaxbase.cpp 4
use the QAxBase API like this:
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 5
+ \snippet src_activeqt_container_qaxbase.cpp 5
Note that the QList the object should fill has to be provided as an
element in the parameter list of \l{QVariant}s.
@@ -855,7 +855,7 @@ QByteArray QAxEventSink::findProperty(DISPID dispID)
through its \c IDispatch implementation or other interfaces.
Those interfaces can be retrieved through queryInterface().
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 6
+ \snippet src_activeqt_container_qaxbase.cpp 6
To get the definition of the COM interfaces you will have to use the header
files provided with the component you want to use. Some compilers can also
@@ -955,21 +955,21 @@ QAxMetaObject *QAxBase::internalMetaObject() const
The most efficient way to set this property is by using the
registered component's UUID, e.g.
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 7
+ \snippet src_activeqt_container_qaxbase.cpp 7
The second fastest way is to use the registered control's class
name (with or without version number), e.g.
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 8
+ \snippet src_activeqt_container_qaxbase.cpp 8
The slowest, but easiest way to use is to use the control's full
name, e.g.
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 9
+ \snippet src_activeqt_container_qaxbase.cpp 9
It is also possible to initialize the object from a file, e.g.
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 10
+ \snippet src_activeqt_container_qaxbase.cpp 10
If the component's UUID is used the following patterns can be used
to initialize the control on a remote machine, to initialize a
@@ -978,21 +978,21 @@ QAxMetaObject *QAxBase::internalMetaObject() const
\li To initialize the control on a different machine use the following
pattern:
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 11
+ \snippet src_activeqt_container_qaxbase.cpp 11
\li To initialize a licensed control use the following pattern:
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 12
+ \snippet src_activeqt_container_qaxbase.cpp 12
\li To connect to an already running object use the following pattern:
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 13
+ \snippet src_activeqt_container_qaxbase.cpp 13
\endlist
The first two patterns can be combined, e.g. to initialize a licensed
control on a remote machine:
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 14
+ \snippet src_activeqt_container_qaxbase.cpp 14
The control's read function always returns the control's UUID, if provided including the license
key, and the name of the server, but not including the username, the domain or the password.
@@ -1624,7 +1624,7 @@ private:
}
struct Method {
- Method() : flags(0)
+ Method() : flags(0)
{}
QByteArray type;
QByteArray parameters;
@@ -1832,15 +1832,20 @@ QMetaObject *qax_readClassInfo(ITypeLib *typeLib, ITypeInfo *classInfo, const QM
return generator.metaObject(parentObject, className.toLatin1());
}
+void qax_deleteMetaObject(QMetaObject *metaObject)
+{
+ delete static_cast<QAxMetaObject *>(metaObject);
+}
+
MetaObjectGenerator::MetaObjectGenerator(QAxBase *ax, QAxBasePrivate *dptr)
-: that(ax), d(dptr), disp(0), dispInfo(0), classInfo(0), typelib(0),
+: that(ax), d(dptr), disp(0), dispInfo(0), classInfo(0), typelib(0),
iidnames(QLatin1String("HKEY_LOCAL_MACHINE\\Software\\Classes"), QSettings::NativeFormat)
{
init();
}
MetaObjectGenerator::MetaObjectGenerator(ITypeLib *tlib, ITypeInfo *tinfo)
-: that(0), d(0), disp(0), dispInfo(tinfo), classInfo(0), typelib(tlib),
+: that(0), d(0), disp(0), dispInfo(tinfo), classInfo(0), typelib(tlib),
iidnames(QLatin1String("HKEY_LOCAL_MACHINE\\Software\\Classes"), QSettings::NativeFormat)
{
init();
@@ -2217,7 +2222,7 @@ void MetaObjectGenerator::readClassInfo()
classInfo->GetImplTypeFlags(i, &typeFlags);
if (typeFlags & IMPLTYPEFLAG_FSOURCE)
continue;
-
+
HREFTYPE hrefType;
if (S_OK == classInfo->GetRefTypeOfImplType(i, &hrefType))
classInfo->GetRefTypeInfo(hrefType, &dispInfo);
@@ -2226,7 +2231,7 @@ void MetaObjectGenerator::readClassInfo()
dispInfo->GetTypeAttr(&ifaceAttr);
WORD typekind = ifaceAttr->typekind;
dispInfo->ReleaseTypeAttr(ifaceAttr);
-
+
if (typekind & TKIND_DISPATCH) {
break;
} else {
@@ -3470,7 +3475,7 @@ static bool checkHRESULT(HRESULT hres, EXCEPINFO *exc, QAxBase *that, const QStr
qWarning(" Help : %s", help.toLatin1().data());
qWarning(" Connect to the exception(int,QString,QString,QString) signal to catch this exception");
}
- }
+ }
return false;
case DISP_E_MEMBERNOTFOUND:
qWarning("QAxBase: Error calling IDispatch member %s: Member not found", name.toLatin1().data());
@@ -4045,12 +4050,12 @@ bool QAxBase::dynamicCallHelper(const char *name, void *inout, QList<QVariant> &
as the full prototype, for example as it would be written in a
QObject::connect() call.
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 15
+ \snippet src_activeqt_container_qaxbase.cpp 15
Alternatively a function can be called passing the parameters embedded
in the string, e.g. above function can also be invoked using
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 16
+ \snippet src_activeqt_container_qaxbase.cpp 16
All parameters are passed as strings; it depends on the control whether
they are interpreted correctly, and is slower than using the prototype
@@ -4060,7 +4065,7 @@ bool QAxBase::dynamicCallHelper(const char *name, void *inout, QList<QVariant> &
property. The property setter is called when \a var1 is a valid QVariant,
otherwise the getter is called.
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 17
+ \snippet src_activeqt_container_qaxbase.cpp 17
Note that it is faster to get and set properties using
QObject::property() and QObject::setProperty().
@@ -4079,7 +4084,7 @@ bool QAxBase::dynamicCallHelper(const char *name, void *inout, QList<QVariant> &
queryInterface() to retrieve the appropriate COM interface, and
use the function directly.
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 18
+ \snippet src_activeqt_container_qaxbase.cpp 18
This is also more efficient.
*/
@@ -4162,7 +4167,7 @@ QVariant QAxBase::dynamicCall(const char *function, QList<QVariant> &vars)
certain elements of the application as dispatch interfaces. Use
this method to navigate the hierarchy of the object model, e.g.
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 19
+ \snippet src_activeqt_container_qaxbase.cpp 19
*/
QAxObject *QAxBase::querySubObject(const char *name,
const QVariant &var1,
@@ -4506,7 +4511,7 @@ void *qax_createObjectWrapper(int metaType, IUnknown *iface)
values is turned around, ie. the last element of the array is the first
parameter in the function.
- \snippet doc/src/snippets/code/src_activeqt_container_qaxbase.cpp 20
+ \snippet src_activeqt_container_qaxbase.cpp 20
Use this signal if the event has parameters of unsupported data
types. Otherwise, connect directly to the signal \a name.
diff --git a/src/activeqt/container/qaxscript.cpp b/src/activeqt/container/qaxscript.cpp
index 28ceed1..442aa41 100644
--- a/src/activeqt/container/qaxscript.cpp
+++ b/src/activeqt/container/qaxscript.cpp
@@ -91,27 +91,27 @@ class QAxScriptSite : public IActiveScriptSite, public IActiveScriptSiteWindow
{
public:
QAxScriptSite(QAxScript *script);
-
+
ULONG WINAPI AddRef();
ULONG WINAPI Release();
HRESULT WINAPI QueryInterface(REFIID iid, void **ppvObject);
-
+
HRESULT WINAPI GetLCID(LCID *plcid);
HRESULT WINAPI GetItemInfo(LPCOLESTR pstrName, DWORD dwReturnMask, IUnknown **ppiunkItem, ITypeInfo **ppti);
HRESULT WINAPI GetDocVersionString(BSTR *pbstrVersion);
-
+
HRESULT WINAPI OnScriptTerminate(const VARIANT *pvarResult, const EXCEPINFO *pexcepinfo);
HRESULT WINAPI OnStateChange(SCRIPTSTATE ssScriptState);
HRESULT WINAPI OnScriptError(IActiveScriptError *pscripterror);
HRESULT WINAPI OnEnterScript();
HRESULT WINAPI OnLeaveScript();
-
+
HRESULT WINAPI GetWindow(HWND *phwnd);
HRESULT WINAPI EnableModeless(BOOL fEnable);
-
+
protected:
QWidget *window() const;
-
+
private:
QAxScript *script;
LONG ref;
@@ -159,7 +159,7 @@ HRESULT WINAPI QAxScriptSite::QueryInterface(REFIID iid, void **ppvObject)
*ppvObject = (IActiveScriptSiteWindow*)this;
else
return E_NOINTERFACE;
-
+
AddRef();
return S_OK;
}
@@ -177,7 +177,7 @@ HRESULT WINAPI QAxScriptSite::GetLCID(LCID * /*plcid*/)
/*
Implements IActiveScriptSite::GetItemInfo
- Tries to find the QAxBase for \a pstrName and returns the
+ Tries to find the QAxBase for \a pstrName and returns the
relevant interfaces in \a item and \a type as requested through \a mask.
*/
HRESULT WINAPI QAxScriptSite::GetItemInfo(LPCOLESTR pstrName, DWORD mask, IUnknown **item, ITypeInfo **type)
@@ -186,16 +186,16 @@ HRESULT WINAPI QAxScriptSite::GetItemInfo(LPCOLESTR pstrName, DWORD mask, IUnkno
*item = 0;
else if (mask & SCRIPTINFO_IUNKNOWN)
return E_POINTER;
-
+
if (type)
*type = 0;
else if (mask & SCRIPTINFO_ITYPEINFO)
return E_POINTER;
-
+
QAxBase *object = script->findObject(QString::fromWCharArray(pstrName));
if (!object)
return TYPE_E_ELEMENTNOTFOUND;
-
+
if (mask & SCRIPTINFO_IUNKNOWN)
object->queryInterface(IID_IUnknown, (void**)item);
if (mask & SCRIPTINFO_ITYPEINFO) {
@@ -212,7 +212,7 @@ HRESULT WINAPI QAxScriptSite::GetItemInfo(LPCOLESTR pstrName, DWORD mask, IUnkno
/*
Implements IActiveScriptSite::GetDocVersionString
- This method is not implemented. The scripting engine should assume
+ This method is not implemented. The scripting engine should assume
that the script is in sync with the document.
*/
HRESULT WINAPI QAxScriptSite::GetDocVersionString(BSTR * /*version*/)
@@ -229,11 +229,11 @@ HRESULT WINAPI QAxScriptSite::GetDocVersionString(BSTR * /*version*/)
HRESULT WINAPI QAxScriptSite::OnScriptTerminate(const VARIANT *result, const EXCEPINFO *exception)
{
emit script->finished();
-
+
if (result && result->vt != VT_EMPTY)
emit script->finished(VARIANTToQVariant(*result, 0));
if (exception)
- emit script->finished(exception->wCode,
+ emit script->finished(exception->wCode,
QString::fromWCharArray(exception->bstrSource),
QString::fromWCharArray(exception->bstrDescription),
QString::fromWCharArray(exception->bstrHelpFile)
@@ -244,7 +244,7 @@ HRESULT WINAPI QAxScriptSite::OnScriptTerminate(const VARIANT *result, const EXC
/*
Implements IActiveScriptSite::OnEnterScript
- Fires QAxScript::entered() to inform the host that the
+ Fires QAxScript::entered() to inform the host that the
scripting engine has begun executing the script code.
*/
HRESULT WINAPI QAxScriptSite::OnEnterScript()
@@ -256,7 +256,7 @@ HRESULT WINAPI QAxScriptSite::OnEnterScript()
/*
Implements IActiveScriptSite::OnLeaveScript
- Fires QAxScript::finished() to inform the host that the
+ Fires QAxScript::finished() to inform the host that the
scripting engine has returned from executing the script code.
*/
HRESULT WINAPI QAxScriptSite::OnLeaveScript()
@@ -268,7 +268,7 @@ HRESULT WINAPI QAxScriptSite::OnLeaveScript()
/*
Implements IActiveScriptSite::OnScriptError
- Fires QAxScript::error() to inform the host that an
+ Fires QAxScript::error() to inform the host that an
that an execution error occurred while the engine was running the script.
*/
HRESULT WINAPI QAxScriptSite::OnScriptError(IActiveScriptError *error)
@@ -280,7 +280,7 @@ HRESULT WINAPI QAxScriptSite::OnScriptError(IActiveScriptError *error)
LONG charPos;
BSTR bstrLineText;
QString lineText;
-
+
error->GetExceptionInfo(&exception);
error->GetSourcePosition(&context, &lineNumber, &charPos);
HRESULT hres = error->GetSourceLineText(&bstrLineText);
@@ -293,7 +293,7 @@ HRESULT WINAPI QAxScriptSite::OnScriptError(IActiveScriptError *error)
SysFreeString(exception.bstrHelpFile);
emit script->error(exception.wCode, QString::fromWCharArray(exception.bstrDescription), lineNumber, lineText);
-
+
return S_OK;
}
@@ -322,31 +322,31 @@ QWidget *QAxScriptSite::window() const
w = qobject_cast<QWidget*>(p);
p = p->parent();
}
-
+
if (w)
w = w->window();
if (!w && qApp)
w = qApp->activeWindow();
-
+
return w;
}
/*
Implements IActiveScriptSiteWindow::GetWindow
- Retrieves the handle to a window that can act as the owner of a
+ Retrieves the handle to a window that can act as the owner of a
pop-up window that the scripting engine must display.
*/
HRESULT WINAPI QAxScriptSite::GetWindow(HWND *phwnd)
{
if (!phwnd)
return E_POINTER;
-
+
*phwnd = 0;
QWidget *w = window();
if (!w)
return E_FAIL;
-
+
// FIXME: 4.10.2011 Does this work with the parent's HWND?
*phwnd = hwndForWidget(w);
return S_OK;
@@ -355,7 +355,7 @@ HRESULT WINAPI QAxScriptSite::GetWindow(HWND *phwnd)
/*
Implements IActiveScriptSiteWindow::EnableModeless
- Causes the host to enable or disable its main window
+ Causes the host to enable or disable its main window
as well as any modeless dialog boxes.
*/
HRESULT WINAPI QAxScriptSite::EnableModeless(BOOL fEnable)
@@ -409,7 +409,7 @@ HRESULT WINAPI QAxScriptSite::EnableModeless(BOOL fEnable)
/*!
Constructs a QAxScriptEngine object interpreting script code in \a language
- provided by the code in \a script. This is usually done by the QAxScript
+ provided by the code in \a script. This is usually done by the QAxScript
class when \link QAxScript::load() loading a script\endlink.
Instances of QAxScriptEngine should always have both a language and a
@@ -421,7 +421,7 @@ QAxScriptEngine::QAxScriptEngine(const QString &language, QAxScript *script)
#ifdef QT_CHECK_STATE
if (language.isEmpty())
qWarning("QAxScriptEngine: created without language");
-
+
if (!script_code)
qWarning("QAxScriptEngine: created without script");
#endif
@@ -445,7 +445,7 @@ QAxScriptEngine::~QAxScriptEngine()
#endif
}
-/*!
+/*!
\fn QString QAxScriptEngine::scriptLanguage() const
Returns the scripting language, for example "VBScript",
or "JScript".
@@ -457,20 +457,20 @@ QAxScriptEngine::~QAxScriptEngine()
bool QAxScriptEngine::initialize(IUnknown **ptr)
{
*ptr = 0;
-
+
#ifndef QT_NO_QAXSCRIPT
if (!script_code || script_language.isEmpty())
return false;
-
+
CLSID clsid;
HRESULT hres = CLSIDFromProgID((wchar_t*)script_language.utf16(), &clsid);
if(FAILED(hres))
return false;
-
+
CoCreateInstance(clsid, 0, CLSCTX_INPROC_SERVER, IID_IActiveScript, (void**)&engine);
if (!engine)
return false;
-
+
IActiveScriptParse *parser = 0;
engine->QueryInterface(IID_IActiveScriptParse, (void**)&parser);
if (!parser) {
@@ -478,7 +478,7 @@ bool QAxScriptEngine::initialize(IUnknown **ptr)
engine = 0;
return false;
}
-
+
if (engine->SetScriptSite(script_code->script_site) != S_OK) {
engine->Release();
engine = 0;
@@ -490,7 +490,7 @@ bool QAxScriptEngine::initialize(IUnknown **ptr)
engine = 0;
return false;
}
-
+
BSTR bstrCode = QStringToBSTR(script_code->scriptCode());
#ifdef Q_OS_WIN64
hres = parser->ParseScriptText(bstrCode, 0, 0, 0, DWORDLONG(this), 0, SCRIPTTEXT_ISVISIBLE, 0, 0);
@@ -498,17 +498,17 @@ bool QAxScriptEngine::initialize(IUnknown **ptr)
hres = parser->ParseScriptText(bstrCode, 0, 0, 0, DWORD(this), 0, SCRIPTTEXT_ISVISIBLE, 0, 0);
#endif
SysFreeString(bstrCode);
-
+
parser->Release();
parser = 0;
-
+
script_code->updateObjects();
-
+
if (engine->SetScriptState(SCRIPTSTATE_CONNECTED) != S_OK) {
engine = 0;
return false;
}
-
+
IDispatch *scriptDispatch = 0;
engine->GetScriptDispatch(0, &scriptDispatch);
if (scriptDispatch) {
@@ -516,7 +516,7 @@ bool QAxScriptEngine::initialize(IUnknown **ptr)
scriptDispatch->Release();
}
#endif
-
+
return *ptr != 0;
}
@@ -535,12 +535,12 @@ bool QAxScriptEngine::hasIntrospection() const
{
if (!isValid())
return false;
-
+
IDispatch *scriptDispatch = 0;
QAxBase::queryInterface(IID_IDispatch, (void**)&scriptDispatch);
if (!scriptDispatch)
return false;
-
+
UINT tic = 0;
HRESULT hres = scriptDispatch->GetTypeInfoCount(&tic);
scriptDispatch->Release();
@@ -560,7 +560,7 @@ long QAxScriptEngine::queryInterface(const QUuid &uuid, void **iface) const
*iface = 0;
if (!engine)
return E_NOTIMPL;
-
+
#ifndef QT_NO_QAXSCRIPT
return engine->QueryInterface(uuid, iface);
#else
@@ -577,7 +577,7 @@ QAxScriptEngine::State QAxScriptEngine::state() const
{
if (!engine)
return Uninitialized;
-
+
#ifndef QT_NO_QAXSCRIPT
SCRIPTSTATE state;
engine->GetScriptState(&state);
@@ -596,7 +596,7 @@ void QAxScriptEngine::setState(State st)
#ifndef QT_NO_QAXSCRIPT
if (!engine)
return;
-
+
engine->SetScriptState((SCRIPTSTATE)st);
#else
Q_UNUSED(st);
@@ -612,7 +612,7 @@ void QAxScriptEngine::addItem(const QString &name)
#ifndef QT_NO_QAXSCRIPT
if (!engine)
return;
-
+
engine->AddNamedItem((wchar_t*)name.utf16(), SCRIPTITEM_ISSOURCE|SCRIPTITEM_ISVISIBLE);
#else
Q_UNUSED(name);
@@ -627,10 +627,10 @@ void QAxScriptEngine::addItem(const QString &name)
Every instance of the QAxScript class represents a piece of
scripting code in a particular scripting language. The code is
loaded into the script engine using load(). Functions declared
- in the code can be called using call().
+ in the code can be called using call().
- The script provides scriptEngine() provides feedback to the
- application through signals. The most important signal is the
+ The script provides scriptEngine() provides feedback to the
+ application through signals. The most important signal is the
error() signal. Direct access to the QAxScriptEngine is provided
through the scriptEngine() function.
@@ -652,7 +652,7 @@ void QAxScriptEngine::addItem(const QString &name)
/*!
Constructs a QAxScript object called \a name and registers
it with the QAxScriptManager \a manager. This is usually done by the
- QAxScriptManager class when \link QAxScriptManager::load() loading a
+ QAxScriptManager class when \link QAxScriptManager::load() loading a
script\endlink.
A script should always have a name. A manager is necessary to allow
@@ -665,10 +665,10 @@ script_engine(0)
{
if (manager) {
manager->d->scriptDict.insert(name, this);
- connect(this, SIGNAL(error(int,QString,int,QString)),
+ connect(this, SIGNAL(error(int,QString,int,QString)),
manager, SLOT(scriptError(int,QString,int,QString)));
}
-
+
#ifndef QT_NO_QAXSCRIPT
script_site = new QAxScriptSite(this);
#else
@@ -683,7 +683,7 @@ QAxScript::~QAxScript()
{
delete script_engine;
script_engine = 0;
-
+
#ifndef QT_NO_QAXSCRIPT
script_site->Release();
#endif
@@ -694,10 +694,10 @@ QAxScript::~QAxScript()
into the script engine. Returns true if \a code was successfully
entered into the script engine; otherwise returns false.
- If \a language is empty (the default) it will be determined
- heuristically. If \a code contains the string \c {End Sub} it will
- be interpreted as VBScript, otherwise as JScript. Additional
- scripting languages can be registered using
+ If \a language is empty (the default) it will be determined
+ heuristically. If \a code contains the string \c {End Sub} it will
+ be interpreted as VBScript, otherwise as JScript. Additional
+ scripting languages can be registered using
QAxScript::registerEngine().
This function can only be called once for each QAxScript object,
@@ -707,19 +707,19 @@ bool QAxScript::load(const QString &code, const QString &language)
{
if (script_engine || code.isEmpty())
return false;
-
+
script_code = code;
QString lang = language;
if (lang.isEmpty()) {
if (code.contains(QLatin1String("End Sub"), Qt::CaseInsensitive))
lang = QLatin1String("VBScript");
-
+
QList<QAxEngineDescriptor>::ConstIterator it;
for (it = engines.begin(); it != engines.end(); ++it) {
QAxEngineDescriptor engine = *it;
if (engine.code.isEmpty())
continue;
-
+
if (code.contains(engine.code)) {
lang = engine.name;
break;
@@ -728,18 +728,18 @@ bool QAxScript::load(const QString &code, const QString &language)
}
if (lang.isEmpty())
lang = QLatin1String("JScript");
-
+
script_engine = new QAxScriptEngine(lang, this);
// trigger call to initialize
script_engine->metaObject();
-
+
return script_engine->isValid();
}
/*!
Returns a list of all the functions in this script if the respective
script engine supports introspection; otherwise returns an empty list.
- The functions are either provided with full prototypes or only as
+ The functions are either provided with full prototypes or only as
names, depending on the value of \a flags.
\sa QAxScriptEngine::hasIntrospection()
@@ -747,7 +747,7 @@ bool QAxScript::load(const QString &code, const QString &language)
QStringList QAxScript::functions(FunctionFlags flags) const
{
QStringList functions;
-
+
const QMetaObject *mo = script_engine->metaObject();
for (int i = mo->methodOffset(); i < mo->methodCount(); ++i) {
const QMetaMethod slot(mo->method(i));
@@ -756,21 +756,21 @@ QStringList QAxScript::functions(FunctionFlags flags) const
QString slotname = QString::fromLatin1(slot.methodSignature());
if (slotname.contains(QLatin1Char('_')))
continue;
-
+
if (flags == FunctionSignatures)
functions << slotname;
else
functions << slotname.left(slotname.indexOf(QLatin1Char('(')));
}
-
+
return functions;
}
/*!
- Calls \a function, passing the parameters \a var1, \a var1,
+ Calls \a function, passing the parameters \a var1, \a var1,
\a var2, \a var3, \a var4, \a var5, \a var6, \a var7 and \a var8
- as arguments and returns the value returned by the function, or an
- invalid QVariant if the function does not return a value or when
+ as arguments and returns the value returned by the function, or an
+ invalid QVariant if the function does not return a value or when
the function call failed.
See QAxScriptManager::call() for more information about how to call
@@ -787,7 +787,7 @@ QVariant QAxScript::call(const QString &function, const QVariant &var1,
{
if (!script_engine)
return QVariant();
-
+
return script_engine->dynamicCall(function.toLatin1(), var1, var2, var3, var4, var5, var6, var7, var8);
}
@@ -804,7 +804,7 @@ QVariant QAxScript::call(const QString &function, QList<QVariant> &arguments)
{
if (!script_engine)
return QVariant();
-
+
return script_engine->dynamicCall(function.toLatin1(), arguments);
}
@@ -815,7 +815,7 @@ void QAxScript::updateObjects()
{
if (!script_manager)
return;
-
+
script_manager->updateScript(this);
}
@@ -826,7 +826,7 @@ QAxBase *QAxScript::findObject(const QString &name)
{
if (!script_manager)
return 0;
-
+
return script_manager->d->objectDict.value(name);
}
@@ -844,7 +844,7 @@ QAxBase *QAxScript::findObject(const QString &name)
/*! \fn QAxScriptEngine* QAxScript::scriptEngine() const
Returns a pointer to the script engine.
- You can use the object returned to connect signals to the
+ You can use the object returned to connect signals to the
script functions, or to access the script engine directly.
*/
@@ -899,9 +899,9 @@ QAxBase *QAxScript::findObject(const QString &name)
and script code.
\inmodule QAxContainer
- The QAxScriptManager acts as a bridge between the COM objects embedded
- in the Qt application through QAxObject or QAxWidget, and the scripting
- languages available through the Windows Script technologies, usually JScript
+ The QAxScriptManager acts as a bridge between the COM objects embedded
+ in the Qt application through QAxObject or QAxWidget, and the scripting
+ languages available through the Windows Script technologies, usually JScript
and VBScript.
Create one QAxScriptManager for each separate document in your
@@ -940,19 +940,19 @@ QAxScriptManager::~QAxScriptManager()
Returns a list with all the functions that are available.
Functions provided by script engines that don't support
introspection are not included in the list.
- The functions are either provided with full prototypes or
+ The functions are either provided with full prototypes or
only as names, depending on the value of \a flags.
*/
QStringList QAxScriptManager::functions(QAxScript::FunctionFlags flags) const
{
QStringList functions;
-
+
QHash<QString, QAxScript*>::ConstIterator scriptIt;
for (scriptIt = d->scriptDict.begin(); scriptIt != d->scriptDict.end(); ++scriptIt) {
QAxScript *script = scriptIt.value();
functions += script->functions(flags);
}
-
+
return functions;
}
@@ -962,19 +962,19 @@ QStringList QAxScriptManager::functions(QAxScript::FunctionFlags flags) const
QStringList QAxScriptManager::scriptNames() const
{
QStringList scripts;
-
+
QHash<QString, QAxScript*>::ConstIterator scriptIt;
for (scriptIt = d->scriptDict.begin(); scriptIt != d->scriptDict.end(); ++scriptIt) {
scripts << scriptIt.key();
}
-
+
return scripts;
}
/*!
Returns the script called \a name.
- You can use the returned pointer to call functions directly
+ You can use the returned pointer to call functions directly
through QAxScript::call(), to access the script engine directly, or
to delete and thus unload the script.
*/
@@ -996,7 +996,7 @@ void QAxScriptManager::addObject(QAxBase *object)
QString name = obj->objectName();
if (d->objectDict.contains(name))
return;
-
+
d->objectDict.insert(name, object);
connect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(objectDestroyed(QObject*)));
}
@@ -1028,7 +1028,7 @@ void QAxScriptManager::addObject(QAxBase *object)
before loading any scripts. If \a code declares a function that is
already available (no matter in which language) the first function
is overloaded and can no longer be called via call(); but it will
- still be available by calling its \link script() script \endlink
+ still be available by calling its \link script() script \endlink
directly.
\sa addObject(), scriptNames(), functions()
@@ -1038,7 +1038,7 @@ QAxScript *QAxScriptManager::load(const QString &code, const QString &name, cons
QAxScript *script = new QAxScript(name, this);
if (script->load(code, language))
return script;
-
+
delete script;
return 0;
}
@@ -1066,10 +1066,10 @@ QAxScript *QAxScriptManager::load(const QString &file, const QString &name)
QByteArray data = f.readAll();
QString contents = QString::fromLocal8Bit(data, data.size());
f.close();
-
+
if (contents.isEmpty())
return 0;
-
+
QString language;
if (file.endsWith(QLatin1String(".js"))) {
language = QLatin1String("JScript");
@@ -1079,46 +1079,46 @@ QAxScript *QAxScriptManager::load(const QString &file, const QString &name)
QAxEngineDescriptor engine = *it;
if (engine.extension.isEmpty())
continue;
-
+
if (file.endsWith(engine.extension)) {
language = engine.name;
break;
}
}
}
-
+
if (language.isEmpty())
language = QLatin1String("VBScript");
-
+
QAxScript *script = new QAxScript(name, this);
if (script->load(contents, language))
return script;
-
+
delete script;
return 0;
}
/*!
- Calls \a function, passing the parameters \a var1, \a var1,
+ Calls \a function, passing the parameters \a var1, \a var1,
\a var2, \a var3, \a var4, \a var5, \a var6, \a var7 and \a var8
- as arguments and returns the value returned by the function, or an
- invalid QVariant if the function does not return a value or when
+ as arguments and returns the value returned by the function, or an
+ invalid QVariant if the function does not return a value or when
the function call failed. The call returns when the script's
execution has finished.
In most script engines the only supported parameter type is "const
QVariant&", for example, to call a JavaScript function
- \snippet doc/src/snippets/code/src_activeqt_container_qaxscript.cpp 0
+ \snippet src_activeqt_container_qaxscript.cpp 0
use
- \snippet doc/src/snippets/code/src_activeqt_container_qaxscript.cpp 1
- As with \link QAxBase::dynamicCall() dynamicCall \endlink the
+ \snippet src_activeqt_container_qaxscript.cpp 1
+ As with \link QAxBase::dynamicCall() dynamicCall \endlink the
parameters can directly be embedded in the function string.
- \snippet doc/src/snippets/code/src_activeqt_container_qaxscript.cpp 2
+ \snippet src_activeqt_container_qaxscript.cpp 2
However, this is slower.
Functions provided by script engines that don't support
introspection are not available and must be called directly
- using QAxScript::call() on the respective \link script()
+ using QAxScript::call() on the respective \link script()
script \endlink object.
Note that calling this function can be significantely slower than
@@ -1141,7 +1141,7 @@ QVariant QAxScriptManager::call(const QString &function, const QVariant &var1,
#endif
return QVariant();
}
-
+
return s->call(function, var1, var2, var3, var4, var5, var6, var7, var8);
}
@@ -1160,7 +1160,7 @@ QVariant QAxScriptManager::call(const QString &function, QList<QVariant> &argume
#endif
return QVariant();
}
-
+
QList<QVariant> args(arguments);
return s->call(function, args);
}
@@ -1177,17 +1177,17 @@ bool QAxScriptManager::registerEngine(const QString &name, const QString &extens
{
if (name.isEmpty())
return false;
-
+
CLSID clsid;
HRESULT hres = CLSIDFromProgID((wchar_t*)name.utf16(), &clsid);
if (hres != S_OK)
return false;
-
+
QAxEngineDescriptor engine;
engine.name = name;
engine.extension = extension;
engine.code = code;
-
+
engines.prepend(engine);
return true;
}
@@ -1201,18 +1201,18 @@ QString QAxScriptManager::scriptFileFilter()
QString allFiles = QLatin1String("Script Files (*.js *.vbs *.dsm");
QString specialFiles = QLatin1String(";;VBScript Files (*.vbs *.dsm)"
";;JavaScript Files (*.js)");
-
+
QList<QAxEngineDescriptor>::ConstIterator it;
for (it = engines.begin(); it != engines.end(); ++it) {
QAxEngineDescriptor engine = *it;
if (engine.extension.isEmpty())
continue;
-
+
allFiles += QLatin1String(" *") + engine.extension;
specialFiles += QLatin1String(";;") + engine.name + QLatin1String(" Files (*") + engine.extension + QLatin1Char(')');
}
allFiles += QLatin1Char(')');
-
+
return allFiles + specialFiles + QLatin1String(";;All Files (*.*)");
}
@@ -1233,7 +1233,7 @@ QString QAxScriptManager::scriptFileFilter()
/*!
\internal
- Returns a pointer to the first QAxScript that knows
+ Returns a pointer to the first QAxScript that knows
about \a function, or 0 if this function is unknown.
*/
QAxScript *QAxScriptManager::scriptForFunction(const QString &function) const
@@ -1243,23 +1243,23 @@ QAxScript *QAxScriptManager::scriptForFunction(const QString &function) const
QHash<QString, QAxScript*>::ConstIterator scriptIt;
for (scriptIt = d->scriptDict.begin(); scriptIt != d->scriptDict.end(); ++scriptIt) {
QAxScript *script = scriptIt.value();
-
+
if (script->functions(QAxScript::FunctionSignatures).contains(function))
return script;
}
}
-
+
QString funcName = function;
funcName = funcName.left(funcName.indexOf(QLatin1Char('(')));
// second try, checking only names, not prototypes
QHash<QString, QAxScript*>::ConstIterator scriptIt;
for (scriptIt = d->scriptDict.begin(); scriptIt != d->scriptDict.end(); ++scriptIt) {
QAxScript *script = scriptIt.value();
-
+
if (script->functions(QAxScript::FunctionNames).contains(funcName))
return script;
}
-
+
return 0;
}
@@ -1271,7 +1271,7 @@ void QAxScriptManager::updateScript(QAxScript *script)
QHash<QString, QAxBase*>::ConstIterator objectIt;
for (objectIt = d->objectDict.constBegin(); objectIt != d->objectDict.constEnd(); ++objectIt) {
QString name = objectIt.key();
-
+
QAxScriptEngine *engine = script->scriptEngine();
if (engine)
engine->addItem(name);
diff --git a/src/activeqt/container/qaxselect.cpp b/src/activeqt/container/qaxselect.cpp
index d4b2ab7..abfdf76 100644
--- a/src/activeqt/container/qaxselect.cpp
+++ b/src/activeqt/container/qaxselect.cpp
@@ -51,7 +51,7 @@ class ControlList : public QAbstractListModel
{
public:
ControlList(QObject *parent=0)
- : QAbstractListModel(parent)
+ : QAbstractListModel(parent)
{
HKEY classes_key;
RegOpenKeyEx(HKEY_CLASSES_ROOT, L"CLSID", 0, KEY_READ, &classes_key);
@@ -102,7 +102,7 @@ public:
int rowCount(const QModelIndex & = QModelIndex()) const { return controls.count(); }
QVariant data(const QModelIndex &index, int role) const;
-
+
private:
QStringList controls;
QMap<QString, QString> clsids;
@@ -131,7 +131,7 @@ QVariant ControlList::data(const QModelIndex &index, int role) const
components of the system and select one. The CLSID of the selected component can
then be used in the application to e.g. initialize a QAxWidget:
- \snippet doc/src/snippets/code/src_activeqt_container_qaxselect.cpp 0
+ \snippet src_activeqt_container_qaxselect.cpp 0
\sa QAxWidget, {ActiveQt Framework}
*/
diff --git a/src/activeqt/control/control.pro b/src/activeqt/control/control.pro
index 4bafbca..dfe86ea 100644
--- a/src/activeqt/control/control.pro
+++ b/src/activeqt/control/control.pro
@@ -1,4 +1,4 @@
-TARGET = QAxServer
+TARGET = QtAxServer
QT += core-private gui-private widgets axbase
CONFIG += static
@@ -21,10 +21,7 @@ SOURCES = qaxserver.cpp \
MODULE = axserver
MODULE_DEFINES = QAXSERVER
-MODULE_CONFIG = idcidl
+MODULE_CONFIG = idcidl force_import_plugins
CONFIG += no_module_headers
load(qt_module)
-# QtActiveQt is too inconsistent with other Qt modules
-# to use the generic cmake config files generator
-CONFIG -= create_cmake
DEFINES -= QT_NO_CAST_TO_ASCII QT_USE_QSTRINGBUILDER
diff --git a/src/activeqt/control/qaxbindable.cpp b/src/activeqt/control/qaxbindable.cpp
index ed4b938..e867eb8 100644
--- a/src/activeqt/control/qaxbindable.cpp
+++ b/src/activeqt/control/qaxbindable.cpp
@@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE
\l{moc}{meta-object compiler} requires you to inherit from
QWidget first.
- \snippet doc/src/snippets/code/src_activeqt_control_qaxbindable.cpp 0
+ \snippet src_activeqt_control_qaxbindable.cpp 0
When implementing the property write function, use
requestPropertyChange() to get permission from the ActiveX client
@@ -107,7 +107,7 @@ QAxBindable::~QAxBindable()
This function is usually called first in the write function for \a
property, and writing is abandoned if the function returns false.
- \snippet doc/src/snippets/code/src_activeqt_control_qaxbindable.cpp 1
+ \snippet src_activeqt_control_qaxbindable.cpp 1
\sa propertyChanged()
*/
@@ -197,7 +197,7 @@ void QAxBindable::reportError(int code, const QString &src, const QString &desc,
writeData(). The default implementation does nothing and returns
false.
- \warning ActiveX controls embedded in HTML can use either the
+ \warning ActiveX controls embedded in HTML can use either the
\c type and \c data attribute of the \c object tag to read data,
or use a list of \c param tags to initialize properties. If
\c param tags are used, then Internet Explorer will ignore the
@@ -271,7 +271,7 @@ bool QAxBindable::writeData(QIODevice *sink)
support the interface \a iid. Note that you must cast the \c
this pointer to the appropriate superclass.
- \snippet doc/src/snippets/code/src_activeqt_control_qaxbindable.cpp 2
+ \snippet src_activeqt_control_qaxbindable.cpp 2
Return the standard COM results \c S_OK (interface is supported)
or \c E_NOINTERFACE (requested interface is not supported).
@@ -290,7 +290,7 @@ bool QAxBindable::writeData(QIODevice *sink)
delegate calls to \c QueryInterface(), \c AddRef(), and \c
Release() to the interface provided by this function.
- \snippet doc/src/snippets/code/src_activeqt_control_qaxbindable.cpp 3
+ \snippet src_activeqt_control_qaxbindable.cpp 3
Instead of declaring and implementing these three functions
manually, you can use the \c QAXAGG_IUNKNOWN macro in the class
diff --git a/src/activeqt/control/qaxfactory.cpp b/src/activeqt/control/qaxfactory.cpp
index 0c92da0..6305cf8 100644
--- a/src/activeqt/control/qaxfactory.cpp
+++ b/src/activeqt/control/qaxfactory.cpp
@@ -64,20 +64,20 @@ extern wchar_t qAxModuleFilename[MAX_PATH];
the pure virtual functions in any implementation file (e.g. main.cpp), and export
the factory using the \c QAXFACTORY_EXPORT() macro.
- \snippet doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp 0
+ \snippet src_activeqt_control_qaxfactory.cpp 0
If you use the \c Q_CLASSINFO() macro to provide the unique
identifiers or other attributes for your class you can use the \c
QAXFACTORY_BEGIN(), \c QAXCLASS() and \c QAXFACTORY_END() macros to
expose one or more classes as COM objects.
- \snippet doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp 1
+ \snippet src_activeqt_control_qaxfactory.cpp 1
If your server supports just a single COM object, you can use
a default factory implementation through the \c QAXFACTORY_DEFAULT() macro.
- \snippet doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp 2
+ \snippet src_activeqt_control_qaxfactory.cpp 2
Only one QAxFactory implementation may be instantiated and
exported by an ActiveX server application. This instance is accessible
@@ -230,7 +230,7 @@ QUuid QAxFactory::eventsID(const QString &key) const
e.g. implemented categories, can be added in an implementation of
this function.
- \snippet doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp 3
+ \snippet src_activeqt_control_qaxfactory.cpp 3
If you reimplement this function you must also reimplement
unregisterClass() to remove the additional registry values.
@@ -247,7 +247,7 @@ void QAxFactory::registerClass(const QString &key, QSettings *settings) const
Unregisters any additional values for the class \a key from the
system registry using the \a settings object.
- \snippet doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp 4
+ \snippet src_activeqt_control_qaxfactory.cpp 4
\sa registerClass(), QSettings
*/
@@ -354,7 +354,7 @@ extern bool qAxIsServer;
Returns true if the application has been started (by COM) as an ActiveX
server, otherwise returns false.
- \snippet doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp 5
+ \snippet src_activeqt_control_qaxfactory.cpp 5
*/
bool QAxFactory::isServer()
@@ -426,9 +426,9 @@ bool QAxFactory::isService() const
The server is started automatically with \a type set to \c MultipleInstances
if the server executable has been started with the \c -activex
- command line parameter. To switch to SingleInstance, call
-
- \snippet doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp 6
+ command line parameter. To switch to SingleInstance, call
+
+ \snippet src_activeqt_control_qaxfactory.cpp 6
in your own main() entry point function.
*/
@@ -519,7 +519,7 @@ bool QAxFactory::registerActiveObject(QObject *object)
and if the server is an executable server then it will have the application id
\a AppID.
- \snippet doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp 7
+ \snippet src_activeqt_control_qaxfactory.cpp 7
\sa QAXFACTORY_EXPORT(), QAXFACTORY_BEGIN()
*/
@@ -533,7 +533,7 @@ bool QAxFactory::registerActiveObject(QObject *object)
and if the server is an executable server then it will have the application id
\a AppID.
- \snippet doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp 8
+ \snippet src_activeqt_control_qaxfactory.cpp 8
\sa QAXFACTORY_BEGIN()
*/
@@ -552,7 +552,7 @@ bool QAxFactory::registerActiveObject(QObject *object)
This macro needs to be used together with the QAXCLASS(), QAXTYPE()
and QAXFACTORY_END() macros.
- \snippet doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp 9
+ \snippet src_activeqt_control_qaxfactory.cpp 9
*/
/*!
diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp
index 37e607c..73a7679 100644
--- a/src/activeqt/control/qaxserverbase.cpp
+++ b/src/activeqt/control/qaxserverbase.cpp
@@ -878,6 +878,11 @@ public:
qax_hhook = SetWindowsHookEx(WH_GETMESSAGE, axs_FilterProc, 0, GetCurrentThreadId());
}
+ // If we created QApplication instance, ensure native event loop starts properly
+ // by calling processEvents.
+ if (qax_ownQApp)
+ qApp->processEvents();
+
HRESULT res;
// Create the ActiveX wrapper - aggregate if requested
if (pUnkOuter) {
@@ -1390,8 +1395,8 @@ LRESULT QT_WIN_CALLBACK QAxServerBase::ActiveXProc(HWND hWnd, UINT uMsg, WPARAM
nativeResourceForWindow("handle", widgetWindow));
if (h)
::SetParent(h, that->m_hWnd);
- Qt::WindowFlags flags = widgetWindow->windowFlags();
- widgetWindow->setWindowFlags(flags | Qt::FramelessWindowHint);
+ Qt::WindowFlags flags = widgetWindow->flags();
+ widgetWindow->setFlags(flags | Qt::FramelessWindowHint);
}
}
that->qt.widget->raise();
diff --git a/src/activeqt/doc/activeqt.qdocconf b/src/activeqt/doc/activeqt.qdocconf
new file mode 100644
index 0000000..32dca1e
--- /dev/null
+++ b/src/activeqt/doc/activeqt.qdocconf
@@ -0,0 +1,44 @@
+include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
+
+project = ActiveQt
+description = ActiveQt
+url = http://qt-project.org/doc/activeqt
+version = 5.0.1
+
+examplesinstallpath =
+
+qhp.projects = ActiveQt
+
+qhp.ActiveQt.file = activeqt.qhp
+qhp.ActiveQt.namespace = org.qt-project.activeqt.500
+qhp.ActiveQt.virtualFolder = activeqt
+qhp.ActiveQt.indexTitle = Active Qt
+qhp.ActiveQt.indexRoot =
+
+qhp.ActiveQt.filterAttributes = activeqt 5.0.1 qtrefdoc
+qhp.ActiveQt.customFilters.Qt.name = activeqt 5.0.1
+qhp.ActiveQt.customFilters.Qt.filterAttributes = activeqt 5.0.1
+
+qhp.ActiveQt.subprojects = qaxcontainerclasses qaxserverclasses
+qhp.ActiveQt.subprojects.qaxcontainerclasses.title = QAxContainer C++ Classes
+qhp.ActiveQt.subprojects.qaxcontainerclasses.indexTitle = QAxContainer C++ Classes
+qhp.ActiveQt.subprojects.qaxcontainerclasses.selectors = class fake:headerfile
+qhp.ActiveQt.subprojects.qaxcontainerclasses.sortPages = true
+
+qhp.ActiveQt.subprojects.qaxserverclasses.title = QAxServer C++ Classes
+qhp.ActiveQt.subprojects.qaxserverclasses.indexTitle = QAxServer C++ Classes
+qhp.ActiveQt.subprojects.qaxserverclasses.selectors = class fake:headerfile
+qhp.ActiveQt.subprojects.qaxserverclasses.sortPages = true
+
+tagfile = ../../../doc/activeqt/activeqt.tags
+
+depends += qtcore qtgui qtdoc
+
+headerdirs += ..
+
+sourcedirs += ..
+
+exampledirs += ../../../examples/ \
+ snippets
+
+imagedirs += images
diff --git a/src/activeqt/doc/snippets/doc_src_activeqt-dumpcpp.cpp b/src/activeqt/doc/snippets/doc_src_activeqt-dumpcpp.cpp
new file mode 100644
index 0000000..b2595d5
--- /dev/null
+++ b/src/activeqt/doc/snippets/doc_src_activeqt-dumpcpp.cpp
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+Outlook::Application *outlook = new Outlook::Application;
+//! [0]
+
+
+//! [1]
+Outlook::_NameSpace *session = outlook->Session();
+//! [1]
+
+
+//! [2]
+Outlook::NameSpace *session = outlook->Session();
+//! [2]
+
+
+//! [3]
+Outlook::_NameSpace *tmp = outlook->Session();
+Outlook::NameSpace *session = new Outlook::NameSpace(tmp);
+delete tmp; // or any other use of tmp: segfault
+//! [3]
+
+
+//! [4]
+Outlook::NameSpace *session = new Outlook::NameSpace(outlook->Session());
+//! [4]
diff --git a/doc/src/snippets/code/doc_src_examples_activeqt_dotnet.qdoc b/src/activeqt/doc/snippets/doc_src_examples_activeqt_dotnet.qdoc
index 8bbf1cb..8bbf1cb 100644
--- a/doc/src/snippets/code/doc_src_examples_activeqt_dotnet.qdoc
+++ b/src/activeqt/doc/snippets/doc_src_examples_activeqt_dotnet.qdoc
diff --git a/doc/src/snippets/code/doc_src_qaxcontainer.pro b/src/activeqt/doc/snippets/doc_src_qaxcontainer.pro
index d3a3c2d..d3a3c2d 100644
--- a/doc/src/snippets/code/doc_src_qaxcontainer.pro
+++ b/src/activeqt/doc/snippets/doc_src_qaxcontainer.pro
diff --git a/doc/src/snippets/code/doc_src_qaxserver.cpp b/src/activeqt/doc/snippets/doc_src_qaxserver.cpp
index 3ba3ce2..3ba3ce2 100644
--- a/doc/src/snippets/code/doc_src_qaxserver.cpp
+++ b/src/activeqt/doc/snippets/doc_src_qaxserver.cpp
diff --git a/doc/src/snippets/code/doc_src_qaxserver.pro b/src/activeqt/doc/snippets/doc_src_qaxserver.pro
index dcd3d38..dcd3d38 100644
--- a/doc/src/snippets/code/doc_src_qaxserver.pro
+++ b/src/activeqt/doc/snippets/doc_src_qaxserver.pro
diff --git a/doc/src/snippets/code/doc_src_qaxserver.qdoc b/src/activeqt/doc/snippets/doc_src_qaxserver.qdoc
index c50641b..c50641b 100644
--- a/doc/src/snippets/code/doc_src_qaxserver.qdoc
+++ b/src/activeqt/doc/snippets/doc_src_qaxserver.qdoc
diff --git a/doc/src/snippets/code/src_activeqt_container_qaxbase.cpp b/src/activeqt/doc/snippets/src_activeqt_container_qaxbase.cpp
index 2e2d91b..2e2d91b 100644
--- a/doc/src/snippets/code/src_activeqt_container_qaxbase.cpp
+++ b/src/activeqt/doc/snippets/src_activeqt_container_qaxbase.cpp
diff --git a/doc/src/snippets/code/src_activeqt_container_qaxscript.cpp b/src/activeqt/doc/snippets/src_activeqt_container_qaxscript.cpp
index b9df5d2..b9df5d2 100644
--- a/doc/src/snippets/code/src_activeqt_container_qaxscript.cpp
+++ b/src/activeqt/doc/snippets/src_activeqt_container_qaxscript.cpp
diff --git a/doc/src/snippets/code/src_activeqt_container_qaxselect.cpp b/src/activeqt/doc/snippets/src_activeqt_container_qaxselect.cpp
index 25e8599..25e8599 100644
--- a/doc/src/snippets/code/src_activeqt_container_qaxselect.cpp
+++ b/src/activeqt/doc/snippets/src_activeqt_container_qaxselect.cpp
diff --git a/doc/src/snippets/code/src_activeqt_control_qaxbindable.cpp b/src/activeqt/doc/snippets/src_activeqt_control_qaxbindable.cpp
index ae4d094..ae4d094 100644
--- a/doc/src/snippets/code/src_activeqt_control_qaxbindable.cpp
+++ b/src/activeqt/doc/snippets/src_activeqt_control_qaxbindable.cpp
diff --git a/doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp b/src/activeqt/doc/snippets/src_activeqt_control_qaxfactory.cpp
index 775998d..775998d 100644
--- a/doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp
+++ b/src/activeqt/doc/snippets/src_activeqt_control_qaxfactory.cpp
diff --git a/src/activeqt/doc/src/activeqt-dumpcpp.qdoc b/src/activeqt/doc/src/activeqt-dumpcpp.qdoc
new file mode 100644
index 0000000..34cee4c
--- /dev/null
+++ b/src/activeqt/doc/src/activeqt-dumpcpp.qdoc
@@ -0,0 +1,129 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page activeqt-dumpcpp.html
+ \title The dumpcpp Tool (ActiveQt)
+
+ \ingroup activeqt-tools
+
+ \keyword dumpcpp
+
+ The \c dumpcpp tool generates a C++ namespace for a type library.
+
+ To generate a C++ namespace for a type library, call \c dumpcpp with the
+ following command-line parameters:
+
+ \table
+ \header
+ \li Option
+ \li Result
+ \row
+ \li input
+ \li Generate documentation for \e input. \e input can specify a type library file or a type
+ library ID, or a CLSID or ProgID for an object
+ \row
+ \li -o file
+ \li Writes the class declaration to \e {file}.h and meta object infomation to \e {file}.cpp
+ \row
+ \li -n namespace
+ \li Generate a C++ namespace \e namespace
+ \row
+ \li -nometaobject
+ \li Do not generate a .cpp file with the meta object information.
+ The meta object is then generated in runtime.
+ \row
+ \li -getfile libid
+ \li Print the filename for the typelibrary \e libid to stdout
+ \row
+ \li -compat
+ \li Generate namespace with dynamicCall-compatible API
+ \row
+ \li -v
+ \li Print version information
+ \row
+ \li -h
+ \li Print help
+ \endtable
+
+ \c dumpcpp can be integrated into the \c qmake build system. In your .pro
+ file, list the type libraries you want to use in the TYPELIBS variable:
+
+ \snippet activeqt/qutlook/qutlook.pro 0
+
+ The generated namespace will declare all enumerations, as well as one QAxObject subclass
+ for each \c coclass and \c interface declared in the type library. coclasses marked with
+ the \c control attribute will be wrapped by a QAxWidget subclass.
+
+ Those classes that wrap creatable coclasses (i.e. coclasses that are not marked
+ as \c noncreatable) have a default constructor; this is typically a single class
+ of type \c Application.
+
+ \snippet doc_src_activeqt-dumpcpp.cpp 0
+
+ All other classes can only be created by passing an IDispatch interface pointer
+ to the constructor; those classes should however not be created explicitly.
+ Instead, use the appropriate API of already created objects.
+
+ \snippet doc_src_activeqt-dumpcpp.cpp 1
+
+ All coclass wrappers also have one constructors taking an interface wrapper class
+ for each interface implemented.
+
+ \snippet doc_src_activeqt-dumpcpp.cpp 2
+
+ You have to create coclasses to be able to connect to signals of the subobject.
+ Note that the constructor deletes the interface object, so the following will
+ cause a segmentation fault:
+
+ \snippet doc_src_activeqt-dumpcpp.cpp 3
+
+ If the return type is of a coclass or interface type declared in another
+ type library you have to include the namespace header for that other type
+ library before including the header for the namespace you want to use
+ (both header have to be generated with this tool).
+
+ By default, methods and property returning subobjects will use the type as in
+ the type library. The caller of the function is responsible for deleting or
+ reparenting the object returned. If the \c -compat switch is set, properties
+ and method returning a COM object have the return type \c IDispatch*, and
+ the namespace will not declare wrapper classes for interfaces.
+
+ In this case, create the correct wrapper class explicitly:
+
+ \snippet doc_src_activeqt-dumpcpp.cpp 4
+
+ You can of course use the IDispatch* returned directly, in which case you have to
+ call \c Release() when finished with the interface.
+
+ All classes in the namespace are tagged with a macro that allows you to export
+ or import them from a DLL. To do that, declare the macro to expand to
+ \c __declspec(dllimport/export) before including the header file.
+
+ To build the tool you must first build the QAxContainer library.
+ Then run your make tool in \c tools/dumpcpp.
+*/
diff --git a/src/activeqt/doc/src/activeqt-dumpdoc.qdoc b/src/activeqt/doc/src/activeqt-dumpdoc.qdoc
new file mode 100644
index 0000000..7005542
--- /dev/null
+++ b/src/activeqt/doc/src/activeqt-dumpdoc.qdoc
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page activeqt-dumpdoc.html
+ \title The dumpdoc Tool (ActiveQt)
+
+ \ingroup activeqt-tools
+
+ \keyword dumpdoc
+
+ The \c dumpdoc tool generates Qt-style documentation for any
+ COM object and writes it into the file specified.
+
+ Call \c dumpdoc with the following command line parameters:
+
+ \table
+ \header
+ \li Option
+ \li Result
+ \row
+ \li -o file
+ \li Writes output to \e file
+ \row
+ \li object
+ \li Generate documentation for \e object
+ \row
+ \li -v
+ \li Print version information
+ \row
+ \li -h
+ \li Print help
+ \endtable
+
+ \e object must be an object installed on the local machine (ie.
+ remote objects are not supported), and can include subobjects
+ accessible through properties, ie.
+ \c Outlook.Application/Session/CurrentUser
+
+ The generated file will be an HTML file using Qt documentation
+ style.
+
+ To build the tool you must first build the QAxContainer library.
+ Then run your make tool in \c tools/dumpdoc.
+*/
diff --git a/doc/src/activeqt.qdoc b/src/activeqt/doc/src/activeqt-index.qdoc
index 60d33b9..65ba218 100644
--- a/doc/src/activeqt.qdoc
+++ b/src/activeqt/doc/src/activeqt-index.qdoc
@@ -30,29 +30,26 @@
\title Tools for ActiveQt
\brief Tools to help integrate Qt applications with ActiveX components.
- These tools provide support for integrating Qt with ActiveX components.
-
- \generatelist{related}
+ The following tools enable Qt integration with the ActiveX components.
\sa {ActiveQt Framework}
*/
/*!
- \page activeqt.html
- \title Qt's ActiveX Framework (ActiveQt)
- \brief An overview of Qt's ActiveX and COM integration on Windows.
-
+ \page activeqt-index.html
\ingroup qt-activex
\keyword ActiveQt
\target ActiveQt Framework
+ \title Active Qt
+ \brief Provides ActiveX and COM integration on Windows
Qt's ActiveX and COM support allows Qt for Windows developers to:
- \list 1
+ \list
\li Access and use ActiveX controls and COM objects provided by any
ActiveX server in their Qt applications.
\li Make their Qt applications available as COM servers, with
- any number of Qt objects and widgets as COM objects and ActiveX
+ any number of Qt objects and widgets as COM objects and ActiveX
controls.
\endlist
@@ -76,7 +73,7 @@
A set of \l{Tools for ActiveQt}{tools} is provided to simplify the
developing and building of Qt projects that use ActiveX.
- To build the static libraries, change into the \c activeqt directory
+ To build the static libraries, change into the \c activeqt directory
(usually \c QTDIR/src/activeqt), and run \c qmake and your make
tool in both the \c container and the \c control subdirectory.
The libraries \c qaxcontainer.lib and \c qaxserver.lib will be linked
@@ -87,8 +84,31 @@
plugin that integrates the QAxContainer module into \l{Qt
Designer}.
- The ActiveQt modules are part of the \l{Qt Commercial Edition} and
- the \l{Open Source Versions of Qt}.
+ \section1 Articles and Guides
+ \list
+ \li \l{Tools for ActiveQt}
+ \li \l{Using ActiveX controls and COM in Qt}
+ \li \l{Building ActiveX servers in Qt}
+ \endlist
+
+ \section1 Reference
- \sa {QAxContainer Module}, {QAxServer Module}
+ \list
+ \li \l{QAxContainer C++ Classes}
+ \li \l{QAxServer C++ Classes}
+ \endlist
+
+ \section1 Examples
+ \list
+ \li \l{Multiple Example (ActiveQt)}
+ \li \l{Qutlook Example (ActiveQt)}
+ \li \l{COM App Example (ActiveQt)}
+ \li \l{Dot Net Example (ActiveQt)}
+ \li \l{OpenGL Example (ActiveQt)}
+ \li \l{Hierarchy Example (ActiveQt)}
+ \li \l{Menus Example (ActiveQt)}
+ \li \l{Wrapper Example (ActiveQt)}
+ \li \l{Simple Example (ActiveQt)}
+ \li \l{Web Browser Example (ActiveQt)}
+ \endlist
*/
diff --git a/doc/src/examples/dotnet.qdoc b/src/activeqt/doc/src/examples/dotnet.qdoc
index 2f522c1..fc66b4f 100644
--- a/doc/src/examples/dotnet.qdoc
+++ b/src/activeqt/doc/src/examples/dotnet.qdoc
@@ -29,7 +29,7 @@
\page activeqt-dotnet.html
\title Dot Net Example (ActiveQt)
- The Dot Net example demonstrates how Qt objects can be used in a
+ \brief The Dot Net example demonstrates how Qt objects can be used in a
.NET environment, and how .NET objects can be used in a Qt
environment.
@@ -97,7 +97,7 @@
\b{Remark:} You will notice that in the generated code the following line is
commented out:
- \snippet doc/src/snippets/code/doc_src_examples_activeqt_dotnet.qdoc 0
+ \snippet doc_src_examples_activeqt_dotnet.qdoc 0
This line is regenerated without comment whenever you change the
dialog, in which case you have to comment it out again to be able
@@ -114,14 +114,14 @@
managed .NET application, whether written in C#, VB.NET, MC++ or other
managed programming language.
- \snippet examples/activeqt/dotnet/wrapper/lib/worker.h 0
+ \snippet activeqt/dotnet/wrapper/lib/worker.h 0
The Qt class has nothing unusual for Qt users, and as even the Qt
specialities like \c Q_PROPERTY, \c slots and \c signals are
implemented with straight C++ they don't cause any trouble when
compiling this class with any C++ compiler.
- \snippet examples/activeqt/dotnet/wrapper/lib/networker.h 0
+ \snippet activeqt/dotnet/wrapper/lib/networker.h 0
The .NET wrapper class uses keywords that are part of MC++ to indicate
that the class is managed/garbage collected (\c {__gc}), and that \c
@@ -155,21 +155,21 @@
to the String object, even if it has been moved by the garbage
collector, and it can be used just like a normal pointer.
- \snippet examples/activeqt/dotnet/wrapper/lib/tools.cpp 0
+ \snippet activeqt/dotnet/wrapper/lib/tools.cpp 0
\codeline
- \snippet examples/activeqt/dotnet/wrapper/lib/tools.cpp 1
+ \snippet activeqt/dotnet/wrapper/lib/tools.cpp 1
The convertor functions can then be used in the wrapper class
implementation to call the functions in the native C++ class.
- \snippet examples/activeqt/dotnet/wrapper/lib/networker.cpp 0
+ \snippet activeqt/dotnet/wrapper/lib/networker.cpp 0
\codeline
- \snippet examples/activeqt/dotnet/wrapper/lib/networker.cpp 1
+ \snippet activeqt/dotnet/wrapper/lib/networker.cpp 1
The constructor and destructor simply create and destroy the Qt
object wrapped using the C++ operators \c new and \c delete.
- \snippet examples/activeqt/dotnet/wrapper/lib/networker.cpp 2
+ \snippet activeqt/dotnet/wrapper/lib/networker.cpp 2
The netWorker class delegates calls from the .NET code to the native
code. Although the transition between those two worlds implies a small
@@ -177,7 +177,7 @@
this should be negligible since we are anyway going to run within the
CLR.
- \snippet examples/activeqt/dotnet/wrapper/lib/networker.cpp 3
+ \snippet activeqt/dotnet/wrapper/lib/networker.cpp 3
The property setter calls the native Qt class before firing the
event using the \c __raise keyword.
@@ -185,10 +185,10 @@
This wrapper class can now be used in .NET code, e.g. using C++, C#,
Visual Basic or any other programming language available for .NET.
- \snippet examples/activeqt/dotnet/wrapper/main.cs 0
- \snippet examples/activeqt/dotnet/wrapper/main.cs 1
- \snippet examples/activeqt/dotnet/wrapper/main.cs 2
- \snippet examples/activeqt/dotnet/wrapper/main.cs 3
+ \snippet activeqt/dotnet/wrapper/main.cs 0
+ \snippet activeqt/dotnet/wrapper/main.cs 1
+ \snippet activeqt/dotnet/wrapper/main.cs 2
+ \snippet activeqt/dotnet/wrapper/main.cs 3
\section1 Walkthrough: .NET/COM Interop with ActiveQt
@@ -266,7 +266,7 @@
the event handler \c circleClicked for the \c ClickEvent to increase
the line width by one for every click:
- \snippet examples/activeqt/dotnet/walkthrough/Form1.cs 0
+ \snippet activeqt/dotnet/walkthrough/Form1.cs 0
In general we can implement a default event handler by double
clicking on the widget in the form, but the default events for
@@ -276,7 +276,7 @@
emitted by QPushButton. Add the event handler \c resetLineWidth to
the \c clicked event, and implement the generated function:
- \snippet examples/activeqt/dotnet/walkthrough/Form1.cs 1
+ \snippet activeqt/dotnet/walkthrough/Form1.cs 1
We reset the property to 1, and also call the \c setFocus() slot
to simulate the user style on Windows, where a button grabs focus
diff --git a/doc/src/examples/hierarchy-demo.qdocinc b/src/activeqt/doc/src/examples/hierarchy-demo.qdocinc
index 86bfd87..86bfd87 100644
--- a/doc/src/examples/hierarchy-demo.qdocinc
+++ b/src/activeqt/doc/src/examples/hierarchy-demo.qdocinc
diff --git a/doc/src/examples/multiple-demo.qdocinc b/src/activeqt/doc/src/examples/multiple-demo.qdocinc
index 339fc20..339fc20 100644
--- a/doc/src/examples/multiple-demo.qdocinc
+++ b/src/activeqt/doc/src/examples/multiple-demo.qdocinc
diff --git a/doc/src/examples/opengl-demo.qdocinc b/src/activeqt/doc/src/examples/opengl-demo.qdocinc
index ccc1452..ccc1452 100644
--- a/doc/src/examples/opengl-demo.qdocinc
+++ b/src/activeqt/doc/src/examples/opengl-demo.qdocinc
diff --git a/doc/src/examples/simple-demo.qdocinc b/src/activeqt/doc/src/examples/simple-demo.qdocinc
index 5eee8bc..5eee8bc 100644
--- a/doc/src/examples/simple-demo.qdocinc
+++ b/src/activeqt/doc/src/examples/simple-demo.qdocinc
diff --git a/doc/src/examples/wrapper-demo.qdocinc b/src/activeqt/doc/src/examples/wrapper-demo.qdocinc
index a00c505..a00c505 100644
--- a/doc/src/examples/wrapper-demo.qdocinc
+++ b/src/activeqt/doc/src/examples/wrapper-demo.qdocinc
diff --git a/doc/src/activeqt-container.qdoc b/src/activeqt/doc/src/qtaxcontainer.qdoc
index 0162e26..d8d6441 100644
--- a/doc/src/activeqt-container.qdoc
+++ b/src/activeqt/doc/src/qtaxcontainer.qdoc
@@ -24,6 +24,58 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+/*!
+ \module QAxContainer
+ \title QAxContainer C++ Classes
+ \ingroup modules
+
+ \brief The QAxContainer module is a Windows-only extension for
+ accessing ActiveX controls and COM objects.
+
+ QAxServer is part of the \l{Active Qt} module.
+ The \l{Using ActiveX controls and COM in Qt} page contains information about
+ containers for ActiveX controls.
+
+ \section1 License Information
+
+ The QAxContainer module is not covered by the \l{GNU General Public License (GPL)},
+ the \l{GNU Lesser General Public License (LGPL)}, or the
+ \l{Qt Commercial License}. Instead, it is distributed under
+ the following license.
+
+ \legalese
+ Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).\br
+ Contact: http://www.qt-project.org/legal\br
+
+ You may use this file under the terms of the BSD license as follows:
+
+ "Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+ of its contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+ \endlegalese
+*/
/*!
\page activeqt-container.html
@@ -67,7 +119,7 @@
To build Qt applications that can host COM objects and ActiveX controls
link the application against the QAxContainer module by adding
- \snippet doc/src/snippets/code/doc_src_qaxcontainer.pro 0
+ \snippet doc_src_qaxcontainer.pro 0
to your application's \c .pro file.
@@ -82,7 +134,7 @@
\section1 Instantiating COM Objects
To instantiate a COM object use the QAxBase::setControl() API, or pass
- the name of the object directly into the constructor of the QAxBase
+ the name of the object directly into the constructor of the QAxBase
subclass you are using.
The control can be specified in a variety of formats, but the fastest
@@ -94,7 +146,7 @@
\section2 Typical Error Messages
ActiveQt prints error messages to the debug output when it
- encounters error situations at runtime. Usually you must run
+ encounters error situations at runtime. Usually you must run
your program in the debugger to see these messages (e.g. in Visual
Studio's Debug output).
@@ -128,7 +180,7 @@
want to use, or integrate it into the build system by adding the type
libraries to the \c TYPELIBS variable in your application's \c .pro file:
- \snippet doc/src/snippets/code/doc_src_qaxcontainer.pro 1
+ \snippet doc_src_qaxcontainer.pro 1
Note that \l dumpcpp might not be able to expose all APIs in the type
library.
@@ -141,8 +193,8 @@
Use QAxBase::dynamicCall() and QAxBase::querySubObject() as well as
the QObject::setProperty() and QObject::property() APIs to call the
- methods and properties of the COM object through their name. Use the
- \l dumpdoc tool to get the documentation of the Qt API for any COM
+ methods and properties of the COM object through their name. Use the
+ \l dumpdoc tool to get the documentation of the Qt API for any COM
object and its subobjects; note that not all of the COM object's APIs
might be available.
@@ -154,12 +206,12 @@
The script engine can then run script code that accesses the COM objects.
To instantiate a script engine, use QAxScriptManager::addObject() to
- register the COM objects you want to access from script, and
+ register the COM objects you want to access from script, and
QAxScriptManager::load() to load the script code into the engine. Then
- call the script functions using QAxScriptManager::call() or
+ call the script functions using QAxScriptManager::call() or
QAxScript::call().
- Which APIs of the COM object are available through scripting depends on
+ Which APIs of the COM object are available through scripting depends on
the script language used.
The \l{testcon - An ActiveX Test Container (ActiveQt)}{ActiveX Test Container}
@@ -168,7 +220,7 @@
\section2 Calling a Function Using the Native COM Interfaces
To call functions of the COM object that can not be accessed via any
- of the above methods it is possible to request the COM interface directly
+ of the above methods it is possible to request the COM interface directly
using QAxBase::queryInterface(). To get a C++ definition of the respective
interface classes use the \c #import directive with the type library
provided with the control; see your compiler manual for details.
@@ -176,7 +228,7 @@
\section2 Typical Error Messages
ActiveQt prints error messages to the debug output when it
- encounters error situations at runtime. Usually you must run
+ encounters error situations at runtime. Usually you must run
your program in the debugger to see these messages (e.g. in Visual
Studio's Debug output).
@@ -193,13 +245,13 @@
\section3 Error calling IDispatch member: Type mismatch in parameter n
A QAxBase::dynamicCall() failed - the function prototype was correct,
- but the paramter at index \c n was of the wrong type and could
+ but the paramter at index \c n was of the wrong type and could
not be coerced to the correct type.
\section3 QAxScriptManager::call(): No script provides this function
You try to call a function that is provided through an engine
- that doesn't provide introspection (ie. ActivePython or
+ that doesn't provide introspection (ie. ActivePython or
ActivePerl). You need to call the function directly on the
respective QAxScript object.
*/
diff --git a/doc/src/activeqt-server.qdoc b/src/activeqt/doc/src/qtaxserver.qdoc
index 285a74c..eb1b2f0 100644
--- a/doc/src/activeqt-server.qdoc
+++ b/src/activeqt/doc/src/qtaxserver.qdoc
@@ -26,6 +26,59 @@
****************************************************************************/
/*!
+ \module QAxServer
+ \title QAxServer C++ Classes
+ \ingroup modules
+
+ \brief The QAxServer module is a Windows-only static library that
+ you can use to turn a standard Qt binary into a COM server.
+
+ QAxServer is part of the \l{Active Qt} module. The
+ \l{Building ActiveX servers in Qt} page contains information about
+ turning a Qt binary into a COM server
+
+ \section1 License Information
+
+ The QAxContainer module is not covered by the \l{GNU General Public License (GPL)},
+ the \l{GNU Lesser General Public License (LGPL)}, or the
+ \l{Qt Commercial License}. Instead, it is distributed under
+ the following license.
+
+ \legalese
+ Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).\br
+ Contact: http://www.qt-project.org/legal\br
+
+ You may use this file under the terms of the BSD license as follows:
+
+ "Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+ of its contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+ \endlegalese
+*/
+
+/*!
\page activeqt-server.html
\title Building ActiveX servers in Qt
\ingroup qt-activex
@@ -60,10 +113,10 @@
An out-of-process executable server is generated from a \c .pro
file like this:
- \snippet doc/src/snippets/code/doc_src_qaxserver.pro 0
+ \snippet doc_src_qaxserver.pro 0
To build an in-process server, use a \c .pro file like this:
- \snippet doc/src/snippets/code/doc_src_qaxserver.pro 1
+ \snippet doc_src_qaxserver.pro 1
The files \c qaxserver.rc and \c qaxserver.def are part of the
framework and can be used from their usual location (specify a
@@ -91,7 +144,7 @@
Additionally you can specify a version number using the \c VERSION
variable, e.g.
- \snippet doc/src/snippets/code/doc_src_qaxserver.pro 2
+ \snippet doc_src_qaxserver.pro 2
The version number specified will be used as the version of the type
library and of the server when registering.
@@ -100,7 +153,7 @@
Whether your COM server should run as a stand-alone executable
or as a shared library in the client process depends mainly on the
- type of COM objects you want to provide in the server.
+ type of COM objects you want to provide in the server.
An executable server has the advantage of being able to run as a
stand-alone application, but adds considerable overhead to the
@@ -113,7 +166,7 @@
time. The communication between client and server is done directly
through virtual function calls and does not introduce the overhead
required for remote procedure calls. However, if the server crashes the
- client application is likely to crash as well, and not every
+ client application is likely to crash as well, and not every
functionality is available for in-process servers (i.e. register in
the COM's running-object-table).
@@ -122,7 +175,7 @@
\section2 Typical Errors During the Post-Build Steps
- For the ActiveQt specific post-processing steps to work the
+ For the ActiveQt specific post-processing steps to work the
server has to meet some requirements:
\list
@@ -131,19 +184,19 @@
\li The initial linking of the server includes a temporary type
library resource
\li All dependencies required to run the server are in the system path
- (or in the path used by the calling environment; note that Visual
+ (or in the path used by the calling environment; note that Visual
Studio has its own set of environment variables listed in the
Tools|Options|Directories dialog).
\endlist
- If those requirements are not met one ore more of the following
+ If those requirements are not met one ore more of the following
errors are likely to occur:
\section3 The Server Executable Crashes
To generate the IDL the widgets exposed as ActiveX controls need to
- be instantiated (the constructor is called). At this point, nothing
- else but a QApplication object exists. Your widget constructor must
+ be instantiated (the constructor is called). At this point, nothing
+ else but a QApplication object exists. Your widget constructor must
not rely on any other objects to be created, e.g. it should check for
null-pointers.
@@ -186,26 +239,26 @@
or any existing QObject subclass. If the class is a subclass of QWidget,
the COM object will be an ActiveX control.
- \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 3
+ \snippet doc_src_qaxserver.cpp 3
The Q_OBJECT macro is required to provide the meta object information
about the widget to the ActiveQt framework.
- \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 4
+ \snippet doc_src_qaxserver.cpp 4
Use the Q_CLASSINFO() macro to specify the COM identifiers for the COM
object. \c ClassID and \c InterfaceID are required, while \c EventsID is
only necessary when your object has signals. To generate these identifiers,
use system tools like \c uuidgen or \c guidgen.
- You can specify additional attributes for each of your classes; see
+ You can specify additional attributes for each of your classes; see
\l{Class Information and Tuning} for details.
- \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 5
+ \snippet doc_src_qaxserver.cpp 5
Use the Q_PROPERTY() macro to declare properties for the ActiveX control.
- Declare a standard constructor taking a parent object, and functions,
+ Declare a standard constructor taking a parent object, and functions,
signals and slots like for any QObject subclass.
\footnote
If a standard constructor is not present the compiler will issue
@@ -216,9 +269,9 @@
your implementation of QAxFactory::create.
\endfootnote
- \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 6
+ \snippet doc_src_qaxserver.cpp 6
- The ActiveQt framework will expose properties and public slots as ActiveX
+ The ActiveQt framework will expose properties and public slots as ActiveX
properties and methods, and signals as ActiveX events, and convert between
the Qt data types and the equivalent COM data types.
@@ -273,8 +326,8 @@
COM cannot marshal IPictureDisp accross process boundaries,
so QPixmap properties cannot be called for out-of-process servers. You
can however marshal the image data via e.g. temporary files. See the
- Microsoft
- \link http://support.microsoft.com/default.aspx?scid=kb;[LN];Q150034 KB article
+ Microsoft
+ \link http://support.microsoft.com/default.aspx?scid=kb;[LN];Q150034 KB article
Q150034 \endlink for more information.
\endfootnote
\row
@@ -393,7 +446,7 @@
\row
\li QRect&
\footnote
- OLE needs to marshal user defined types by reference (ByRef), and cannot
+ OLE needs to marshal user defined types by reference (ByRef), and cannot
marshal them by value (ByVal). This is why const-references and object
parameters are not supported for QRect, QSize and QPoint.
\endfootnote
@@ -416,7 +469,7 @@
\section2 Sub-Objects
COM objects can have multiple sub-objects that can represent a sub element
- of the COM object. A COM object representing a multi-document spread sheet
+ of the COM object. A COM object representing a multi-document spread sheet
application can for example provide one sub-object for each spread sheet.
Any QObject subclass can be used as the type for a sub object in ActiveX, as
@@ -428,38 +481,38 @@
To make the properties bindable for the ActiveX client, use multiple
inheritance from the QAxBindable class:
- \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 7
+ \snippet doc_src_qaxserver.cpp 7
When implementing the property write functions, use the
QAxBindable class's requestPropertyChange() and propertyChanged()
functions to allow ActiveX clients to bind to the control
- properties.
- \footnote
- This is not required, but gives the client more control over
+ properties.
+ \footnote
+ This is not required, but gives the client more control over
the ActiveX control.
\endfootnote
\section1 Serving Controls
- To make a COM server available to the COM system it must be registered
- in the system registry using five unique identifiers.
- These identifiers are provided by tools like \c guidgen or \c uuidgen.
- The registration information allows COM to localize the binary providing
- a requested ActiveX control, marshall remote procedure calls to the
- control and read type information about the methods and properties exposed
+ To make a COM server available to the COM system it must be registered
+ in the system registry using five unique identifiers.
+ These identifiers are provided by tools like \c guidgen or \c uuidgen.
+ The registration information allows COM to localize the binary providing
+ a requested ActiveX control, marshall remote procedure calls to the
+ control and read type information about the methods and properties exposed
by the control.
- To create the COM object when the client asks for it the server must export
+ To create the COM object when the client asks for it the server must export
an implementation of a QAxFactory. The easist way to do this is to use a set
of macros:
- \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 8
+ \snippet doc_src_qaxserver.cpp 8
This will export \c MyWidget and \c MyWidget2 as COM objects that can be
created by COM clients, and will register \c MySubType as a type that can
be used in properties and parameters of \c MyWidget and \c MyWidget2.
- The \link QAxFactory QAxFactory class documentation \endlink explains
+ The \link QAxFactory QAxFactory class documentation \endlink explains
how to use this macro, and how to implement and use custom factories.
For out-of-process executable servers you can implement a main()
@@ -470,7 +523,7 @@
server. Use QAxFactory::isServer() to create and run a standard
application interface, or to prevent a stand-alone execution:
- \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 9
+ \snippet doc_src_qaxserver.cpp 9
This is however not necessary as ActiveQt provides a default implementation
of a main function. The default implemenation calls QAxFactory::startServer(),
@@ -498,7 +551,7 @@
\section2 Typical Compile-Time Problems
- The compiler/linker errors listed are based on those issued by the
+ The compiler/linker errors listed are based on those issued by the
Microsoft Visual C++ 6.0 compiler.
\section3 "No overloaded function takes 2 parameters"
@@ -512,13 +565,13 @@
macro, the QAxFactory subclass had no appropriate constructor.
Provide a public class constructor like
- \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 10
+ \snippet doc_src_qaxserver.cpp 10
for your factory class.
\section3 "Syntax error: bad suffix on number"
- The unique identifiers have not been passed as strings into the
+ The unique identifiers have not been passed as strings into the
QAXFACTORY_EXPORT() or QAXFACTORY_DEFAULT() macro.
\section3 "Unresolved external symbol _ucm_instantiate"
@@ -560,7 +613,7 @@
your installer process, resolve the \c DllRegisterServer symbol and
call the function:
- \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 11
+ \snippet doc_src_qaxserver.cpp 11
\section3 Distributing Servers over the Internet
@@ -578,11 +631,11 @@
other Online resources. The examples include INF files that can be used
to build CAB archives:
- \snippet examples/activeqt/simple/simple.inf 0
+ \snippet activeqt/simple/simple.inf 0
The CABARC tool from Microsoft can easily generate CAB archives:
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 12
+ \snippet doc_src_qaxserver.qdoc 12
The INF files assume a static build of Qt, so no dependencies to other DLLs
are listed in the INF files. To distribute an ActiveX server depending on
@@ -592,13 +645,13 @@
\section1 Using the Controls
To use the ActiveX controls, e.g. to embed them in a web page, use
- the \c <object> HTML tag.
+ the \c <object> HTML tag.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 13
+ \snippet doc_src_qaxserver.qdoc 13
To initialize the control's properties, use
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 14
+ \snippet doc_src_qaxserver.qdoc 14
If the web browser supports scripting use JavaScript, VBScript
and forms to script the control. The
@@ -612,7 +665,7 @@
\section3 Supported Clients
- These standard applications work with ActiveX controls developed with
+ These standard applications work with ActiveX controls developed with
ActiveQt. Note that some clients support only in-process controls.
\list
@@ -647,8 +700,8 @@
If the system is unable to start the server (check with the task
manager whether the server runs a process), make sure that no DLL
- the server depends on is missing from the system path (e.g. the Qt
- DLL!). Use a dependency walker to view all dependencies of the server
+ the server depends on is missing from the system path (e.g. the Qt
+ DLL!). Use a dependency walker to view all dependencies of the server
binary.
If the server runs (e.g. the task manager lists a process), see
@@ -657,7 +710,7 @@
\section3 The Object Cannot Be Created
If the server could be built and registered correctly during the build
- process, but the object cannot be initiliazed e.g. by the OLE/COM Object
+ process, but the object cannot be initiliazed e.g. by the OLE/COM Object
Viewer application, make sure that no DLL the server depends on is
missing from the system path (e.g. the Qt DLL). Use a dependency walker
to view all dependencies of the server binary.
@@ -667,16 +720,16 @@
\section2 Debugging Runtime Errors
- To debug an in-process server in Visual Studio, set the server project
+ To debug an in-process server in Visual Studio, set the server project
as the active project, and specify a client "executable for debug
- session" in the project settings (e.g. use the ActiveX Test Container).
- You can set breakpoints in your code, and also step into ActiveQt and
+ session" in the project settings (e.g. use the ActiveX Test Container).
+ You can set breakpoints in your code, and also step into ActiveQt and
Qt code if you installed the debug version.
To debug an executable server, run the application in a debugger
and start with the command line parameter \c -activex. Then start
- your client and create an instance of your ActiveX control. COM
- will use the existing process for the next client trying to create
+ your client and create an instance of your ActiveX control. COM
+ will use the existing process for the next client trying to create
an ActiveX control.
\section1 Class Information and Tuning
@@ -731,7 +784,7 @@
\row
\li Insertable
\li If the value is "yes" the class is registered to be "Insertable"
- and will be listed in OLE 2 containers (ie. Microsoft Office). This
+ and will be listed in OLE 2 containers (ie. Microsoft Office). This
attribute is not be set by default.
\row
\li Aggregatable
@@ -751,12 +804,12 @@
\row
\li MIME
\li The object can handle data and files of the format specified in the
- value. The value has the format mime:extension:description. Multiple
+ value. The value has the format mime:extension:description. Multiple
formats are separated by a semicolon.
\row
\li CoClassAlias
\li The classname used in the generated IDL and in the registry. This is
- esp. useful for C++ classes that live in a namespace - by default,
+ esp. useful for C++ classes that live in a namespace - by default,
ActiveQt just removes the "::" to make the IDL compile.
\endtable
@@ -766,13 +819,13 @@
own API, and is available in the "Insert Objects" dialog of Microsoft
Office applications.
- \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 15
+ \snippet doc_src_qaxserver.cpp 15
\section2 Developing Licensed Components
If you develop components you might want to control who is able to instantiate
- those components. Since the server binary can be shipped to and registered on
- any client machine it is possible for anybody to use those components in his
+ those components. Since the server binary can be shipped to and registered on
+ any client machine it is possible for anybody to use those components in his
own software.
Licensing components can be done using a variety of techniques, e.g. the code
@@ -782,35 +835,35 @@
To mark a Qt class as licensed specify a "LicenseKey" using the
Q_CLASSINFO() macro.
- \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 16
+ \snippet doc_src_qaxserver.cpp 16
The key is required to be able to create an instance of \c MyLicensedControl
- on a machine that is not licensed itself. The licensed developer can now
- redistributes the server binary with his application, which creates the control
+ on a machine that is not licensed itself. The licensed developer can now
+ redistributes the server binary with his application, which creates the control
using the value of "LicenseKey", while users of the application cannot create
the control without the license key.
- If a single license key for the control is not sufficient (ie. you want
- differnet developers to receive different license keys) you can specify an
- empty key to indicate that the control requires a license, and reimplement
- \l QAxFactory::validateLicenseKey() to verify that a license exists on the
+ If a single license key for the control is not sufficient (ie. you want
+ differnet developers to receive different license keys) you can specify an
+ empty key to indicate that the control requires a license, and reimplement
+ \l QAxFactory::validateLicenseKey() to verify that a license exists on the
system (ie. through a license file).
\section2 More Interfaces
- ActiveX controls provided by ActiveQt servers support a minimal set of COM
- interfaces to implement the OLE specifications. When the ActiveX class inherits
+ ActiveX controls provided by ActiveQt servers support a minimal set of COM
+ interfaces to implement the OLE specifications. When the ActiveX class inherits
from the QAxBindable class it can also implement additional COM interfaces.
Create a new subclass of QAxAggregated and use multiple inheritance
- to subclass additional COM interface classes.
+ to subclass additional COM interface classes.
- \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 17
+ \snippet doc_src_qaxserver.cpp 17
Reimplement the QAxAggregated::queryInterface() function to
support the additional COM interfaces.
- \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 18
+ \snippet doc_src_qaxserver.cpp 18
Since \c ISomeCOMInterface is a subclass of \c IUnknown you will
have to implement the \c QueryInterface(), \c AddRef(), and \c
@@ -820,7 +873,7 @@
returned by the QAxAggregated::controllingUnknown() function,
e.g.
- \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 19
+ \snippet doc_src_qaxserver.cpp 19
Do not support the \c IUnknown interface itself in your
\l{QAxAggregated::queryInterface()}{queryInterface()}
@@ -833,5 +886,5 @@
QAxBindable::createAggregate() to return a new object of the
QAxAggregated subclass.
- \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 20
+ \snippet doc_src_qaxserver.cpp 20
*/
diff --git a/src/src.pro b/src/src.pro
index 48eece3..f8c9d2c 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -1,4 +1,4 @@
TEMPLATE = subdirs
-
-SUBDIRS += activeqt tools
+SUBDIRS = activeqt
+win32: SUBDIRS += tools
CONFIG += ordered
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 82cce69..41abb07 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -1,4 +1,5 @@
TEMPLATE = subdirs
SUBDIRS += \
qaxobject \
- dumpcpp
+ dumpcpp \
+ cmake
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
new file mode 100644
index 0000000..4f15a69
--- /dev/null
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -0,0 +1,12 @@
+
+cmake_minimum_required(VERSION 2.8)
+
+project(qmake_cmake_files)
+
+enable_testing()
+
+find_package(Qt5Core REQUIRED)
+
+include("${_Qt5CTestMacros}")
+
+expect_pass(test_modules)
diff --git a/tests/auto/cmake/cmake.pro b/tests/auto/cmake/cmake.pro
new file mode 100644
index 0000000..bf2dbcb
--- /dev/null
+++ b/tests/auto/cmake/cmake.pro
@@ -0,0 +1,5 @@
+
+# Cause make to do nothing.
+TEMPLATE = subdirs
+
+CONFIG += ctest_testcase
diff --git a/tests/auto/cmake/test_modules/CMakeLists.txt b/tests/auto/cmake/test_modules/CMakeLists.txt
new file mode 100644
index 0000000..4336ad4
--- /dev/null
+++ b/tests/auto/cmake/test_modules/CMakeLists.txt
@@ -0,0 +1,7 @@
+
+cmake_minimum_required(VERSION 2.8)
+
+project(test_modules)
+
+add_subdirectory(server)
+add_subdirectory(container)
diff --git a/tests/auto/cmake/test_modules/container/CMakeLists.txt b/tests/auto/cmake/test_modules/container/CMakeLists.txt
new file mode 100644
index 0000000..6d04576
--- /dev/null
+++ b/tests/auto/cmake/test_modules/container/CMakeLists.txt
@@ -0,0 +1,24 @@
+
+cmake_minimum_required(VERSION 2.8)
+
+project(cmake_axcontainer)
+
+find_package(Qt5Core REQUIRED)
+find_package(Qt5Gui REQUIRED)
+find_package(Qt5Widgets REQUIRED)
+
+find_package(Qt5AxContainer REQUIRED)
+
+include_directories(
+ ${Qt5AxContainer_INCLUDE_DIRS}
+)
+
+add_definitions(${Qt5AxContainer_DEFINITIONS})
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}")
+
+add_executable(axcontainerapp axcontainer.cpp)
+
+target_link_libraries(axcontainerapp
+ ${Qt5AxContainer_LIBRARIES}
+)
diff --git a/tests/auto/cmake/test_modules/container/axcontainer.cpp b/tests/auto/cmake/test_modules/container/axcontainer.cpp
new file mode 100644
index 0000000..d8e8729
--- /dev/null
+++ b/tests/auto/cmake/test_modules/container/axcontainer.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the test suite 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qt_windows.h>
+#include <ActiveQt>
+#include <ActiveQt/ActiveQt>
+#include <ActiveQt/QAxWidget>
+#include <QAxWidget>
+
+int main(int argc, char **argv)
+{
+ QAxWidget w;
+}
diff --git a/tests/auto/cmake/test_modules/server/CMakeLists.txt b/tests/auto/cmake/test_modules/server/CMakeLists.txt
new file mode 100644
index 0000000..f553990
--- /dev/null
+++ b/tests/auto/cmake/test_modules/server/CMakeLists.txt
@@ -0,0 +1,24 @@
+
+cmake_minimum_required(VERSION 2.8)
+
+project(cmake_axserver)
+
+find_package(Qt5Core REQUIRED)
+find_package(Qt5Gui REQUIRED)
+find_package(Qt5Widgets REQUIRED)
+
+find_package(Qt5AxServer REQUIRED)
+
+include_directories(
+ ${Qt5AxServer_INCLUDE_DIRS}
+)
+
+add_definitions(${Qt5AxServer_DEFINITIONS})
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}")
+
+add_executable(axserverapp WIN32 axserver.cpp)
+
+target_link_libraries(axserverapp
+ ${Qt5AxServer_LIBRARIES}
+)
diff --git a/tests/auto/cmake/test_modules/server/axserver.cpp b/tests/auto/cmake/test_modules/server/axserver.cpp
new file mode 100644
index 0000000..4a9bc11
--- /dev/null
+++ b/tests/auto/cmake/test_modules/server/axserver.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the test suite 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qt_windows.h>
+#include <QAxFactory>
+#include <ActiveQt/QAxFactory>
+#include <ActiveQt/ActiveQt>
+#include <ActiveQt>
+
+
+QT_BEGIN_NAMESPACE
+QAxFactory *qax_instantiate()
+{
+ return 0;
+}
+QT_END_NAMESPACE
+
+int main(int argc, char **argv)
+{
+ QAxFactory::isServer();
+ return 0;
+}
diff --git a/tools/dumpcpp/main.cpp b/tools/dumpcpp/main.cpp
index 63a031a..a7a44b1 100644
--- a/tools/dumpcpp/main.cpp
+++ b/tools/dumpcpp/main.cpp
@@ -46,6 +46,7 @@
#include <QTextStream>
#include <QSettings>
#include <QStringList>
+#include <QTemporaryFile>
#include <QUuid>
#include <QWidget>
#include <QFileInfo>
@@ -77,6 +78,7 @@ extern QMetaObject *qax_readInterfaceInfo(ITypeLib *typeLib, ITypeInfo *typeInfo
extern QList<QByteArray> qax_qualified_usertypes;
extern QString qax_docuFromName(ITypeInfo *typeInfo, const QString &name);
extern bool qax_dispatchEqualsIDispatch;
+extern void qax_deleteMetaObject(QMetaObject *mo);
QByteArray nameSpace;
QMap<QByteArray, QByteArray> namespaceForType;
@@ -535,6 +537,12 @@ void strreg(const QByteArray &s)
}
}
+void strDetachAndRegister(QByteArray s)
+{
+ s.detach();
+ strreg(s);
+}
+
int stridx(const QByteArray &s)
{
int i = stringIndex.value(s);
@@ -563,6 +571,24 @@ uint nameToBuiltinType(const QByteArray &name)
return tp < uint(QMetaType::User) ? tp : uint(QMetaType::UnknownType);
}
+void copyFileToStream(QFile *file, QTextStream *stream)
+{
+ file->seek(0);
+ QByteArray buffer;
+ const int bufferSize = 4096 * 1024;
+ buffer.resize(bufferSize);
+ while (!file->atEnd()) {
+ const int bytesRead = static_cast<int>(file->read(buffer.data(), bufferSize));
+ if (bytesRead < bufferSize) {
+ buffer.resize(bytesRead);
+ *stream << buffer;
+ buffer.resize(bufferSize);
+ } else {
+ *stream << buffer;
+ }
+ }
+}
+
void generateTypeInfo(QTextStream &out, const QByteArray &typeName)
{
if (QtPrivate::isBuiltinType(typeName)) {
@@ -700,7 +726,7 @@ void generateClassImpl(QTextStream &out, const QMetaObject *mo, const QByteArray
int argsCount = method.parameterCount();
combinedParameterCount += argsCount;
- strreg(method.name());
+ strDetachAndRegister(method.name());
QByteArray typeName = method.typeName();
if (!QtPrivate::isBuiltinType(typeName))
strreg(typeName);
@@ -710,8 +736,8 @@ void generateClassImpl(QTextStream &out, const QMetaObject *mo, const QByteArray
const QList<QByteArray> parameterTypes = method.parameterTypes();
for (int j = 0; j < argsCount; ++j) {
if (!QtPrivate::isBuiltinType(parameterTypes.at(j)))
- strreg(parameterTypes.at(j));
- strreg(parameterNames.at(j));
+ strDetachAndRegister(parameterTypes.at(j));
+ strDetachAndRegister(parameterNames.at(j));
}
}
for (int i = mo->propertyOffset(); i < allPropertyCount; ++i) {
@@ -1002,8 +1028,12 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
QMetaObject *namespaceObject = qax_readEnumInfo(typelib, 0);
- QByteArray classImplBuffer;
- QTextStream classImplOut(&classImplBuffer, QIODevice::WriteOnly);
+ QTemporaryFile classImplFile;
+ if (!classImplFile.open()) {
+ qWarning("dumpcpp: Cannot open temporary file.");
+ return false;
+ }
+ QTextStream classImplOut(&classImplFile);
QFile implFile(cppFile + QLatin1String(".cpp"));
QTextStream implOut(&implFile);
if (!(category & (NoMetaObject|NoImplementation))) {
@@ -1119,7 +1149,7 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
break;
}
- delete metaObject;
+ qax_deleteMetaObject(metaObject);
typeinfo->ReleaseTypeAttr(typeattr);
typeinfo->Release();
}
@@ -1156,6 +1186,7 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
declOut << " class " << className << ";" << endl;
namespaceForType.insert(className, nspace);
namespaceForType.insert(className + "*", nspace);
+ namespaceForType.insert(className + "**", nspace);
}
}
declOut << "}" << endl << endl;
@@ -1178,6 +1209,7 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
declOut << " class " << className << ";" << endl;
namespaceForType.insert(className, libName.toLatin1());
namespaceForType.insert(className + "*", libName.toLatin1());
+ namespaceForType.insert(className + "**", libName.toLatin1());
}
}
@@ -1278,7 +1310,7 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
currentTypeInfo = 0;
}
- delete metaObject;
+ qax_deleteMetaObject(metaObject);
typeinfo->ReleaseTypeAttr(typeattr);
typeinfo->Release();
@@ -1379,10 +1411,12 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
implOut << "#undef QT_MOC_LITERAL" << endl << endl;
- implOut << classImplBuffer << endl;
+ classImplOut.flush();
+ copyFileToStream(&classImplFile, &implOut);
+ implOut << endl;
}
- delete namespaceObject;
+ qax_deleteMetaObject(namespaceObject);
classesOut.flush();
inlinesOut.flush();