summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--LGPL_EXCEPTION.txt2
-rw-r--r--LICENSE.LGPLv214
-rw-r--r--LICENSE.LGPLv34
-rw-r--r--examples/activeqt/activeqt.pro2
-rw-r--r--examples/activeqt/comapp/doc/snippets/doc_src_examples_activeqt_comapp.qdoc8
-rw-r--r--examples/activeqt/comapp/doc/src/comapp.qdoc12
-rw-r--r--examples/activeqt/comapp/main.cpp10
-rw-r--r--examples/activeqt/dotnet/wrapper/lib/networker.cpp8
-rw-r--r--examples/activeqt/dotnet/wrapper/lib/networker.h8
-rw-r--r--examples/activeqt/dotnet/wrapper/lib/tools.cpp8
-rw-r--r--examples/activeqt/dotnet/wrapper/lib/tools.h8
-rw-r--r--examples/activeqt/dotnet/wrapper/lib/worker.cpp8
-rw-r--r--examples/activeqt/dotnet/wrapper/lib/worker.h8
-rw-r--r--examples/activeqt/hierarchy/doc/snippets/hierarchy-demo-snippet.qdoc12
-rw-r--r--examples/activeqt/hierarchy/doc/src/hierarchy.qdoc12
-rw-r--r--examples/activeqt/hierarchy/main.cpp8
-rw-r--r--examples/activeqt/hierarchy/objects.cpp8
-rw-r--r--examples/activeqt/hierarchy/objects.h8
-rw-r--r--examples/activeqt/menus/doc/snippets/doc_src_examples_activeqt_menus.qdoc8
-rw-r--r--examples/activeqt/menus/doc/src/menus.qdoc12
-rw-r--r--examples/activeqt/menus/main.cpp8
-rw-r--r--examples/activeqt/menus/menus.cpp28
-rw-r--r--examples/activeqt/menus/menus.h8
-rw-r--r--examples/activeqt/multiple/ax1.h8
-rw-r--r--examples/activeqt/multiple/ax2.h8
-rw-r--r--examples/activeqt/multiple/doc/src/multiple.qdoc12
-rw-r--r--examples/activeqt/multiple/main.cpp8
-rw-r--r--examples/activeqt/multiple/multipleax.rc4
-rw-r--r--examples/activeqt/opengl/doc/src/opengl.qdoc12
-rw-r--r--examples/activeqt/opengl/glbox.cpp8
-rw-r--r--examples/activeqt/opengl/glbox.h8
-rw-r--r--examples/activeqt/opengl/globjwin.cpp8
-rw-r--r--examples/activeqt/opengl/globjwin.h8
-rw-r--r--examples/activeqt/opengl/main.cpp8
-rw-r--r--examples/activeqt/qutlook/addressview.cpp8
-rw-r--r--examples/activeqt/qutlook/addressview.h8
-rw-r--r--examples/activeqt/qutlook/doc/src/qutlook.qdoc12
-rw-r--r--examples/activeqt/qutlook/main.cpp8
-rw-r--r--examples/activeqt/simple/doc/src/simple.qdoc12
-rw-r--r--examples/activeqt/simple/main.cpp12
-rw-r--r--examples/activeqt/webbrowser/doc/src/webbrowser.qdoc12
-rw-r--r--examples/activeqt/webbrowser/main.cpp17
-rw-r--r--examples/activeqt/webbrowser/mainwindow_windowsmobile.ui306
-rw-r--r--examples/activeqt/webbrowser/webaxwidget.h10
-rw-r--r--examples/activeqt/webbrowser/webbrowser.pro1
-rw-r--r--examples/activeqt/wrapper/doc/src/wrapper.qdoc12
-rw-r--r--examples/activeqt/wrapper/main.cpp8
-rw-r--r--examples/activeqt/wrapper/wrapperax.rc4
-rw-r--r--qtactiveqt.pro5
-rw-r--r--src/activeqt/activeqt.pro6
-rw-r--r--src/activeqt/axshared.prx3
-rw-r--r--src/activeqt/container/qaxbase.cpp184
-rw-r--r--src/activeqt/container/qaxbase.h29
-rw-r--r--src/activeqt/container/qaxdump.cpp8
-rw-r--r--src/activeqt/container/qaxobject.cpp8
-rw-r--r--src/activeqt/container/qaxobject.h16
-rw-r--r--src/activeqt/container/qaxscript.cpp80
-rw-r--r--src/activeqt/container/qaxscript.h8
-rw-r--r--src/activeqt/container/qaxscriptwrapper.cpp8
-rw-r--r--src/activeqt/container/qaxselect.cpp24
-rw-r--r--src/activeqt/container/qaxselect.h8
-rw-r--r--src/activeqt/container/qaxselect.ui8
-rw-r--r--src/activeqt/container/qaxwidget.cpp93
-rw-r--r--src/activeqt/container/qaxwidget.h16
-rw-r--r--src/activeqt/control/control.pro3
-rw-r--r--src/activeqt/control/qaxaggregated.cpp141
-rw-r--r--src/activeqt/control/qaxaggregated.h23
-rw-r--r--src/activeqt/control/qaxbindable.cpp94
-rw-r--r--src/activeqt/control/qaxbindable.h8
-rw-r--r--src/activeqt/control/qaxfactory.cpp13
-rw-r--r--src/activeqt/control/qaxfactory.h24
-rw-r--r--src/activeqt/control/qaxmain.cpp8
-rw-r--r--src/activeqt/control/qaxserver.cpp273
-rw-r--r--src/activeqt/control/qaxserverbase.cpp54
-rw-r--r--src/activeqt/control/qaxserverdll.cpp8
-rw-r--r--src/activeqt/control/qaxservermain.cpp30
-rw-r--r--src/activeqt/doc/snippets/doc_src_activeqt-dumpcpp.cpp8
-rw-r--r--src/activeqt/doc/snippets/doc_src_examples_activeqt_dotnet.qdoc8
-rw-r--r--src/activeqt/doc/snippets/doc_src_qaxcontainer.pro8
-rw-r--r--src/activeqt/doc/snippets/doc_src_qaxserver.cpp8
-rw-r--r--src/activeqt/doc/snippets/doc_src_qaxserver.pro8
-rw-r--r--src/activeqt/doc/snippets/doc_src_qaxserver.qdoc8
-rw-r--r--src/activeqt/doc/snippets/src_activeqt_container_qaxbase.cpp8
-rw-r--r--src/activeqt/doc/snippets/src_activeqt_container_qaxscript.cpp8
-rw-r--r--src/activeqt/doc/snippets/src_activeqt_container_qaxselect.cpp8
-rw-r--r--src/activeqt/doc/snippets/src_activeqt_control_qaxbindable.cpp8
-rw-r--r--src/activeqt/doc/snippets/src_activeqt_control_qaxfactory.cpp8
-rw-r--r--src/activeqt/doc/src/activeqt-dumpcpp.qdoc12
-rw-r--r--src/activeqt/doc/src/activeqt-dumpdoc.qdoc12
-rw-r--r--src/activeqt/doc/src/activeqt-index.qdoc12
-rw-r--r--src/activeqt/doc/src/examples/dotnet.qdoc12
-rw-r--r--src/activeqt/doc/src/qtaxcontainer.qdoc20
-rw-r--r--src/activeqt/doc/src/qtaxserver.qdoc20
-rw-r--r--src/activeqt/shared/qaxtypefunctions.cpp17
-rw-r--r--src/activeqt/shared/qaxtypefunctions.h8
-rw-r--r--src/activeqt/shared/qaxtypes.cpp58
-rw-r--r--src/activeqt/shared/qaxtypes.h10
-rw-r--r--src/activeqt/shared/qaxutils.cpp8
-rw-r--r--src/activeqt/shared/qaxutils_p.h8
-rw-r--r--src/src.pro2
-rw-r--r--src/tools/idc/main.cpp14
-rw-r--r--tests/auto/auto.pro4
-rw-r--r--tests/auto/cmake/test_modules/container/axcontainer.cpp12
-rw-r--r--tests/auto/cmake/test_modules/server/axserver.cpp12
-rw-r--r--tests/auto/dumpcpp/tst_dumpcpp.cpp14
-rw-r--r--tests/auto/qaxobject/tst_qaxobject.cpp14
-rw-r--r--tests/auto/qaxscript/qaxscript.pro3
-rw-r--r--tests/auto/qaxscript/tst_qaxscript.cpp63
-rw-r--r--tools/dumpcpp/main.cpp544
-rw-r--r--tools/dumpdoc/main.cpp16
-rw-r--r--tools/testcon/ambientproperties.cpp16
-rw-r--r--tools/testcon/ambientproperties.h14
-rw-r--r--tools/testcon/ambientproperties.ui36
-rw-r--r--tools/testcon/changeproperties.cpp18
-rw-r--r--tools/testcon/changeproperties.h14
-rw-r--r--tools/testcon/changeproperties.ui36
-rw-r--r--tools/testcon/controlinfo.cpp14
-rw-r--r--tools/testcon/controlinfo.h14
-rw-r--r--tools/testcon/controlinfo.ui36
-rw-r--r--tools/testcon/docuwindow.cpp14
-rw-r--r--tools/testcon/docuwindow.h14
-rw-r--r--tools/testcon/invokemethod.cpp19
-rw-r--r--tools/testcon/invokemethod.h14
-rw-r--r--tools/testcon/invokemethod.ui36
-rw-r--r--tools/testcon/main.cpp14
-rw-r--r--tools/testcon/mainwindow.cpp44
-rw-r--r--tools/testcon/mainwindow.h14
-rw-r--r--tools/testcon/mainwindow.ui36
-rw-r--r--tools/testcon/scripts/perlscript.pl14
-rw-r--r--tools/testcon/scripts/pythonscript.py14
-rw-r--r--tools/testcon/testcon.rc4
132 files changed, 1430 insertions, 1897 deletions
diff --git a/.qmake.conf b/.qmake.conf
index 35f43d5..068da42 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -1,4 +1,4 @@
load(qt_build_config)
CONFIG += qt_example_installs
-MODULE_VERSION = 5.4.2
+MODULE_VERSION = 5.5.0
diff --git a/LGPL_EXCEPTION.txt b/LGPL_EXCEPTION.txt
index 7e2e30f..5cdacb9 100644
--- a/LGPL_EXCEPTION.txt
+++ b/LGPL_EXCEPTION.txt
@@ -1,4 +1,4 @@
-Digia Qt LGPL Exception version 1.1
+The Qt Company Qt LGPL Exception version 1.1
As an additional permission to the GNU Lesser General Public License version
2.1, the object code form of a "work that uses the Library" may incorporate
diff --git a/LICENSE.LGPLv21 b/LICENSE.LGPLv21
index 341aa9e..6e18461 100644
--- a/LICENSE.LGPLv21
+++ b/LICENSE.LGPLv21
@@ -1,7 +1,7 @@
GNU LESSER GENERAL PUBLIC LICENSE
- The Qt Toolkit is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
- Contact: http://www.qt-project.org/legal
+ The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.
+ Contact: http://www.qt.io/licensing/
You may use, distribute and copy the Qt GUI Toolkit under the terms of
GNU Lesser General Public License version 2.1, which is displayed below.
diff --git a/LICENSE.LGPLv3 b/LICENSE.LGPLv3
index aed671a..8fbb743 100644
--- a/LICENSE.LGPLv3
+++ b/LICENSE.LGPLv3
@@ -1,7 +1,7 @@
GNU LESSER GENERAL PUBLIC LICENSE
- The Qt Toolkit is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
- Contact: http://www.qt-project.org/legal
+ The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.
+ Contact: http://www.qt.io/licensing/
You may use, distribute and copy the Qt GUI Toolkit under the terms of
GNU Lesser General Public License version 3, which is displayed below.
diff --git a/examples/activeqt/activeqt.pro b/examples/activeqt/activeqt.pro
index 12501b3..1fe8bee 100644
--- a/examples/activeqt/activeqt.pro
+++ b/examples/activeqt/activeqt.pro
@@ -11,4 +11,4 @@ contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles2):!contains(QT_CONFIG,
# For now only the contain examples with mingw, for the others you need
# an IDL compiler
-mingw|wince*:SUBDIRS = webbrowser
+mingw:SUBDIRS = webbrowser
diff --git a/examples/activeqt/comapp/doc/snippets/doc_src_examples_activeqt_comapp.qdoc b/examples/activeqt/comapp/doc/snippets/doc_src_examples_activeqt_comapp.qdoc
index 87a3380..fb5fb90 100644
--- a/examples/activeqt/comapp/doc/snippets/doc_src_examples_activeqt_comapp.qdoc
+++ b/examples/activeqt/comapp/doc/snippets/doc_src_examples_activeqt_comapp.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/comapp/doc/src/comapp.qdoc b/examples/activeqt/comapp/doc/src/comapp.qdoc
index ea8e22a..59cd471 100644
--- a/examples/activeqt/comapp/doc/src/comapp.qdoc
+++ b/examples/activeqt/comapp/doc/src/comapp.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU 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
+** 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$
diff --git a/examples/activeqt/comapp/main.cpp b/examples/activeqt/comapp/main.cpp
index 4c855dd..8e49d0e 100644
--- a/examples/activeqt/comapp/main.cpp
+++ b/examples/activeqt/comapp/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -264,7 +264,7 @@ int main(int argc, char **argv)
appobject.setVisible(true);
- QObject::connect(qApp, SIGNAL(lastWindowClosed()), &appobject, SLOT(quit()));
+ QObject::connect(&app, &QGuiApplication::lastWindowClosed, &appobject, &Application::quit);
return app.exec();
}
diff --git a/examples/activeqt/dotnet/wrapper/lib/networker.cpp b/examples/activeqt/dotnet/wrapper/lib/networker.cpp
index ae5157e..f61c180 100644
--- a/examples/activeqt/dotnet/wrapper/lib/networker.cpp
+++ b/examples/activeqt/dotnet/wrapper/lib/networker.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/dotnet/wrapper/lib/networker.h b/examples/activeqt/dotnet/wrapper/lib/networker.h
index 6dc72e3..b8b758a 100644
--- a/examples/activeqt/dotnet/wrapper/lib/networker.h
+++ b/examples/activeqt/dotnet/wrapper/lib/networker.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/dotnet/wrapper/lib/tools.cpp b/examples/activeqt/dotnet/wrapper/lib/tools.cpp
index 58c862a..3267341 100644
--- a/examples/activeqt/dotnet/wrapper/lib/tools.cpp
+++ b/examples/activeqt/dotnet/wrapper/lib/tools.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/dotnet/wrapper/lib/tools.h b/examples/activeqt/dotnet/wrapper/lib/tools.h
index f9eb84c..45eb1c7 100644
--- a/examples/activeqt/dotnet/wrapper/lib/tools.h
+++ b/examples/activeqt/dotnet/wrapper/lib/tools.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/dotnet/wrapper/lib/worker.cpp b/examples/activeqt/dotnet/wrapper/lib/worker.cpp
index 9c57048..645c015 100644
--- a/examples/activeqt/dotnet/wrapper/lib/worker.cpp
+++ b/examples/activeqt/dotnet/wrapper/lib/worker.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/dotnet/wrapper/lib/worker.h b/examples/activeqt/dotnet/wrapper/lib/worker.h
index a2c2f77..8ad126b 100644
--- a/examples/activeqt/dotnet/wrapper/lib/worker.h
+++ b/examples/activeqt/dotnet/wrapper/lib/worker.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/hierarchy/doc/snippets/hierarchy-demo-snippet.qdoc b/examples/activeqt/hierarchy/doc/snippets/hierarchy-demo-snippet.qdoc
index 40d8744..cddf779 100644
--- a/examples/activeqt/hierarchy/doc/snippets/hierarchy-demo-snippet.qdoc
+++ b/examples/activeqt/hierarchy/doc/snippets/hierarchy-demo-snippet.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU 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
+** 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$
diff --git a/examples/activeqt/hierarchy/doc/src/hierarchy.qdoc b/examples/activeqt/hierarchy/doc/src/hierarchy.qdoc
index bc22b80..60765ef 100644
--- a/examples/activeqt/hierarchy/doc/src/hierarchy.qdoc
+++ b/examples/activeqt/hierarchy/doc/src/hierarchy.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU 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
+** 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$
diff --git a/examples/activeqt/hierarchy/main.cpp b/examples/activeqt/hierarchy/main.cpp
index a51395c..817998e 100644
--- a/examples/activeqt/hierarchy/main.cpp
+++ b/examples/activeqt/hierarchy/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/hierarchy/objects.cpp b/examples/activeqt/hierarchy/objects.cpp
index 84237b2..1cb59ae 100644
--- a/examples/activeqt/hierarchy/objects.cpp
+++ b/examples/activeqt/hierarchy/objects.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/hierarchy/objects.h b/examples/activeqt/hierarchy/objects.h
index 1112984..4ceea1f 100644
--- a/examples/activeqt/hierarchy/objects.h
+++ b/examples/activeqt/hierarchy/objects.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/menus/doc/snippets/doc_src_examples_activeqt_menus.qdoc b/examples/activeqt/menus/doc/snippets/doc_src_examples_activeqt_menus.qdoc
index d4836b2..cca4d85 100644
--- a/examples/activeqt/menus/doc/snippets/doc_src_examples_activeqt_menus.qdoc
+++ b/examples/activeqt/menus/doc/snippets/doc_src_examples_activeqt_menus.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/menus/doc/src/menus.qdoc b/examples/activeqt/menus/doc/src/menus.qdoc
index 49a37bc..d4861ae 100644
--- a/examples/activeqt/menus/doc/src/menus.qdoc
+++ b/examples/activeqt/menus/doc/src/menus.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU 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
+** 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$
diff --git a/examples/activeqt/menus/main.cpp b/examples/activeqt/menus/main.cpp
index 6255e57..a610903 100644
--- a/examples/activeqt/menus/main.cpp
+++ b/examples/activeqt/menus/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/menus/menus.cpp b/examples/activeqt/menus/menus.cpp
index 908c88c..638bcd2 100644
--- a/examples/activeqt/menus/menus.cpp
+++ b/examples/activeqt/menus/menus.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -58,12 +58,12 @@ QMenus::QMenus(QWidget *parent)
action = new QAction(QPixmap((const char**)fileopen), "&Open", this);
action->setShortcut(tr("CTRL+O"));
- connect(action, SIGNAL(triggered()), this, SLOT(fileOpen()));
+ connect(action, &QAction::triggered, this, &QMenus::fileOpen);
file->addAction(action);
action = new QAction(QPixmap((const char**)filesave),"&Save", this);
action->setShortcut(tr("CTRL+S"));
- connect(action, SIGNAL(triggered()), this, SLOT(fileSave()));
+ connect(action, &QAction::triggered, this, &QMenus::fileSave);
file->addAction(action);
QMenu *edit = new QMenu(this);
@@ -73,28 +73,28 @@ QMenus::QMenus(QWidget *parent)
action->setToolTip("Normal");
action->setStatusTip("Toggles Normal");
action->setCheckable(true);
- connect(action, SIGNAL(triggered()), this, SLOT(editNormal()));
+ connect(action, &QAction::triggered, this, &QMenus::editNormal);
edit->addAction(action);
action = new QAction("&Bold", this);
action->setShortcut(tr("CTRL+B"));
action->setCheckable(true);
- connect(action, SIGNAL(triggered()), this, SLOT(editBold()));
+ connect(action, &QAction::triggered, this, &QMenus::editBold);
edit->addAction(action);
action = new QAction("&Underline", this);
action->setShortcut(tr("CTRL+U"));
action->setCheckable(true);
- connect(action, SIGNAL(triggered()), this, SLOT(editUnderline()));
+ connect(action, &QAction::triggered, this, &QMenus::editUnderline);
edit->addAction(action);
QMenu *advanced = new QMenu(this);
action = new QAction("&Font...", this);
- connect(action, SIGNAL(triggered()), this, SLOT(editAdvancedFont()));
+ connect(action, &QAction::triggered, this, &QMenus::editAdvancedFont);
advanced->addAction(action);
action = new QAction("&Style...", this);
- connect(action, SIGNAL(triggered()), this, SLOT(editAdvancedStyle()));
+ connect(action, &QAction::triggered, this, &QMenus::editAdvancedStyle);
advanced->addAction(action);
edit->addMenu(advanced)->setText("&Advanced");
@@ -105,18 +105,18 @@ QMenus::QMenus(QWidget *parent)
action->setShortcut(tr("CTRL+V"));
action->setCheckable(true);
action->setEnabled(false);
- connect(action, SIGNAL(triggered()), this, SLOT(editUnderline()));
+ connect(action, &QAction::triggered, this, &QMenus::editUnderline);
edit->addAction(action);
QMenu *help = new QMenu(this);
action = new QAction("&About...", this);
action->setShortcut(tr("F1"));
- connect(action, SIGNAL(triggered()), this, SLOT(helpAbout()));
+ connect(action, &QAction::triggered, this, &QMenus::helpAbout);
help->addAction(action);
action = new QAction("&About Qt...", this);
- connect(action, SIGNAL(triggered()), this, SLOT(helpAboutQt()));
+ connect(action, &QAction::triggered, this, &QMenus::helpAboutQt);
help->addAction(action);
if (!QAxFactory::isServer())
diff --git a/examples/activeqt/menus/menus.h b/examples/activeqt/menus/menus.h
index c4a5e69..515e9f8 100644
--- a/examples/activeqt/menus/menus.h
+++ b/examples/activeqt/menus/menus.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/multiple/ax1.h b/examples/activeqt/multiple/ax1.h
index 72bbe5d..286645f 100644
--- a/examples/activeqt/multiple/ax1.h
+++ b/examples/activeqt/multiple/ax1.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/multiple/ax2.h b/examples/activeqt/multiple/ax2.h
index 239e93e..8b04653 100644
--- a/examples/activeqt/multiple/ax2.h
+++ b/examples/activeqt/multiple/ax2.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/multiple/doc/src/multiple.qdoc b/examples/activeqt/multiple/doc/src/multiple.qdoc
index 79ea938..7a40928 100644
--- a/examples/activeqt/multiple/doc/src/multiple.qdoc
+++ b/examples/activeqt/multiple/doc/src/multiple.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU 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
+** 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$
diff --git a/examples/activeqt/multiple/main.cpp b/examples/activeqt/multiple/main.cpp
index 4ae9f89..1bf2447 100644
--- a/examples/activeqt/multiple/main.cpp
+++ b/examples/activeqt/multiple/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/multiple/multipleax.rc b/examples/activeqt/multiple/multipleax.rc
index b424759..a847979 100644
--- a/examples/activeqt/multiple/multipleax.rc
+++ b/examples/activeqt/multiple/multipleax.rc
@@ -15,10 +15,10 @@ BEGIN
BEGIN
BLOCK "040904e4"
BEGIN
- VALUE "CompanyName", "Digia Plc and/or its subsidiary(-ies)"
+ VALUE "CompanyName", "The Qt Company Ltd."
VALUE "FileDescription", "Multiple Example (ActiveQt)"
VALUE "FileVersion", "1.0.0.0"
- VALUE "LegalCopyright", "Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies)."
+ VALUE "LegalCopyright", "Copyright (C) 2015 The Qt Company Ltd."
VALUE "InternalName", "multipleax.dll"
VALUE "OriginalFilename", "multipleax.dll"
VALUE "ProductName", "Multiple Example (ActiveQt)"
diff --git a/examples/activeqt/opengl/doc/src/opengl.qdoc b/examples/activeqt/opengl/doc/src/opengl.qdoc
index 231ea5b..8d37853 100644
--- a/examples/activeqt/opengl/doc/src/opengl.qdoc
+++ b/examples/activeqt/opengl/doc/src/opengl.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU 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
+** 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$
diff --git a/examples/activeqt/opengl/glbox.cpp b/examples/activeqt/opengl/glbox.cpp
index 69285fa..3f2b5bb 100644
--- a/examples/activeqt/opengl/glbox.cpp
+++ b/examples/activeqt/opengl/glbox.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/opengl/glbox.h b/examples/activeqt/opengl/glbox.h
index b356056..53e3487 100644
--- a/examples/activeqt/opengl/glbox.h
+++ b/examples/activeqt/opengl/glbox.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/opengl/globjwin.cpp b/examples/activeqt/opengl/globjwin.cpp
index ddc0601..367ede2 100644
--- a/examples/activeqt/opengl/globjwin.cpp
+++ b/examples/activeqt/opengl/globjwin.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/opengl/globjwin.h b/examples/activeqt/opengl/globjwin.h
index 433034f..cd9a8d9 100644
--- a/examples/activeqt/opengl/globjwin.h
+++ b/examples/activeqt/opengl/globjwin.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/opengl/main.cpp b/examples/activeqt/opengl/main.cpp
index 8f62d59..861bf4e 100644
--- a/examples/activeqt/opengl/main.cpp
+++ b/examples/activeqt/opengl/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/qutlook/addressview.cpp b/examples/activeqt/qutlook/addressview.cpp
index ef26ce0..b92c793 100644
--- a/examples/activeqt/qutlook/addressview.cpp
+++ b/examples/activeqt/qutlook/addressview.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/qutlook/addressview.h b/examples/activeqt/qutlook/addressview.h
index aec4709..c29c537 100644
--- a/examples/activeqt/qutlook/addressview.h
+++ b/examples/activeqt/qutlook/addressview.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/qutlook/doc/src/qutlook.qdoc b/examples/activeqt/qutlook/doc/src/qutlook.qdoc
index a7199c0..362ae37 100644
--- a/examples/activeqt/qutlook/doc/src/qutlook.qdoc
+++ b/examples/activeqt/qutlook/doc/src/qutlook.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU 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
+** 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$
diff --git a/examples/activeqt/qutlook/main.cpp b/examples/activeqt/qutlook/main.cpp
index 3857bda..4cb6fa5 100644
--- a/examples/activeqt/qutlook/main.cpp
+++ b/examples/activeqt/qutlook/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/simple/doc/src/simple.qdoc b/examples/activeqt/simple/doc/src/simple.qdoc
index 0aac5f6..02e68d8 100644
--- a/examples/activeqt/simple/doc/src/simple.qdoc
+++ b/examples/activeqt/simple/doc/src/simple.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU 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
+** 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$
diff --git a/examples/activeqt/simple/main.cpp b/examples/activeqt/simple/main.cpp
index 487ccfa..2c86d97 100644
--- a/examples/activeqt/simple/main.cpp
+++ b/examples/activeqt/simple/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -63,8 +63,8 @@ public:
LCD = new QLCDNumber( 3, this );
edit = new QLineEdit( this );
- connect( slider, SIGNAL(valueChanged(int)), this, SLOT(setValue(int)) );
- connect( edit, SIGNAL(textChanged(QString)), this, SLOT(setText(QString)) );
+ connect( slider, &QAbstractSlider::valueChanged, this, &QSimpleAX::setValue );
+ connect( edit, &QLineEdit::textChanged, this, &QSimpleAX::setText );
vbox->addWidget( slider );
vbox->addWidget( LCD );
diff --git a/examples/activeqt/webbrowser/doc/src/webbrowser.qdoc b/examples/activeqt/webbrowser/doc/src/webbrowser.qdoc
index 07c2ef7..38465f7 100644
--- a/examples/activeqt/webbrowser/doc/src/webbrowser.qdoc
+++ b/examples/activeqt/webbrowser/doc/src/webbrowser.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU 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
+** 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$
diff --git a/examples/activeqt/webbrowser/main.cpp b/examples/activeqt/webbrowser/main.cpp
index dc6d2f3..cac2505 100644
--- a/examples/activeqt/webbrowser/main.cpp
+++ b/examples/activeqt/webbrowser/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -51,12 +51,7 @@
#include <QVariant>
#include <QSettings>
-#if defined(Q_WS_WINCE_WM)
-#include "ui_mainwindow_windowsmobile.h"
-#include <windows.h>
-#else
#include "ui_mainwindow.h"
-#endif
static const char qtUrl[] = "qt.io";
static const char iWebBrowser2DocumentationUrl[] = "http://msdn.microsoft.com/en-us/library/aa752127%28v=vs.85%29.aspx";
@@ -349,11 +344,7 @@ int main(int argc, char ** argv)
const QString url = arguments.size() > 1 ?
arguments.at(1) : QString::fromLatin1(qtUrl);
w.navigate(url);
-#if defined(Q_OS_WINCE)
- w.showMaximized();
-#else
w.show();
-#endif
return a.exec();
}
//! [4]
diff --git a/examples/activeqt/webbrowser/mainwindow_windowsmobile.ui b/examples/activeqt/webbrowser/mainwindow_windowsmobile.ui
deleted file mode 100644
index 29cdc6d..0000000
--- a/examples/activeqt/webbrowser/mainwindow_windowsmobile.ui
+++ /dev/null
@@ -1,306 +0,0 @@
-<ui version="4.0" stdsetdef="1" >
- <class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow" >
- <property name="objectName" >
- <string notr="true" >MainWindow</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>812</width>
- <height>605</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Qt WebBrowser</string>
- </property>
- <widget class="QWidget" name="centralWidget">
- <layout class="QHBoxLayout" >
- <property name="objectName" >
- <string notr="true" >unnamed</string>
- </property>
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QFrame" name="Frame3" >
- <property name="objectName" >
- <string notr="true" >Frame3</string>
- </property>
- <property name="frameShape" >
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Sunken</enum>
- </property>
- <layout class="QVBoxLayout" >
- <property name="objectName" >
- <string notr="true" >unnamed</string>
- </property>
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>0</number>
- </property>
- <item>
- <widget class="QAxWidget" name="WebBrowser" >
- <property name="objectName" >
- <string notr="true" >WebBrowser</string>
- </property>
- <property name="focusPolicy" >
- <enum>Qt::StrongFocus</enum>
- </property>
- <property name="control" >
- <string>{F5AFC7EF-1571-48B6-A69C-F1833F4C3A44}</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- <widget class="QToolBar" name="tbNavigate" >
- <property name="objectName" >
- <string notr="true" >tbNavigate</string>
- </property>
- <property name="windowTitle" >
- <string>Navigation</string>
- </property>
- <addaction name="actionBack" />
- <addaction name="actionForward" />
- <addaction name="actionStop" />
- <addaction name="actionRefresh" />
- <addaction name="actionHome" />
- <addaction name="separator" />
- <addaction name="actionSearch" />
- </widget>
- <widget class="QToolBar" name="tbAddress" >
- <property name="objectName" >
- <string notr="true" >tbAddress</string>
- </property>
- <property name="windowTitle" >
- <string>Address</string>
- </property>
- <addaction name="actionGo" />
- </widget>
- <widget class="QMenuBar" name="menubar" >
- <property name="objectName" >
- <string notr="true" >menubar</string>
- </property>
- <widget class="QMenu" name="PopupMenu" >
- <property name="objectName" >
- <string notr="true" >PopupMenu</string>
- </property>
- <property name="title" >
- <string>&amp;File</string>
- </property>
- <widget class="QMenu" name="FileNewGroup_2" >
- <property name="objectName" >
- <string notr="true" >FileNewGroup_2</string>
- </property>
- <property name="title" >
- <string>New</string>
- </property>
- <addaction name="actionNewWindow" />
- </widget>
- <addaction name="FileNewGroup" />
- <addaction name="FileNewGroup_2" />
- <addaction name="separator" />
- <addaction name="actionFileClose" />
- </widget>
- <widget class="QMenu" name="BookmarksMenu" >
- <property name="objectName" >
- <string notr="true" >BookmarksMenu</string>
- </property>
- <property name="title" >
- <string>&amp;Bookmarks</string>
- </property>
- <addaction name="actionAddBookmark" />
- <addaction name="separator" />
- </widget>
- <widget class="QMenu" name="HistoryMenu" >
- <property name="objectName" >
- <string notr="true" >HistoryMenu</string>
- </property>
- <property name="title" >
- <string>Hi&amp;story</string>
- </property>
- </widget>
- <widget class="QMenu" name="unnamed" >
- <property name="objectName" >
- <string notr="true" >unnamed</string>
- </property>
- <property name="title" >
- <string>&amp;Help</string>
- </property>
- <addaction name="actionAbout" />
- <addaction name="actionAboutQt" />
- </widget>
- <addaction name="PopupMenu" />
- <addaction name="BookmarksMenu" />
- <addaction name="HistoryMenu" />
- <addaction name="unnamed" />
- </widget>
- <action name="actionGo" >
- <property name="objectName" >
- <string>actionGo</string>
- </property>
- <property name="icon" >
- <iconset>image0</iconset>
- </property>
- <property name="iconText" >
- <string>Go</string>
- </property>
- </action>
- <action name="actionBack" >
- <property name="objectName" >
- <string>actionBack</string>
- </property>
- <property name="icon" >
- <iconset>image1</iconset>
- </property>
- <property name="iconText" >
- <string>Back</string>
- </property>
- <property name="shortcut" >
- <string>Backspace</string>
- </property>
- </action>
- <action name="actionForward" >
- <property name="objectName" >
- <string>actionForward</string>
- </property>
- <property name="icon" >
- <iconset>image2</iconset>
- </property>
- <property name="iconText" >
- <string>Forward</string>
- </property>
- </action>
- <action name="actionStop" >
- <property name="objectName" >
- <string>actionStop</string>
- </property>
- <property name="icon" >
- <iconset>image3</iconset>
- </property>
- <property name="iconText" >
- <string>Stop</string>
- </property>
- </action>
- <action name="actionRefresh" >
- <property name="objectName" >
- <string>actionRefresh</string>
- </property>
- <property name="icon" >
- <iconset>image4</iconset>
- </property>
- <property name="iconText" >
- <string>Refresh</string>
- </property>
- </action>
- <action name="actionHome" >
- <property name="objectName" >
- <string>actionHome</string>
- </property>
- <property name="icon" >
- <iconset>image5</iconset>
- </property>
- <property name="iconText" >
- <string>Home</string>
- </property>
- </action>
- <action name="actionFileClose" >
- <property name="objectName" >
- <string>actionFileClose</string>
- </property>
- <property name="iconText" >
- <string>Close</string>
- </property>
- <property name="text" >
- <string>C&amp;lose</string>
- </property>
- </action>
- <action name="actionSearch" >
- <property name="objectName" >
- <string>actionSearch</string>
- </property>
- <property name="icon" >
- <iconset>image6</iconset>
- </property>
- <property name="iconText" >
- <string>Search</string>
- </property>
- </action>
- <action name="actionAbout" >
- <property name="objectName" >
- <string>actionAbout</string>
- </property>
- <property name="iconText" >
- <string>About</string>
- </property>
- </action>
- <action name="actionAddBookmark" >
- <property name="objectName" >
- <string>actionAddBookmark</string>
- </property>
- <property name="text" >
- <string>Add Bookmark</string>
- </property>
- </action>
- <action name="actionAboutQt" >
- <property name="objectName" >
- <string>actionAboutQt</string>
- </property>
- <property name="iconText" >
- <string>About Qt</string>
- </property>
- </action>
- <actiongroup name="FileNewGroup" >
- <action name="actionNewWindow" >
- <property name="objectName" >
- <string>actionNewWindow</string>
- </property>
- <property name="iconText" >
- <string>Window</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+N</string>
- </property>
- </action>
- <property name="objectName" >
- <string>FileNewGroup</string>
- </property>
- </actiongroup>
- </widget>
- <layoutdefault spacing="6" margin="11" />
- <images>
- <image name="image0" >
- <data format="XPM.GZ" length="1241" >789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232365200210543251d2e253d856405bffcbc54103b11c8563600020b03105719c4b530b08072f50880513560a09c080338d5209420294a4451a38c90426621ab5146d10de524a2aa417505445122861a547722bb0c971a3d2aa921c2ae446c6a9431fc85a9064551220e354009653dec00294e712a1ac4e97078a9a9b5e6020013b3f563</data>
- </image>
- <image name="image1" >
- <data format="XPM.GZ" length="4494" >789ce596497332470c86effe15947573a5f4c1cc30cc542a07ef60bc808dd7540e3d9b6df006186c93ca7f8fba2535ce57be98dc9292313c487a2575f7ccf063a376d53baa6dfc589bbe9ad7fbbc96df99496da3983d3e7efcfec76f7faead87418dfe1a51500bd67f595befbfd6f2daf1f35369014e08a05e6fd4ab96e31e73d0282bc7a7cae23ff3ccfe8170ca6cee9843f51f3b4ec8cff9efccdebf2d2cf9b06bb9417a25c74f98bdff99390a84fb8e49af70f39891b2e40bfbf8b6b0917e87968346a8f5a6cc51c07ab02f2cf1983237552f709c86691e3bbd5be5821998a32067bd1765d13f67563d530a4b3df8b01c523d8ec74059faed086bfc82390e851b8ed3c86485e34365a9bfc5ece3df8433e10bcb5140f5dd3cf0e099f32f99e350cecb5858f2b1c1dc52fda663d334a277c0ecfd5d61c9373973120967969b548fd71b079e797d8e985b21eb63aecceb85e7c299f4ffaa2ce7739359ebc195631387c6ad1f5e302791ccbba72cf173e15cfa2d2cc7619cf1fa63c9dccaa4ff4bcfdc7fa82cfdf7999348f6bf299c4bfd4c59ea0f99535dafca71d60a65ffebca52ff8c3989e47cce98351fb785759e7bcbad65bf0be624ca9a8e87caac0fb1702ef191b2cc9731a7b9ec4f87d934659e27e142f8c671e6eb9d0ae7b2be07cc6924ccf999698a7e4f58f572e64cebb9f393444994e68e4365d9ff7be15caef70766ad678cb0f8f18359ebe109b3af27f199fadd794cf254eb196599774758e77d5496f5dd64a67959af122ef87c639b59eb81d34ba97fe3f4215196f3922acbbc28acf527cc792c7a857029ecf63bcded05efb8a52cf3cc9833ed2f66563dac0b8b1ebe3317ea77f73352173db8f6ccf54a66df0f30fb7c777d9bc214d2cf88d9cf73cfece3ddf3296b66da7fe199d7a32b5cc8feef31fbfe8f99bdde96b0faddf3272bac390665b99e90d9e7ef33972de9d73d7ff3d873255c49fc1b73257ee4f8d2eb5d336b3e8e8535ff86d9e7bbf35f2cf51366ef77cfeb6299df62563f3c0a8b1fdcf3d3569778773f756e66f7fcac967e175f797ffff5dfd9ff4103010d6698a35955030b2cb1c25bbcc3fbd5344861882352b8c5077c5c45836678c267ca7fc1314ebeaf81537cc599eb608e6ff88e1f2b682c705314b6486182dbb8f31d0ddca529f644619ff2db641d3cf82a8bfa9d62d7da670d3cc4233c760a63eaa08d2734478fac8f87ffc833788a6738c073bc20ebe3255eb1069d863e5e3b851bacfb7c6b0d0c30c488f24a3a2d4ddaf1986a3d600b13179be280ef597809e876e206000c69d8ec0e590f32c8a18012b7a0825b9799e018eee0de4e0b4318c103ff2ea2985b78c47d28a487ce276b634cca40356d1655801c3bf044af2136e0195ef8b711be4045ab50ff42e16bdbb6463d8e610253fe3d4855ec3ed80abd9f62397ef9c9e6cee835249bc31bbc731ff0010beacbcdbfaca29f2836a3e839fd1f3acb5cb6fd6e13b6605b34766097d6664cdf0d7faad9813dd827df08daf4de812ddaa7061c4017baf43ea6daef70c8fb0247704c932dc897b94e67da09553a811ef4a94a0f4ee10c069435216b630ae7a43b800b7fc6164ea543ea73ea75663b22a50e5cc215ec50956beaf606ead08080147b64c76403d20ebdc6142268528d3655ee3a1db6f88b535ee015b42081d4205ee1f4f335878501ea7644331dc81acecdb7ef63b86b32eae59956cff63237f92af7319c9a82669c989256bd0b6fa6fabe86bbfe0ecdadb9a399ce61b49a86355adfbedd45736756bc27b30afd161a9a9179585de33bf69fd2f8ebd7b5bf014644b906</data>
- </image>
- <image name="image2" >
- <data format="XPM.GZ" length="4494" >789ce5965b4f23471085dff915d6d6db2aaac5e3b92aca037703cbc55c8c21ca43cf8c8d0dd85c6c307694ff9eeaaed3bd68771f968d14298a0a109fabebd4e99a9ef17cfad8e81d1f343e7e5a99cecc6c5435aaa1796a7cac9fc7e3c5ef7ffcf6e7ca8756d4909f661c35a20fbfac7ce8cc1a55e3f07ed2b7409702b4badaccfb996563020f5c7ecbf340b9a31c3591dff7ac7943e002cc8e73cf74acdcc27a8a2d37a5be4e1d9f04567f9fc105f25dcfea9726caad62a07c1158f58f94e3087e868ea57fa5fa0be590bfb11c3525affd4e03ebfa25b8507fbcaa1c47ca66e459fdf10c6c30af4dcfda8f5f9513dfffce71e1f5a956967adddfaeb25f4f7b60e8d199e596f42f6bc787ca213f554e5be06dc7a28ffdee282791cedb5c83d19fd795a55ecf4b3fb0ee07ebd312fae796e3283665e238524e2265de031bcc774d396d61be25b8c4fe1f02abfeab67f49f2867decfbd6393b6a03f03438f3bca19fa51cb33fc6f80fd7eae2c27e257e7cb4de5b4045f78d679f24960ddcfb172e6f73357ce63e88fc115ce43e558fcabbeb905fb7e47cae24ff5daca41af007bbd81e5b425f53aff6160d52f95f318f37d01a39ee7ca05f4790a469e0e1c97590bfa1b81f53c3e2bfbf5ecf697b532efe754398f31af437085eb65948b18e723f70cbf9e2bcc633db0f65b533609fcbafb372bf318fdcfc015e65b281731ee0ff6acf70767ca5e8f7be01abcab5cfa7e89e53cce2ba3fd1681b5df8172013f44e00acfbf4a39e8ef287b7dbe02234feefce795d727a36c12ccf75239d4b7c1bede9def42fcc0ef7960d5cbc05ebf543635aed752b94aa1ff02ee83ddf3b6a87c3d3f2b9b047a4fcaa17e0cf6f5eef928ab13f5476960d5eb7ac6f5dd07d7e04839e83d29d7be9ffbfe31b50dc723cfa87f08acf947e51a7ad457ee6760773ecaa4f47e36036bfd96673c3fb6c13578a01cf41f9505d5af3b2f655dc28fa93da33e550ef523e5e06f08861eb9e7b94cdfe7ddf753d50feb6f94437e00f67edcf3aa4e831ed8afe73bb05fefe655f7c37edcfd62bb81ddfb82935776cfeb41c87766ff2cfe7f1a4c6cb8e48ae91f68d4dce7015ff390473fad71c3b77cc7639ef03d3ffcb48f013ff293a84c79c6d54f693c8bc28b28589539bff2e2ed647e586389184bacf13a6ff0e6d71a32f92dde96bfdf9dbccc6387dba2d086caae4c668ff7bf68f0673ee0433ee263eef0099ff2199f8b62d0e32e5f704fea2fe5b70d3f57729556b91b349a1c718b634e64faa9fc7fc919e772220a91213254ca273b884bf72b4a54f1846ad925e93b1af56940d734a4110fe4efb5c40dddda907311734c7752d10b3a1ae289c634a17b7dafe331e995b3b124fbdfd25d85471763596fab7aa2a4f53d444653ded3773bb96e8faeae1de2ea8dff9da0b0ebfcd858e3357aa667bb1f68b4a5e7d256853559e8f56d64aefe85e6f44a0b5aea3bac5c2bebf74b8775fb6bfbb858771e7a6f1df09c36f89a36698bb6f53d5c4ef08ee4e6a2dd269b9d488729ed4a171b7bd40ece3228cce5d305edd3673ed7773139bd133a14d5233a96cff7a9237142a77446e7125dba900e70681564f5a6acdc1285ae9e0feaf150d675e8d2d59dd315ad52931fec2973d1a5489c6698e29c5a508829797bd629a52665bcf9fdd32ed95c1d50217b5c18b67390f34befb8e78873a9b6b39ad285216328a2de3bef5b32a59db5ccec42a6b565aaf7dffba6e663d3972b211ea86b065f3cbccbc7b53890399a21a55f677f5863e4f670c337df667f58e3d6dc99dbef3dd5ff6bdf73ff82c65fbfaefc0d4fb5b868</data>
- </image>
- <image name="image3" >
- <data format="XPM.GZ" length="802" >789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232325500210543251d2e25658564056503300071f540dc3430007371012a492a830156496538c094848922c9c2259134c099304914e3604c8424aa5e6449b0044216ca824ba2da8b4512218b4d122e8b55520fee5974072164511da487ea490c7f22cba249e20d3efc018f3fcae0d2702eb5d2106992b5d65c00b9a48974</data>
- </image>
- <image name="image4" >
- <data format="XPM.GZ" length="1241" >789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232365200210543251d2e253d856405bffcbc54105b19c8563600020b03103711c4b530b08072f50880513524ab518681443435ca984ae08ae06a94114a10ac443435ca3043904d4c4453a38ca604ae11590d9a0ab80bd0d46078914c35c4d885a608871a547f61f81d5d117a1862018930e5b8d5c0950c741a1b1e6a6aadb90086a9d853</data>
- </image>
- <image name="image5" >
- <data format="XPM.GZ" length="5598" >789ca5985973db480ec7dff3295cc15b6a0b2351a428d6d63ef83e255bbe647b6a1fd02465dd872d9f53f3dd076c005dc926ce6a32eed8553f37fadf7fa0c1a69cdfbe6cdc9cb537befcf6e97145ab61be910fe861e34bf1349dbefdfedffffcf1e97323dae07f51bdbe117dfed7a7cfddd546bed199cfca0ae888016afeab62e8796ef110ee545caf05be16ae5bfc6ee096e7b6e756983f51b6f53b81257ecfb8eee7e9b162f66af1c78125fe48987f23f3fb81657e691cd5bddecc7316d555efd058f7eb2867aa771058f4de8c55cffb6dd4a34cf5b68d357e681c6515634db81a7e3ef59c35cccf5560bf9ef6953389c77660af074f15c751e05c38a6d81f2ef9f3a848f4e9d658f2c36b635dbfa54cc2383556bd33e12492fc70df38f1f3f8ae4cc2745a711285fda7caa4f95e06967a2d8c63f27a8fc2a60fa4acfa980a371b898f0767dc6cf8fdbc9f84c27e4de124d2fabe186b3dee8c75ff1365dbef2db0ccef0987fd2f2a6632fd576552fd2b63d57b08ecd7d39d70b321fd0560acfb6d1a4b7e3050764de7d79f08a70de937ea7b7689e68f4de1e0776e2c7ab8abecb47eb170aa7ee822b0e89f1b4b7fd24dc529abe9794f02cbf99e2b3badc7a5b1ee97089b3e0e8d253f3c364e253e5576120ff7c63a9f7966d2e771d358e75bca4ef3bb0e2cf9758db5fe47c6b21eeb81bd3f07c2ad58ebd130d67e6a194b3cf97e62b2fa24c67a1f5d2aab3f8781a53e17c6eaa7082cfa3de156acf9d5034b7e3563f1eb96c6eaf7c0b815fbf8d2739e3aedefb1b1de9723618b77a49cebf946c6e20f5f8d251e753e8b5bb9e74c980a4afc7a7fbf66b1ed8fb7c67a9ec7c2ad5cfd74038bdfa6b1f6cbd458fd2e84b358efbb0363f5b71358fccd8c33596f9c4bfddcc458fac78d8cf5797b3296f5f82c4c49e6f5c9bf9fb23ce41307967e3935d6f36c0b67b1ce3f188b5f3757367f5363b98fdc38b0cc0f8cf5f90bf3ea97028bfe50981289777d63edcf81b1c4439897f3c52d615738cfe0df371c1deb7db265acf98d8d253f7a50d67a60c758cfcbf4cc7f2fb0f8bf1736bfae30d6f35f1a4b3ce6c6e2df95ca85f6f7dc58f3db0e5c783e14e6ebc533e87e963fbe0873f9fd3cc97c91693fd028b0d4e3c558f3eb0b9b5f972bab3fe78c353f3056bfabc0e2371636bfe4cf9b29d1e76b69acfdb863accfd33cb0dc2fa7c6e2179e03cb79ae940b7dffbf1b6bfd1363f53b12367f581a6b3d1bca56df6e60a9bfc6e765def4ecef6bc7eafaf9e8d558fbb7a15ce87d7263acf7ffbdb1e40f33e1e0cf29ebfea8eb6d7ff29f17f8f4137dfe51d8fa0117ca65ee3fbfe3bd705116b2de9f775e3af50313e1a229f1f0682cf1b052e6e1d9dfbf1cddd4fd2363cdcfef5fb05b7d1f0c944bed4f67ac9f5f27c265bf4c3d9f07eefb787f1f96695eaa1e0a174d7d7f81b1ee4f81a5fe75e552d9bf1fca7e617e9e8d556f33b0c4fbcf5ffdb44c956bc6a2d75dfd6c2020fd3ce2ff69a0c31c0b2cff91461fef71804374bfaa81231ce3044b9ce2ecd734380fc2392e70890ff888bfa6f184cff8c24e5ef10ddf71f3a37c3ed6c015afdec26dfeb983bbb887fb78f0f734380fe031c7437f3247788c27d8fe713e1f6a1076f014cfb08be7ac7481977885d75c951fe4f3630dcea3c3eb7b9cc70d6b9ce12d9fee26de610debeb69b0fb578cb89a0d8c399711e794609373d9c39455f2b53466d8c20c17809c45cc7a3c00f011081cffccff379fef35388f1d0428a0c401f459e58c3d45700f0003cee71d8678fc730d7430e2557d3c8331f7568c37308129cc7006733e9d262c6008cb6ff3f94ea3c72bc678ca3f1fb80a637884154c71c974c55d72c91a4feca4fdf553f8ad46554d8e9ee30a9eb1efab31611f2ff0ca346427bb9c11e114debe7e7ebed328318702e7f0ce9dbee47a1c724655b745b0c94ea6b0c55519f059b98f73d19a6cc30eecc21eecfb7100877004c770026de8e070bdfe805338832e9cc3055cc2955f7b0d3de8f0cfebb5356ee016eea0c6a30e11342086049a907aadcd35355a90111250f5e5288706bfdb4bea572a78b49e06ddd3a0d2807a2502110d6944639ad09466ebf9e8ae684e0bf5b1a4075ab28f11ffa1df678dc7f57cb0c68a9ee899355e7c2ddbf40a31bdb1c63bcdfe86c6803669cb9f4555c76b38a76dcee57d5d1f5c8f1d5af0b9745581bb029a5c8f3eedd21eed73b70ebe56fa91061dd061f05139e9d1116b1cfb9aee55c4fcf6330d5cd289d778a6b65fdd831dea702e256b9cf2b974a84367d4fd580347744e17744957acc13e7cfc095d538f356ed8cd2ddd518dea147da4c1956890ffcf295ed5e4c83b4a59f182b9455935e3b801ab791c7fa4e188d7a4bcbee66353feaef9df8852ca2f3e9ee3ef73840f359cabfec22979f4ddbd1bf018ba118f318f899bf298b9b95bb8e537cffe9ffffef4171c39a0bf</data>
- </image>
- <image name="image6" >
- <data format="XPM.GZ" length="3742" >789c8d96c9521c490c86ef3c458775734cc8ddd5b5c6c41c303b180cc60b66620eaacc2c9aa5599b7562de7da45fc5180c8e98fa39f091522e4a49c9bbb783bdedcdc1db77735733991d864198c8e5e06dbc9e4eeffffceb8fbfe7de64d9407f466531c8defc36f76667360883adb3d364c013051ae2039f8147266359068f4dc6740a2e4db05f05d726f0253898c017c6a3cc04ffafce79aa3af0143c36c17e055caa0aacbf06aeb2203e5f09ae4d185f75ce472de6e7737063c2fcb57356b702fed673e32c473d4bcf3760198f02e69325706b022f3a676df0f567e05035d1ed273dc79883e7c1d1045e70ae2456d84fd9738a589f0b703261bc72ae25e17ee4b0e7d8f3b5733374e603e32c37c11ff36970db12f193f7e07c1c6bec87c6e0c604ff0e1c4db03f36cec7e3a6f4fd2e38e779eee7bd05e7e350fa7e4fc0455ee6b84fb9eab913bfdf1c5ce5758efba54fffb1e75302d726f8af3817a5f8f922584cf06fc0211f951ebfd0b30afe07ce4510dfdf1e38e665e9f9f1e01c32cf1fda06a73c2f7c7eac5f8c8b61eef582f315b909dc82f1c17e07dc1459e5f1c77d953abb787e0ab832611cf957366dd9c707f556762a3fcf8673ddd6d8afdc1957b909fe98af2a65d4c787c08d09e3c8bfaad504f378de83a309e35fc049d9d747bda19c7dbe8f602d88d6fd11af3a33c1ffde398e02ec69178c0b04bb7fa12be03e08e7ab4b895e2f74ec1ca2e73f6d811b2d37df1feaa9969082f71ff4a73a98c01f9cdb3678fde27eea58f7f9cdc8bfba33c11efda2199ac01bcead048fd72678a4e9e3f6a86f6d172acc87fc69f290f9386f3d72f478a1bf348509fea8b7a66c9b80fec1a8b7a66a53f47cc2fe9b5ae77346fe35ad09e761703081d12f9b68c2fc57ce6d0c1e6fe463934ce0efc63234c11ffd5b4a13c66f9cb53d79fded832bcd27f47f5aeb59055e744eb1df3fe2251aeee4e7453f9264c27aa847b44f7f4f909fda3efb7ae30c5c84b65f1fef435b9a608ff7a4ad4c981ffb6b6b13d8fda5edfb37eff4dcb65e2f787f5a7cb0f7fd0413ecf13eb49d09f6783ff07cf97d8ec0a3f8d8df516f483faf07c45b1f27e9f30ff989e9fdbe11ff1034fd3c9eebe068c238fa9f6677f2fb27ac1f475dd3f97da25fc6c204be755673ef3f8db3360c1f1f824b13c651df2877c44fd0df511efe5ea39f44318151cf9a4e2ab0af870d63fee4dc55fdfe109f880ff3fb788a8ff98df733762630fa471aa6febda2839e5b3f0fe1bef4f18bc9fb01fa7dca4ce0bb9e5b671ef69c3cff18f99cc626d853cf551f3fe453ca531bbdde979cbb2c793e207f536102a39fa5ca0446bf4279f97b89feaabb5181511f38bedf2ffa47373461bdcfe0dc8471d46387860fc6fbaad155c11ef7a5d953747ede69cf2a30fe3fd06c5121fe88572726f8a37f68720ffbfdadf7ac02fb7e82098c7e85ebf2fde37dea92098cf7acc367bc33fbff7a6ecfc4c22d078eaac41d1ff0e4d7f66a7df84293e71ecfec858f9ee8d1fef8a9c733fb139ef2299ff1395ff0255fc167c233befee1f1cc3ef10ddff21ddff303cfabe77bd584177891971e3d7ed8db4e7b2df30aaff29a7aac3ff9ebe4a9bdf2067fe04ddee28ffafb36eff027de558fcfbaab2ffc95bf3db5578b3dfecefb3ce411673c56ceb9e0b23f47a5fbac7fb26f889988742f2a129e504b81a246e0c8ec293cb7a7441d0b1dd0840ee9883486744253bea4533a7bd5fe9c2ed4feb29fff4aff32a36b8dd5e92fe6bfa15bddcf1dddd303cd93c6911668aa2b5cbc363f3c16799f9630fbb2d20aadd21aadeb3d547a8617f6f0d8a00fb4495bfadb47daa61dfa84f977e933c597f64f6e6c9fbed057fa467bf49df669c8bb34a2eca53d8d35576ef88e722aa8a48a6a6a448320a20fd36bf3eb7f407c2c89efb5500f6422877224c77222533915e6b397fbd117f54ccee54275295732936bb9915bb9937b797869ff34e7649ecfe4bd2ce81a8bbc2a4bb2fc5a3dfe2c59915559fb75fdfe8f7affe7f7b97f011cdd9635</data>
- </image>
- </images>
-</ui>
diff --git a/examples/activeqt/webbrowser/webaxwidget.h b/examples/activeqt/webbrowser/webaxwidget.h
index 4a34a12..acb936e 100644
--- a/examples/activeqt/webbrowser/webaxwidget.h
+++ b/examples/activeqt/webbrowser/webaxwidget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -53,7 +53,7 @@ public:
{
}
protected:
- virtual bool translateKeyEvent(int message, int keycode) const
+ bool translateKeyEvent(int message, int keycode) const Q_DECL_OVERRIDE
{
if (message >= WM_KEYFIRST && message <= WM_KEYLAST)
return true;
diff --git a/examples/activeqt/webbrowser/webbrowser.pro b/examples/activeqt/webbrowser/webbrowser.pro
index 9fa342b..0fd36c0 100644
--- a/examples/activeqt/webbrowser/webbrowser.pro
+++ b/examples/activeqt/webbrowser/webbrowser.pro
@@ -5,7 +5,6 @@ QT += widgets axcontainer
HEADERS = webaxwidget.h
SOURCES = main.cpp
FORMS = mainwindow.ui
-wincewm*: FORMS = mainwindow_windowsmobile.ui
# install
diff --git a/examples/activeqt/wrapper/doc/src/wrapper.qdoc b/examples/activeqt/wrapper/doc/src/wrapper.qdoc
index 41debb9..f51fe12 100644
--- a/examples/activeqt/wrapper/doc/src/wrapper.qdoc
+++ b/examples/activeqt/wrapper/doc/src/wrapper.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU 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
+** 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$
diff --git a/examples/activeqt/wrapper/main.cpp b/examples/activeqt/wrapper/main.cpp
index 5c16f92..2c0db5f 100644
--- a/examples/activeqt/wrapper/main.cpp
+++ b/examples/activeqt/wrapper/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/activeqt/wrapper/wrapperax.rc b/examples/activeqt/wrapper/wrapperax.rc
index 4a30a6f..6db5316 100644
--- a/examples/activeqt/wrapper/wrapperax.rc
+++ b/examples/activeqt/wrapper/wrapperax.rc
@@ -15,10 +15,10 @@ BEGIN
BEGIN
BLOCK "040904e4"
BEGIN
- VALUE "CompanyName", "Digia Plc and/or its subsidiary(-ies)"
+ VALUE "CompanyName", "The Qt COmpany Ltd."
VALUE "FileDescription", "Wrapper Example (ActiveQt)"
VALUE "FileVersion", "1.0.0.0"
- VALUE "LegalCopyright", "Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies)."
+ VALUE "LegalCopyright", "Copyright (C) 2015 The Qt Company Ltd."
VALUE "InternalName", "wrapperax.dll"
VALUE "OriginalFilename", "wrapperax.dll"
VALUE "ProductName", "Wrapper Example (ActiveQt)"
diff --git a/qtactiveqt.pro b/qtactiveqt.pro
index 039aaad..b993871 100644
--- a/qtactiveqt.pro
+++ b/qtactiveqt.pro
@@ -1,7 +1,4 @@
CONFIG += tests_need_tools
load(qt_parts)
-!win32|winrt|wince {
- message("ActiveQt is a Windows Desktop-only module. Will just generate a docs target.")
- SUBDIRS = src
-}
+SUBDIRS = src
diff --git a/src/activeqt/activeqt.pro b/src/activeqt/activeqt.pro
index 752bd21..090566e 100644
--- a/src/activeqt/activeqt.pro
+++ b/src/activeqt/activeqt.pro
@@ -1,12 +1,12 @@
-win32:!winrt {
+win32:!winrt:!wince {
TEMPLATE = subdirs
CONFIG += ordered
axshared.file = axshared.prx
- SUBDIRS = axshared container
- !wince: SUBDIRS += control
+ SUBDIRS = axshared container control
} else {
# fake project for creating the documentation
+ message("ActiveQt is a Windows Desktop-only module. Will just generate a docs target.")
TEMPLATE = aux
QMAKE_DOCS = $$PWD/doc/activeqt.qdocconf
}
diff --git a/src/activeqt/axshared.prx b/src/activeqt/axshared.prx
index 29fe833..6d335e9 100644
--- a/src/activeqt/axshared.prx
+++ b/src/activeqt/axshared.prx
@@ -7,8 +7,7 @@ MODULE_INCNAME = ActiveQt
CONFIG += static
QT += gui-private widgets
-LIBS_PRIVATE += -lole32 -loleaut32
-!wince*: LIBS_PRIVATE += -luser32 -lgdi32 -ladvapi32
+LIBS_PRIVATE += -lole32 -loleaut32 -luser32 -lgdi32 -ladvapi32
mingw: LIBS_PRIVATE += -luuid
HEADERS = \
diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp
index 3181578..2c5865c 100644
--- a/src/activeqt/container/qaxbase.cpp
+++ b/src/activeqt/container/qaxbase.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -304,14 +304,7 @@ public:
}
sigs.insert(memid, signalname);
- QMap<DISPID,QByteArray>::ConstIterator it;
- DISPID id = -1;
- for (it = propsigs.constBegin(); it!= propsigs.constEnd(); ++it) {
- if (it.value() == signalname) {
- id = it.key();
- break;
- }
- }
+ const DISPID id = propsigs.key(signalname, -1);
if (id != -1)
propsigs.remove(id);
}
@@ -586,6 +579,8 @@ public:
class QAxBasePrivate
{
public:
+ typedef QHash<QUuid, QAxEventSink*> UuidEventSinkHash;
+
QAxBasePrivate()
: useEventSink(true), useMetaObject(true), useClassInfo(true),
cachedMetaObject(false), initialized(false), tryCache(false),
@@ -625,8 +620,7 @@ public:
}
QString ctrl;
-
- QHash<QUuid, QAxEventSink*> eventSink;
+ UuidEventSinkHash eventSink;
uint useEventSink :1;
uint useMetaObject :1;
uint useClassInfo :1;
@@ -886,9 +880,6 @@ QAxBase::QAxBase(IUnknown *iface)
d->ptr->AddRef();
d->initialized = true;
}
-#if defined(Q_OS_WINCE)
- CoInitializeEx(0, COINIT_MULTITHREADED);
-#endif
}
/*!
@@ -898,9 +889,6 @@ QAxBase::QAxBase(IUnknown *iface)
*/
QAxBase::~QAxBase()
{
-#if defined(Q_OS_WINCE)
- CoUninitialize();
-#endif
clear();
@@ -996,7 +984,7 @@ QAxMetaObject *QAxBase::internalMetaObject() const
*/
bool QAxBase::setControl(const QString &c)
{
- if (c.toLower() == d->ctrl.toLower())
+ if (!c.compare(d->ctrl, Qt::CaseInsensitive))
return !d->ctrl.isEmpty();
QString search = c;
@@ -1014,10 +1002,9 @@ bool QAxBase::setControl(const QString &c)
search = controls.value(c + QLatin1String("/CLSID/Default")).toString();
if (search.isEmpty()) {
controls.beginGroup(QLatin1String("/CLSID"));
- QStringList clsids = controls.childGroups();
- for (QStringList::Iterator it = clsids.begin(); it != clsids.end(); ++it) {
- QString clsid = *it;
- QString name = controls.value(clsid + QLatin1String("/Default")).toString();
+ const QStringList clsids = controls.childGroups();
+ foreach (const QString &clsid, clsids) {
+ const QString name = controls.value(clsid + QLatin1String("/Default")).toString();
if (name == c) {
search = clsid;
break;
@@ -1031,7 +1018,7 @@ bool QAxBase::setControl(const QString &c)
search = c;
}
- if (search.toLower() == d->ctrl.toLower())
+ if (!search.compare(d->ctrl, Qt::CaseInsensitive))
return !d->ctrl.isEmpty();
clear();
@@ -1116,10 +1103,7 @@ void QAxBase::disableClassInfo()
*/
void QAxBase::clear()
{
- QHash<QUuid, QAxEventSink*>::Iterator it = d->eventSink.begin();
- while (it != d->eventSink.end()) {
- QAxEventSink *eventSink = it.value();
- ++it;
+ foreach (QAxEventSink *eventSink, d->eventSink) {
if (eventSink) {
eventSink->unadvise();
eventSink->Release();
@@ -1349,17 +1333,12 @@ bool QAxBase::initializeLicensedHelper(void *f, const QString &key, IUnknown **p
*/
bool QAxBase::initializeActive(IUnknown** ptr)
{
-#if defined(Q_OS_WINCE)
- Q_UNUSED(ptr);
- return false;
-#else
int at = control().lastIndexOf(QLatin1String("}&"));
QString clsid(control().left(at));
GetActiveObject(QUuid(clsid), 0, ptr);
return *ptr != 0;
-#endif
}
#ifdef Q_CC_GNU
@@ -1380,10 +1359,6 @@ bool QAxBase::initializeActive(IUnknown** ptr)
*/
bool QAxBase::initializeFromFile(IUnknown** ptr)
{
-#if defined(Q_OS_WINCE)
- Q_UNUSED(ptr);
- return false;
-#else
IStorage *storage = 0;
ILockBytes * bytes = 0;
HRESULT hres = ::CreateILockBytesOnHGlobal(0, TRUE, &bytes);
@@ -1395,7 +1370,6 @@ bool QAxBase::initializeFromFile(IUnknown** ptr)
bytes->Release();
return hres == S_OK;
-#endif
}
@@ -1436,7 +1410,7 @@ bool QAxBase::initializeRemote(IUnknown** ptr)
at = user.indexOf(QChar::fromLatin1(':'));
if (at != -1) {
passwd = user.mid(at+1);
- user = user.left(at);
+ user.truncate(at);
}
at = user.indexOf(QChar::fromLatin1('/'));
if (at != -1) {
@@ -1448,7 +1422,7 @@ bool QAxBase::initializeRemote(IUnknown** ptr)
at = clsid.lastIndexOf(QLatin1String("}:"));
if (at != -1) {
key = clsid.mid(at+2);
- clsid = clsid.left(at);
+ clsid.truncate(at);
}
d->ctrl = server + QChar::fromLatin1('/') + clsid;
@@ -1542,6 +1516,10 @@ public:
}
private:
+ typedef QPair<QByteArray, int> ByteArrayIntPair;
+ typedef QList<ByteArrayIntPair> ByteArrayIntPairList;
+ typedef QMap<QByteArray, ByteArrayIntPairList>::ConstIterator EnumListMapConstIterator;
+
void init();
@@ -1706,10 +1684,11 @@ private:
return property_list.value(name).type;
}
- QMap<QByteArray, QList<QPair<QByteArray, int> > > enum_list;
+ QMap<QByteArray, ByteArrayIntPairList> enum_list;
+
inline void addEnumValue(const QByteArray &enumname, const QByteArray &key, int value)
{
- enum_list[enumname].append(QPair<QByteArray, int>(key, value));
+ enum_list[enumname].append(ByteArrayIntPair(key, value));
}
inline bool hasEnum(const QByteArray &enumname)
@@ -1933,20 +1912,20 @@ QByteArray MetaObjectGenerator::usertypeToString(const TYPEDESC &tdesc, ITypeInf
userTypeName = "IDispatch";
} else {
if (typeLibName != current_typelib)
- userTypeName = typeLibName + "::" + userTypeName;
+ userTypeName.prepend(typeLibName + "::");
if (!qax_qualified_usertypes.contains(userTypeName))
qax_qualified_usertypes << userTypeName;
}
break;
case TKIND_ENUM:
if (typeLibName != current_typelib)
- userTypeName = typeLibName + "::" + userTypeName;
+ userTypeName.prepend(typeLibName + "::");
if (!qax_qualified_usertypes.contains("enum " + userTypeName))
qax_qualified_usertypes << "enum " + userTypeName;
break;
case TKIND_INTERFACE:
if (typeLibName != current_typelib)
- userTypeName = typeLibName + "::" + userTypeName;
+ userTypeName.prepend(typeLibName + "::");
if (!qax_qualified_usertypes.contains(userTypeName))
qax_qualified_usertypes << userTypeName;
break;
@@ -2182,11 +2161,10 @@ void MetaObjectGenerator::readClassInfo()
if (!tlid.isEmpty()) {
controls.beginGroup(QLatin1String("/Classes/TypeLib/") + tlid);
QStringList versions = controls.childGroups();
- QStringList::Iterator vit = versions.begin();
- while (tlfile.isEmpty() && vit != versions.end()) {
- QString version = *vit;
- ++vit;
+ foreach (const QString &version, versions) {
tlfile = controls.value(QLatin1Char('/') + version + QLatin1String("/0/win32/.")).toString();
+ if (!tlfile.isEmpty())
+ break;
}
controls.endGroup();
} else {
@@ -2197,11 +2175,13 @@ void MetaObjectGenerator::readClassInfo()
if (!tlfile.isEmpty()) {
LoadTypeLib((OLECHAR*)tlfile.utf16(), &typelib);
if (!typelib) {
- tlfile = tlfile.left(tlfile.lastIndexOf(QLatin1Char('.'))) + QLatin1String(".tlb");
+ tlfile.truncate(tlfile.lastIndexOf(QLatin1Char('.')));
+ tlfile += QLatin1String(".tlb");
LoadTypeLib((OLECHAR*)tlfile.utf16(), &typelib);
}
if (!typelib) {
- tlfile = tlfile.left(tlfile.lastIndexOf(QLatin1Char('.'))) + QLatin1String(".olb");
+ tlfile.truncate(tlfile.lastIndexOf(QLatin1Char('.')));
+ tlfile.append(QLatin1String(".olb"));
LoadTypeLib((OLECHAR*)tlfile.utf16(), &typelib);
}
}
@@ -2978,11 +2958,7 @@ QMetaObject *MetaObjectGenerator::tryCache()
IConnectionPointContainer *cpoints = 0;
d->ptr->QueryInterface(IID_IConnectionPointContainer, (void**)&cpoints);
if (cpoints) {
- QList<QUuid>::ConstIterator it = d->metaobj->connectionInterfaces.begin();
- while (it != d->metaobj->connectionInterfaces.end()) {
- QUuid iid = *it;
- ++it;
-
+ foreach (const QUuid &iid, d->metaobj->connectionInterfaces) {
IConnectionPoint *cpoint = 0;
cpoints->FindConnectionPoint(iid, &cpoint);
if (cpoint) {
@@ -3068,10 +3044,9 @@ QMetaObject *MetaObjectGenerator::metaObject(const QMetaObject *parentObject, co
int_data_size += (signal_list.count() + slot_list.count()) * 5 + paramsDataSize;
int_data_size += property_list.count() * 3;
int_data_size += enum_list.count() * 4;
- for (QMap<QByteArray, QList<QPair<QByteArray, int> > >::ConstIterator it = enum_list.begin();
- it != enum_list.end(); ++it) {
- int_data_size += (*it).count() * 2;
- }
+ const EnumListMapConstIterator ecend = enum_list.end();
+ for (EnumListMapConstIterator it = enum_list.begin(); it != ecend; ++it)
+ int_data_size += it.value().count() * 2;
++int_data_size; // eod
uint *int_data = new uint[int_data_size];
@@ -3100,7 +3075,9 @@ QMetaObject *MetaObjectGenerator::metaObject(const QMetaObject *parentObject, co
uint offset = header->classInfoData;
// each class info in form key\0value\0
- for (QMap<QByteArray, QByteArray>::ConstIterator it = classinfo_list.begin(); it != classinfo_list.end(); ++it) {
+ typedef QMap<QByteArray, QByteArray>::ConstIterator ClassInfoConstIterator;
+ const ClassInfoConstIterator cend = classinfo_list.end();
+ for (ClassInfoConstIterator it = classinfo_list.begin(); it != cend; ++it) {
QByteArray key(it.key());
QByteArray value(it.value());
int_data[offset++] = strings.enter(key);
@@ -3147,7 +3124,9 @@ QMetaObject *MetaObjectGenerator::metaObject(const QMetaObject *parentObject, co
Q_ASSERT(offset == uint(header->propertyData));
// each property in form name\0type\0
- for (QMap<QByteArray, Property>::ConstIterator it = property_list.begin(); it != property_list.end(); ++it) {
+ typedef QMap<QByteArray, Property>::ConstIterator PropertyMapConstIterator;
+ const PropertyMapConstIterator pcend = property_list.end();
+ for (PropertyMapConstIterator it = property_list.begin(); it != pcend; ++it) {
QByteArray name(it.key());
QByteArray type(it.value().type);
Q_ASSERT(!type.isEmpty());
@@ -3164,7 +3143,7 @@ QMetaObject *MetaObjectGenerator::metaObject(const QMetaObject *parentObject, co
int value_offset = offset + enum_list.count() * 4;
// each enum in form name\0
- for (QMap<QByteArray, QList<QPair<QByteArray, int> > >::ConstIterator it = enum_list.begin(); it != enum_list.end(); ++it) {
+ for (EnumListMapConstIterator it = enum_list.begin(); it != ecend; ++it) {
QByteArray name(it.key());
int flags = 0x0; // 0x1 for flag?
int count = it.value().count();
@@ -3178,8 +3157,9 @@ QMetaObject *MetaObjectGenerator::metaObject(const QMetaObject *parentObject, co
Q_ASSERT(offset == uint(header->enumeratorData + enum_list.count() * 4));
// each enum value in form key\0
- for (QMap<QByteArray, QList<QPair<QByteArray, int> > >::ConstIterator it = enum_list.begin(); it != enum_list.end(); ++it) {
- for (QList<QPair<QByteArray,int> >::ConstIterator it2 = it.value().begin(); it2 != it.value().end(); ++it2) {
+ for (EnumListMapConstIterator it = enum_list.begin(); it != ecend; ++it) {
+ const ByteArrayIntPairList::ConstIterator vcend = it.value().end();
+ for (ByteArrayIntPairList::ConstIterator it2 = it.value().begin(); it2 != vcend; ++it2) {
QByteArray key((*it2).first);
int value = (*it2).second;
int_data[offset++] = strings.enter(key);
@@ -3206,8 +3186,7 @@ QMetaObject *MetaObjectGenerator::metaObject(const QMetaObject *parentObject, co
if (!cacheKey.isEmpty()) {
mo_cache.insert(cacheKey, d->metaobj);
d->cachedMetaObject = true;
- for (QHash<QUuid, QAxEventSink*>::Iterator it = d->eventSink.begin(); it != d->eventSink.end(); ++it) {
- QAxEventSink *sink = it.value();
+ foreach (QAxEventSink *sink, d->eventSink) {
if (sink) {
QUuid ciid = sink->connectionInterface();
@@ -3660,7 +3639,7 @@ int QAxBase::internalInvoke(QMetaObject::Call call, int index, void **v)
if (dispid == DISPID_UNKNOWN && slotname.toLower().startsWith("set")) {
// see if we are calling a property set function as a slot
- slotname = slotname.right(slotname.length() - 3);
+ slotname.remove(0, slotname.length() - 3);
dispid = d->metaobj->dispIDofName(slotname, disp);
isProperty = true;
}
@@ -3684,6 +3663,8 @@ int QAxBase::internalInvoke(QMetaObject::Call call, int index, void **v)
else
params.rgvarg = new VARIANTARG[params.cArgs];
}
+ for (VARIANTARG *vp = params.rgvarg, *vEnd = params.rgvarg + params.cArgs; vp < vEnd; ++vp)
+ VariantInit(vp);
int p;
for (p = 0; p < (int)params.cArgs; ++p) {
@@ -3835,7 +3816,8 @@ static void qax_noSuchFunction(int disptype, const QByteArray &name, const QByte
\a name is already normalized?
*/
-bool QAxBase::dynamicCallHelper(const char *name, void *inout, QList<QVariant> &vars, QByteArray &type)
+bool QAxBase::dynamicCallHelper(const char *name, void *inout, QList<QVariant> &vars,
+ QByteArray &type, unsigned flags)
{
if (isNull()) {
qWarning("QAxBase::dynamicCallHelper: Object is not initialized, or initialization failed");
@@ -3866,7 +3848,9 @@ bool QAxBase::dynamicCallHelper(const char *name, void *inout, QList<QVariant> &
bool parse = false;
if (function.contains('(')) {
- disptype = DISPATCH_METHOD | DISPATCH_PROPERTYGET;
+ disptype = DISPATCH_METHOD;
+ if (!(flags & NoPropertyGet))
+ disptype |= DISPATCH_PROPERTYGET; // Support Excel/VB.
if (d->useMetaObject)
id = mo->indexOfSlot(function);
if (id >= 0) {
@@ -4047,6 +4031,32 @@ bool QAxBase::dynamicCallHelper(const char *name, void *inout, QList<QVariant> &
return checkHRESULT(hres, &excepinfo, this, QLatin1String(function), varc-argerr-1);
}
+/*!
+ \internal
+*/
+QVariantList QAxBase::argumentsToList(const QVariant &var1, const QVariant &var2,
+ const QVariant &var3, const QVariant &var4,
+ const QVariant &var5, const QVariant &var6,
+ const QVariant &var7, const QVariant &var8)
+{
+ QVariantList vars;
+ QVariant var = var1;
+ int argc = 1;
+ while (var.isValid()) {
+ vars << var;
+ switch (++argc) {
+ case 2: var = var2; break;
+ case 3: var = var3; break;
+ case 4: var = var4; break;
+ case 5: var = var5; break;
+ case 6: var = var6; break;
+ case 7: var = var7; break;
+ case 8: var = var8; break;
+ default:var = QVariant(); break;
+ }
+ }
+ return vars;
+}
/*!
Calls the COM object's method \a function, passing the
@@ -4107,24 +4117,8 @@ QVariant QAxBase::dynamicCall(const char *function,
const QVariant &var7,
const QVariant &var8)
{
- QList<QVariant> vars;
- QVariant var = var1;
- int argc = 1;
- while(var.isValid()) {
- vars << var;
- switch(++argc) {
- case 2: var = var2; break;
- case 3: var = var3; break;
- case 4: var = var4; break;
- case 5: var = var5; break;
- case 6: var = var6; break;
- case 7: var = var7; break;
- case 8: var = var8; break;
- default:var = QVariant(); break;
- }
- }
-
- return dynamicCall(function, vars);
+ QVariantList vars = QAxBase::argumentsToList(var1, var2, var3, var4, var5, var6, var7, var8);
+ return dynamicCall(function, vars); // Use overload taking "QVariantList &" to avoid recursion
}
/*!
@@ -4141,11 +4135,19 @@ QVariant QAxBase::dynamicCall(const char *function,
*/
QVariant QAxBase::dynamicCall(const char *function, QList<QVariant> &vars)
{
+ return dynamicCall(function, vars, 0);
+}
+
+/*!
+ \internal
+*/
+QVariant QAxBase::dynamicCall(const char *function, QList<QVariant> &vars, unsigned flags)
+{
VARIANTARG res;
VariantInit(&res);
QByteArray rettype;
- if (!dynamicCallHelper(function, &res, vars, rettype))
+ if (!dynamicCallHelper(function, &res, vars, rettype, flags))
return QVariant();
QVariant qvar = VARIANTToQVariant(res, rettype);
diff --git a/src/activeqt/container/qaxbase.h b/src/activeqt/container/qaxbase.h
index 16e8f50..7b667af 100644
--- a/src/activeqt/container/qaxbase.h
+++ b/src/activeqt/container/qaxbase.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -137,6 +137,11 @@ protected:
void initializeFrom(QAxBase *that);
void connectNotify();
long indexOfVerb(const QString &verb) const;
+ QVariant dynamicCall(const char *name, QList<QVariant> &vars, unsigned flags);
+ static QVariantList argumentsToList(const QVariant &var1, const QVariant &var2,
+ const QVariant &var3, const QVariant &var4,
+ const QVariant &var5, const QVariant &var6,
+ const QVariant &var7, const QVariant &var8);
virtual const QMetaObject *fallbackMetaObject() const = 0;
@@ -148,6 +153,11 @@ protected:
static const uint qt_meta_data_QAxBase[];
private:
+ enum DynamicCallHelperFlags {
+ NoPropertyGet = 0x1 // Suppresses DISPATCH_PROPERTYGET, use for plain functions.
+ };
+
+ friend class QAxScript;
friend class QAxEventSink;
friend void *qax_createObjectWrapper(int, IUnknown*);
bool initializeLicensedHelper(void *factory, const QString &key, IUnknown **ptr);
@@ -157,24 +167,17 @@ private:
virtual const QMetaObject *parentMetaObject() const = 0;
int internalProperty(QMetaObject::Call, int index, void **v);
int internalInvoke(QMetaObject::Call, int index, void **v);
- bool dynamicCallHelper(const char *name, void *out, QList<QVariant> &var, QByteArray &type);
+ bool dynamicCallHelper(const char *name, void *out, QList<QVariant> &var,
+ QByteArray &type, unsigned flags = 0);
};
-#if defined Q_CC_MSVC && _MSC_VER < 1300
-template <> inline QAxBase *qobject_cast_helper<QAxBase*>(const QObject *o, QAxBase *)
-#else
template <> inline QAxBase *qobject_cast<QAxBase*>(const QObject *o)
-#endif
{
void *result = o ? const_cast<QObject *>(o)->qt_metacast("QAxBase") : 0;
return (QAxBase*)(result);
}
-#if defined Q_CC_MSVC && _MSC_VER < 1300
-template <> inline QAxBase *qobject_cast_helper<QAxBase*>(QObject *o, QAxBase *)
-#else
template <> inline QAxBase *qobject_cast<QAxBase*>(QObject *o)
-#endif
{
void *result = o ? o->qt_metacast("QAxBase") : 0;
return (QAxBase*)(result);
diff --git a/src/activeqt/container/qaxdump.cpp b/src/activeqt/container/qaxdump.cpp
index 8bbca6c..db124d4 100644
--- a/src/activeqt/container/qaxdump.cpp
+++ b/src/activeqt/container/qaxdump.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/container/qaxobject.cpp b/src/activeqt/container/qaxobject.cpp
index 7303e74..a2ea2dd 100644
--- a/src/activeqt/container/qaxobject.cpp
+++ b/src/activeqt/container/qaxobject.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/container/qaxobject.h b/src/activeqt/container/qaxobject.h
index ceb96ca..fd18c98 100644
--- a/src/activeqt/container/qaxobject.h
+++ b/src/activeqt/container/qaxobject.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -68,21 +68,13 @@ private:
const QMetaObject *parentMetaObject() const;
};
-#if defined Q_CC_MSVC && _MSC_VER < 1300
-template <> inline QAxObject *qobject_cast_helper<QAxObject*>(const QObject *o, QAxObject *)
-#else
template <> inline QAxObject *qobject_cast<QAxObject*>(const QObject *o)
-#endif
{
void *result = o ? const_cast<QObject *>(o)->qt_metacast("QAxObject") : 0;
return (QAxObject*)(result);
}
-#if defined Q_CC_MSVC && _MSC_VER < 1300
-template <> inline QAxObject *qobject_cast_helper<QAxObject*>(QObject *o, QAxObject *)
-#else
template <> inline QAxObject *qobject_cast<QAxObject*>(QObject *o)
-#endif
{
void *result = o ? o->qt_metacast("QAxObject") : 0;
return (QAxObject*)(result);
diff --git a/src/activeqt/container/qaxscript.cpp b/src/activeqt/container/qaxscript.cpp
index 7e4bb6a..b7a8862 100644
--- a/src/activeqt/container/qaxscript.cpp
+++ b/src/activeqt/container/qaxscript.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -712,13 +712,8 @@ bool QAxScript::load(const QString &code, const QString &language)
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)) {
+ foreach (const QAxEngineDescriptor &engine, engines) {
+ if (!engine.code.isEmpty() && code.contains(engine.code)) {
lang = engine.name;
break;
}
@@ -783,10 +778,8 @@ QVariant QAxScript::call(const QString &function, const QVariant &var1,
const QVariant &var7,
const QVariant &var8)
{
- if (!script_engine)
- return QVariant();
-
- return script_engine->dynamicCall(function.toLatin1(), var1, var2, var3, var4, var5, var6, var7, var8);
+ QVariantList vars = QAxBase::argumentsToList(var1, var2, var3, var4, var5, var6, var7, var8);
+ return call(function, vars);
}
/*!
@@ -803,7 +796,8 @@ QVariant QAxScript::call(const QString &function, QList<QVariant> &arguments)
if (!script_engine)
return QVariant();
- return script_engine->dynamicCall(function.toLatin1(), arguments);
+ return script_engine->dynamicCall(function.toLatin1(), arguments,
+ QAxBase::NoPropertyGet);
}
/*! \internal
@@ -944,13 +938,9 @@ QAxScriptManager::~QAxScriptManager()
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);
- }
-
+ functions.reserve(d->scriptDict.size());
+ foreach (const QAxScript *script, d->scriptDict)
+ functions.append(script->functions(flags));
return functions;
}
@@ -959,14 +949,7 @@ 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;
+ return d->scriptDict.keys();
}
/*!
@@ -1072,13 +1055,8 @@ QAxScript *QAxScriptManager::load(const QString &file, const QString &name)
if (file.endsWith(QLatin1String(".js"))) {
language = QLatin1String("JScript");
} else {
- QList<QAxEngineDescriptor>::ConstIterator it;
- for (it = engines.begin(); it != engines.end(); ++it) {
- QAxEngineDescriptor engine = *it;
- if (engine.extension.isEmpty())
- continue;
-
- if (file.endsWith(engine.extension)) {
+ foreach (const QAxEngineDescriptor &engine, engines) {
+ if (!engine.extension.isEmpty() && file.endsWith(engine.extension)) {
language = engine.name;
break;
}
@@ -1200,14 +1178,12 @@ QString QAxScriptManager::scriptFileFilter()
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(')');
+ foreach (const QAxEngineDescriptor &engine, engines) {
+ if (!engine.extension.isEmpty()) {
+ allFiles += QLatin1String(" *") + engine.extension;
+ specialFiles += QLatin1String(";;") + engine.name
+ + QLatin1String(" Files (*") + engine.extension + QLatin1Char(')');
+ }
}
allFiles += QLatin1Char(')');
@@ -1238,22 +1214,16 @@ QAxScript *QAxScriptManager::scriptForFunction(const QString &function) const
{
// check full prototypes if included
if (function.contains(QLatin1Char('('))) {
- QHash<QString, QAxScript*>::ConstIterator scriptIt;
- for (scriptIt = d->scriptDict.begin(); scriptIt != d->scriptDict.end(); ++scriptIt) {
- QAxScript *script = scriptIt.value();
-
+ foreach (QAxScript *script, d->scriptDict) {
if (script->functions(QAxScript::FunctionSignatures).contains(function))
return script;
}
}
QString funcName = function;
- funcName = funcName.left(funcName.indexOf(QLatin1Char('(')));
+ funcName.truncate(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();
-
+ foreach (QAxScript *script, d->scriptDict) {
if (script->functions(QAxScript::FunctionNames).contains(funcName))
return script;
}
diff --git a/src/activeqt/container/qaxscript.h b/src/activeqt/container/qaxscript.h
index 84a6702..8abd72a 100644
--- a/src/activeqt/container/qaxscript.h
+++ b/src/activeqt/container/qaxscript.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/container/qaxscriptwrapper.cpp b/src/activeqt/container/qaxscriptwrapper.cpp
index e9cb031..26b33e8 100644
--- a/src/activeqt/container/qaxscriptwrapper.cpp
+++ b/src/activeqt/container/qaxscriptwrapper.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/container/qaxselect.cpp b/src/activeqt/container/qaxselect.cpp
index a6234de..ff56dc3 100644
--- a/src/activeqt/container/qaxselect.cpp
+++ b/src/activeqt/container/qaxselect.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -298,20 +298,20 @@ QAxSelect::QAxSelect(QWidget *parent, Qt::WindowFlags flags)
d->filterModel->setSourceModel(new ControlList(this));
d->selectUi.ActiveXList->setModel(d->filterModel);
- connect(d->selectUi.ActiveXList->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)),
- this, SLOT(onActiveXListCurrentChanged(QModelIndex)));
- connect(d->selectUi.ActiveXList, SIGNAL(activated(QModelIndex)),
- this, SLOT(onActiveXListActivated()));
+ connect(d->selectUi.ActiveXList->selectionModel(), &QItemSelectionModel::currentChanged,
+ this, &QAxSelect::onActiveXListCurrentChanged);
+ connect(d->selectUi.ActiveXList, &QAbstractItemView::activated,
+ this, &QAxSelect::onActiveXListActivated);
#ifndef QT_NO_CURSOR
QApplication::restoreOverrideCursor();
#endif
d->selectUi.ActiveXList->setFocus();
- connect(d->selectUi.buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
- connect(d->selectUi.buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
- connect(d->selectUi.filterLineEdit, SIGNAL(textChanged(QString)),
- this, SLOT(onFilterLineEditChanged(QString)));
+ connect(d->selectUi.buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
+ connect(d->selectUi.buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
+ connect(d->selectUi.filterLineEdit, &QLineEdit::textChanged,
+ this, &QAxSelect::onFilterLineEditChanged);
}
/*!
diff --git a/src/activeqt/container/qaxselect.h b/src/activeqt/container/qaxselect.h
index f336679..0b21c02 100644
--- a/src/activeqt/container/qaxselect.h
+++ b/src/activeqt/container/qaxselect.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/container/qaxselect.ui b/src/activeqt/container/qaxselect.ui
index 8f88e42..25b8490 100644
--- a/src/activeqt/container/qaxselect.ui
+++ b/src/activeqt/container/qaxselect.ui
@@ -2,8 +2,8 @@
<class>QAxSelect</class>
<comment>*********************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -19,8 +19,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/container/qaxwidget.cpp b/src/activeqt/container/qaxwidget.cpp
index 7c3a0a8..9def746 100644
--- a/src/activeqt/container/qaxwidget.cpp
+++ b/src/activeqt/container/qaxwidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -381,7 +381,6 @@ public:
bool eventTranslated : 1;
private:
-#if !defined(Q_WS_WINCE)
struct OleMenuItem {
OleMenuItem(HMENU hm = 0, int ID = 0, QMenu *menu = 0)
: hMenu(hm), id(ID), subMenu(menu)
@@ -390,8 +389,9 @@ private:
int id;
QMenu *subMenu;
};
+ typedef QMap<QAction*, OleMenuItem> MenuItemMap;
+
QMenu *generatePopup(HMENU subMenu, QWidget *parent);
-#endif
IOleObject *m_spOleObject;
IOleControl *m_spOleControl;
@@ -406,19 +406,15 @@ private:
bool canHostDocument : 1;
DWORD m_dwOleObject;
-#if !defined(Q_WS_WINCE)
HWND m_menuOwner;
-#endif
CONTROLINFO control_info;
QSize sizehint;
LONG ref;
QAxWidget *widget;
QAxHostWidget *host;
-#if !defined(Q_WS_WINCE)
QPointer<QMenuBar> menuBar;
- QMap<QAction*,OleMenuItem> menuItemMap;
-#endif
+ MenuItemMap menuItemMap;
};
static const ushort mouseTbl[] = {
@@ -461,17 +457,13 @@ static Qt::KeyboardModifiers translateModifierState(int s)
return bst;
}
-#if defined(Q_WS_WINCE)
-static int filter_ref = 0;
-#else
static const wchar_t *qaxatom = L"QAxContainer4_Atom";
-#endif
// The filter procedure listening to user interaction on the control
class QAxNativeEventFilter : public QAbstractNativeEventFilter
{
public:
- virtual bool nativeEventFilter(const QByteArray &eventType, void *message, long *) Q_DECL_OVERRIDE;
+ bool nativeEventFilter(const QByteArray &eventType, void *message, long *) Q_DECL_OVERRIDE;
};
Q_GLOBAL_STATIC(QAxNativeEventFilter, s_nativeEventFilter)
@@ -552,10 +544,8 @@ QAxClientSite::QAxClientSite(QAxWidget *c)
canHostDocument = false;
m_dwOleObject = 0;
-#if !defined(Q_WS_WINCE)
m_menuOwner = 0;
menuBar = 0;
-#endif
memset(&control_info, 0, sizeof(control_info));
}
@@ -571,7 +561,6 @@ bool QAxClientSite::activateObject(bool initialized, const QByteArray &data)
DWORD dwMiscStatus = 0;
m_spOleObject->GetMiscStatus(DVASPECT_CONTENT, &dwMiscStatus);
-#if !defined(Q_OS_WINCE)
IOleDocument *document = 0;
m_spOleObject->QueryInterface(IID_IOleDocument, (void**)&document);
if (document) {
@@ -595,7 +584,6 @@ bool QAxClientSite::activateObject(bool initialized, const QByteArray &data)
}
document->Release();
}
-#endif
if (!canHostDocument) {
// activate as control
@@ -630,7 +618,6 @@ bool QAxClientSite::activateObject(bool initialized, const QByteArray &data)
if (spPS) {
HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE, data.length());
if (hGlobal) {
-#if !defined(Q_OS_WINCE)
BYTE* pbData = (BYTE*)GlobalLock(hGlobal);
if (pbData)
memcpy(pbData, data.data(), data.length());
@@ -647,7 +634,6 @@ bool QAxClientSite::activateObject(bool initialized, const QByteArray &data)
pLockBytes->Release();
}
GlobalFree(hGlobal);
-#endif
}
spPS->Release();
}
@@ -1066,9 +1052,7 @@ HRESULT WINAPI QAxClientSite::CanInPlaceActivate()
HRESULT WINAPI QAxClientSite::OnInPlaceActivate()
{
AX_DEBUG(QAxClientSite::OnInPlaceActivate);
-#if !defined(Q_OS_WINCE)
OleLockRunning(m_spOleObject, true, false);
-#endif
if (!m_spInPlaceObject) {
/* ### disabled for now
m_spOleObject->QueryInterface(IID_IOleInPlaceObjectWindowless, (void**) &m_spInPlaceObject);
@@ -1134,9 +1118,7 @@ HRESULT WINAPI QAxClientSite::OnInPlaceDeactivate()
m_spInPlaceObject->Release();
m_spInPlaceObject = 0;
inPlaceObjectWindowless = false;
-#if !defined(Q_OS_WINCE)
OleLockRunning(m_spOleObject, false, false);
-#endif
return S_OK;
}
@@ -1162,11 +1144,6 @@ HRESULT WINAPI QAxClientSite::OnPosRectChange(LPCRECT /*lprcPosRect*/)
}
//**** IOleInPlaceFrame
-#if defined(Q_WS_WINCE)
-HRESULT WINAPI QAxClientSite::InsertMenus(HMENU /*hmenuShared*/, LPOLEMENUGROUPWIDTHS /*lpMenuWidths*/)
-{
- return E_NOTIMPL;
-#else
HRESULT WINAPI QAxClientSite::InsertMenus(HMENU /*hmenuShared*/, LPOLEMENUGROUPWIDTHS lpMenuWidths)
{
AX_DEBUG(QAxClientSite::InsertMenus);
@@ -1200,7 +1177,6 @@ HRESULT WINAPI QAxClientSite::InsertMenus(HMENU /*hmenuShared*/, LPOLEMENUGROUPW
lpMenuWidths->width[4] = windowMenu->actions().count();
return S_OK;
-#endif
}
static int menuItemEntry(HMENU menu, int index, MENUITEMINFO item, QString &text, QPixmap &/*icon*/)
@@ -1237,7 +1213,6 @@ static int menuItemEntry(HMENU menu, int index, MENUITEMINFO item, QString &text
return -1;
}
-#if !defined(Q_OS_WINCE)
QMenu *QAxClientSite::generatePopup(HMENU subMenu, QWidget *parent)
{
QMenu *popup = 0;
@@ -1267,7 +1242,7 @@ QMenu *QAxClientSite::generatePopup(HMENU subMenu, QWidget *parent)
QString keyString = text.right(text.length() - lastSep);
accel = keyString;
if (!accel.isEmpty())
- text = text.left(lastSep);
+ text.truncate(lastSep);
}
if (popupMenu)
@@ -1303,13 +1278,7 @@ QMenu *QAxClientSite::generatePopup(HMENU subMenu, QWidget *parent)
}
return popup;
}
-#endif
-#if defined(Q_OS_WINCE)
-HRESULT WINAPI QAxClientSite::SetMenu(HMENU /*hmenuShared*/, HOLEMENU /*holemenu*/, HWND /*hwndActiveObject*/)
-{
- return E_NOTIMPL;
-#else
HRESULT WINAPI QAxClientSite::SetMenu(HMENU hmenuShared, HOLEMENU holemenu, HWND hwndActiveObject)
{
AX_DEBUG(QAxClientSite::SetMenu);
@@ -1378,24 +1347,16 @@ HRESULT WINAPI QAxClientSite::SetMenu(HMENU hmenuShared, HOLEMENU holemenu, HWND
}
} else if (menuBar) {
m_menuOwner = 0;
- QMap<QAction*, OleMenuItem>::Iterator it;
- for (it = menuItemMap.begin(); it != menuItemMap.end(); ++it) {
- QAction *action = it.key();
- delete action;
- }
+ const MenuItemMap::Iterator mend = menuItemMap.end();
+ for (MenuItemMap::Iterator it = menuItemMap.begin(); it != mend; ++it)
+ delete it.key();
menuItemMap.clear();
}
OleSetMenuDescriptor(holemenu, widget ? hwndForWidget(widget) : 0, m_menuOwner, this, m_spInPlaceActiveObject);
return S_OK;
-#endif
}
-#if defined(Q_OS_WINCE)
-int QAxClientSite::qt_metacall(QMetaObject::Call /*call*/, int isignal, void ** /*argv*/)
-{
- return isignal;
-#else
int QAxClientSite::qt_metacall(QMetaObject::Call call, int isignal, void **argv)
{
if (!m_spOleObject || call != QMetaObject::InvokeMetaMethod || !menuBar)
@@ -1411,25 +1372,19 @@ int QAxClientSite::qt_metacall(QMetaObject::Call call, int isignal, void **argv)
if (oleItem.hMenu)
::PostMessage(m_menuOwner, WM_COMMAND, oleItem.id, 0);
return -1;
-#endif
}
HRESULT WINAPI QAxClientSite::RemoveMenus(HMENU /*hmenuShared*/)
{
-#if defined(Q_OS_WINCE)
- return E_NOTIMPL;
-#else
AX_DEBUG(QAxClientSite::RemoveMenus);
- QMap<QAction*, OleMenuItem>::Iterator it;
- for (it = menuItemMap.begin(); it != menuItemMap.end(); ++it) {
- QAction *action = it.key();
- action->setVisible(false);
- delete action;
+ const MenuItemMap::Iterator mend = menuItemMap.end();
+ for (MenuItemMap::Iterator it = menuItemMap.begin(); it != mend; ++it) {
+ it.key()->setVisible(false);
+ delete it.key();
}
menuItemMap.clear();
return S_OK;
-#endif
}
HRESULT WINAPI QAxClientSite::SetStatusText(LPCOLESTR pszStatusText)
@@ -2009,23 +1964,14 @@ bool QAxWidget::createHostWindow(bool initialized)
*/
bool QAxWidget::createHostWindow(bool initialized, const QByteArray &data)
{
-#ifdef QT3_SUPPORT
- QApplication::sendPostedEvents(0, QEvent::ChildInserted);
-#endif
container = new QAxClientSite(this);
container->activateObject(initialized, data);
-#if !defined(Q_OS_WINCE)
ATOM filter_ref = FindAtom(qaxatom);
-#endif
if (!filter_ref)
QAbstractEventDispatcher::instance()->installNativeEventFilter(s_nativeEventFilter());
-#if !defined(Q_OS_WINCE)
AddAtom(qaxatom);
-#else
- ++filter_ref;
-#endif
if (parentWidget())
QApplication::postEvent(parentWidget(), new QEvent(QEvent::LayoutRequest));
@@ -2056,17 +2002,12 @@ void QAxWidget::clear()
if (isNull())
return;
if (!control().isEmpty()) {
-#if !defined(Q_OS_WINCE)
ATOM filter_ref = FindAtom(qaxatom);
if (filter_ref)
DeleteAtom(filter_ref);
filter_ref = FindAtom(qaxatom);
- if (!filter_ref) {
-#else
- if (!filter_ref && !--filter_ref) {
-#endif
+ if (!filter_ref)
QAbstractEventDispatcher::instance()->removeNativeEventFilter(s_nativeEventFilter());
- }
}
if (container)
diff --git a/src/activeqt/container/qaxwidget.h b/src/activeqt/container/qaxwidget.h
index 2c8817b..4792d0e 100644
--- a/src/activeqt/container/qaxwidget.h
+++ b/src/activeqt/container/qaxwidget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -92,21 +92,13 @@ private:
const QMetaObject *parentMetaObject() const;
};
-#if defined Q_CC_MSVC && _MSC_VER < 1300
-template <> inline QAxWidget *qobject_cast_helper<QAxWidget*>(const QObject *o, QAxWidget *)
-#else
template <> inline QAxWidget *qobject_cast<QAxWidget*>(const QObject *o)
-#endif
{
void *result = o ? const_cast<QObject *>(o)->qt_metacast("QAxWidget") : 0;
return (QAxWidget*)(result);
}
-#if defined Q_CC_MSVC && _MSC_VER < 1300
-template <> inline QAxWidget *qobject_cast_helper<QAxWidget*>(QObject *o, QAxWidget *)
-#else
template <> inline QAxWidget *qobject_cast<QAxWidget*>(QObject *o)
-#endif
{
void *result = o ? o->qt_metacast("QAxWidget") : 0;
return (QAxWidget*)(result);
diff --git a/src/activeqt/control/control.pro b/src/activeqt/control/control.pro
index 20a5ea3..c579ce8 100644
--- a/src/activeqt/control/control.pro
+++ b/src/activeqt/control/control.pro
@@ -10,7 +10,8 @@ HEADERS = qaxaggregated.h \
qaxfactory.h \
../shared/qaxtypes.h
-SOURCES = qaxserver.cpp \
+SOURCES = qaxaggregated.cpp \
+ qaxserver.cpp \
qaxserverbase.cpp \
qaxbindable.cpp \
qaxfactory.cpp \
diff --git a/src/activeqt/control/qaxaggregated.cpp b/src/activeqt/control/qaxaggregated.cpp
new file mode 100644
index 0000000..6ce27a5
--- /dev/null
+++ b/src/activeqt/control/qaxaggregated.cpp
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the ActiveQt framework 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 The Qt Company Ltd 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$
+**
+****************************************************************************/
+
+#include "qaxaggregated.h"
+
+#ifdef QT_WIDGETS_LIB
+# include <QtWidgets/QWidget>
+#endif
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QAxAggregated
+ \brief The QAxAggregated class is an abstract base class for implementations of
+ additional COM interfaces.
+
+ \inmodule QAxServer
+
+ Create a subclass of QAxAggregated and reimplement
+ queryInterface() to support additional COM interfaces. Use
+ multiple inheritance from those COM interfaces. Implement the
+ IUnknown interface of those COM interfaces by delegating the
+ calls to \c QueryInterface(), \c AddRef() and \c Release() to the
+ interface provided by controllingUnknown().
+
+ Use the widget() method if you need to make calls to the QWidget
+ implementing the ActiveX control. You must not store that pointer
+ in your subclass (unless you use QPointer), as the QWidget can
+ be destroyed by the ActiveQt framework at any time.
+
+ \sa QAxBindable, QAxFactory, {Active Qt}
+*/
+
+/*!
+ \fn QAxAggregated::~QAxAggregated()
+
+ The destructor is called internally by Qt.
+*/
+
+/*!
+ \fn long QAxAggregated::queryInterface(const QUuid &iid, void **iface)
+
+ Reimplement this pure virtual function to support additional COM
+ interfaces. Set the value of \a iface to point to this object to
+ support the interface \a iid. Note that you must cast the \c
+ this pointer to the appropriate superclass.
+
+ \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).
+
+ \warning
+ Even though you must implement the \c IUnknown interface if you
+ implement any COM interface you must not support the \c IUnknown
+ interface in your queryInterface() implementation.
+*/
+
+/*!
+ \fn IUnknown *QAxAggregated::controllingUnknown() const
+
+ Returns the \c IUnknown interface of the ActiveX control. Implement
+ the \c IUnknown interface in your QAxAggregated subclass to
+ delegate calls to \c QueryInterface(), \c AddRef(), and \c
+ Release() to the interface provided by this function.
+
+ \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
+ declaration of your subclass.
+*/
+
+/*!
+ \fn QObject *QAxAggregated::object() const
+
+ Returns a pointer to the QObject subclass implementing the COM object.
+ This function might return 0.
+
+ \warning
+ You must not store the returned pointer, unless you use a
+ QPointer, since the QObject can be destroyed by ActiveQt at any
+ time.
+*/
+
+/*!
+ Returns a pointer to the QWidget subclass implementing the ActiveX control.
+ This function might return 0.
+
+ \warning
+ You must not store the returned pointer, unless you use a
+ QPointer, since the QWidget can be destroyed by ActiveQt at any
+ time.
+*/
+QWidget *QAxAggregated::widget() const
+{
+#ifdef QT_WIDGETS_LIB
+ return qobject_cast<QWidget*>(the_object);
+#else
+ return 0;
+#endif
+}
+
+QT_END_NAMESPACE
diff --git a/src/activeqt/control/qaxaggregated.h b/src/activeqt/control/qaxaggregated.h
index 90c8f5a..80e0212 100644
--- a/src/activeqt/control/qaxaggregated.h
+++ b/src/activeqt/control/qaxaggregated.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -47,6 +47,8 @@ struct IUnknown;
QT_BEGIN_NAMESPACE
+class QWidget;
+
class QUuid;
class QAxAggregated
@@ -62,10 +64,7 @@ protected:
inline IUnknown *controllingUnknown() const
{ return controlling_unknown; }
- inline QWidget *widget() const
- {
- return qobject_cast<QWidget*>(the_object);
- }
+ QWidget *widget() const;
inline QObject *object() const { return the_object; }
private:
@@ -74,10 +73,10 @@ private:
};
#define QAXAGG_IUNKNOWN \
- HRESULT WINAPI QueryInterface(REFIID iid, LPVOID *iface) { \
- return controllingUnknown()->QueryInterface(iid, iface); } \
- ULONG WINAPI AddRef() {return controllingUnknown()->AddRef(); } \
- ULONG WINAPI Release() {return controllingUnknown()->Release(); } \
+ HRESULT WINAPI QueryInterface(REFIID iid, LPVOID *iface) Q_DECL_OVERRIDE \
+ { return controllingUnknown()->QueryInterface(iid, iface); } \
+ ULONG WINAPI AddRef() Q_DECL_OVERRIDE { return controllingUnknown()->AddRef(); } \
+ ULONG WINAPI Release() Q_DECL_OVERRIDE { return controllingUnknown()->Release(); } \
QT_END_NAMESPACE
diff --git a/src/activeqt/control/qaxbindable.cpp b/src/activeqt/control/qaxbindable.cpp
index 23f6244..eaead36 100644
--- a/src/activeqt/control/qaxbindable.cpp
+++ b/src/activeqt/control/qaxbindable.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -233,90 +233,4 @@ bool QAxBindable::writeData(QIODevice *sink)
return false;
}
-/*!
- \class QAxAggregated
- \brief The QAxAggregated class is an abstract base class for implementations of
- additional COM interfaces.
-
- \inmodule QAxServer
-
- Create a subclass of QAxAggregated and reimplement
- queryInterface() to support additional COM interfaces. Use
- multiple inheritance from those COM interfaces. Implement the
- IUnknown interface of those COM interfaces by delegating the
- calls to \c QueryInterface(), \c AddRef() and \c Release() to the
- interface provided by controllingUnknown().
-
- Use the widget() method if you need to make calls to the QWidget
- implementing the ActiveX control. You must not store that pointer
- in your subclass (unless you use QPointer), as the QWidget can
- be destroyed by the ActiveQt framework at any time.
-
- \sa QAxBindable, QAxFactory, {Active Qt}
-*/
-
-/*!
- \fn QAxAggregated::~QAxAggregated()
-
- The destructor is called internally by Qt.
-*/
-
-/*!
- \fn long QAxAggregated::queryInterface(const QUuid &iid, void **iface)
-
- Reimplement this pure virtual function to support additional COM
- interfaces. Set the value of \a iface to point to this object to
- support the interface \a iid. Note that you must cast the \c
- this pointer to the appropriate superclass.
-
- \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).
-
- \warning
- Even though you must implement the \c IUnknown interface if you
- implement any COM interface you must not support the \c IUnknown
- interface in your queryInterface() implementation.
-*/
-
-/*!
- \fn IUnknown *QAxAggregated::controllingUnknown() const
-
- Returns the \c IUnknown interface of the ActiveX control. Implement
- the \c IUnknown interface in your QAxAggregated subclass to
- delegate calls to \c QueryInterface(), \c AddRef(), and \c
- Release() to the interface provided by this function.
-
- \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
- declaration of your subclass.
-*/
-
-/*!
- \fn QObject *QAxAggregated::object() const
-
- Returns a pointer to the QObject subclass implementing the COM object.
- This function might return 0.
-
- \warning
- You must not store the returned pointer, unless you use a
- QPointer, since the QObject can be destroyed by ActiveQt at any
- time.
-*/
-
-/*!
- \fn QWidget *QAxAggregated::widget() const
-
- Returns a pointer to the QWidget subclass implementing the ActiveX control.
- This function might return 0.
-
- \warning
- You must not store the returned pointer, unless you use a
- QPointer, since the QWidget can be destroyed by ActiveQt at any
- time.
-*/
-
QT_END_NAMESPACE
diff --git a/src/activeqt/control/qaxbindable.h b/src/activeqt/control/qaxbindable.h
index ebc6452..69381e6 100644
--- a/src/activeqt/control/qaxbindable.h
+++ b/src/activeqt/control/qaxbindable.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/control/qaxfactory.cpp b/src/activeqt/control/qaxfactory.cpp
index 4ab315c..3d6ff9f 100644
--- a/src/activeqt/control/qaxfactory.cpp
+++ b/src/activeqt/control/qaxfactory.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -278,7 +278,8 @@ bool QAxFactory::validateLicenseKey(const QString &key, const QString &licenseKe
if (licenseKey.isEmpty()) {
QString licFile(QString::fromWCharArray(qAxModuleFilename));
int lastDot = licFile.lastIndexOf(QLatin1Char('.'));
- licFile = licFile.left(lastDot) + QLatin1String(".lic");
+ licFile.truncate(lastDot);
+ licFile += QLatin1String(".lic");
if (QFile::exists(licFile))
return true;
return false;
@@ -492,7 +493,7 @@ bool QAxFactory::registerActiveObject(QObject *object)
if (qstricmp(object->metaObject()->classInfo(object->metaObject()->indexOfClassInfo("RegisterObject")).value(), "yes"))
return false;
- if (!QString::fromWCharArray(qAxModuleFilename).toLower().endsWith(QLatin1String(".exe")))
+ if (!QString::fromWCharArray(qAxModuleFilename).endsWith(QLatin1String(".exe"), Qt::CaseInsensitive))
return false;
ActiveObject *active = new ActiveObject(object, qAxFactory());
diff --git a/src/activeqt/control/qaxfactory.h b/src/activeqt/control/qaxfactory.h
index eaf5757..533ffc5 100644
--- a/src/activeqt/control/qaxfactory.h
+++ b/src/activeqt/control/qaxfactory.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -218,20 +218,20 @@ public:
factory = new QAxClass<Class>(typeLibID().toString(), appID().toString()); \
qRegisterMetaType<Class*>(#Class"*"); \
keys = factory->featureList(); \
- for (it = keys.begin(); it != keys.end(); ++it) { \
- factoryKeys += *it; \
- factories.insert(*it, factory); \
- creatable.insert(*it, true); \
+ foreach (const QString &key, keys) { \
+ factoryKeys += key; \
+ factories.insert(key, factory); \
+ creatable.insert(key, true); \
}\
#define QAXTYPE(Class) \
factory = new QAxClass<Class>(typeLibID().toString(), appID().toString()); \
qRegisterMetaType<Class*>(#Class"*"); \
keys = factory->featureList(); \
- for (it = keys.begin(); it != keys.end(); ++it) { \
- factoryKeys += *it; \
- factories.insert(*it, factory); \
- creatable.insert(*it, false); \
+ foreach (const QString &key, keys) { \
+ factoryKeys += key; \
+ factories.insert(key, factory); \
+ creatable.insert(key, false); \
}\
#define QAXFACTORY_END() \
diff --git a/src/activeqt/control/qaxmain.cpp b/src/activeqt/control/qaxmain.cpp
index 8dafaf0..c030d81 100644
--- a/src/activeqt/control/qaxmain.cpp
+++ b/src/activeqt/control/qaxmain.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/control/qaxserver.cpp b/src/activeqt/control/qaxserver.cpp
index 58b3faf..4326eb8 100644
--- a/src/activeqt/control/qaxserver.cpp
+++ b/src/activeqt/control/qaxserver.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -47,9 +47,13 @@
#include <qmap.h>
#include <qmenubar.h>
#include <qmetaobject.h>
+#include <qscopedpointer.h>
+#include <qfileinfo.h>
#include <qsettings.h>
#include <qvariant.h>
#include <qtextstream.h>
+#include <qloggingcategory.h>
+#include <qdebug.h>
#include <qt_windows.h>
#include <olectl.h>
@@ -107,6 +111,8 @@ static CRITICAL_SECTION qAxModuleSection;
static int initCount = 0;
+Q_LOGGING_CATEGORY(lcAxRegistration, "qt.activeqt.registration")
+
QString qAxInit()
{
static QString libFile;
@@ -121,18 +127,18 @@ QString qAxInit()
if (LoadTypeLibEx((wchar_t*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK)
return libFile;
- int lastDot = libFile.lastIndexOf(QLatin1Char('.'));
- libFile = libFile.left(lastDot) + QLatin1String(".tlb");
+ const int lastDot = libFile.lastIndexOf(QLatin1Char('.'));
+ libFile.truncate(lastDot);
+ libFile += QLatin1String(".tlb");
if (LoadTypeLibEx((wchar_t*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK)
return libFile;
- lastDot = libFile.lastIndexOf(QLatin1Char('.'));
- libFile = libFile.left(lastDot) + QLatin1String(".olb");
+ libFile.truncate(lastDot);
+ libFile += QLatin1String(".olb");
if (LoadTypeLibEx((wchar_t*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK)
return libFile;
- libFile = QString();
- return libFile;
+ return QString();
}
void qAxCleanup()
@@ -207,16 +213,15 @@ QString qax_clean_type(const QString &type, const QMetaObject *mo)
HRESULT UpdateRegistry(BOOL bRegister)
{
qAxIsServer = false;
+ const QChar dot(QLatin1Char('.'));
+ const QChar slash(QLatin1Char('/'));
QString file = QString::fromWCharArray(qAxModuleFilename);
- QString path = file.left(file.lastIndexOf(QLatin1Char('\\'))+1);
- QString module = file.right(file.length() - path.length());
- module = module.left(module.lastIndexOf(QLatin1Char('.')));
+ const QString module = QFileInfo(file).baseName();
const QString appId = qAxFactory()->appID().toString().toUpper();
const QString libId = qAxFactory()->typeLibID().toString().toUpper();
- QString libFile = qAxInit();
- QString typeLibVersion;
+ const QString libFile = qAxInit();
TLIBATTR *libAttr = 0;
if (qAxTypeLibrary)
@@ -224,10 +229,6 @@ HRESULT UpdateRegistry(BOOL bRegister)
if (!libAttr)
return SELFREG_E_TYPELIB;
- DWORD major = libAttr->wMajorVerNum;
- DWORD minor = libAttr->wMinorVerNum;
- typeLibVersion = QString::number((uint)major) + QLatin1Char('.') + QString::number((uint)minor);
-
if (bRegister)
RegisterTypeLib(qAxTypeLibrary, (wchar_t*)libFile.utf16(), 0);
else
@@ -235,17 +236,14 @@ HRESULT UpdateRegistry(BOOL bRegister)
qAxTypeLibrary->ReleaseTLibAttr(libAttr);
- if (typeLibVersion.isEmpty())
- typeLibVersion = QLatin1String("1.0");
-
// check whether the user has permission to write to HKLM\Software\Classes
// if not, use HKCU\Software\Classes
QString keyPath(QLatin1String("HKEY_LOCAL_MACHINE\\Software\\Classes"));
- QSettings test(keyPath, QSettings::NativeFormat);
- if (!test.isWritable())
+ QScopedPointer<QSettings> settings(new QSettings(keyPath, QSettings::NativeFormat));
+ if (!settings->isWritable()) {
keyPath = QLatin1String("HKEY_CURRENT_USER\\Software\\Classes");
-
- QSettings settings(keyPath, QSettings::NativeFormat);
+ settings.reset(new QSettings(keyPath, QSettings::NativeFormat));
+ }
// we try to create the ActiveX widgets later on...
bool delete_qApp = false;
@@ -257,18 +255,17 @@ HRESULT UpdateRegistry(BOOL bRegister)
if (bRegister) {
if (qAxOutProcServer) {
- settings.setValue(QLatin1String("/AppID/") + appId + QLatin1String("/."), module);
- settings.setValue(QLatin1String("/AppID/") + module + QLatin1String(".EXE/AppID"), appId);
+ settings->setValue(QLatin1String("/AppID/") + appId + QLatin1String("/."), module);
+ settings->setValue(QLatin1String("/AppID/") + module + QLatin1String(".EXE/AppID"), appId);
}
QStringList keys = qAxFactory()->featureList();
- for (QStringList::Iterator key = keys.begin(); key != keys.end(); ++key) {
- QString className = *key;
- QObject *object = qAxFactory()->createObject(className);
- const QMetaObject *mo = qAxFactory()->metaObject(className);
- const QString classId = qAxFactory()->classID(className).toString().toUpper();
+ foreach (const QString &classNameIn, keys) {
+ QObject *object = qAxFactory()->createObject(classNameIn);
+ const QMetaObject *mo = qAxFactory()->metaObject(classNameIn);
+ const QString classId = qAxFactory()->classID(classNameIn).toString().toUpper();
- className = qax_clean_type(className, mo);
+ const QString className = qax_clean_type(classNameIn, mo);
if (object) { // don't register subobject classes
QString classVersion = mo ? QString::fromLatin1(mo->classInfo(mo->indexOfClassInfo("Version")).value()) : QString();
@@ -276,7 +273,7 @@ HRESULT UpdateRegistry(BOOL bRegister)
classVersion = QLatin1String("1.0");
bool insertable = mo && !qstricmp(mo->classInfo(mo->indexOfClassInfo("Insertable")).value(), "yes");
bool control = object->isWidgetType();
- const QString classMajorVersion = classVersion.left(classVersion.indexOf(QLatin1Char('.')));
+ QString classMajorVersion = classVersion.left(classVersion.indexOf(dot));
uint olemisc = OLEMISC_SETCLIENTSITEFIRST
|OLEMISC_ACTIVATEWHENVISIBLE
|OLEMISC_INSIDEOUT
@@ -287,35 +284,41 @@ HRESULT UpdateRegistry(BOOL bRegister)
else if (object->findChild<QMenuBar*>() && !qax_disable_inplaceframe)
olemisc |= OLEMISC_WANTSTOMENUMERGE;
- settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/."), className + QLatin1String(" Class"));
- settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/CLSID/."), classId);
+ const QString versionLessProgId = module + dot + className;
+ const QString progId = versionLessProgId + dot + classMajorVersion;
+ QString key = slash + progId;
+ settings->setValue(key + QLatin1String("/."), className + QLatin1String(" Class"));
+ settings->setValue(key + QLatin1String("/CLSID/."), classId);
if (insertable)
- settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/Insertable/."), QVariant(QLatin1String("")));
+ settings->setValue(key + QLatin1String("/Insertable/."), QVariant(QLatin1String("")));
- settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/."), className + QLatin1String(" Class"));
- settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/CLSID/."), classId);
- settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/CurVer/."), module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion);
+ key = slash + module + dot + className;
+ settings->setValue(key + QLatin1String("/."), className + QLatin1String(" Class"));
+ settings->setValue(key + QLatin1String("/CLSID/."), classId);
+ settings->setValue(key + QLatin1String("/CurVer/."), progId);
- settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/."), className + QLatin1String(" Class"));
+ key = QLatin1String("/CLSID/") + classId;
+ settings->setValue(key + QLatin1String("/."), className + QLatin1String(" Class"));
if (file.endsWith(QLatin1String("exe"), Qt::CaseInsensitive))
- settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/AppID"), appId);
+ settings->setValue(key + QLatin1String("/AppID"), appId);
if (control)
- settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/Control/."), QVariant(QLatin1String("")));
+ settings->setValue(key + QLatin1String("/Control/."), QVariant(QLatin1String("")));
if (insertable)
- settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/Insertable/."), QVariant(QLatin1String("")));
- if (file.right(3).toLower() == QLatin1String("dll"))
- settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/InProcServer32/."), file);
+ settings->setValue(key + QLatin1String("/Insertable/."), QVariant(QLatin1String("")));
+ if (file.endsWith(QLatin1String("dll"), Qt::CaseInsensitive))
+ settings->setValue(key + QLatin1String("/InProcServer32/."), file);
else
- settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/LocalServer32/."),
+ settings->setValue(key + QLatin1String("/LocalServer32/."),
QLatin1Char('\"') + file + QLatin1String("\" -activex"));
- settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/MiscStatus/."), control ? QLatin1String("1") : QLatin1String("0"));
- settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/MiscStatus/1/."), QString::number(olemisc));
- settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/Programmable/."), QVariant(QLatin1String("")));
- settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/ToolboxBitmap32/."), QLatin1Char('\"') +
+ settings->setValue(key + QLatin1String("/MiscStatus/."), control ? QLatin1String("1") : QLatin1String("0"));
+ settings->setValue(key + QLatin1String("/MiscStatus/1/."), QString::number(olemisc));
+ settings->setValue(key + QLatin1String("/Programmable/."), QVariant(QLatin1String("")));
+ settings->setValue(key + QLatin1String("/ToolboxBitmap32/."), QLatin1Char('\"') +
file + QLatin1String("\", 101"));
- settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/TypeLib/."), libId); settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/Version/."), classVersion);
- settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/VersionIndependentProgID/."), module + QLatin1Char('.') + className);
- settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/ProgID/."), module + QLatin1Char('.') + className + QLatin1Char('.') + classVersion.left(classVersion.indexOf(QLatin1Char('.'))));
+ settings->setValue(key + QLatin1String("/TypeLib/."), libId);
+ settings->setValue(key + QLatin1String("/Version/."), classVersion);
+ settings->setValue(key + QLatin1String("/VersionIndependentProgID/."), versionLessProgId);
+ settings->setValue(key + QLatin1String("/ProgID/."), progId);
QString mime = QLatin1String(mo->classInfo(mo->indexOfClassInfo("MIME")).value());
if (!mime.isEmpty()) {
@@ -327,73 +330,82 @@ HRESULT UpdateRegistry(BOOL bRegister)
QString extension;
while (mime.contains(QLatin1Char(':'))) {
extension = mime.mid(mime.lastIndexOf(QLatin1Char(':')) + 1);
- mime = mime.left(mime.length() - extension.length() - 1);
+ mime.chop(extension.length() - 1);
// Prepend '.' before extension, if required.
extension = extension.trimmed();
- if (extension[0] != QLatin1Char('.'))
- extension = QLatin1Char('.') + extension;
+ if (!extension.startsWith(dot))
+ extension.prepend(dot);
}
if (!extension.isEmpty()) {
- settings.setValue(QLatin1Char('/') + extension + QLatin1String("/."), module + QLatin1Char('.') + className);
- settings.setValue(QLatin1Char('/') + extension + QLatin1String("/Content Type"), mime);
-
- mime = mime.replace(QLatin1Char('/'), QLatin1Char('\\'));
- settings.setValue(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/CLSID"), classId);
- settings.setValue(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/Extension"), extension);
+ key = slash + extension;
+ settings->setValue(key + QLatin1String("/."), module + dot + className);
+ settings->setValue(key + QLatin1String("/Content Type"), mime);
+
+ mime.replace(slash, QLatin1Char('\\'));
+ key = QLatin1String("/MIME/Database/Content Type/") + mime;
+ settings->setValue(key + QLatin1String("/CLSID"), classId);
+ settings->setValue(key + QLatin1String("/Extension"), extension);
}
}
}
delete object;
+ qCDebug(lcAxRegistration).nospace().noquote() << "Registered \"" << progId
+ << "\"/" << classId << ", \"" << file << "\" at \"" << keyPath
+ << "\", insertable=" << insertable << ", control=" << control
+ << ", olemisc=" << hex << showbase << olemisc
+ << ", mime=" << mime;
}
- qAxFactory()->registerClass(*key, &settings);
+ qAxFactory()->registerClass(classNameIn, settings.data());
}
} else {
if (qAxOutProcServer) {
- settings.remove(QLatin1String("/AppID/") + appId + QLatin1String("/."));
- settings.remove(QLatin1String("/AppID/") + module + QLatin1String(".EXE"));
+ settings->remove(QLatin1String("/AppID/") + appId + QLatin1String("/."));
+ settings->remove(QLatin1String("/AppID/") + module + QLatin1String(".EXE"));
}
QStringList keys = qAxFactory()->featureList();
- for (QStringList::Iterator key = keys.begin(); key != keys.end(); ++key) {
- QString className = *key;
- const QMetaObject *mo = qAxFactory()->metaObject(className);
- const QString classId = qAxFactory()->classID(className).toString().toUpper();
- className = qax_clean_type(className, mo);
+ foreach (const QString &classNameIn, keys) {
+ const QMetaObject *mo = qAxFactory()->metaObject(classNameIn);
+ const QString classId = qAxFactory()->classID(classNameIn).toString().toUpper();
+ const QString className = qax_clean_type(classNameIn, mo);
QString classVersion = mo ? QString::fromLatin1(mo->classInfo(mo->indexOfClassInfo("Version")).value()) : QString();
if (classVersion.isNull())
classVersion = QLatin1String("1.0");
- const QString classMajorVersion = classVersion.left(classVersion.indexOf(QLatin1Char('.')));
-
- qAxFactory()->unregisterClass(*key, &settings);
-
- settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/CLSID/."));
- settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/Insertable/."));
- settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/."));
- settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion);
-
- settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/CLSID/."));
- settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/CurVer/."));
- settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/."));
- settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className);
-
- settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/AppID"));
- settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/Control/."));
- settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/Insertable/."));
- settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/InProcServer32/."));
- settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/LocalServer32/."));
- settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/MiscStatus/1/."));
- settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/MiscStatus/."));
- settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/Programmable/."));
- settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/ToolboxBitmap32/."));
- settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/TypeLib/."));
- settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/Version/."));
- settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/VersionIndependentProgID/."));
- settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/ProgID/."));
- settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/."));
- settings.remove(QLatin1String("/CLSID/") + classId);
+ const QString classMajorVersion = classVersion.left(classVersion.indexOf(dot));
+
+ qAxFactory()->unregisterClass(classNameIn, settings.data());
+ const QString progId = module + dot + className + dot + classMajorVersion;
+ QString key = slash + progId;
+ settings->remove(key + QLatin1String("/CLSID/."));
+ settings->remove(key + QLatin1String("/Insertable/."));
+ settings->remove(key + QLatin1String("/."));
+ settings->remove(key);
+
+ key = slash + module + dot + className;
+ settings->remove(key + QLatin1String("/CLSID/."));
+ settings->remove(key + QLatin1String("/CurVer/."));
+ settings->remove(key + QLatin1String("/."));
+ settings->remove(key);
+
+ key = QLatin1String("/CLSID/") + classId;
+ settings->remove(key + QLatin1String("/AppID"));
+ settings->remove(key + QLatin1String("/Control/."));
+ settings->remove(key + QLatin1String("/Insertable/."));
+ settings->remove(key + QLatin1String("/InProcServer32/."));
+ settings->remove(key + QLatin1String("/LocalServer32/."));
+ settings->remove(key + QLatin1String("/MiscStatus/1/."));
+ settings->remove(key + QLatin1String("/MiscStatus/."));
+ settings->remove(key + QLatin1String("/Programmable/."));
+ settings->remove(key + QLatin1String("/ToolboxBitmap32/."));
+ settings->remove(key + QLatin1String("/TypeLib/."));
+ settings->remove(key + QLatin1String("/Version/."));
+ settings->remove(key + QLatin1String("/VersionIndependentProgID/."));
+ settings->remove(key + QLatin1String("/ProgID/."));
+ settings->remove(key + QLatin1String("/."));
+ settings->remove(key);
QString mime = QLatin1String(mo->classInfo(mo->indexOfClassInfo("MIME")).value());
if (!mime.isEmpty()) {
@@ -405,24 +417,29 @@ HRESULT UpdateRegistry(BOOL bRegister)
QString extension;
while (mime.contains(QLatin1Char(':'))) {
extension = mime.mid(mime.lastIndexOf(QLatin1Char(':')) + 1);
- mime = mime.left(mime.length() - extension.length() - 1);
+ mime.chop(extension.length() - 1);
// Prepend '.' before extension, if required.
extension = extension.trimmed();
- if (extension[0] != QLatin1Char('.'))
- extension.prepend(QLatin1Char('.'));
+ if (extension[0] != dot)
+ extension.prepend(dot);
}
if (!extension.isEmpty()) {
- settings.remove(QLatin1Char('/') + extension + QLatin1String("/Content Type"));
- settings.remove(QLatin1Char('/') + extension + QLatin1String("/."));
- settings.remove(QLatin1Char('/') + extension);
- mime.replace(QLatin1Char('/'), QLatin1Char('\\'));
- settings.remove(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/Extension"));
- settings.remove(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/CLSID"));
- settings.remove(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/."));
- settings.remove(QLatin1String("/MIME/Database/Content Type/") + mime);
+ key = slash + extension;
+ settings->remove(key + QLatin1String("/Content Type"));
+ settings->remove(key + QLatin1String("/."));
+ settings->remove(key);
+ mime.replace(slash, QLatin1Char('\\'));
+ key = QLatin1String("/MIME/Database/Content Type/") + mime;
+ settings->remove(key + QLatin1String("/Extension"));
+ settings->remove(key + QLatin1String("/CLSID"));
+ settings->remove(key + QLatin1String("/."));
+ settings->remove(key);
}
}
}
+ qCDebug(lcAxRegistration).nospace().noquote() << "Unregistered \""
+ << progId << "\"/" << classId << ", \"" << file << "\" from \""
+ << keyPath << '"';
}
}
@@ -430,8 +447,9 @@ HRESULT UpdateRegistry(BOOL bRegister)
delete qApp;
qAxCleanup();
- if (settings.status() == QSettings::NoError)
+ if (settings->status() == QSettings::NoError)
return S_OK;
+ qWarning() << module << ": Error writing to " << keyPath;
return SELFREG_E_CLASS;
}
@@ -1074,7 +1092,7 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver)
file.remove();
QString filebase = QString::fromWCharArray(qAxModuleFilename);
- filebase = filebase.left(filebase.lastIndexOf(QLatin1Char('.')));
+ filebase.truncate(filebase.lastIndexOf(QLatin1Char('.')));
QString appID = qAxFactory()->appID().toString().toUpper();
if (QUuid(appID).isNull())
@@ -1094,7 +1112,7 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver)
QString version(ver.unicode(), ver.length());
while (version.count(QLatin1Char('.')) > 1) {
int lastdot = version.lastIndexOf(QLatin1Char('.'));
- version = version.left(lastdot) + version.right(version.length() - lastdot - 1);
+ version.remove(lastdot, 1);
}
if (version.isEmpty())
version = QLatin1String("1.0");
@@ -1188,12 +1206,11 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver)
out << "\t/* Forward declaration of classes that might be used as parameters */" << endl << endl;
int res = S_OK;
- for (key = keys.begin(); key != keys.end(); ++key) {
- QByteArray className = (*key).toLatin1();
- const QMetaObject *mo = qAxFactory()->metaObject(QString::fromLatin1(className.constData()));
+ foreach (const QString &className, keys) {
+ const QMetaObject *mo = qAxFactory()->metaObject(className);
// We have meta object information for this type. Forward declare it.
if (mo) {
- QByteArray cleanType = qax_clean_type(*key, mo).toLatin1();
+ QByteArray cleanType = qax_clean_type(className, mo).toLatin1();
out << "\tcoclass " << cleanType << ';' << endl;
subtypes.append(cleanType);
if (!QMetaType::type(cleanType))
@@ -1206,15 +1223,14 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver)
}
out << endl;
- for (key = keys.begin(); key != keys.end(); ++key) {
- QByteArray className = (*key).toLatin1();
- const QMetaObject *mo = qAxFactory()->metaObject(QString::fromLatin1(className.constData()));
+ foreach (const QString &className, keys) {
+ const QMetaObject *mo = qAxFactory()->metaObject(className);
// We have meta object information for this type. Define it.
if (mo) {
- QObject *o = qAxFactory()->createObject(QString::fromLatin1(className.constData()));
+ QObject *o = qAxFactory()->createObject(className);
// It's not a control class, so it is actually a subtype. Define it.
if (!o)
- res = classIDL(0, mo, QString::fromLatin1(className), false, out);
+ res = classIDL(0, mo, className, false, out);
delete o;
}
}
@@ -1223,19 +1239,18 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver)
if (res != S_OK)
goto ErrorInClass;
- for (key = keys.begin(); key != keys.end(); ++key) {
- QByteArray className = (*key).toLatin1();
- QObject *o = qAxFactory()->createObject(QString::fromLatin1(className.constData()));
+ foreach (const QString &className, keys) {
+ QObject *o = qAxFactory()->createObject(className);
if (!o)
continue;
const QMetaObject *mo = o->metaObject();
QAxBindable *bind = (QAxBindable*)o->qt_metacast("QAxBindable");
bool isBindable = bind != 0;
- QByteArray cleanType = qax_clean_type(*key, mo).toLatin1();
+ const QByteArray cleanType = qax_clean_type(className, mo).toLatin1();
subtypes.append(cleanType);
subtypes.append(cleanType + '*');
- res = classIDL(o, mo, QString::fromLatin1(className.constData()), isBindable, out);
+ res = classIDL(o, mo, className, isBindable, out);
delete o;
if (res != S_OK)
break;
diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp
index c4cae79..5929270 100644
--- a/src/activeqt/control/qaxserverbase.cpp
+++ b/src/activeqt/control/qaxserverbase.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -620,12 +620,8 @@ public:
connections = old.connections;
that = old.that;
iid = old.iid;
- QList<CONNECTDATA>::Iterator it = connections.begin();
- while (it != connections.end()) {
- CONNECTDATA connection = *it;
- ++it;
+ foreach (const CONNECTDATA &connection, connections)
connection.pUnk->AddRef();
- }
}
~QAxConnection()
{
@@ -786,7 +782,7 @@ LRESULT QT_WIN_CALLBACK axs_FilterProc(int nCode, WPARAM wParam, LPARAM lParam)
class QAxWinEventFilter : public QAbstractNativeEventFilter
{
public:
- virtual bool nativeEventFilter(const QByteArray &, void *message, long *) Q_DECL_OVERRIDE;
+ bool nativeEventFilter(const QByteArray &, void *message, long *) Q_DECL_OVERRIDE;
};
bool QAxWinEventFilter::nativeEventFilter(const QByteArray &, void *message, long *)
@@ -833,9 +829,9 @@ public:
// COM only knows the CLSID, but QAxFactory is class name based...
QStringList keys = qAxFactory()->featureList();
- for (QStringList::Iterator key = keys.begin(); key != keys.end(); ++key) {
- if (qAxFactory()->classID(*key) == clsid) {
- className = *key;
+ foreach (const QString &key, keys) {
+ if (qAxFactory()->classID(key) == clsid) {
+ className = key;
break;
}
}
@@ -1114,9 +1110,9 @@ QAxServerBase::~QAxServerBase()
revokeActiveObject();
- for (QAxServerBase::ConnectionPointsIterator it = points.begin(); it != points.end(); ++it) {
- if (it.value())
- (*it)->Release();
+ foreach (IConnectionPoint *point, points) {
+ if (point)
+ point->Release();
}
delete aggregatedObject;
aggregatedObject = 0;
@@ -1330,12 +1326,9 @@ bool QAxServerBase::internalCreate()
// install an event filter for stock events
if (isWidget) {
qt.object->installEventFilter(this);
- const QList<QWidget*> children = qt.object->findChildren<QWidget*>();
- QList<QWidget*>::ConstIterator it = children.constBegin();
- while (it != children.constEnd()) {
- (*it)->installEventFilter(this);
- ++it;
- }
+ const QWidgetList children = qt.object->findChildren<QWidget*>();
+ foreach (QWidget *child, children)
+ child->installEventFilter(this);
}
return true;
}
@@ -2351,7 +2344,8 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid,
if (index == -1) {
QRegExp regexp(QLatin1String("_([0-9])\\("));
if (regexp.lastIndexIn(QString::fromLatin1(name.constData())) != -1) {
- name = name.left(name.length() - regexp.cap(0).length()) + '(';
+ name.chop(regexp.cap(0).length());
+ name += '(';
int overload = regexp.cap(1).toInt() + 1;
for (int s = 0; s < qt.object->metaObject()->methodCount(); ++s) {
@@ -2609,11 +2603,11 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid,
int br = context.indexOf(QLatin1Char('['));
if (br != -1) {
context = context.mid(br+1);
- context = context.left(context.length() - 1);
+ context.chop(1);
contextID = context.toInt();
context = exception->context;
- context = context.left(br-1);
+ context.truncate(br-1);
}
pexcepinfo->bstrHelpFile = QStringToBSTR(context);
pexcepinfo->dwHelpContext = contextID;
@@ -2713,7 +2707,7 @@ HRESULT WINAPI QAxServerBase::Load(IStream *pStm)
QBuffer qtbuffer(&qtarray);
QByteArray mimeType = mo->classInfo(mo->indexOfClassInfo("MIME")).value();
if (!mimeType.isEmpty()) {
- mimeType = mimeType.left(mimeType.indexOf(':')); // first type
+ mimeType.truncate(mimeType.indexOf(':')); // first type
QAxBindable *axb = (QAxBindable*)qt.object->qt_metacast("QAxBindable");
if (axb && axb->readData(&qtbuffer, QString::fromLatin1(mimeType)))
return S_OK;
@@ -3031,13 +3025,13 @@ HRESULT WINAPI QAxServerBase::Load(LPCOLESTR fileName, DWORD /* mode */)
continue;
}
- mimeType = mime.left(mimeType.indexOf(QLatin1Char(':'))); // first type
+ mimeType.truncate(mimeType.indexOf(QLatin1Char(':'))); // first type
if (mimeType.isEmpty()) {
qWarning() << class_name << ": Invalid syntax in Q_CLASSINFO for MIME";
continue;
}
QString mimeExtension = mime.mid(mimeType.length() + 1);
- mimeExtension = mimeExtension.left(mimeExtension.indexOf(QLatin1Char(':')));
+ mimeExtension.truncate(mimeExtension.indexOf(QLatin1Char(':')));
if (mimeExtension != fileExtension)
continue;
@@ -3075,13 +3069,13 @@ HRESULT WINAPI QAxServerBase::Save(LPCOLESTR fileName, BOOL fRemember)
qWarning() << class_name << ": Invalid syntax in Q_CLASSINFO for MIME";
continue;
}
- mimeType = mime.left(mimeType.indexOf(QLatin1Char(':'))); // first type
+ mimeType.truncate(mimeType.indexOf(QLatin1Char(':'))); // first type
if (mimeType.isEmpty()) {
qWarning() << class_name << ": Invalid syntax in Q_CLASSINFO for MIME";
continue;
}
QString mimeExtension = mime.mid(mimeType.length() + 1);
- mimeExtension = mimeExtension.left(mimeExtension.indexOf(QLatin1Char(':')));
+ mimeExtension.truncate(mimeExtension.indexOf(QLatin1Char(':')));
if (mimeExtension != fileExtension)
continue;
if (axb->writeData(&file)) {
diff --git a/src/activeqt/control/qaxserverdll.cpp b/src/activeqt/control/qaxserverdll.cpp
index f6145f5..fa4619b 100644
--- a/src/activeqt/control/qaxserverdll.cpp
+++ b/src/activeqt/control/qaxserverdll.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/control/qaxservermain.cpp b/src/activeqt/control/qaxservermain.cpp
index 382ead1..ae3f5b5 100644
--- a/src/activeqt/control/qaxservermain.cpp
+++ b/src/activeqt/control/qaxservermain.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -128,17 +128,18 @@ bool qax_startServer(QAxFactory::ServerType type)
return true;
const QStringList keys = qAxFactory()->featureList();
- if (!keys.count())
+ const int keyCount = keys.count();
+ if (!keyCount)
return false;
if (!qAxFactory()->isService())
StartMonitor();
- classRegistration = new DWORD[keys.count()];
+ classRegistration = new DWORD[keyCount];
int object = 0;
- for (QStringList::ConstIterator key = keys.begin(); key != keys.end(); ++key, ++object) {
+ for (object = 0; object < keyCount; ++object) {
IUnknown* p = 0;
- CLSID clsid = qAxFactory()->classID(*key);
+ CLSID clsid = qAxFactory()->classID(keys.at(object));
// Create a QClassFactory (implemented in qaxserverbase.cpp)
HRESULT hRes = GetClassObject(clsid, IID_IClassFactory, (void**)&p);
@@ -164,9 +165,8 @@ bool qax_stopServer()
qAxIsServer = false;
- const QStringList keys = qAxFactory()->featureList();
- int object = 0;
- for (QStringList::ConstIterator key = keys.begin(); key != keys.end(); ++key, ++object)
+ const int keyCount = qAxFactory()->featureList().size();
+ for (int object = 0; object < keyCount; ++object)
CoRevokeClassObject(classRegistration[object]);
delete []classRegistration;
@@ -177,11 +177,7 @@ bool qax_stopServer()
return true;
}
-#if defined(Q_OS_WINCE)
-extern void __cdecl qWinMain(HINSTANCE, HINSTANCE, LPSTR, int, int &, QVector<char *> &);
-#else
extern void qWinMain(HINSTANCE, HINSTANCE, LPSTR, int, int &, QVector<char *> &);
-#endif
QT_END_NAMESPACE
@@ -189,12 +185,8 @@ QT_END_NAMESPACE
int qMain(int, char **);
#define main qMain
#else
-#if defined(Q_OS_WINCE)
-extern "C" int __cdecl main(int, char **);
-#else
extern "C" int main(int, char **);
#endif
-#endif
EXTERN_C int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR, int nShowCmd)
diff --git a/src/activeqt/doc/snippets/doc_src_activeqt-dumpcpp.cpp b/src/activeqt/doc/snippets/doc_src_activeqt-dumpcpp.cpp
index fa6501b..579affb 100644
--- a/src/activeqt/doc/snippets/doc_src_activeqt-dumpcpp.cpp
+++ b/src/activeqt/doc/snippets/doc_src_activeqt-dumpcpp.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/doc/snippets/doc_src_examples_activeqt_dotnet.qdoc b/src/activeqt/doc/snippets/doc_src_examples_activeqt_dotnet.qdoc
index ef535a0..1f5cdd0 100644
--- a/src/activeqt/doc/snippets/doc_src_examples_activeqt_dotnet.qdoc
+++ b/src/activeqt/doc/snippets/doc_src_examples_activeqt_dotnet.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/doc/snippets/doc_src_qaxcontainer.pro b/src/activeqt/doc/snippets/doc_src_qaxcontainer.pro
index 38445eb..5b9e771 100644
--- a/src/activeqt/doc/snippets/doc_src_qaxcontainer.pro
+++ b/src/activeqt/doc/snippets/doc_src_qaxcontainer.pro
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/doc/snippets/doc_src_qaxserver.cpp b/src/activeqt/doc/snippets/doc_src_qaxserver.cpp
index e9ae716..90b183b 100644
--- a/src/activeqt/doc/snippets/doc_src_qaxserver.cpp
+++ b/src/activeqt/doc/snippets/doc_src_qaxserver.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/doc/snippets/doc_src_qaxserver.pro b/src/activeqt/doc/snippets/doc_src_qaxserver.pro
index a4e0d53..9fe38cc 100644
--- a/src/activeqt/doc/snippets/doc_src_qaxserver.pro
+++ b/src/activeqt/doc/snippets/doc_src_qaxserver.pro
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/doc/snippets/doc_src_qaxserver.qdoc b/src/activeqt/doc/snippets/doc_src_qaxserver.qdoc
index 86714f0..bb406c6 100644
--- a/src/activeqt/doc/snippets/doc_src_qaxserver.qdoc
+++ b/src/activeqt/doc/snippets/doc_src_qaxserver.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/doc/snippets/src_activeqt_container_qaxbase.cpp b/src/activeqt/doc/snippets/src_activeqt_container_qaxbase.cpp
index 23060b7..fb01380 100644
--- a/src/activeqt/doc/snippets/src_activeqt_container_qaxbase.cpp
+++ b/src/activeqt/doc/snippets/src_activeqt_container_qaxbase.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/doc/snippets/src_activeqt_container_qaxscript.cpp b/src/activeqt/doc/snippets/src_activeqt_container_qaxscript.cpp
index e49a800..d2068d2 100644
--- a/src/activeqt/doc/snippets/src_activeqt_container_qaxscript.cpp
+++ b/src/activeqt/doc/snippets/src_activeqt_container_qaxscript.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/doc/snippets/src_activeqt_container_qaxselect.cpp b/src/activeqt/doc/snippets/src_activeqt_container_qaxselect.cpp
index cb9ed9f..7326e62 100644
--- a/src/activeqt/doc/snippets/src_activeqt_container_qaxselect.cpp
+++ b/src/activeqt/doc/snippets/src_activeqt_container_qaxselect.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/doc/snippets/src_activeqt_control_qaxbindable.cpp b/src/activeqt/doc/snippets/src_activeqt_control_qaxbindable.cpp
index 4243e7d..aa301a1 100644
--- a/src/activeqt/doc/snippets/src_activeqt_control_qaxbindable.cpp
+++ b/src/activeqt/doc/snippets/src_activeqt_control_qaxbindable.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/doc/snippets/src_activeqt_control_qaxfactory.cpp b/src/activeqt/doc/snippets/src_activeqt_control_qaxfactory.cpp
index 67763cc..0337ebd 100644
--- a/src/activeqt/doc/snippets/src_activeqt_control_qaxfactory.cpp
+++ b/src/activeqt/doc/snippets/src_activeqt_control_qaxfactory.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/doc/src/activeqt-dumpcpp.qdoc b/src/activeqt/doc/src/activeqt-dumpcpp.qdoc
index b803d8e..7825c58 100644
--- a/src/activeqt/doc/src/activeqt-dumpcpp.qdoc
+++ b/src/activeqt/doc/src/activeqt-dumpcpp.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU 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
+** 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$
diff --git a/src/activeqt/doc/src/activeqt-dumpdoc.qdoc b/src/activeqt/doc/src/activeqt-dumpdoc.qdoc
index 605dde7..aa99e9f 100644
--- a/src/activeqt/doc/src/activeqt-dumpdoc.qdoc
+++ b/src/activeqt/doc/src/activeqt-dumpdoc.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU 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
+** 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$
diff --git a/src/activeqt/doc/src/activeqt-index.qdoc b/src/activeqt/doc/src/activeqt-index.qdoc
index 6881453..7997060 100644
--- a/src/activeqt/doc/src/activeqt-index.qdoc
+++ b/src/activeqt/doc/src/activeqt-index.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU 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
+** 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$
diff --git a/src/activeqt/doc/src/examples/dotnet.qdoc b/src/activeqt/doc/src/examples/dotnet.qdoc
index 76b5be0..425bdc3 100644
--- a/src/activeqt/doc/src/examples/dotnet.qdoc
+++ b/src/activeqt/doc/src/examples/dotnet.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU 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
+** 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$
diff --git a/src/activeqt/doc/src/qtaxcontainer.qdoc b/src/activeqt/doc/src/qtaxcontainer.qdoc
index 5620aa8..b553f63 100644
--- a/src/activeqt/doc/src/qtaxcontainer.qdoc
+++ b/src/activeqt/doc/src/qtaxcontainer.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU 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
+** 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$
@@ -45,8 +45,8 @@
the following license.
\legalese
- Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).\br
- Contact: http://www.qt-project.org/legal\br
+ Copyright (C) 2015 The Qt Company Ltd.\br
+ Contact: http://www.qt.io/licensing/\br
You may use this file under the terms of the BSD license as follows:
@@ -59,8 +59,8 @@
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
+ * Neither the name of The Qt Company Ltd nor the names of its
+ contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
diff --git a/src/activeqt/doc/src/qtaxserver.qdoc b/src/activeqt/doc/src/qtaxserver.qdoc
index 32d10b8..97ddcf3 100644
--- a/src/activeqt/doc/src/qtaxserver.qdoc
+++ b/src/activeqt/doc/src/qtaxserver.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU 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
+** 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$
@@ -46,8 +46,8 @@
the following license.
\legalese
- Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).\br
- Contact: http://www.qt-project.org/legal\br
+ Copyright (C) 2015 The Qt Company Ltd.\br
+ Contact: http://www.qt.io/licensing/\br
You may use this file under the terms of the BSD license as follows:
@@ -60,8 +60,8 @@
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
+ * Neither the name of The Qt Company Ltd nor the names of its
+ contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
diff --git a/src/activeqt/shared/qaxtypefunctions.cpp b/src/activeqt/shared/qaxtypefunctions.cpp
index 3dc96f8..7e2d98b 100644
--- a/src/activeqt/shared/qaxtypefunctions.cpp
+++ b/src/activeqt/shared/qaxtypefunctions.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -188,14 +188,12 @@ void clearVARIANT(VARIANT *var)
case VT_UINT|VT_BYREF:
delete var->puintVal;
break;
-#if !defined(Q_OS_WINCE) && defined(_MSC_VER) && _MSC_VER >= 1400
case VT_I8|VT_BYREF:
delete var->pllVal;
break;
case VT_UI8|VT_BYREF:
delete var->pullVal;
break;
-#endif
case VT_CY|VT_BYREF:
delete var->pcyVal;
break;
@@ -209,8 +207,11 @@ void clearVARIANT(VARIANT *var)
delete var->pdate;
break;
case VT_DISPATCH|VT_BYREF:
- (*var->ppdispVal)->Release();
- delete var->ppdispVal;
+ if (var->ppdispVal) {
+ if (*var->ppdispVal)
+ (*var->ppdispVal)->Release();
+ delete var->ppdispVal;
+ }
break;
case VT_ARRAY|VT_VARIANT|VT_BYREF:
case VT_ARRAY|VT_UI1|VT_BYREF:
diff --git a/src/activeqt/shared/qaxtypefunctions.h b/src/activeqt/shared/qaxtypefunctions.h
index 78ede68..7dd200f 100644
--- a/src/activeqt/shared/qaxtypefunctions.h
+++ b/src/activeqt/shared/qaxtypefunctions.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/shared/qaxtypes.cpp b/src/activeqt/shared/qaxtypes.cpp
index 0515742..7d9d882 100644
--- a/src/activeqt/shared/qaxtypes.cpp
+++ b/src/activeqt/shared/qaxtypes.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -79,10 +79,6 @@ extern void *qax_createObjectWrapper(int metaType, IUnknown *iface);
static IFontDisp *QFontToIFont(const QFont &font)
{
-#if defined(Q_OS_WINCE)
- Q_UNUSED(font);
- return 0;
-#else
FONTDESC fdesc;
memset(&fdesc, 0, sizeof(fdesc));
fdesc.cbSizeofstruct = sizeof(FONTDESC);
@@ -103,7 +99,6 @@ static IFontDisp *QFontToIFont(const QFont &font)
#endif
}
return f;
-#endif
}
static QFont IFontToQFont(IFont *f)
@@ -135,10 +130,6 @@ static QFont IFontToQFont(IFont *f)
static IPictureDisp *QPixmapToIPicture(const QPixmap &pixmap)
{
-#if defined(Q_OS_WINCE)
- Q_UNUSED(pixmap);
- return 0;
-#else
IPictureDisp *pic = 0;
PICTDESC desc;
@@ -162,7 +153,6 @@ static IPictureDisp *QPixmapToIPicture(const QPixmap &pixmap)
#endif
}
return pic;
-#endif
}
static QPixmap IPictureToQPixmap(IPicture *ipic)
@@ -330,7 +320,6 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type
case QVariant::LongLong:
if (out && arg.vt == (VT_CY|VT_BYREF)) {
arg.pcyVal->int64 = qvar.toLongLong();
-#if !defined(Q_OS_WINCE) && defined(_MSC_VER) && _MSC_VER >= 1400
} else if (out && arg.vt == (VT_I8|VT_BYREF)) {
*arg.pllVal = qvar.toLongLong();
} else {
@@ -341,22 +330,11 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type
arg.vt |= VT_BYREF;
}
}
-#else
- } else {
- arg.vt = VT_CY;
- arg.cyVal.int64 = qvar.toLongLong();
- if (out) {
- arg.pcyVal = new CY(arg.cyVal);
- arg.vt |= VT_BYREF;
- }
- }
-#endif
break;
case QVariant::ULongLong:
if (out && arg.vt == (VT_CY|VT_BYREF)) {
arg.pcyVal->int64 = qvar.toULongLong();
-#if !defined(Q_OS_WINCE) && defined(_MSC_VER) && _MSC_VER >= 1400
} else if (out && arg.vt == (VT_UI8|VT_BYREF)) {
*arg.pullVal = qvar.toULongLong();
} else {
@@ -367,18 +345,6 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type
arg.vt |= VT_BYREF;
}
}
-#else
- } else {
- arg.vt = VT_CY;
- arg.cyVal.int64 = qvar.toULongLong();
- if (out) {
- arg.pcyVal = new CY(arg.cyVal);
- arg.vt |= VT_BYREF;
- }
- }
-
-#endif
-
break;
case QVariant::Bool:
@@ -537,13 +503,8 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type
pElement = &variant.boolVal;
break;
case QVariant::LongLong:
-#if !defined(Q_OS_WINCE) && defined(_MSC_VER) && _MSC_VER >= 1400
vt = VT_I8;
pElement = &variant.llVal;
-#else
- vt = VT_CY;
- pElement = &variant.cyVal;
-#endif
break;
default:
break;
@@ -938,7 +899,6 @@ QVariant VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName, uint
case VT_CY|VT_BYREF:
var = arg.pcyVal->int64;
break;
-#if !defined(Q_OS_WINCE) && defined(_MSC_VER) && _MSC_VER >= 1400
case VT_I8:
var = arg.llVal;
break;
@@ -951,7 +911,6 @@ QVariant VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName, uint
case VT_UI8|VT_BYREF:
var = *arg.pullVal;
break;
-#endif
case VT_R4:
var = arg.fltVal;
break;
@@ -1227,7 +1186,6 @@ QVariant VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName, uint
break;
#endif // QAX_SERVER
default:
-#if !defined(Q_OS_WINCE)
// support for any SAFEARRAY(Type) where Type can be converted to a QVariant
// -> QVariantList
if (arg.vt & VT_ARRAY) {
@@ -1255,10 +1213,8 @@ QVariant VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName, uint
case VT_I1: pElement = &variant.cVal; break;
case VT_I2: pElement = &variant.iVal; break;
case VT_I4: pElement = &variant.lVal; break;
-#if defined(_MSC_VER) && _MSC_VER >= 1400
case VT_I8: pElement = &variant.llVal; break;
case VT_UI8: pElement = &variant.ullVal; break;
-#endif
case VT_INT: pElement = &variant.intVal; break;
case VT_UI1: Q_ASSERT(false); break; // already covered
case VT_UI2: pElement = &variant.uiVal; break;
@@ -1291,7 +1247,6 @@ QVariant VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName, uint
var = list;
}
-#endif
break;
}
@@ -1308,9 +1263,8 @@ QVariant VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName, uint
} else if (proptype == QVariant::StringList && var.type() == QVariant::List) {
bool allStrings = true;
QStringList strings;
- const QList<QVariant> list(var.toList());
- for (QList<QVariant>::ConstIterator it(list.begin()); it != list.end(); ++it) {
- QVariant variant = *it;
+ const QVariantList list(var.toList());
+ foreach (const QVariant &variant, list) {
if (variant.canConvert(QVariant::String))
strings << variant.toString();
else
diff --git a/src/activeqt/shared/qaxtypes.h b/src/activeqt/shared/qaxtypes.h
index 9c572a6..3823f71 100644
--- a/src/activeqt/shared/qaxtypes.h
+++ b/src/activeqt/shared/qaxtypes.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -41,7 +41,7 @@
#ifndef QAXTYPES_H
#define QAXTYPES_H
-#include "qaxtypefunctions.h"
+#include <ActiveQt/qaxtypefunctions.h>
QT_BEGIN_NAMESPACE
diff --git a/src/activeqt/shared/qaxutils.cpp b/src/activeqt/shared/qaxutils.cpp
index 92567ef..7e5a9be 100644
--- a/src/activeqt/shared/qaxutils.cpp
+++ b/src/activeqt/shared/qaxutils.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/activeqt/shared/qaxutils_p.h b/src/activeqt/shared/qaxutils_p.h
index bc7d8c4..7da5811 100644
--- a/src/activeqt/shared/qaxutils_p.h
+++ b/src/activeqt/shared/qaxutils_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the ActiveQt framework of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** 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
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/src.pro b/src/src.pro
index 6cff49f..4248dae 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -1,4 +1,4 @@
TEMPLATE = subdirs
SUBDIRS = activeqt
-win32:!winrt: SUBDIRS += tools
+win32:!winrt:!wince: SUBDIRS += tools
CONFIG += ordered
diff --git a/src/tools/idc/main.cpp b/src/tools/idc/main.cpp
index 350f0da..8a34cd1 100644
--- a/src/tools/idc/main.cpp
+++ b/src/tools/idc/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** 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
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 41abb07..593ed3f 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -1,5 +1,9 @@
TEMPLATE = subdirs
SUBDIRS += \
qaxobject \
+ qaxscript \
dumpcpp \
cmake
+
+*g++*: SUBDIRS -= \
+ qaxscript \
diff --git a/tests/auto/cmake/test_modules/container/axcontainer.cpp b/tests/auto/cmake/test_modules/container/axcontainer.cpp
index d42280f..7728d10 100644
--- a/tests/auto/cmake/test_modules/container/axcontainer.cpp
+++ b/tests/auto/cmake/test_modules/container/axcontainer.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** 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
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** 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
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/tests/auto/cmake/test_modules/server/axserver.cpp b/tests/auto/cmake/test_modules/server/axserver.cpp
index bbb6ca1..a50d636 100644
--- a/tests/auto/cmake/test_modules/server/axserver.cpp
+++ b/tests/auto/cmake/test_modules/server/axserver.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** 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
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** 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
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/tests/auto/dumpcpp/tst_dumpcpp.cpp b/tests/auto/dumpcpp/tst_dumpcpp.cpp
index a46bbec..0e1ac16 100644
--- a/tests/auto/dumpcpp/tst_dumpcpp.cpp
+++ b/tests/auto/dumpcpp/tst_dumpcpp.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** 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
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/tests/auto/qaxobject/tst_qaxobject.cpp b/tests/auto/qaxobject/tst_qaxobject.cpp
index 2190590..f039a40 100644
--- a/tests/auto/qaxobject/tst_qaxobject.cpp
+++ b/tests/auto/qaxobject/tst_qaxobject.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** 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
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/tests/auto/qaxscript/qaxscript.pro b/tests/auto/qaxscript/qaxscript.pro
new file mode 100644
index 0000000..704b2cd
--- /dev/null
+++ b/tests/auto/qaxscript/qaxscript.pro
@@ -0,0 +1,3 @@
+CONFIG += testcase
+QT = core axcontainer testlib
+SOURCES += tst_qaxscript.cpp
diff --git a/tests/auto/qaxscript/tst_qaxscript.cpp b/tests/auto/qaxscript/tst_qaxscript.cpp
new file mode 100644
index 0000000..523b445
--- /dev/null
+++ b/tests/auto/qaxscript/tst_qaxscript.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QtTest/QtTest>
+#include <QAxScriptManager>
+#include <QAxScript>
+
+class tst_QAxScript : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void scriptReturnValue();
+};
+
+void tst_QAxScript::scriptReturnValue()
+{
+ QAxScriptManager scriptManager;
+ const char scriptCode[] =
+ "function foo() {\n"
+ " return 'test';\n"
+ "}\n"; // QTBUG-42289, fails when DISPATCH_PROPERTYGET is used.
+ QAxScript *script = scriptManager.load(QLatin1String(scriptCode),
+ QStringLiteral("Test"),
+ QStringLiteral("JScript"));
+ QVERIFY2(script, "Unable to load script (CoInitialize() called?)");
+ const QVariant result = script->call("foo()");
+ QCOMPARE(result, QVariant(QStringLiteral("test")));
+}
+
+QTEST_MAIN(tst_QAxScript)
+#include "tst_qaxscript.moc"
diff --git a/tools/dumpcpp/main.cpp b/tools/dumpcpp/main.cpp
index d2d39e9..4ec7697 100644
--- a/tools/dumpcpp/main.cpp
+++ b/tools/dumpcpp/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** 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
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -40,6 +40,9 @@
#include <QStringList>
#include <QTemporaryFile>
#include <QUuid>
+#include <QCoreApplication>
+#include <QCommandLineOption>
+#include <QCommandLineParser>
#include <QWidget>
#include <QFileInfo>
#include <qt_windows.h>
@@ -49,6 +52,12 @@ QT_BEGIN_NAMESPACE
static ITypeInfo *currentTypeInfo = 0;
+enum ProgramMode {
+ GenerateMode,
+ TypeLibID,
+ DoNothing
+};
+
enum ObjectCategory
{
DefaultObject = 0x00,
@@ -59,9 +68,7 @@ enum ObjectCategory
NoDeclaration = 0x010,
NoInlines = 0x020,
OnlyInlines = 0x040,
- DoNothing = 0x080,
Licensed = 0x100,
- TypeLibID = 0x101
};
extern QMetaObject *qax_readEnumInfo(ITypeLib *typeLib, const QMetaObject *parentObject);
@@ -72,7 +79,6 @@ 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;
QVector<QByteArray> strings;
QHash<QByteArray, int> stringIndex; // Optimization, speeds up generation
@@ -87,7 +93,7 @@ void writeEnums(QTextStream &out, const QMetaObject *mo)
QByteArray key(metaEnum.key(k));
out << " " << key.leftJustified(24) << "= " << metaEnum.value(k);
if (k < metaEnum.keyCount() - 1)
- out << ",";
+ out << ',';
out << endl;
}
out << " };" << endl;
@@ -95,7 +101,7 @@ void writeEnums(QTextStream &out, const QMetaObject *mo)
}
}
-void writeHeader(QTextStream &out, const QByteArray &nameSpace, const QString &outFileName)
+void writeHeader(QTextStream &out, const QString &nameSpace, const QString &outFileName)
{
out << "#ifndef QAX_DUMPCPP_" << outFileName.toUpper() << "_H" << endl;
out << "#define QAX_DUMPCPP_" << outFileName.toUpper() << "_H" << endl;
@@ -143,7 +149,7 @@ QByteArray constRefify(const QByteArray &type)
|| type == "QColor" || type == "QFont"
|| type == "QByteArray" || type == "QValueList<QVariant>"
|| type == "QStringList")
- ctype = "const " + ctype + "&";
+ ctype = "const " + ctype + '&';
return ctype;
}
@@ -165,9 +171,9 @@ void generateClassDecl(QTextStream &out, const QString &controlID, const QMetaOb
out << "QAxObject";
out << endl;
- out << "{" << endl;
+ out << '{' << endl;
out << "public:" << endl;
- out << " " << className << "(";
+ out << " " << className << '(';
if (category & Licensed)
out << "const QString &licenseKey = QString(), ";
if (category & ActiveX)
@@ -184,7 +190,7 @@ void generateClassDecl(QTextStream &out, const QString &controlID, const QMetaOb
out << "QAxObject((IUnknown*)subobject, parent";
else
out << "QAxObject(parent";
- out << ")" << endl;
+ out << ')' << endl;
out << " {" << endl;
if (category & SubObject)
out << " internalRelease();" << endl;
@@ -207,7 +213,7 @@ void generateClassDecl(QTextStream &out, const QString &controlID, const QMetaOb
QByteArray iface_class = info.value();
- out << " " << className << "(" << iface_class << " *iface)" << endl;
+ out << " " << className << '(' << iface_class << " *iface)" << endl;
if (category & ActiveX)
out << " : QAxWidget()" << endl;
@@ -232,7 +238,7 @@ void generateClassDecl(QTextStream &out, const QString &controlID, const QMetaOb
QByteArray key(metaEnum.key(k));
out << " " << key.leftJustified(24) << "= " << metaEnum.value(k);
if (k < metaEnum.keyCount() - 1)
- out << ",";
+ out << ',';
out << endl;
}
out << " };" << endl;
@@ -272,12 +278,11 @@ void generateClassDecl(QTextStream &out, const QString &controlID, const QMetaOb
// remains the same, we have to use the original name when used with QObject::connect or QMetaObject
QByteArray propertyFunctionName(propertyName);
if (axBase_vfuncs.contains(propertyFunctionName)) {
- propertyFunctionName = className + "_" + propertyName;
+ propertyFunctionName = className + '_' + propertyName;
qWarning("property conflits with QAXBase: %s changed to %s", propertyName.constData(), propertyFunctionName.constData());
}
QByteArray propertyType(property.typeName());
- QByteArray castType(propertyType);
QByteArray simplePropType = propertyType;
simplePropType.replace('*', "");
@@ -287,18 +292,18 @@ void generateClassDecl(QTextStream &out, const QString &controlID, const QMetaOb
if (!propertyType.contains("::") &&
(qax_qualified_usertypes.contains(simplePropType) || qax_qualified_usertypes.contains("enum "+ simplePropType))
) {
- propertyType = nameSpace + "::" + propertyType;
+ propertyType.prepend(nameSpace + "::");
foreignNamespace = false;
}
- out << propertyType << " ";
+ out << propertyType << ' ';
if (category & OnlyInlines)
out << className << "::";
out << propertyFunctionName << "() const";
if (!(category & NoInlines)) {
- out << endl << indent << "{" << endl;
+ out << endl << indent << '{' << endl;
if (qax_qualified_usertypes.contains(simplePropType)) {
if (foreignNamespace)
out << "#ifdef QAX_DUMPCPP_" << propertyType.left(propertyType.indexOf("::")).toUpper() << "_H" << endl;
@@ -325,7 +330,7 @@ void generateClassDecl(QTextStream &out, const QString &controlID, const QMetaOb
} else {
out << indent << " return *(" << propertyType << "*)qax_result.constData();" << endl;
}
- out << indent << "}" << endl;
+ out << indent << '}' << endl;
} else {
out << "; //Returns the value of " << propertyName << endl;
}
@@ -344,14 +349,14 @@ void generateClassDecl(QTextStream &out, const QString &controlID, const QMetaOb
out << indent << "inline " << "void ";
if (category & OnlyInlines)
out << className << "::";
- out << setter << "(" << constRefify(propertyType) << " value)";
+ out << setter << '(' << constRefify(propertyType) << " value)";
if (!(category & NoInlines)) {
if (propertyType.endsWith('*')) {
- out << "{" << endl;
+ out << '{' << endl;
out << " int typeId = qRegisterMetaType<" << propertyType << ">(\"" << propertyType << "\", &value);" << endl;
out << " setProperty(\"" << propertyName << "\", QVariant(typeId, &value));" << endl;
- out << "}" << endl;
+ out << '}' << endl;
} else {
out << "{ setProperty(\"" << propertyName << "\", QVariant(value)); }" << endl;
}
@@ -402,7 +407,7 @@ void generateClassDecl(QTextStream &out, const QString &controlID, const QMetaOb
QByteArray simpleSlotType = slotType;
simpleSlotType.replace('*', "");
if (!slotType.contains("::") && qax_qualified_usertypes.contains(simpleSlotType))
- slotType = nameSpace + "::" + slotType;
+ slotType.prepend(nameSpace + "::");
QByteArray slotNamedSignature;
@@ -425,10 +430,10 @@ void generateClassDecl(QTextStream &out, const QString &controlID, const QMetaOb
for (int i = 0; i < signatureSplit.count(); ++i) {
QByteArray parameterType = signatureSplit.at(i);
if (!parameterType.contains("::") && namespaceForType.contains(parameterType))
- parameterType = namespaceForType.value(parameterType) + "::" + parameterType;
+ parameterType.prepend(namespaceForType.value(parameterType) + "::");
slotNamedSignature += constRefify(parameterType);
- slotNamedSignature += " ";
+ slotNamedSignature += ' ';
slotNamedSignature += parameterSplit.at(i);
if (defaultArguments >= signatureSplit.count() - i) {
slotNamedSignature += " = ";
@@ -443,9 +448,9 @@ void generateClassDecl(QTextStream &out, const QString &controlID, const QMetaOb
out << indent << "inline ";
if (!slotTag.isEmpty())
- out << slotTag << " ";
+ out << slotTag << ' ';
else
- out << slotType << " ";
+ out << slotType << ' ';
if (category & OnlyInlines)
out << className << "::";
@@ -453,7 +458,7 @@ void generateClassDecl(QTextStream &out, const QString &controlID, const QMetaOb
int parnIdx = slotNamedSignature.indexOf('(');
QByteArray slotOriginalName = slotNamedSignature.left(parnIdx);
if (axBase_vfuncs.contains(slotOriginalName)) {
- QByteArray newSignature = className + "_" + slotOriginalName;
+ QByteArray newSignature = className + '_' + slotOriginalName;
newSignature += slotNamedSignature.mid(parnIdx);
qWarning("function name conflits with QAXBase %s changed to %s", slotNamedSignature.constData(), newSignature.constData());
slotNamedSignature = newSignature;
@@ -462,16 +467,16 @@ void generateClassDecl(QTextStream &out, const QString &controlID, const QMetaOb
out << slotNamedSignature;
if (category & NoInlines) {
- out << ";" << endl;
+ out << ';' << endl;
} else {
out << endl;
- out << indent << "{" << endl;
+ out << indent << '{' << endl;
if (slotType != QByteArrayLiteral("void")) {
out << indent << " " << slotType << " qax_result";
if (slotType.endsWith('*'))
out << " = 0";
- out << ";" << endl;
+ out << ';' << endl;
if (qax_qualified_usertypes.contains(simpleSlotType)) {
bool foreignNamespace = simpleSlotType.contains("::");
if (foreignNamespace)
@@ -488,7 +493,7 @@ void generateClassDecl(QTextStream &out, const QString &controlID, const QMetaOb
if (slotType != QByteArrayLiteral("void"))
out << "(void*)&qax_result";
else
- out << "0";
+ out << '0';
if (!slotParameters.isEmpty()) {
out << ", (void*)&";
out << slotParameters.replace(",", ", (void*)&");
@@ -498,7 +503,7 @@ void generateClassDecl(QTextStream &out, const QString &controlID, const QMetaOb
out << indent << " qt_metacall(QMetaObject::InvokeMetaMethod, " << islot << ", _a);" << endl;
if (slotType != QByteArrayLiteral("void"))
out << indent << " return qax_result;" << endl;
- out << indent << "}" << endl;
+ out << indent << '}' << endl;
}
out << endl;
@@ -629,7 +634,7 @@ void generateMethods(QTextStream &out, const QMetaObject *mo, const QMetaMethod:
out << method.parameterCount() << ", ";
out << paramsIndex << ", ";
addStringIdx(method.tag());
- out << (AccessProtected | method.attributes() | funcTypeFlag) << "," << endl;
+ out << (AccessProtected | method.attributes() | funcTypeFlag) << ',' << endl;
paramsIndex += 1 + method.parameterCount() * 2;
}
out << endl;
@@ -656,20 +661,20 @@ void generateMethodParameters(QTextStream &out, const QMetaObject *mo, const QMe
// Return type
generateTypeInfo(out, method.typeName());
- out << ",";
+ out << ',';
// Parameter types
const QList<QByteArray> parameterTypes = method.parameterTypes();
for (int j = 0; j < argsCount; ++j) {
- out << " ";
+ out << ' ';
generateTypeInfo(out, parameterTypes.at(j));
- out << ",";
+ out << ',';
}
// Parameter names
const QList<QByteArray> parameterNames = method.parameterNames();
for (int j = 0; j < argsCount; ++j)
- out << " " << stridx(parameterNames.at(j)) << ",";
+ out << ' ' << stridx(parameterNames.at(j)) << ',';
out << endl;
}
@@ -821,7 +826,7 @@ void generateClassImpl(QTextStream &out, const QMetaObject *mo, const QByteArray
if (property.isEditable())
flags |= Editable;
- out << "0x" << QString::number(flags, 16).rightJustified(8, '0') << ", \t\t // " << property.typeName() << " " << property.name();
+ out << "0x" << QString::number(flags, 16).rightJustified(8, '0') << ", \t\t // " << property.typeName() << ' ' << property.name();
out << endl;
}
out << endl;
@@ -870,7 +875,7 @@ void generateClassImpl(QTextStream &out, const QMetaObject *mo, const QByteArray
out << endl;
out << "void *" << className << "::qt_metacast(const char *_clname)" << endl;
- out << "{" << endl;
+ out << '{' << endl;
out << " if (!_clname) return 0;" << endl;
out << " if (!strcmp(_clname, \"" << qualifiedClassName << "\"))" << endl;
out << " return static_cast<void*>(const_cast<" << className << "*>(this));" << endl;
@@ -878,113 +883,13 @@ void generateClassImpl(QTextStream &out, const QMetaObject *mo, const QByteArray
out << " return QAxWidget::qt_metacast(_clname);" << endl;
else
out << " return QAxObject::qt_metacast(_clname);" << endl;
- out << "}" << endl;
+ out << '}' << endl;
}
-bool generateClass(QAxObject *object, const QByteArray &className, const QByteArray &nameSpace, const QByteArray &outname, ObjectCategory category)
+bool generateTypeLibrary(QString typeLibFile, QString outname,
+ const QString &nameSpace, ObjectCategory category)
{
- IOleControl *control = 0;
- object->queryInterface(IID_IOleControl, (void**)&control);
- if (control) {
- category = ActiveX;
- control->Release();
- }
-
- const QMetaObject *mo = object->metaObject();
-
- if (!nameSpace.isEmpty() && !(category & NoDeclaration)) {
- QFile outfile(QString::fromLatin1(nameSpace.toLower().constData()) + QLatin1String(".h"));
- if (!outfile.open(QIODevice::WriteOnly | QIODevice::Text)) {
- qWarning("dumpcpp: Could not open output file '%s'", qPrintable(outfile.fileName()));
- return false;
- }
- QTextStream out(&outfile);
-
- out << "/****************************************************************************" << endl;
- out << "**" << endl;
- out << "** Namespace " << nameSpace << " generated by dumpcpp" << endl;
- out << "**" << endl;
- out << "****************************************************************************/" << endl;
- out << endl;
-
- writeHeader(out, nameSpace, outfile.fileName());
- generateNameSpace(out, mo, nameSpace);
-
- // close namespace file
- out << "};" << endl;
- out << endl;
-
- out << "#endif" << endl;
- out << endl;
- }
-
- if (!(category & NoDeclaration)) {
- QFile outfile(QString::fromLatin1(outname.constData()) + QLatin1String(".h"));
- if (!outfile.open(QIODevice::WriteOnly | QIODevice::Text)) {
- qWarning("dumpcpp: Could not open output file '%s'", qPrintable(outfile.fileName()));
- return false;
- }
- QTextStream out(&outfile);
-
- out << "/****************************************************************************" << endl;
- out << "**" << endl;
- out << "** Class declaration generated by dumpcpp" << endl;
- out << "**" << endl;
- out << "****************************************************************************/" << endl;
- out << endl;
-
- out << "#include <qdatetime.h>" << endl;
- if (category & ActiveX)
- out << "#include <qaxwidget.h>" << endl;
- else
- out << "#include <qaxobject.h>" << endl;
- out << endl;
-
- out << "struct IDispatch;" << endl,
- out << endl;
-
- if (!nameSpace.isEmpty()) {
- out << "#include \"" << nameSpace.toLower() << ".h\"" << endl;
- out << endl;
- out << "namespace " << nameSpace << " {" << endl;
- }
-
- generateClassDecl(out, object->control(), mo, className, nameSpace, category);
-
- if (!nameSpace.isEmpty()) {
- out << endl;
- out << "};" << endl;
- }
- }
-
- if (!(category & (NoMetaObject|NoImplementation))) {
- QFile outfile(QString::fromLatin1(outname.constData()) + QLatin1String(".cpp"));
- if (!outfile.open(QIODevice::WriteOnly | QIODevice::Text)) {
- qWarning("dumpcpp: Could not open output file '%s'", qPrintable(outfile.fileName()));
- return false;
- }
- QTextStream out(&outfile);
-
- out << "#include <qmetaobject.h>" << endl;
- out << "#include \"" << outname << ".h\"" << endl;
- out << endl;
-
- if (!nameSpace.isEmpty()) {
- out << "using namespace " << nameSpace << ";" << endl;
- out << endl;
- }
-
- generateClassImpl(out, mo, className, nameSpace, category);
- }
-
- return true;
-}
-
-bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, ObjectCategory category)
-{
- QString typeLibFile(QString::fromLatin1(typeLib.constData()));
- typeLibFile = typeLibFile.replace(QLatin1Char('/'), QLatin1Char('\\'));
- QString cppFile(QString::fromLatin1(outname.constData()));
+ typeLibFile.replace(QLatin1Char('/'), QLatin1Char('\\'));
ITypeLib *typelib;
LoadTypeLibEx(reinterpret_cast<const wchar_t *>(typeLibFile.utf16()), REGKIND_NONE, &typelib);
@@ -993,13 +898,14 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
return false;
}
- QString libName;
- BSTR nameString;
- typelib->GetDocumentation(-1, &nameString, 0, 0, 0);
- libName = QString::fromWCharArray(nameString);
- SysFreeString(nameString);
- if (!nameSpace.isEmpty())
- libName = QString::fromLocal8Bit(nameSpace);
+ QString libName = nameSpace;
+ if (libName.isEmpty()) {
+ BSTR nameString = Q_NULLPTR;
+ if (SUCCEEDED(typelib->GetDocumentation(-1, &nameString, 0, 0, 0))) {
+ libName = QString::fromWCharArray(nameString);
+ SysFreeString(nameString);
+ }
+ }
QString libVersion(QLatin1String("1.0"));
@@ -1010,10 +916,10 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
typelib->ReleaseTLibAttr(tlibattr);
}
- if (cppFile.isEmpty())
- cppFile = libName.toLower();
+ if (outname.isEmpty())
+ outname = libName.toLower();
- if (cppFile.isEmpty()) {
+ if (outname.isEmpty()) {
qWarning("dumpcpp: no output filename provided, and cannot deduce output filename");
return false;
}
@@ -1026,7 +932,7 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
return false;
}
QTextStream classImplOut(&classImplFile);
- QFile implFile(cppFile + QLatin1String(".cpp"));
+ QFile implFile(outname + QLatin1String(".cpp"));
QTextStream implOut(&implFile);
if (!(category & (NoMetaObject|NoImplementation))) {
if (!implFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
@@ -1044,13 +950,13 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
implOut << "#define QAX_DUMPCPP_" << libName.toUpper() << "_NOINLINES" << endl;
- implOut << "#include \"" << cppFile << ".h\"" << endl;
+ implOut << "#include \"" << outname << ".h\"" << endl;
implOut << endl;
- implOut << "using namespace " << libName << ";" << endl;
+ implOut << "using namespace " << libName << ';' << endl;
implOut << endl;
}
- QFile declFile(cppFile + QLatin1String(".h"));
+ QFile declFile(outname + QLatin1String(".h"));
QTextStream declOut(&declFile);
QByteArray classes;
QTextStream classesOut(&classes, QIODevice::WriteOnly);
@@ -1073,11 +979,12 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
declOut << "****************************************************************************/" << endl;
declOut << endl;
- QFileInfo cppFileInfo(cppFile);
- writeHeader(declOut, libName.toLatin1(), cppFileInfo.fileName());
+ QFileInfo cppFileInfo(outname);
+ writeHeader(declOut, libName, cppFileInfo.fileName());
UINT typeCount = typelib->GetTypeInfoCount();
if (declFile.isOpen()) {
+ QByteArrayList opaquePointerTypes;
declOut << endl;
declOut << "// Referenced namespace" << endl;
for (UINT index = 0; index < typeCount; ++index) {
@@ -1124,10 +1031,10 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
SysFreeString(bstr);
switch (typekind) {
case TKIND_RECORD:
- className = "struct " + className;
+ className.prepend("struct ");
break;
case TKIND_ENUM:
- className = "enum " + className;
+ className.prepend("enum ");
break;
default:
break;
@@ -1155,8 +1062,8 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
if (refTypeLib.contains(' ')) {
refType = refTypeLib.left(refTypeLib.indexOf(' ')) + ' ' + refType;
}
- refTypeLib = refTypeLib.left(refTypeLib.indexOf("::"));
- refTypeLib = refTypeLib.mid(refTypeLib.lastIndexOf(' ') + 1);
+ refTypeLib.truncate(refTypeLib.indexOf("::"));
+ refTypeLib.remove(0, refTypeLib.lastIndexOf(' ') + 1);
namespaces[refTypeLib].append(refType);
} else {
namespaces[libName.toLatin1()].append(refType);
@@ -1172,19 +1079,21 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
for (int c = 0; c < classList.count(); ++c) {
QByteArray className = classList.at(c);
if (className.contains(' ')) {
- declOut << " " << className << ";" << endl;
+ declOut << " " << className << ';' << endl;
namespaceForType.insert(className.mid(className.indexOf(' ') + 1), nspace);
} else {
- declOut << " class " << className << ";" << endl;
+ declOut << " class " << className << ';' << endl;
+ opaquePointerTypes.append(nspace + "::" + className);
namespaceForType.insert(className, nspace);
- namespaceForType.insert(className + "*", nspace);
+ namespaceForType.insert(className + '*', nspace);
namespaceForType.insert(className + "**", nspace);
}
}
- declOut << "}" << endl << endl;
+ declOut << '}' << endl << endl;
}
}
-
+ foreach (const QByteArray &opaquePointerType, opaquePointerTypes)
+ declOut << "Q_DECLARE_OPAQUE_POINTER(" << opaquePointerType << "*)" << endl;
declOut << endl;
}
generateNameSpace(declOut, namespaceObject, libName.toLatin1());
@@ -1195,12 +1104,12 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
for (int c = 0; c < classList.count(); ++c) {
QByteArray className = classList.at(c);
if (className.contains(' ')) {
- declOut << " " << className << ";" << endl;
+ declOut << " " << className << ';' << endl;
namespaceForType.insert(className.mid(className.indexOf(' ') + 1), libName.toLatin1());
} else {
- declOut << " class " << className << ";" << endl;
+ declOut << " class " << className << ';' << endl;
namespaceForType.insert(className, libName.toLatin1());
- namespaceForType.insert(className + "*", libName.toLatin1());
+ namespaceForType.insert(className + '*', libName.toLatin1());
namespaceForType.insert(className + "**", libName.toLatin1());
}
}
@@ -1326,13 +1235,13 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
currentList.append(strings.at(i));
// Split strings into chunks less than 64k to work around compiler limits.
if (currentTableLen > 60000) {
- implOut << " char stringdata" << listVector.size() << "[" << currentTableLen + 1 << "];" << endl;
+ implOut << " char stringdata" << listVector.size() << '[' << currentTableLen + 1 << "];" << endl;
listVector.append(currentList);
currentList.clear();
currentTableLen = 0;
}
}
- implOut << " char stringdata" << listVector.size() << "[" << currentTableLen + 1 << "];" << endl;
+ implOut << " char stringdata" << listVector.size() << '[' << currentTableLen + 1 << "];" << endl;
implOut << "};" << endl;
listVector.append(currentList);
@@ -1355,9 +1264,9 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
int idx = 0;
for (int j = 0; j < listVector[i].size(); j++) {
if (totalStringCount)
- implOut << "," << endl;
+ implOut << ',' << endl;
const QByteArray &str = listVector[i].at(j);
- implOut << "QT_MOC_LITERAL(" << totalStringCount++ << ", " << idx << ", " << str.length() << ", " << i << ")";
+ implOut << "QT_MOC_LITERAL(" << totalStringCount++ << ", " << idx << ", " << str.length() << ", " << i << ')';
idx += str.length() + 1;
}
}
@@ -1369,13 +1278,13 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
for (int i = 0; i < listVector.size(); ++i) {
int col = 0;
int len = 0;
- implOut << "," << endl;
+ implOut << ',' << endl;
implOut << " \"";
for (int j = 0; j < listVector[i].size(); ++j) {
QByteArray s = listVector[i].at(j);
len = s.length();
if (col && col + len >= 150) {
- implOut << "\"" << endl << " \"";
+ implOut << '"' << endl << " \"";
col = 0;
} else if (len && s.at(0) >= '0' && s.at(0) <= '9') {
implOut << "\"\"";
@@ -1385,7 +1294,7 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
while (idx < s.length()) {
if (idx > 0) {
col = 0;
- implOut << "\"" << endl << " \"";
+ implOut << '"' << endl << " \"";
}
int spanLen = qMin(150, s.length() - idx);
implOut << s.mid(idx, spanLen);
@@ -1396,7 +1305,7 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
implOut << "\\0";
col += len + 2;
}
- implOut << "\"";
+ implOut << '"';
}
// Terminate stringdata struct
implOut << endl << "};" << endl;
@@ -1425,7 +1334,7 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
declOut << "#endif" << endl << endl;
}
// close namespace
- declOut << "}" << endl;
+ declOut << '}' << endl;
declOut << endl;
// partial template specialization for qMetaTypeCreateHelper and qMetaTypeConstructHelper
@@ -1437,15 +1346,6 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
declOut << "template<>" << endl;
declOut << "struct QMetaTypeFunctionHelper<" << libName << "::" << subType << ", /* Accepted */ true> {" << endl;
- declOut << " static void Delete(void *t) { delete static_cast<" << libName << "::" << subType << "*>(t); }" << endl;
-
- declOut << " static void *Create(const void *t)" << endl;
- declOut << " {" << endl;
- declOut << " Q_ASSERT(!t);" << endl;
- declOut << " Q_UNUSED(t)" << endl; // Silence warnings for release builds
- declOut << " return new " << libName << "::" << subType << "();" << endl;
- declOut << " }" << endl;
-
declOut << " static void Destruct(void *t)" << endl;
declOut << " {" << endl;
declOut << " Q_UNUSED(t)" << endl; // Silence MSVC that warns for POD types.
@@ -1456,7 +1356,7 @@ bool generateTypeLibrary(const QByteArray &typeLib, const QByteArray &outname, O
declOut << " {" << endl;
declOut << " Q_ASSERT(!t);" << endl;
declOut << " Q_UNUSED(t)" << endl; // Silence warnings for release builds
- declOut << " return new (where) " << libName << "::" << subType << ";" << endl;
+ declOut << " return new (where) " << libName << "::" << subType << ';' << endl;
declOut << " }" << endl;
declOut << "#ifndef QT_NO_DATASTREAM" << endl;
@@ -1482,123 +1382,140 @@ QT_END_NAMESPACE
QT_USE_NAMESPACE
-int main(int argc, char **argv)
+struct Options
{
- qax_dispatchEqualsIDispatch = false;
+ Options() : mode(GenerateMode), category(DefaultObject), dispatchEqualsIDispatch(false) {}
- if (FAILED(CoInitialize(0))) {
- qErrnoWarning("CoInitialize() failed.");
- return -1;
- }
+ ProgramMode mode;
+ uint category;
+ bool dispatchEqualsIDispatch;
- uint category = DefaultObject;
-
- enum State {
- Default = 0,
- Output,
- NameSpace,
- GetTypeLib
- } state;
- state = Default;
-
- QByteArray outname;
- QByteArray typeLib;
-
- for (int a = 1; a < argc; ++a) {
- QByteArray arg(argv[a]);
- const char first = arg[0];
- switch(state) {
- case Default:
- if (first == '-' || first == '/') {
- arg = arg.mid(1).toLower();
-
- if (arg == "o") {
- state = Output;
- } else if (arg == "n") {
- state = NameSpace;
- } else if (arg == "v") {
- qWarning("dumpcpp: Version 1.0");
- return 0;
- } else if (arg == "nometaobject") {
- category |= NoMetaObject;
- } else if (arg == "impl") {
- category |= NoDeclaration;
- } else if (arg == "decl") {
- category |= NoImplementation;
- } else if (arg == "donothing") {
- category = DoNothing;
- break;
- } else if (arg == "compat") {
- qax_dispatchEqualsIDispatch = true;
- break;
- } else if (arg == "getfile") {
- state = GetTypeLib;
- break;
- } else if (arg == "h") {
- qWarning("dumpcpp Version1.0\n\n"
- "Generate a C++ namespace from a type library.\n\n"
- "Usage:\n"
- "dumpcpp input [-[-n <namespace>] [-o <filename>]\n\n"
- " input: A type library file, type library ID, ProgID or CLSID\n\n"
- "Optional parameters:\n"
- " namespace: The name of the generated C++ namespace\n"
- " filename: The file name (without extension) of the generated files\n"
- "\n"
- "Other parameters:\n"
- " -nometaobject Don't generate meta object information (no .cpp file)\n"
- " -impl Only generate the .cpp file\n"
- " -decl Only generate the .h file\n"
- " -compat Treat all coclass parameters as IDispatch\n"
- "\n"
- "Examples:\n"
- " dumpcpp Outlook.Application -o outlook\n"
- " dumpcpp {3B756301-0075-4E40-8BE8-5A81DE2426B7}\n"
- "\n");
- return 0;
- }
- } else {
- typeLib = arg;
- }
- break;
+ QString outname;
+ QString typeLib;
+ QString nameSpace;
+};
- case Output:
- outname = arg;
- state = Default;
- break;
+static void parseOptions(Options *options)
+{
+ const char helpText[] =
+ "\nGenerate a C++ namespace from a type library.\n\n"
+ "Examples:\n"
+ " dumpcpp -o ieframe %WINDIR%\\system32\\ieframe.dll\n"
+ " dumpcpp -o outlook Outlook.Application\n"
+ " dumpcpp {3B756301-0075-4E40-8BE8-5A81DE2426B7}\n"
+ " dumpcpp -getfile {21D6D480-A88B-11D0-83DD-00AA003CCABD}\n";
+
+ const char outputOptionC[] = "-o";
+ const char nameSpaceOptionC[] = "-n";
+ const char getfileOptionC[] = "-getfile";
+
+ QStringList args = QCoreApplication::arguments();
+ // Convert Windows-style '/option' into '-option'.
+ for (int i = 1; i < args.size(); ) {
+ QString &arg = args[i];
+ if (arg.startsWith(QLatin1Char('/')))
+ arg[0] = QLatin1Char('-');
+ const bool takesOptionValue = arg == QLatin1String(outputOptionC)
+ || arg == QLatin1String(nameSpaceOptionC)
+ || arg == QLatin1String(getfileOptionC);
+ i += takesOptionValue ? 2 : 1;
+ }
- case NameSpace:
- nameSpace = arg;
- state = Default;
- break;
+ QCommandLineParser parser;
+ QCoreApplication::setApplicationVersion(QLatin1String(QT_VERSION_STR));
+ parser.setApplicationDescription(QLatin1String(helpText));
+
+
+ parser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions);
+ parser.addHelpOption();
+ parser.addVersionOption();
+ QCommandLineOption outputOption(QLatin1String(outputOptionC + 1),
+ QStringLiteral("Write output to file."),
+ QStringLiteral("file"));
+ parser.addOption(outputOption);
+ QCommandLineOption nameSpaceOption(QLatin1String(nameSpaceOptionC + 1),
+ QStringLiteral("The name of the generated C++ namespace."),
+ QStringLiteral("namespace"));
+ parser.addOption(nameSpaceOption);
+ QCommandLineOption noMetaObjectOption(QStringLiteral("nometaobject"),
+ QStringLiteral("Don't generate meta object information (no .cpp file). The meta object is then generated in runtime."));
+ parser.addOption(noMetaObjectOption);
+ QCommandLineOption noDeclarationOption(QStringLiteral("impl"),
+ QStringLiteral("Only generate the .cpp file."));
+ parser.addOption(noDeclarationOption);
+ QCommandLineOption noImplementationOption(QStringLiteral("decl"),
+ QStringLiteral("Only generate the .h file."));
+ parser.addOption(noImplementationOption);
+ QCommandLineOption doNothingOption(QStringLiteral("donothing"),
+ QStringLiteral("Do not generate any files."));
+ parser.addOption(doNothingOption);
+ QCommandLineOption compatOption(QStringLiteral("compat"),
+ QStringLiteral("Treat all coclass parameters as IDispatch."));
+ parser.addOption(compatOption);
+ QCommandLineOption getFileOption(QLatin1String(getfileOptionC + 1),
+ QStringLiteral("Print the filename for the type library it to standard output."),
+ QStringLiteral("id"));
+ parser.addOption(getFileOption);
+ parser.addPositionalArgument(QStringLiteral("input"),
+ QStringLiteral("A type library file, type library ID, ProgID or CLSID."));
+ parser.process(args);
+
+ if (parser.isSet(outputOption))
+ options->outname = parser.value(outputOption);
+ if (parser.isSet(nameSpaceOption))
+ options->nameSpace = parser.value(nameSpaceOption);
+ if (parser.isSet(noMetaObjectOption))
+ options->category |= NoMetaObject;
+ if (parser.isSet(noDeclarationOption))
+ options->category |= NoDeclaration;
+ if (parser.isSet(noImplementationOption))
+ options->category |= NoImplementation;
+ if (parser.isSet(doNothingOption))
+ options->mode = DoNothing;
+ options->dispatchEqualsIDispatch = parser.isSet(compatOption);
+ if (parser.isSet(getFileOption)) {
+ options->typeLib = parser.value(getFileOption);
+ options->mode = TypeLibID;
+ }
+ if (!parser.positionalArguments().isEmpty())
+ options->typeLib = parser.positionalArguments().first();
- case GetTypeLib:
- typeLib = arg;
- state = Default;
- category = TypeLibID;
- break;
- default:
- break;
- }
+ if (options->mode == GenerateMode && options->typeLib.isEmpty()) {
+ qWarning("dumpcpp: No object class or type library name provided.\n");
+ parser.showHelp(1);
}
+}
- if (category == TypeLibID) {
+int main(int argc, char **argv)
+{
+ if (FAILED(CoInitialize(0))) {
+ qErrnoWarning("CoInitialize() failed.");
+ return -1;
+ }
+ QCoreApplication app(argc, argv);
+
+ Options options;
+ parseOptions(&options);
+ qax_dispatchEqualsIDispatch = options.dispatchEqualsIDispatch;
+ QString typeLib = options.typeLib;
+
+ if (options.mode == TypeLibID) {
QSettings settings(QLatin1String("HKEY_LOCAL_MACHINE\\Software\\Classes\\TypeLib\\") +
- QString::fromLatin1(typeLib.constData()), QSettings::NativeFormat);
- typeLib = QByteArray();
+ typeLib, QSettings::NativeFormat);
+ typeLib.clear();
QStringList codes = settings.childGroups();
for (int c = 0; c < codes.count(); ++c) {
- typeLib = settings.value(QLatin1String("/") + codes.at(c) + QLatin1String("/0/win32/.")).toByteArray();
- if (QFile::exists(QString::fromLatin1(typeLib))) {
+ typeLib = settings.value(QLatin1Char('/') + codes.at(c) + QLatin1String("/0/win32/.")).toString();
+ if (QFile::exists(typeLib))
break;
- }
}
if (!typeLib.isEmpty())
- fprintf(stdout, "\"%s\"\n", typeLib.data());
+ fprintf(stdout, "\"%s\"\n", qPrintable(typeLib));
return 0;
}
- if (category == DoNothing)
+ if (options.mode == DoNothing)
return 0;
if (typeLib.isEmpty()) {
@@ -1608,62 +1525,61 @@ int main(int argc, char **argv)
}
// not a file - search registry
- if (!QFile::exists(QString::fromLatin1(typeLib.constData()))) {
+ if (!QFile::exists(typeLib)) {
bool isObject = false;
QSettings settings(QLatin1String("HKEY_LOCAL_MACHINE\\Software\\Classes"), QSettings::NativeFormat);
// regular string and not a file - must be ProgID
if (typeLib.at(0) != '{') {
CLSID clsid;
- if (CLSIDFromProgID(reinterpret_cast<const wchar_t *>(QString(QLatin1String(typeLib)).utf16()), &clsid) != S_OK) {
- qWarning("dumpcpp: '%s' is not a type library and not a registered ProgID", typeLib.constData());
+ if (CLSIDFromProgID(reinterpret_cast<const wchar_t *>(typeLib.utf16()), &clsid) != S_OK) {
+ qWarning("dumpcpp: '%s' is not a type library and not a registered ProgID",
+ qPrintable(typeLib));
return -2;
}
- QUuid uuid(clsid);
- typeLib = uuid.toString().toLatin1();
+ typeLib = QUuid(clsid).toString();
isObject = true;
}
// check if CLSID
if (!isObject) {
- QVariant test = settings.value(QLatin1String("/CLSID/") +
- QString::fromLatin1(typeLib.constData()) + QLatin1String("/."));
+ QVariant test = settings.value(QLatin1String("/CLSID/") + typeLib + QLatin1String("/."));
isObject = test.isValid();
}
// search typelib ID for CLSID
if (isObject)
- typeLib = settings.value(QLatin1String("/CLSID/") +
- QString::fromLatin1(typeLib.constData()) + QLatin1String("/Typelib/.")).toByteArray();
+ typeLib = settings.value(QLatin1String("/CLSID/") + typeLib
+ + QLatin1String("/Typelib/.")).toString();
// interpret input as type library ID
- QString key = QLatin1String("/TypeLib/") + QLatin1String(typeLib);
+ QString key = QLatin1String("/TypeLib/") + typeLib;
settings.beginGroup(key);
QStringList versions = settings.childGroups();
QStringList codes;
if (versions.count()) {
- settings.beginGroup(QLatin1String("/") + versions.last());
+ settings.beginGroup(QLatin1Char('/') + versions.last());
codes = settings.childGroups();
- key += QLatin1String("/") + versions.last();
+ key += QLatin1Char('/') + versions.last();
settings.endGroup();
}
settings.endGroup();
for (int c = 0; c < codes.count(); ++c) {
- typeLib = settings.value(key + QLatin1String("/") + codes.at(c) + QLatin1String("/win32/.")).toByteArray();
- if (QFile::exists(QString::fromLatin1(typeLib.constData()))) {
+ typeLib = settings.value(key + QLatin1Char('/') + codes.at(c)
+ + QLatin1String("/win32/.")).toString();
+ if (QFile::exists(typeLib))
break;
- }
}
}
- if (!QFile::exists(QString::fromLatin1(typeLib.constData()))) {
- qWarning("dumpcpp: type library '%s' not found", typeLib.constData());
+ if (!QFile::exists(typeLib)) {
+ qWarning("dumpcpp: type library '%s' not found", qPrintable(typeLib));
return -2;
}
- if (!generateTypeLibrary(typeLib, outname, (ObjectCategory)category)) {
- qWarning("dumpcpp: error processing type library '%s'", typeLib.constData());
+ if (!generateTypeLibrary(typeLib, options.outname, options.nameSpace, (ObjectCategory)options.category)) {
+ qWarning("dumpcpp: error processing type library '%s'", qPrintable(typeLib));
return -1;
}
diff --git a/tools/dumpdoc/main.cpp b/tools/dumpdoc/main.cpp
index 9709a94..df86507 100644
--- a/tools/dumpdoc/main.cpp
+++ b/tools/dumpdoc/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** 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
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -106,7 +106,7 @@ int main(int argc, char **argv)
QByteArray subobject = object;
int index = subobject.indexOf('/');
if (index != -1)
- subobject = subobject.left(index);
+ subobject.truncate(index);
QAxObject topobject(QString::fromLatin1(subobject.constData()));
diff --git a/tools/testcon/ambientproperties.cpp b/tools/testcon/ambientproperties.cpp
index 449faa9..9494e25 100644
--- a/tools/testcon/ambientproperties.cpp
+++ b/tools/testcon/ambientproperties.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** 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
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -45,7 +45,7 @@ AmbientProperties::AmbientProperties(QWidget *parent)
{
setupUi(this);
- connect(buttonClose, SIGNAL(clicked()), this, SLOT(close()));
+ connect(buttonClose, &QAbstractButton::clicked, this, &QWidget::close);
}
void AmbientProperties::setControl(QWidget *widget)
diff --git a/tools/testcon/ambientproperties.h b/tools/testcon/ambientproperties.h
index 680e013..a65a909 100644
--- a/tools/testcon/ambientproperties.h
+++ b/tools/testcon/ambientproperties.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** 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
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/tools/testcon/ambientproperties.ui b/tools/testcon/ambientproperties.ui
index 2bdcfb9..cf8e7c9 100644
--- a/tools/testcon/ambientproperties.ui
+++ b/tools/testcon/ambientproperties.ui
@@ -2,41 +2,33 @@
<author></author>
<comment>*********************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 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.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** 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$
**
*********************************************************************</comment>
diff --git a/tools/testcon/changeproperties.cpp b/tools/testcon/changeproperties.cpp
index 3a7fb68..f7fe493 100644
--- a/tools/testcon/changeproperties.cpp
+++ b/tools/testcon/changeproperties.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** 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
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -141,8 +141,8 @@ void ChangeProperties::on_buttonSet_clicked()
break;
case QVariant::Bool:
{
- QString txt = editValue->text().toLower();
- value = QVariant(txt != QLatin1String("0") && txt != QLatin1String("false"));
+ const QString txt = editValue->text();
+ value = QVariant(txt != QLatin1String("0") && txt.compare(QLatin1String("false"), Qt::CaseInsensitive));
}
break;
case QVariant::List:
diff --git a/tools/testcon/changeproperties.h b/tools/testcon/changeproperties.h
index 25faa41..f16cbf5 100644
--- a/tools/testcon/changeproperties.h
+++ b/tools/testcon/changeproperties.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** 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
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/tools/testcon/changeproperties.ui b/tools/testcon/changeproperties.ui
index 1ecdc9b..78de41c 100644
--- a/tools/testcon/changeproperties.ui
+++ b/tools/testcon/changeproperties.ui
@@ -2,41 +2,33 @@
<author></author>
<comment>*********************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 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.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** 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$
**
*********************************************************************</comment>
diff --git a/tools/testcon/controlinfo.cpp b/tools/testcon/controlinfo.cpp
index 62aa089..3959df0 100644
--- a/tools/testcon/controlinfo.cpp
+++ b/tools/testcon/controlinfo.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** 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
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/tools/testcon/controlinfo.h b/tools/testcon/controlinfo.h
index b4e86bb..baf91c8 100644
--- a/tools/testcon/controlinfo.h
+++ b/tools/testcon/controlinfo.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** 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
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/tools/testcon/controlinfo.ui b/tools/testcon/controlinfo.ui
index e2684ca..0fef29d 100644
--- a/tools/testcon/controlinfo.ui
+++ b/tools/testcon/controlinfo.ui
@@ -2,41 +2,33 @@
<author></author>
<comment>*********************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 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.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** 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$
**
*********************************************************************</comment>
diff --git a/tools/testcon/docuwindow.cpp b/tools/testcon/docuwindow.cpp
index 5bc5d6e..f3f136b 100644
--- a/tools/testcon/docuwindow.cpp
+++ b/tools/testcon/docuwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** 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
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/tools/testcon/docuwindow.h b/tools/testcon/docuwindow.h
index d9a4e53..5779d0f 100644
--- a/tools/testcon/docuwindow.h
+++ b/tools/testcon/docuwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** 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
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/tools/testcon/invokemethod.cpp b/tools/testcon/invokemethod.cpp
index c75a685..0f898b1 100644
--- a/tools/testcon/invokemethod.cpp
+++ b/tools/testcon/invokemethod.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** 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
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -101,9 +101,8 @@ void InvokeMethod::on_buttonInvoke_clicked()
parameter->setText(2, vars[v++].toString());
}
- QString resString = result.toString();
- QString resType = QString::fromLatin1(result.typeName());
- editReturn->setText(resType + QLatin1String(" ") + resString);
+ editReturn->setText(QString::fromLatin1(result.typeName())
+ + QLatin1Char(' ') + result.toString());
}
void InvokeMethod::on_comboMethods_activated(const QString &method)
diff --git a/tools/testcon/invokemethod.h b/tools/testcon/invokemethod.h
index fdd32e8..38b9778 100644
--- a/tools/testcon/invokemethod.h
+++ b/tools/testcon/invokemethod.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** 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
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/tools/testcon/invokemethod.ui b/tools/testcon/invokemethod.ui
index f36bd23..3c3a87e 100644
--- a/tools/testcon/invokemethod.ui
+++ b/tools/testcon/invokemethod.ui
@@ -2,41 +2,33 @@
<author></author>
<comment>*********************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 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.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** 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$
**
*********************************************************************</comment>
diff --git a/tools/testcon/main.cpp b/tools/testcon/main.cpp
index a6667d1..dda1b3a 100644
--- a/tools/testcon/main.cpp
+++ b/tools/testcon/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** 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
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/tools/testcon/mainwindow.cpp b/tools/testcon/mainwindow.cpp
index f158965..cc03f5a 100644
--- a/tools/testcon/mainwindow.cpp
+++ b/tools/testcon/mainwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** 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
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -85,8 +85,8 @@ MainWindow::MainWindow(QWidget *parent)
layout->addWidget(mdiArea);
layout->setMargin(0);
- connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)), this, SLOT(updateGUI()));
- connect(actionFileExit, SIGNAL(triggered()), qApp, SLOT(quit()));
+ connect(mdiArea, &QMdiArea::subWindowActivated, this, &MainWindow::updateGUI);
+ connect(actionFileExit, &QAction::triggered, QCoreApplication::quit);
}
MainWindow::~MainWindow()
@@ -340,8 +340,7 @@ void MainWindow::on_actionScriptingLoad_triggered()
QAxScript *script = scripts->load(file, file);
if (script) {
- connect(script, SIGNAL(error(int,QString,int,QString)),
- this, SLOT(logMacro(int,QString,int,QString)));
+ connect(script, &QAxScript::error, this, &MainWindow::logMacro);
actionScriptingRun->setEnabled(true);
}
#else
@@ -403,20 +402,15 @@ void MainWindow::logSignal(const QString &signal, int argc, void *argv)
if (!container)
return;
- QString paramlist;
+ QString paramlist = QLatin1String(" - {");
VARIANT *params = (VARIANT*)argv;
for (int a = argc-1; a >= 0; --a) {
- if (a == argc-1)
- paramlist = QLatin1String(" - {");
- QVariant qvar = VARIANTToQVariant(params[a], 0);
- paramlist += QLatin1String(" ") + qvar.toString();
- if (a > 0)
- paramlist += QLatin1String(",");
- else
- paramlist += QLatin1String(" ");
+ paramlist += QLatin1Char(' ');
+ paramlist += VARIANTToQVariant(params[a], 0).toString();
+ paramlist += a > 0 ? QLatin1Char(',') : QLatin1Char(' ');
}
if (argc)
- paramlist += QLatin1String("}");
+ paramlist += QLatin1Char('}');
logSignals->append(container->windowTitle() + QLatin1String(": ") + signal + paramlist);
}
@@ -444,12 +438,14 @@ void MainWindow::logMacro(int code, const QString &description, int sourcePositi
* that it can be translated in a sane way. */
QString message = tr("Script: ");
if (code)
- message += QString::number(code) + QLatin1String(" ");
- message += QLatin1String("'") + description + QLatin1String("'");
+ message += QString::number(code) + QLatin1Char(' ');
+
+ const QChar singleQuote = QLatin1Char('\'');
+ message += singleQuote + description + singleQuote;
if (sourcePosition)
message += tr(" at position ") + QString::number(sourcePosition);
if (!sourceText.isEmpty())
- message += QLatin1String(" '") + sourceText + QLatin1String("'");
+ message += QLatin1String(" '") + sourceText + singleQuote;
logMacros->append(message);
}
diff --git a/tools/testcon/mainwindow.h b/tools/testcon/mainwindow.h
index 629cf2a..68b85b1 100644
--- a/tools/testcon/mainwindow.h
+++ b/tools/testcon/mainwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** 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
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/tools/testcon/mainwindow.ui b/tools/testcon/mainwindow.ui
index e735528..da39df5 100644
--- a/tools/testcon/mainwindow.ui
+++ b/tools/testcon/mainwindow.ui
@@ -2,41 +2,33 @@
<author></author>
<comment>*********************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and 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.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 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.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** 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$
**
*********************************************************************</comment>
diff --git a/tools/testcon/scripts/perlscript.pl b/tools/testcon/scripts/perlscript.pl
index 7497b2e..e053d79 100644
--- a/tools/testcon/scripts/perlscript.pl
+++ b/tools/testcon/scripts/perlscript.pl
@@ -1,7 +1,7 @@
#############################################################################
##
-## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-## Contact: http://www.qt-project.org/legal
+## Copyright (C) 2015 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
##
## This file is part of the ActiveQt module of the Qt Toolkit.
##
@@ -10,9 +10,9 @@
## 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.
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see http://www.qt.io/terms-conditions. For further
+## information use the contact form at http://www.qt.io/contact-us.
##
## GNU Lesser General Public License Usage
## Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
## 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
+## As a special exception, The Qt Company gives you certain additional
+## rights. These rights are described in The Qt Company LGPL Exception
## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
##
## $QT_END_LICENSE$
diff --git a/tools/testcon/scripts/pythonscript.py b/tools/testcon/scripts/pythonscript.py
index ba61f52..cf363e6 100644
--- a/tools/testcon/scripts/pythonscript.py
+++ b/tools/testcon/scripts/pythonscript.py
@@ -1,8 +1,8 @@
#!/usr/bin/env python
#############################################################################
##
-## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-## Contact: http://www.qt-project.org/legal
+## Copyright (C) 2015 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
##
## This file is part of the test suite of the Qt Toolkit.
##
@@ -11,9 +11,9 @@
## 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.
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see http://www.qt.io/terms-conditions. For further
+## information use the contact form at http://www.qt.io/contact-us.
##
## GNU Lesser General Public License Usage
## Alternatively, this file may be used under the terms of the GNU Lesser
@@ -24,8 +24,8 @@
## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
## 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
+## As a special exception, The Qt Company gives you certain additional
+## rights. These rights are described in The Qt Company LGPL Exception
## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
##
## $QT_END_LICENSE$
diff --git a/tools/testcon/testcon.rc b/tools/testcon/testcon.rc
index 3ab5047..124023e 100644
--- a/tools/testcon/testcon.rc
+++ b/tools/testcon/testcon.rc
@@ -19,11 +19,11 @@ VS_VERSION_INFO VERSIONINFO
BEGIN
BLOCK "040904B0"
BEGIN
- VALUE "CompanyName", "Digia Plc and/or its subsidiary(-ies)\0"
+ VALUE "CompanyName", "The Qt Company Ltd.\0"
VALUE "FileDescription", "ActiveQt Test Container\0"
VALUE "FileVersion", "1,0,0,1\0"
VALUE "InternalName", "testcon\0"
- VALUE "LegalCopyright", "Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).0"
+ VALUE "LegalCopyright", "Copyright (C) 2015 The Qt Company Ltd.0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "testcon.exe\0"
VALUE "ProductName", "ActiveQt Test Container\0"