diff options
41 files changed, 595 insertions, 873 deletions
diff --git a/.qmake.conf b/.qmake.conf index 7e0ad0e..dc68d38 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1,3 +1,3 @@ load(qt_build_config) -MODULE_VERSION = 5.9.5 +MODULE_VERSION = 5.11.0 diff --git a/dist/changes-5.10.0 b/dist/changes-5.10.0 new file mode 100644 index 0000000..a41f02a --- /dev/null +++ b/dist/changes-5.10.0 @@ -0,0 +1,22 @@ +Qt 5.10 introduces many new features and improvements as well as bugfixes +over the 5.9.x series. For more details, refer to the online documentation +included in this distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.10 series is binary compatible with the 5.10.x series. +Applications compiled for 5.9 will continue to run with 5.10. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Qt 5.10.0 Changes * +**************************************************************************** + + - This release contains only minor code improvements. diff --git a/dist/changes-5.10.1 b/dist/changes-5.10.1 new file mode 100644 index 0000000..695c4e3 --- /dev/null +++ b/dist/changes-5.10.1 @@ -0,0 +1,26 @@ +Qt 5.10.1 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.10.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.10 series is binary compatible with the 5.9.x series. +Applications compiled for 5.9 will continue to run with 5.10. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +This release contains all fixes included in the Qt 5.9.4 release. + +**************************************************************************** +* Qt 5.10.1 Changes * +**************************************************************************** + + - This release contains only minor code improvements. diff --git a/examples/activeqt/activeqt.pro b/examples/activeqt/activeqt.pro index 97b22bd..6f189bc 100644 --- a/examples/activeqt/activeqt.pro +++ b/examples/activeqt/activeqt.pro @@ -6,10 +6,9 @@ SUBDIRS += comapp \ simple \ wrapper -contains(QT_CONFIG, shared):SUBDIRS += webbrowser +contains(QT_CONFIG, shared):SUBDIRS += mediaplayer contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles2): SUBDIRS += opengl qtHaveModule(quickcontrols2):SUBDIRS += simpleqml -# For now only the contain examples with mingw, for the others you need -# an IDL compiler -mingw:SUBDIRS = webbrowser +# Other examples need an IDL compiler +mingw:SUBDIRS = mediaplayer diff --git a/examples/activeqt/mediaplayer/doc/images/activeqt-mediaplayer-example.jpg b/examples/activeqt/mediaplayer/doc/images/activeqt-mediaplayer-example.jpg Binary files differnew file mode 100644 index 0000000..4839242 --- /dev/null +++ b/examples/activeqt/mediaplayer/doc/images/activeqt-mediaplayer-example.jpg diff --git a/examples/activeqt/mediaplayer/doc/src/mediaplayer.qdoc b/examples/activeqt/mediaplayer/doc/src/mediaplayer.qdoc new file mode 100644 index 0000000..6043a6a --- /dev/null +++ b/examples/activeqt/mediaplayer/doc/src/mediaplayer.qdoc @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://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 +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example activeqt/mediaplayer + \title Media Player Example (ActiveQt) + + \brief The Media Player example uses the Microsoft Media Player + ActiveX control to implement a functional media player application. + + \image activeqt-mediaplayer-example.jpg + + \e {Media Player} demonstrates how a Qt application can communicate with + embedded ActiveX controls using signals, slots, and the \c dynamicCall() + function. + + \quotefromfile activeqt/mediaplayer/main.cpp + \skipto class MainWindow + \printuntil /^\}/ + + The \c MainWindow class declares a \c QMainWindow based user interface, + using the \c Ui::MainWindow class created by Qt Designer. A number + of slots are implemented to handle events from user interface elements, + including the \c mediaPlayer object, which is a QAxWidget hosting + the Microsoft Media Player ActiveX control. + + \quotefromfile activeqt/mediaplayer/main.cpp + \skipto MainWindow::MainWindow() + \printuntil /^\}/ + + The constructor initializes the user interface, restores a previously + saved window geometry, and uses the \c dynamicCall() function to invoke + the APIs implemented by the Microsoft Media Player ActiveX control, + to set initial configuration parameters. + + \quotefromfile activeqt/mediaplayer/main.cpp + \skipto MainWindow::on_mediaPlayer_PlayStateChange + \printuntil /^\}/ + + The \c on_mediaPlayer_PlayStateChange slot handles the signal emitted + by the \c mediaPlayer object when its state changes. + + \quotefromfile activeqt/mediaplayer/main.cpp + \skipto MainWindow::openMedia + \printuntil /^\}/ + + The \c openMedia() function allows a media file to be opened by using + the \c dynamicCall() function to set the URL property in the ActiveX + control, which causes the media file to be loaded and played. + + \quotefromfile activeqt/mediaplayer/main.cpp + \skipto int main + \printuntil /^\}/ + + The \c main() function starts the application using standard Qt APIs + and uses an optional command line argument as the name of a media + file to be loaded by the player. + + To build the example, you must first build the QAxContainer + library. Then run your make tool in + \c examples/activeqt/mediaplayer and run the resulting + \c mediaplayer.exe. +*/ diff --git a/examples/activeqt/mediaplayer/main.cpp b/examples/activeqt/mediaplayer/main.cpp new file mode 100644 index 0000000..c20f262 --- /dev/null +++ b/examples/activeqt/mediaplayer/main.cpp @@ -0,0 +1,193 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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 <QApplication> +#include <QMessageBox> +#include <QMainWindow> +#include <QDesktopWidget> +#include <QVariant> +#include <QSettings> +#include <QFileDialog> +#include <QCommandLineParser> + +#include "ui_mainwindow.h" + +static const char geometryKey[] = "Geometry"; + +class MainWindow : public QMainWindow +{ + Q_OBJECT +public: + MainWindow(); + ~MainWindow(); + void openMedia(const QString &mediaUrl); + +public slots: + void on_mediaPlayer_PlayStateChange(int newState); + void on_actionOpen_triggered(); + void on_actionExit_triggered(); + void on_actionAbout_triggered(); + void on_actionAboutQt_triggered(); + +private: + void updateWindowTitle(const QString &state); + Ui::MainWindow m_ui; +}; + +MainWindow::MainWindow() +{ + m_ui.setupUi(this); + + QSettings settings(QSettings::IniFormat, QSettings::UserScope, + QCoreApplication::organizationName(), QCoreApplication::applicationName()); + + const QByteArray restoredGeometry = settings.value(QLatin1String(geometryKey)).toByteArray(); + if (restoredGeometry.isEmpty() || !restoreGeometry(restoredGeometry)) { + const QRect availableGeometry = QApplication::desktop()->availableGeometry(this); + const QSize size = (availableGeometry.size() * 4) / 5; + resize(size); + move(availableGeometry.center() - QPoint(size.width(), size.height()) / 2); + } + + m_ui.mediaPlayer->dynamicCall("enableContextMenu", false); + m_ui.mediaPlayer->dynamicCall("stretchToFit", true); + updateWindowTitle(""); +} + +MainWindow::~MainWindow() +{ + QSettings settings(QSettings::IniFormat, QSettings::UserScope, + QCoreApplication::organizationName(), QCoreApplication::applicationName()); + settings.setValue(QLatin1String(geometryKey), saveGeometry()); +} + +void MainWindow::on_mediaPlayer_PlayStateChange(int newState) +{ + static const QHash<int, const char *> stateMapping { + {1, "Stopped"}, + {2, "Paused"}, + {3, "Playing"}, + {4, "Scanning Forwards"}, + {5, "Scanning Backwards"}, + {6, "Buffering"}, + {7, "Waiting"}, + {8, "Media Ended"}, + {9, "Transitioning"}, + {10, "Ready"}, + {11, "Reconnecting"}, + }; + const char *stateStr = stateMapping.value(newState, ""); + updateWindowTitle(tr(stateStr)); +} + +void MainWindow::on_actionOpen_triggered() +{ + QFileDialog fileDialog(this, tr("Open File")); + fileDialog.setAcceptMode(QFileDialog::AcceptOpen); + fileDialog.setFileMode(QFileDialog::ExistingFile); + fileDialog.setMimeTypeFilters({ "application/octet-stream", "video/x-msvideo", "video/mp4", "audio/mpeg", "audio/mp4" }); + if (fileDialog.exec() == QDialog::Accepted) + openMedia(fileDialog.selectedFiles().first()); +} + +void MainWindow::on_actionExit_triggered() +{ + QCoreApplication::quit(); +} + +void MainWindow::on_actionAbout_triggered() +{ + QMessageBox::about(this, tr("About Media Player"), + tr("This Example has been created using the ActiveQt integration into Qt Designer.\n" + "It demonstrates the use of QAxWidget to embed the Windows Media Player ActiveX\n" + "control into a Qt application.")); +} + +void MainWindow::on_actionAboutQt_triggered() +{ + QMessageBox::aboutQt(this, tr("About Qt")); +} + +void MainWindow::openMedia(const QString &mediaUrl) +{ + if (!mediaUrl.isEmpty()) + m_ui.mediaPlayer->dynamicCall("URL", mediaUrl); +} + +void MainWindow::updateWindowTitle(const QString &state) +{ + QString appName = QCoreApplication::applicationName(); + QString title = state.isEmpty() ? appName : + QString("%1 (%2)").arg(appName, state); + setWindowTitle(title); +} + +#include "main.moc" + +int main(int argc, char *argv[]) +{ + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + QApplication app(argc, argv); + QCoreApplication::setApplicationVersion(QT_VERSION_STR); + QCoreApplication::setApplicationName(QLatin1String("Active Qt Media Player")); + QCoreApplication::setOrganizationName(QLatin1String("QtProject")); + + MainWindow w; + QCommandLineParser parser; + parser.setApplicationDescription(QCoreApplication::applicationName()); + parser.addHelpOption(); + parser.addVersionOption(); + parser.addPositionalArgument("file", "The media file to open."); + parser.process(app); + if (!parser.positionalArguments().isEmpty()) + w.openMedia(parser.positionalArguments().constFirst()); + w.show(); + return app.exec(); +} diff --git a/examples/activeqt/mediaplayer/mainwindow.ui b/examples/activeqt/mediaplayer/mainwindow.ui new file mode 100644 index 0000000..b83d392 --- /dev/null +++ b/examples/activeqt/mediaplayer/mainwindow.ui @@ -0,0 +1,147 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>MainWindow</class> + <widget class="QMainWindow" name="MainWindow"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>794</width> + <height>599</height> + </rect> + </property> + <property name="acceptDrops"> + <bool>true</bool> + </property> + <property name="windowTitle"> + <string>Qt Media Player</string> + </property> + <widget class="QWidget" name="centralWidget"> + <layout class="QHBoxLayout" name="unnamed"> + <property name="spacing"> + <number>6</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QFrame" name="Frame"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Sunken</enum> + </property> + <layout class="QVBoxLayout" name="unnamed"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>1</number> + </property> + <property name="topMargin"> + <number>1</number> + </property> + <property name="rightMargin"> + <number>1</number> + </property> + <property name="bottomMargin"> + <number>1</number> + </property> + <item> + <widget class="MediaAxWidget" name="mediaPlayer"> + <property name="control" stdset="0"> + <string>{6bf52a52-394a-11d3-b153-00c04f79faa6}</string> + </property> + <property name="sizePolicy" stdset="0"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + <widget class="QMenuBar" name="menubar"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>794</width> + <height>21</height> + </rect> + </property> + <widget class="QMenu" name="PopupMenu"> + <property name="title"> + <string>&File</string> + </property> + <addaction name="actionOpen"/> + <addaction name="actionExit"/> + </widget> + <widget class="QMenu" name="menuHelp"> + <property name="title"> + <string>&Help</string> + </property> + <addaction name="actionAbout"/> + <addaction name="actionAboutQt"/> + </widget> + <addaction name="PopupMenu"/> + <addaction name="menuHelp"/> + </widget> + <action name="actionOpen"> + <property name="text"> + <string>&Open</string> + </property> + </action> + <action name="actionExit"> + <property name="text"> + <string>E&xit</string> + </property> + </action> + <action name="actionAbout"> + <property name="text"> + <string>&About</string> + </property> + </action> + <action name="actionAboutQt"> + <property name="text"> + <string>About &Qt</string> + </property> + </action> + <actiongroup name="FileNewGroup"/> + </widget> + <layoutdefault spacing="6" margin="11"/> + <customwidgets> + <customwidget> + <class>QAxWidget</class> + <extends>QWidget</extends> + <header>qaxwidget.h</header> + </customwidget> + <customwidget> + <class>MediaAxWidget</class> + <extends>QAxWidget</extends> + <header>mediaaxwidget.h</header> + </customwidget> + </customwidgets> + <resources/> + <connections/> +</ui> diff --git a/examples/activeqt/webbrowser/webaxwidget.h b/examples/activeqt/mediaplayer/mediaaxwidget.h index 9a15a72..a57ca05 100644 --- a/examples/activeqt/webbrowser/webaxwidget.h +++ b/examples/activeqt/mediaplayer/mediaaxwidget.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. +** Copyright (C) 2017 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. @@ -48,28 +48,29 @@ ** ****************************************************************************/ -#ifndef WEBAXWIDGET_H -#define WEBAXWIDGET_H +#ifndef MEDIAAXWIDGET_H +#define MEDIAAXWIDGET_H #include <ActiveQt/QAxWidget> -#include "windows.h" +#include <qt_windows.h> -class WebAxWidget : public QAxWidget +// Overrides the translateKeyEvent() function to pass keystrokes +// to the Windows Media Player ActiveX control. +class MediaAxWidget : public QAxWidget { public: - - WebAxWidget(QWidget *parent = nullptr, Qt::WindowFlags f = 0) + MediaAxWidget(QWidget *parent = nullptr, Qt::WindowFlags f = 0) : QAxWidget(parent, f) { } + protected: - bool translateKeyEvent(int message, int keycode) const Q_DECL_OVERRIDE + bool translateKeyEvent(int message, int keycode) const override { if (message >= WM_KEYFIRST && message <= WM_KEYLAST) return true; return QAxWidget::translateKeyEvent(message, keycode); } - }; -#endif // WEBAXWIDGET_H +#endif // MEDIAAXWIDGET_H diff --git a/examples/activeqt/webbrowser/webbrowser.pro b/examples/activeqt/mediaplayer/mediaplayer.pro index 0fd36c0..ad787a3 100644 --- a/examples/activeqt/webbrowser/webbrowser.pro +++ b/examples/activeqt/mediaplayer/mediaplayer.pro @@ -2,11 +2,10 @@ TEMPLATE = app QT += widgets axcontainer -HEADERS = webaxwidget.h +HEADERS = mediaaxwidget.h SOURCES = main.cpp FORMS = mainwindow.ui - # install -target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/webbrowser +target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/mediaplayer INSTALLS += target diff --git a/examples/activeqt/webbrowser/doc/images/activeqt-webbrowser-example.png b/examples/activeqt/webbrowser/doc/images/activeqt-webbrowser-example.png Binary files differdeleted file mode 100644 index 0bb451a..0000000 --- a/examples/activeqt/webbrowser/doc/images/activeqt-webbrowser-example.png +++ /dev/null diff --git a/examples/activeqt/webbrowser/doc/src/webbrowser.qdoc b/examples/activeqt/webbrowser/doc/src/webbrowser.qdoc deleted file mode 100644 index b8215bd..0000000 --- a/examples/activeqt/webbrowser/doc/src/webbrowser.qdoc +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://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 -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \example activeqt/webbrowser - \title Web Browser Example (ActiveQt) - - \brief The Web Browser example uses the Microsoft Web Browser - ActiveX control to implement a fully functional Web Browser - application. The user interface has been developed using the Qt - Designer integration of the QAxWidget class. - - \image activeqt-webbrowser-example.png - - The code demonstrates how the Qt application can communicate - with the embedded ActiveX controls using signals, slots and the - dynamicCall() function. - - \snippet activeqt/webbrowser/main.cpp 0 - - The \c MainWindow class declares a \c QMainWindow based user interface, - using the \c Ui::MainWindow class generated by Qt Designer. A number - of slots are implemented to handle events from the various user - interface elements, including the \c WebBrowser object, which is a - QAxWidget hosting the Microsoft Web Browser control. - - \snippet activeqt/webbrowser/main.cpp 1 - - The constructor initializes the user interface, installs a - progress bar on the status bar, and loads the bookmarks. - - \snippet activeqt/webbrowser/main.cpp 2 - Different slots handle the signals emitted by the WebBrowser object. - - Connections that don't require any coding, i.e. connecting the \c back - action to the \c GoBack() slot, have already been made in Qt Designer. - - \snippet activeqt/webbrowser/main.cpp 3 - \snippet activeqt/webbrowser/main.cpp 4 - - The rest of the implementation is not related to ActiveQt - the actions - are handled by different slots, and the entry point function starts the - application using standard Qt APIs. - - To build the example you must first build the QAxContainer - library. Then run your make tool in \c - examples/activeqt/webbrowser and run the resulting \c - webbrowser.exe. -*/ diff --git a/examples/activeqt/webbrowser/main.cpp b/examples/activeqt/webbrowser/main.cpp deleted file mode 100644 index 6d6d6d5..0000000 --- a/examples/activeqt/webbrowser/main.cpp +++ /dev/null @@ -1,359 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** 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 https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, 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 <QApplication> -#include <QMessageBox> -#include <QProgressBar> -#include <QLineEdit> -#include <QLabel> -#include <QStatusBar> -#include <QMainWindow> -#include <QDesktopWidget> -#include <QAbstractEventDispatcher> -#include <QSignalMapper> -#include <QVariant> -#include <QSettings> - -#include "ui_mainwindow.h" - -static const char qtUrl[] = "qt.io"; -static const char iWebBrowser2DocumentationUrl[] = "http://msdn.microsoft.com/en-us/library/aa752127%28v=vs.85%29.aspx"; -static const char versionKey[] = "Version"; -static const char geometryKey[] = "Geometry"; - -struct Location { - Location(const QString &t = QString(), const QString &a = QString()) : title(t), address(a) {} - - QString title; - QString address; -}; - -Q_DECLARE_METATYPE(Location) - -static QList<Location> defaultBookmarks() -{ - QList<Location> result; - result.append(Location(QStringLiteral("Qt"), QLatin1String(qtUrl))); - result.append(Location(QStringLiteral("Digia"), QStringLiteral("http://qt.digia.com/"))); - result.append(Location(QStringLiteral("IWebBrowser2 MSDN Documentation"), QLatin1String(iWebBrowser2DocumentationUrl))); - return result; -} - -static bool containsAddress(const QList<Location> &locations, const QString &address) -{ - for (const Location &location : locations) { - if (location.address == address) - return true; - } - return false; -} - -static inline Location locationFromAction(const QAction *action) -{ - return action->data().value<Location>(); -} - -static QList<Location> readBookMarks(QSettings &settings) -{ - QList<Location> result; - if (const int count = settings.beginReadArray(QStringLiteral("Bookmarks"))) { - const QString titleKey = QStringLiteral("title"); - const QString addressKey = QStringLiteral("address"); - for (int i = 0; i < count; ++i) { - settings.setArrayIndex(i); - result.append(Location(settings.value(titleKey).toString(), - settings.value(addressKey).toString())); - } - } - settings.endArray(); - return result; -} - -static void saveBookMarks(const QList<Location> &bookmarks, QSettings &settings) -{ - const int count = bookmarks.size(); - settings.beginWriteArray(QStringLiteral("Bookmarks")); - const QString titleKey = QStringLiteral("title"); - const QString addressKey = QStringLiteral("address"); - for (int i = 0; i < count; ++i) { - settings.setArrayIndex(i); - settings.setValue(titleKey, bookmarks.at(i).title); - settings.setValue(addressKey, bookmarks.at(i).address); - } - settings.endArray(); -} - -//! [0] -class MainWindow : public QMainWindow, public Ui::MainWindow -{ - Q_OBJECT -public: - explicit MainWindow(); - virtual ~MainWindow(); - -public slots: - void navigate(const QString &address); - void on_WebBrowser_TitleChange(const QString &title); - void on_WebBrowser_ProgressChange(int a, int b); - void on_WebBrowser_CommandStateChange(int cmd, bool on); - void on_WebBrowser_BeforeNavigate(); - void on_WebBrowser_NavigateComplete(const QString &address); - - void on_actionGo_triggered(); - void on_actionNewWindow_triggered(); - void on_actionAddBookmark_triggered(); - void on_actionAbout_triggered(); - void on_actionAboutQt_triggered(); - void on_actionFileClose_triggered(); - -private: - inline const QString address() const - { return m_addressEdit->text().trimmed(); } - QList<Location> bookmarks() const; - QAction *addLocation(const Location &location, QMenu *menu); - inline void addBookmark(const Location &location) - { m_bookmarkActions << addLocation(location, BookmarksMenu); } - - QProgressBar *m_progressBar; - QLineEdit *m_addressEdit; - QList<QAction *> m_bookmarkActions; - QList<QAction *> m_historyActions; - QSignalMapper m_locationActionMapper; -}; -//! [0] //! [1] - -MainWindow::MainWindow() -{ - setupUi(this); - - m_addressEdit = new QLineEdit; - tbAddress->insertWidget(actionGo, new QLabel(tr("Address"))); - tbAddress->insertWidget(actionGo, m_addressEdit); - - connect(m_addressEdit, SIGNAL(returnPressed()), actionGo, SLOT(trigger())); - - connect(actionBack, SIGNAL(triggered()), WebBrowser, SLOT(GoBack())); - connect(actionForward, SIGNAL(triggered()), WebBrowser, SLOT(GoForward())); - connect(actionStop, SIGNAL(triggered()), WebBrowser, SLOT(Stop())); - connect(actionRefresh, SIGNAL(triggered()), WebBrowser, SLOT(Refresh())); - connect(actionHome, SIGNAL(triggered()), WebBrowser, SLOT(GoHome())); - connect(actionSearch, SIGNAL(triggered()), WebBrowser, SLOT(GoSearch())); - - m_progressBar = new QProgressBar(statusBar()); - m_progressBar->setTextVisible(false); - m_progressBar->hide(); - statusBar()->addPermanentWidget(m_progressBar); - - connect(&m_locationActionMapper, QOverload<const QString &>::of(&QSignalMapper::mapped), this, &MainWindow::navigate); - - QSettings settings(QSettings::IniFormat, QSettings::UserScope, - QCoreApplication::organizationName(), QCoreApplication::applicationName()); - const QByteArray restoredGeometry = settings.value(QLatin1String(geometryKey)).toByteArray(); - if (restoredGeometry.isEmpty() || !restoreGeometry(restoredGeometry)) { - const QRect availableGeometry = QApplication::desktop()->availableGeometry(this); - const QSize size = (availableGeometry.size() * 4) / 5; - resize(size); - move(availableGeometry.center() - QPoint(size.width(), size.height()) / 2); - } - const QString restoredVersion = settings.value(QLatin1String(versionKey)).toString(); - QList<Location> bookmarks = readBookMarks(settings); - if (bookmarks.isEmpty() || restoredVersion.isEmpty()) - bookmarks = defaultBookmarks(); - for (const Location &bookmark : qAsConst(bookmarks)) - addBookmark(bookmark); -} - -//! [1] - -MainWindow::~MainWindow() -{ - QSettings settings(QSettings::IniFormat, QSettings::UserScope, - QCoreApplication::organizationName(), QCoreApplication::applicationName()); - saveBookMarks(bookmarks(), settings); - settings.setValue(QLatin1String(versionKey), QLatin1String(QT_VERSION_STR)); - settings.setValue(QLatin1String(geometryKey), saveGeometry()); -} - -QAction *MainWindow::addLocation(const Location &location, QMenu *menu) -{ - QAction *action = menu->addAction(location.title); - action->setData(QVariant::fromValue(location)); - m_locationActionMapper.setMapping(action, location.address); - connect(action, &QAction::triggered, &m_locationActionMapper, QOverload<>::of(&QSignalMapper::map)); - return action; -} - -QList<Location> MainWindow::bookmarks() const -{ - QList<Location> result; - for (const QAction *action : qAsConst(m_bookmarkActions)) - result.append(locationFromAction(action)); - return result; -} - -void MainWindow::on_actionAddBookmark_triggered() -{ - if (!m_historyActions.isEmpty()) { - const Location location = locationFromAction(m_historyActions.last()); - if (!containsAddress(bookmarks(), location.address)) - addBookmark(location); - } -} - -//! [2] -void MainWindow::on_WebBrowser_TitleChange(const QString &title) -{ - // This is called multiple times after NavigateComplete(). - // Add new URLs to history here. - setWindowTitle(tr("Qt WebBrowser - ") + title); - const QString currentAddress = address(); - const QString historyAddress = m_historyActions.isEmpty() ? - QString() : locationFromAction(m_historyActions.last()).address; - if (currentAddress.isEmpty() || currentAddress == QStringLiteral("about:blank") || currentAddress == historyAddress) - return; - m_historyActions << addLocation(Location(title, currentAddress), HistoryMenu); - if (m_historyActions.size() > 10) - delete m_historyActions.takeFirst(); -} - -void MainWindow::on_WebBrowser_ProgressChange(int a, int b) -{ - if (a <= 0 || b <= 0) { - m_progressBar->hide(); - return; - } - m_progressBar->setRange(0, b); - m_progressBar->setValue(a); - m_progressBar->show(); -} - -void MainWindow::on_WebBrowser_CommandStateChange(int cmd, bool on) -{ - switch (cmd) { - case 1: - actionForward->setEnabled(on); - break; - case 2: - actionBack->setEnabled(on); - break; - } -} - -void MainWindow::on_WebBrowser_BeforeNavigate() -{ - actionStop->setEnabled(true); -} - -void MainWindow::on_WebBrowser_NavigateComplete(const QString &url) -{ - QSignalBlocker blocker(m_addressEdit); - actionStop->setEnabled(false); - m_addressEdit->setText(url); -} - -//! [3] -void MainWindow::on_actionGo_triggered() -{ - navigate(address()); -} - -//! [2] - -void MainWindow::navigate(const QString &url) -{ - WebBrowser->dynamicCall("Navigate(const QString&)", url); -} - -void MainWindow::on_actionNewWindow_triggered() -{ - MainWindow *window = new MainWindow; - window->show(); - if (m_addressEdit->text().isEmpty()) - return; - window->m_addressEdit->setText(m_addressEdit->text()); - window->actionStop->setEnabled(true); - window->on_actionGo_triggered(); -} - -void MainWindow::on_actionAbout_triggered() -{ - QMessageBox::about(this, tr("About WebBrowser"), - tr("This Example has been created using the ActiveQt integration into Qt Designer.\n" - "It demonstrates the use of QAxWidget to embed the Internet Explorer ActiveX\n" - "control into a Qt application.")); -} - -void MainWindow::on_actionAboutQt_triggered() -{ - QMessageBox::aboutQt(this, tr("About Qt")); -} - -void MainWindow::on_actionFileClose_triggered() -{ - close(); -} - -#include "main.moc" - -//! [3] //! [4] -int main(int argc, char *argv[]) -{ - QApplication a(argc, argv); - QCoreApplication::setApplicationVersion(QT_VERSION_STR); - QCoreApplication::setApplicationName(QStringLiteral("Active Qt Web Browser")); - QCoreApplication::setOrganizationName(QStringLiteral("QtProject")); - MainWindow w; - const auto &arguments = QCoreApplication::arguments(); - const QString url = arguments.value(1, QString::fromLatin1(qtUrl)); - w.navigate(url); - w.show(); - return a.exec(); -} -//! [4] diff --git a/examples/activeqt/webbrowser/mainwindow.ui b/examples/activeqt/webbrowser/mainwindow.ui deleted file mode 100644 index 0117771..0000000 --- a/examples/activeqt/webbrowser/mainwindow.ui +++ /dev/null @@ -1,313 +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="WebAxWidget" name="WebBrowser" > - <property name="objectName" > - <string notr="true" >WebBrowser</string> - </property> - <property name="focusPolicy" > - <enum>Qt::StrongFocus</enum> - </property> - <property name="control" > - <string>{8856F961-340A-11D0-A96B-00C04FD705A2}</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>&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>&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&story</string> - </property> - </widget> - <widget class="QMenu" name="unnamed" > - <property name="objectName" > - <string notr="true" >unnamed</string> - </property> - <property name="title" > - <string>&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&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> - <customwidgets> - <customwidget> - <class>WebAxWidget</class> - <extends>QAxWidget</extends> - <header>webaxwidget.h</header> - </customwidget> - </customwidgets> - <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/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp index aa66398..fa3eacf 100644 --- a/src/activeqt/container/qaxbase.cpp +++ b/src/activeqt/container/qaxbase.cpp @@ -1444,13 +1444,13 @@ bool QAxBase::initializeRemote(IUnknown** ptr) COAUTHIDENTITY authIdentity; authIdentity.UserLength = ULONG(user.length()); authIdentity.User = authIdentity.UserLength - ? const_cast<ushort *>(user.utf16()) : Q_NULLPTR; + ? const_cast<ushort *>(user.utf16()) : nullptr; authIdentity.DomainLength = ULONG(domain.length()); authIdentity.Domain = authIdentity.DomainLength - ? const_cast<ushort *>(domain.utf16()) : Q_NULLPTR; + ? const_cast<ushort *>(domain.utf16()) : nullptr; authIdentity.PasswordLength = ULONG(passwd.length()); authIdentity.Password = authIdentity.PasswordLength - ? const_cast<ushort *>(passwd.utf16()) : Q_NULLPTR; + ? const_cast<ushort *>(passwd.utf16()) : nullptr; authIdentity.Flags = SEC_WINNT_AUTH_IDENTITY_UNICODE; COAUTHINFO authInfo; diff --git a/src/activeqt/container/qaxbase.h b/src/activeqt/container/qaxbase.h index 14be355..722b210 100644 --- a/src/activeqt/container/qaxbase.h +++ b/src/activeqt/container/qaxbase.h @@ -74,7 +74,7 @@ class QAxBase public: typedef QMap<QString, QVariant> PropertyBag; - explicit QAxBase(IUnknown *iface = Q_NULLPTR); + explicit QAxBase(IUnknown *iface = nullptr); virtual ~QAxBase(); QString control() const; @@ -183,13 +183,13 @@ private: template <> inline QAxBase *qobject_cast<QAxBase*>(const QObject *o) { - void *result = o ? const_cast<QObject *>(o)->qt_metacast("QAxBase") : Q_NULLPTR; + void *result = o ? const_cast<QObject *>(o)->qt_metacast("QAxBase") : nullptr; return static_cast<QAxBase *>(result); } template <> inline QAxBase *qobject_cast<QAxBase*>(QObject *o) { - void *result = o ? o->qt_metacast("QAxBase") : Q_NULLPTR; + void *result = o ? o->qt_metacast("QAxBase") : nullptr; return static_cast<QAxBase *>(result); } diff --git a/src/activeqt/container/qaxobject.h b/src/activeqt/container/qaxobject.h index 25d8f1d..bebc60a 100644 --- a/src/activeqt/container/qaxobject.h +++ b/src/activeqt/container/qaxobject.h @@ -60,33 +60,33 @@ class QAxObject : public QObject, public QAxBase friend class QAxEventSink; Q_OBJECT_FAKE public: - QObject* qObject() const Q_DECL_OVERRIDE { return static_cast<QObject *>(const_cast<QAxObject *>(this)); } - const char *className() const Q_DECL_OVERRIDE; + QObject* qObject() const override { return static_cast<QObject *>(const_cast<QAxObject *>(this)); } + const char *className() const override; - explicit QAxObject(QObject *parent = Q_NULLPTR); - explicit QAxObject(const QString &c, QObject *parent = Q_NULLPTR); - explicit QAxObject(IUnknown *iface, QObject *parent = Q_NULLPTR); + explicit QAxObject(QObject *parent = nullptr); + explicit QAxObject(const QString &c, QObject *parent = nullptr); + explicit QAxObject(IUnknown *iface, QObject *parent = nullptr); ~QAxObject(); bool doVerb(const QString &verb); protected: - void connectNotify(const QMetaMethod &signal) Q_DECL_OVERRIDE; - const QMetaObject *fallbackMetaObject() const Q_DECL_OVERRIDE; + void connectNotify(const QMetaMethod &signal) override; + const QMetaObject *fallbackMetaObject() const override; private: - const QMetaObject *parentMetaObject() const Q_DECL_OVERRIDE; + const QMetaObject *parentMetaObject() const override; }; template <> inline QAxObject *qobject_cast<QAxObject*>(const QObject *o) { - void *result = o ? const_cast<QObject *>(o)->qt_metacast("QAxObject") : Q_NULLPTR; + void *result = o ? const_cast<QObject *>(o)->qt_metacast("QAxObject") : nullptr; return reinterpret_cast<QAxObject*>(result); } template <> inline QAxObject *qobject_cast<QAxObject*>(QObject *o) { - void *result = o ? o->qt_metacast("QAxObject") : Q_NULLPTR; + void *result = o ? o->qt_metacast("QAxObject") : nullptr; return reinterpret_cast<QAxObject*>(result); } diff --git a/src/activeqt/container/qaxscript.h b/src/activeqt/container/qaxscript.h index 7185ece..f09b2fc 100644 --- a/src/activeqt/container/qaxscript.h +++ b/src/activeqt/container/qaxscript.h @@ -92,7 +92,7 @@ public: long queryInterface(const QUuid &, void**) const; protected: - bool initialize(IUnknown** ptr) Q_DECL_OVERRIDE; + bool initialize(IUnknown** ptr) override; private: QAxScript *script_code; @@ -159,7 +159,7 @@ class QAxScriptManager : public QObject Q_OBJECT public: - explicit QAxScriptManager(QObject *parent = Q_NULLPTR); + explicit QAxScriptManager(QObject *parent = nullptr); ~QAxScriptManager(); void addObject(QAxBase *object); @@ -222,7 +222,7 @@ inline QAxScriptEngine *QAxScript::scriptEngine() const inline bool QAxScriptEngine::isValid() const { - return engine != Q_NULLPTR; + return engine != nullptr; } inline QString QAxScriptEngine::scriptLanguage() const diff --git a/src/activeqt/container/qaxselect.h b/src/activeqt/container/qaxselect.h index 1d42a61..8921a17 100644 --- a/src/activeqt/container/qaxselect.h +++ b/src/activeqt/container/qaxselect.h @@ -61,7 +61,7 @@ class QAxSelect : public QDialog { Q_OBJECT public: - explicit QAxSelect(QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags()); + explicit QAxSelect(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags()); ~QAxSelect(); QString clsid() const; diff --git a/src/activeqt/container/qaxwidget.cpp b/src/activeqt/container/qaxwidget.cpp index 67485a1..5039123 100644 --- a/src/activeqt/container/qaxwidget.cpp +++ b/src/activeqt/container/qaxwidget.cpp @@ -473,7 +473,7 @@ static const wchar_t *qaxatom = L"QAxContainer4_Atom"; class QAxNativeEventFilter : public QAbstractNativeEventFilter { public: - bool nativeEventFilter(const QByteArray &eventType, void *message, long *) Q_DECL_OVERRIDE; + bool nativeEventFilter(const QByteArray &eventType, void *message, long *) override; }; Q_GLOBAL_STATIC(QAxNativeEventFilter, s_nativeEventFilter) @@ -752,7 +752,7 @@ void QAxClientSite::releaseAll() { if (m_spOleControl) m_spOleControl->Release(); - m_spOleControl = Q_NULLPTR; + m_spOleControl = nullptr; if (m_spOleObject) { m_spOleObject->SetClientSite(0); m_spOleObject->Unadvise(m_dwOleObject); diff --git a/src/activeqt/container/qaxwidget.h b/src/activeqt/container/qaxwidget.h index 02b5315..3a9f19e 100644 --- a/src/activeqt/container/qaxwidget.h +++ b/src/activeqt/container/qaxwidget.h @@ -66,51 +66,51 @@ class QAxWidget : public QWidget, public QAxBase { Q_OBJECT_FAKE public: - QObject* qObject() const Q_DECL_OVERRIDE { return const_cast<QAxWidget *>(this); } - const char *className() const Q_DECL_OVERRIDE; + QObject* qObject() const override { return const_cast<QAxWidget *>(this); } + const char *className() const override; - explicit QAxWidget(QWidget* parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()); - explicit QAxWidget(const QString &c, QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()); - explicit QAxWidget(IUnknown *iface, QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()); + explicit QAxWidget(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags()); + explicit QAxWidget(const QString &c, QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags()); + explicit QAxWidget(IUnknown *iface, QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags()); ~QAxWidget(); - void clear() Q_DECL_OVERRIDE; + void clear() override; bool doVerb(const QString &verb); - QSize sizeHint() const Q_DECL_OVERRIDE; - QSize minimumSizeHint() const Q_DECL_OVERRIDE; + QSize sizeHint() const override; + QSize minimumSizeHint() const override; virtual QAxAggregated *createAggregate(); protected: - bool initialize(IUnknown **) Q_DECL_OVERRIDE; + bool initialize(IUnknown **) override; virtual bool createHostWindow(bool); bool createHostWindow(bool, const QByteArray&); - void changeEvent(QEvent *e) Q_DECL_OVERRIDE; - void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE; + void changeEvent(QEvent *e) override; + void resizeEvent(QResizeEvent *) override; virtual bool translateKeyEvent(int message, int keycode) const; - void connectNotify(const QMetaMethod &signal) Q_DECL_OVERRIDE; - const QMetaObject *fallbackMetaObject() const Q_DECL_OVERRIDE; + void connectNotify(const QMetaMethod &signal) override; + const QMetaObject *fallbackMetaObject() const override; private: friend class QAxClientSite; QAxClientSite *container; QAxWidgetPrivate *d; - const QMetaObject *parentMetaObject() const Q_DECL_OVERRIDE; + const QMetaObject *parentMetaObject() const override; }; template <> inline QAxWidget *qobject_cast<QAxWidget*>(const QObject *o) { - void *result = o ? const_cast<QObject *>(o)->qt_metacast("QAxWidget") : Q_NULLPTR; + void *result = o ? const_cast<QObject *>(o)->qt_metacast("QAxWidget") : nullptr; return static_cast<QAxWidget *>(result); } template <> inline QAxWidget *qobject_cast<QAxWidget*>(QObject *o) { - void *result = o ? o->qt_metacast("QAxWidget") : Q_NULLPTR; + void *result = o ? o->qt_metacast("QAxWidget") : nullptr; return static_cast<QAxWidget *>(result); } diff --git a/src/activeqt/control/qaxaggregated.h b/src/activeqt/control/qaxaggregated.h index 2192266..21add50 100644 --- a/src/activeqt/control/qaxaggregated.h +++ b/src/activeqt/control/qaxaggregated.h @@ -83,10 +83,10 @@ private: }; #define QAXAGG_IUNKNOWN \ - HRESULT WINAPI QueryInterface(REFIID iid, LPVOID *iface) Q_DECL_OVERRIDE \ + HRESULT WINAPI QueryInterface(REFIID iid, LPVOID *iface) override \ { return controllingUnknown()->QueryInterface(iid, iface); } \ - ULONG WINAPI AddRef() Q_DECL_OVERRIDE { return controllingUnknown()->AddRef(); } \ - ULONG WINAPI Release() Q_DECL_OVERRIDE { return controllingUnknown()->Release(); } \ + ULONG WINAPI AddRef() override { return controllingUnknown()->AddRef(); } \ + ULONG WINAPI Release() override { return controllingUnknown()->Release(); } \ QT_END_NAMESPACE diff --git a/src/activeqt/control/qaxfactory.h b/src/activeqt/control/qaxfactory.h index e2c327b..9beacbf 100644 --- a/src/activeqt/control/qaxfactory.h +++ b/src/activeqt/control/qaxfactory.h @@ -162,13 +162,13 @@ inline bool QAxFactory::stopServer() { \ if (key == className) \ return &Class::staticMetaObject; \ - return Q_NULLPTR; \ + return nullptr; \ } \ QObject *createObject(const QString &key) override \ { \ if (key == className) \ - return new Class(Q_NULLPTR); \ - return Q_NULLPTR; \ + return new Class(nullptr); \ + return nullptr; \ } \ QUuid classID(const QString &key) const override \ { \ @@ -202,19 +202,19 @@ public: : QAxFactory(libId, appId) {} - const QMetaObject *metaObject(const QString &) const Q_DECL_OVERRIDE { return &T::staticMetaObject; } - QStringList featureList() const Q_DECL_OVERRIDE { return QStringList(QLatin1String(T::staticMetaObject.className())); } - QObject *createObject(const QString &key) Q_DECL_OVERRIDE + const QMetaObject *metaObject(const QString &) const override { return &T::staticMetaObject; } + QStringList featureList() const override { return QStringList(QLatin1String(T::staticMetaObject.className())); } + QObject *createObject(const QString &key) override { const QMetaObject &mo = T::staticMetaObject; if (key != QLatin1String(mo.className())) - return Q_NULLPTR; + return nullptr; if (!qstrcmp(mo.classInfo(mo.indexOfClassInfo("Creatable")).value(), "no")) - return Q_NULLPTR; - return new T(Q_NULLPTR); + return nullptr; + return new T(nullptr); } - void registerClass(const QString &key, QSettings *settings) const Q_DECL_OVERRIDE + void registerClass(const QString &key, QSettings *settings) const override { const QStringList categories = getImplementedCategories(); @@ -225,7 +225,7 @@ public: } } - void unregisterClass(const QString &key, QSettings *settings) const Q_DECL_OVERRIDE + void unregisterClass(const QString &key, QSettings *settings) const override { const QStringList categories = getImplementedCategories(); @@ -256,7 +256,7 @@ private: QAxFactoryList() \ : QAxFactory(IDTypeLib, IDApp) \ { \ - QAxFactory *factory = Q_NULLPTR; \ + QAxFactory *factory = nullptr; \ QStringList keys; \ QStringList::Iterator it; \ @@ -282,47 +282,47 @@ private: #define QAXFACTORY_END() \ } \ - ~QAxFactoryList() Q_DECL_OVERRIDE { qDeleteAll(factories); } \ - QStringList featureList() const Q_DECL_OVERRIDE { return factoryKeys; } \ - const QMetaObject *metaObject(const QString&key) const Q_DECL_OVERRIDE { \ + ~QAxFactoryList() override { qDeleteAll(factories); } \ + QStringList featureList() const override { return factoryKeys; } \ + const QMetaObject *metaObject(const QString&key) const override { \ QAxFactory *f = factories[key]; \ - return f ? f->metaObject(key) : Q_NULLPTR; \ + return f ? f->metaObject(key) : nullptr; \ } \ - QObject *createObject(const QString &key) Q_DECL_OVERRIDE { \ + QObject *createObject(const QString &key) override { \ if (!creatable.value(key)) \ - return Q_NULLPTR; \ + return nullptr; \ QAxFactory *f = factories[key]; \ - return f ? f->createObject(key) : Q_NULLPTR; \ + return f ? f->createObject(key) : nullptr; \ } \ - QUuid classID(const QString &key) const Q_DECL_OVERRIDE { \ + QUuid classID(const QString &key) const override { \ QAxFactory *f = factories.value(key); \ return f ? f->classID(key) : QUuid(); \ } \ - QUuid interfaceID(const QString &key) const Q_DECL_OVERRIDE { \ + QUuid interfaceID(const QString &key) const override { \ QAxFactory *f = factories.value(key); \ return f ? f->interfaceID(key) : QUuid(); \ } \ - QUuid eventsID(const QString &key) const Q_DECL_OVERRIDE { \ + QUuid eventsID(const QString &key) const override { \ QAxFactory *f = factories.value(key); \ return f ? f->eventsID(key) : QUuid(); \ } \ - void registerClass(const QString &key, QSettings *s) const Q_DECL_OVERRIDE { \ + void registerClass(const QString &key, QSettings *s) const override { \ QAxFactory *f = factories.value(key); \ if (f) f->registerClass(key, s); \ } \ - void unregisterClass(const QString &key, QSettings *s) const Q_DECL_OVERRIDE { \ + void unregisterClass(const QString &key, QSettings *s) const override { \ QAxFactory *f = factories.value(key); \ if (f) f->unregisterClass(key, s); \ } \ - QString exposeToSuperClass(const QString &key) const Q_DECL_OVERRIDE { \ + QString exposeToSuperClass(const QString &key) const override { \ QAxFactory *f = factories.value(key); \ return f ? f->exposeToSuperClass(key) : QString(); \ } \ - bool stayTopLevel(const QString &key) const Q_DECL_OVERRIDE { \ + bool stayTopLevel(const QString &key) const override { \ QAxFactory *f = factories.value(key); \ return f ? f->stayTopLevel(key) : false; \ } \ - bool hasStockEvents(const QString &key) const Q_DECL_OVERRIDE { \ + bool hasStockEvents(const QString &key) const override { \ QAxFactory *f = factories.value(key); \ return f ? f->hasStockEvents(key) : false; \ } \ diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp index bfc4fc0..d46ddda 100644 --- a/src/activeqt/control/qaxserverbase.cpp +++ b/src/activeqt/control/qaxserverbase.cpp @@ -151,7 +151,7 @@ class QAxServerBase : #if defined Q_CC_GNU # if (__W32API_MAJOR_VERSION < 2 || (__W32API_MAJOR_VERSION == 2 && __W32API_MINOR_VERSION < 5)) public IViewObject, // this should not be needed as IViewObject2 is meant to inherit from this, - // untill the mingw headers are fixed this will need to stay. + // until the mingw headers are fixed this will need to stay. # endif #endif public IViewObject2, @@ -816,7 +816,7 @@ LRESULT QT_WIN_CALLBACK axs_FilterProc(int nCode, WPARAM wParam, LPARAM lParam) class QAxWinEventFilter : public QAbstractNativeEventFilter { public: - bool nativeEventFilter(const QByteArray &, void *message, long *) Q_DECL_OVERRIDE; + bool nativeEventFilter(const QByteArray &, void *message, long *) override; }; bool QAxWinEventFilter::nativeEventFilter(const QByteArray &, void *message, long *) @@ -2519,7 +2519,7 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid, vt = QVariant::Int; varp[0] = QVariant(vt); if (varp[0].type() == QVariant::Invalid) - argv[0] = Q_NULLPTR; + argv[0] = nullptr; else argv[0] = const_cast<void*>(varp[0].constData()); } diff --git a/src/activeqt/doc/src/activeqt-index.qdoc b/src/activeqt/doc/src/activeqt-index.qdoc index 2fba3ea..7920bdc 100644 --- a/src/activeqt/doc/src/activeqt-index.qdoc +++ b/src/activeqt/doc/src/activeqt-index.qdoc @@ -106,9 +106,9 @@ \li \l{Dot Net Example (ActiveQt)} \li \l{OpenGL Example (ActiveQt)} \li \l{Hierarchy Example (ActiveQt)} + \li \l{Media Player Example (ActiveQt)} \li \l{Menus Example (ActiveQt)} \li \l{Wrapper Example (ActiveQt)} \li \l{Simple Example (ActiveQt)} - \li \l{Web Browser Example (ActiveQt)} \endlist */ diff --git a/src/activeqt/doc/src/qtaxcontainer.qdoc b/src/activeqt/doc/src/qtaxcontainer.qdoc index 7d79372..ba73467 100644 --- a/src/activeqt/doc/src/qtaxcontainer.qdoc +++ b/src/activeqt/doc/src/qtaxcontainer.qdoc @@ -199,7 +199,7 @@ object and its subobjects; note that not all of the COM object's APIs might be available. - See the \l{activeqt/webbrowser}{Webbrowser} example for more information. + See the \l{activeqt/mediaplayer}{Media Player} example for more information. \section2 Calling Function Through a Script Engine diff --git a/src/activeqt/shared/qaxtypes.cpp b/src/activeqt/shared/qaxtypes.cpp index 62bad32..ffbe52c 100644 --- a/src/activeqt/shared/qaxtypes.cpp +++ b/src/activeqt/shared/qaxtypes.cpp @@ -643,7 +643,7 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type if (out) { qWarning().noquote() << msgOutParameterNotSupported("records"); arg.vt = VT_EMPTY; - arg.byref = Q_NULLPTR; + arg.byref = nullptr; return false; } arg.vt = VT_RECORD; @@ -663,7 +663,7 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type if (out) { qWarning().noquote() << msgOutParameterNotSupported(qvar.typeName()); arg.vt = VT_EMPTY; - arg.byref = Q_NULLPTR; + arg.byref = nullptr; return false; } arg.vt = VT_DISPATCH; @@ -679,7 +679,7 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type if (out) { qWarning().noquote() << msgOutParameterNotSupported(qvar.typeName()); arg.vt = VT_EMPTY; - arg.byref = Q_NULLPTR; + arg.byref = nullptr; return false; } arg.vt = VT_UNKNOWN; @@ -691,7 +691,7 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type if (out) { qWarning().noquote() << msgOutParameterNotSupported("subtype"); arg.vt = VT_EMPTY; - arg.byref = Q_NULLPTR; + arg.byref = nullptr; return false; } arg.vt = VT_DISPATCH; @@ -707,7 +707,7 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type if (out) { qWarning().noquote() << msgOutParameterNotSupported("subtype"); arg.vt = VT_EMPTY; - arg.byref = Q_NULLPTR; + arg.byref = nullptr; return false; } QAxObject *object = *(QAxObject**)qvar.constData(); diff --git a/src/activeqt/shared/qaxutils.cpp b/src/activeqt/shared/qaxutils.cpp index bf5b99b..c41b321 100644 --- a/src/activeqt/shared/qaxutils.cpp +++ b/src/activeqt/shared/qaxutils.cpp @@ -99,14 +99,8 @@ static void addRectToHrgn(HRGN &winRegion, const QRect &r) HRGN qaxHrgnFromQRegion(QRegion region, const QWindow *window) { - region = QHighDpi::toNativeLocalRegion(region, window); HRGN hRegion = CreateRectRgn(0, 0, 0, 0); - if (region.rectCount() == 1) { - addRectToHrgn(hRegion, region.boundingRect()); - return hRegion; - } - const QVector<QRect> &rects = region.rects(); - for (const QRect &rect : rects) + for (const QRect &rect : QHighDpi::toNativeLocalRegion(region, window)) addRectToHrgn(hRegion, rect); return hRegion; } diff --git a/src/tools/idc/idc.pro b/src/tools/idc/idc.pro index 1898ed5..7f9a8d4 100644 --- a/src/tools/idc/idc.pro +++ b/src/tools/idc/idc.pro @@ -2,4 +2,5 @@ option(host_build) CONFIG += force_bootstrap SOURCES = main.cpp +QMAKE_TARGET_DESCRIPTION = "Active Qt Interface Description Compiler" load(qt_tool) diff --git a/tests/manual/testcontrol/main.cpp b/tests/manual/testcontrol/main.cpp index f8fd3e6..7fca250 100644 --- a/tests/manual/testcontrol/main.cpp +++ b/tests/manual/testcontrol/main.cpp @@ -55,7 +55,7 @@ class QTestControl : public QMainWindow Q_CLASSINFO("EventsID", "{E1816BBA-BF5D-4A31-9855-D6BA43205510}") public: - explicit QTestControl(QWidget *parent = Q_NULLPTR); + explicit QTestControl(QWidget *parent = nullptr); public slots: void appendText(const QString &t) { m_logWindow->appendPlainText(t); } diff --git a/tools/dumpcpp/dumpcpp.pro b/tools/dumpcpp/dumpcpp.pro index 9dd6d27..aaaf5f8 100644 --- a/tools/dumpcpp/dumpcpp.pro +++ b/tools/dumpcpp/dumpcpp.pro @@ -3,4 +3,5 @@ DEFINES += QT_NO_CAST_TO_ASCII QT_ASCII_CAST_WARNINGS SOURCES = main.cpp +QMAKE_TARGET_DESCRIPTION = "Active Qt DumpCpp" load(qt_tool) diff --git a/tools/dumpcpp/main.cpp b/tools/dumpcpp/main.cpp index 1f0cca8..8a37f33 100644 --- a/tools/dumpcpp/main.cpp +++ b/tools/dumpcpp/main.cpp @@ -925,7 +925,7 @@ static QByteArrayList vTableOnlyStubsFromTypeLib(ITypeLib *typelib, const QStrin for (UINT i = 0, typeCount = typelib->GetTypeInfoCount(); i < typeCount; ++i) { TYPEKIND typekind; if (SUCCEEDED(typelib->GetTypeInfoType(i, &typekind)) && typekind == TKIND_INTERFACE) { - ITypeInfo *typeinfo = Q_NULLPTR; + ITypeInfo *typeinfo = nullptr; if (SUCCEEDED(typelib->GetTypeInfo(i, &typeinfo) && typeinfo)) { result.append(nameSpacePrefix + classNameFromTypeInfo(typeinfo)); typeinfo->Release(); @@ -949,7 +949,7 @@ bool generateTypeLibrary(QString typeLibFile, QString outname, QString libName = nameSpace; if (libName.isEmpty()) { - BSTR nameString = Q_NULLPTR; + BSTR nameString = nullptr; if (SUCCEEDED(typelib->GetDocumentation(-1, &nameString, 0, 0, 0))) { libName = QString::fromWCharArray(nameString); SysFreeString(nameString); diff --git a/tools/dumpdoc/dumpdoc.pro b/tools/dumpdoc/dumpdoc.pro index f96ecc5..b879a68 100644 --- a/tools/dumpdoc/dumpdoc.pro +++ b/tools/dumpdoc/dumpdoc.pro @@ -2,4 +2,5 @@ QT += axcontainer widgets SOURCES += main.cpp +QMAKE_TARGET_DESCRIPTION = "Active Qt DumpDoc" load(qt_tool) diff --git a/tools/testcon/images/controlmethods.png b/tools/testcon/images/controlmethods.png Binary files differnew file mode 100644 index 0000000..d414032 --- /dev/null +++ b/tools/testcon/images/controlmethods.png diff --git a/tools/testcon/images/controlproperties.png b/tools/testcon/images/controlproperties.png Binary files differnew file mode 100644 index 0000000..682196a --- /dev/null +++ b/tools/testcon/images/controlproperties.png diff --git a/tools/testcon/images/filenew.png b/tools/testcon/images/filenew.png Binary files differnew file mode 100644 index 0000000..1e63057 --- /dev/null +++ b/tools/testcon/images/filenew.png diff --git a/tools/testcon/mainwindow.cpp b/tools/testcon/mainwindow.cpp index 682c8e5..3ff0016 100644 --- a/tools/testcon/mainwindow.cpp +++ b/tools/testcon/mainwindow.cpp @@ -65,14 +65,14 @@ static const ScriptLanguage scriptLanguages[] = { {"Python", ".py"} }; -MainWindow *MainWindow::m_instance = Q_NULLPTR; +MainWindow *MainWindow::m_instance = nullptr; MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) - , m_dlgInvoke(Q_NULLPTR) - , m_dlgProperties(Q_NULLPTR) - , m_dlgAmbient(Q_NULLPTR) - , m_scripts(Q_NULLPTR) + , m_dlgInvoke(nullptr) + , m_dlgProperties(nullptr) + , m_dlgAmbient(nullptr) + , m_scripts(nullptr) { setupUi(this); MainWindow::m_instance = this; // Logging handler needs the UI @@ -99,7 +99,7 @@ MainWindow::MainWindow(QWidget *parent) MainWindow::~MainWindow() { - MainWindow::m_instance = Q_NULLPTR; + MainWindow::m_instance = nullptr; } QAxWidget *MainWindow::activeAxWidget() const diff --git a/tools/testcon/mainwindow.h b/tools/testcon/mainwindow.h index 84cd2ce..7e6575b 100644 --- a/tools/testcon/mainwindow.h +++ b/tools/testcon/mainwindow.h @@ -59,7 +59,7 @@ public: bool loadScript(const QString &file); protected: - void closeEvent(QCloseEvent *) Q_DECL_OVERRIDE; + void closeEvent(QCloseEvent *) override; public slots: void appendLogText(const QString &); diff --git a/tools/testcon/mainwindow.ui b/tools/testcon/mainwindow.ui index be61cd6..d18419e 100644 --- a/tools/testcon/mainwindow.ui +++ b/tools/testcon/mainwindow.ui @@ -416,7 +416,7 @@ <bool>false</bool> </property> <property name="icon" > - <iconset>image0</iconset> + <iconset>:/images/controlmethods.png</iconset> </property> <property name="iconText" > <string>Invoke Methods</string> @@ -436,7 +436,7 @@ <bool>false</bool> </property> <property name="icon" > - <iconset>image1</iconset> + <iconset>:/images/controlproperties.png</iconset> </property> <property name="iconText" > <string>Change Properties</string> @@ -540,7 +540,7 @@ <string>actionFileNew</string> </property> <property name="icon" > - <iconset>image2</iconset> + <iconset>:/images/filenew.png</iconset> </property> <property name="iconText" > <string>Insert Control</string> @@ -670,16 +670,4 @@ </actiongroup> </widget> <layoutdefault spacing="6" margin="11" /> - <pixmapfunction></pixmapfunction> - <images> - <image name="image0" > - <data format="XPM.GZ" length="3502" >789cdd95c96e1c371086ef7a8a81eb6604e56e92bd21c84192175996648d6559b2831cd85cb4ef23d95290770fe72f36e3003ee41220485373f8543f975a587cf17c76b8bb3d7bfe62e56e6117276ee68eededecb9bfbfb878fcf5b75f7e5f79a6d42cfdd54d3553cf7e5a79365fccdc6ce7ea322cc19e26a0aa51aaeb964c31b3ee46d8a9b05b32b7994d27f3178523ecbb99bbbe87fdaef000be06b7ca0e067c9b791c5af04d6637c87e8f99fde0c11edc6935c2193e01f7dab91a1cc083314ef4c7e0b15141ece29f6b4c68c047998720fb7d01473d8e60b24bae2b1d1cf416faba36cacbfe1b99b597f5e04f6d4c081af335b86f5c80ff74091eda3a20beb40376ad8b381fbd0487ce44890f83a3a92cf6a3fd25abca682beb7d15ee42141ec0e90016fed366e6c6223ff498b91d2b30ceab5462d93f1416ff9accdd28e741bc9531e388fcd3c7c292fff7e0c67827febf05b74de5e47c3db84b2cfedf64ae9dc4df1496fc55e0bed15eceb75758ce578387a6f1a81fda288cfa639db9f5d89f55610b7d07b64defc51f3f71407c18f95163aa0fd9ff43662bf543a867e51b9ff3391696fa719943107f241ea189926f96fc84b68a92df3785113fdece5c47a9af77e09818fef2566615e5bea1de75ddb6c284fbaa753b487df03770d34ef532070f5d9bf90aecbb18253ec8bf317d88f08f719f4d3ba8cca83f330c5d147f5f67ee33239fc60e6366ec6fc6c10933fa87f1b6ca7c9fb98e12af0770b05a98d05f4cb42633eaade9c6364afe5e816d2a47e94fb86f9dafea0af1b617e05018fe76b1f0f9927b5df80c1c2a55213f16fd607085d14f6c5d18f7c7b6f5584b3da03e6d5718f567fb494f5bc2c5be061e26b6a847ebea3460477c6c2c8cfa18abb2de2ab8ae7d2df15907ab625f084f768bfa1c4d61d4ef38d4a196787e02db693e8bbef84f88d718ea584b7f417cdd5fe7c1fbe14a7c08f7d9a9e581c088af3385515fae298cfcbbb6d295f49327e1c9ce9fc1dd6467dc1fd7173dfab9f3aa5672dfd06f5c2c76f4575fa9f481b19eaf0be37df46a623e04ebc2e8b7de28ad64ff03705318f7c1b73a7d60c4d35b6514fa29a19ffa7162467ff7ae30f2e17d39afecef8b1dfdd7c7c2a8ff6074aba53f20fea1cc679bd954a2473f0d41754ade7ff497d8a85e49ffc47b145b6db5f403f817fb62477ca29dd623f49fe8d4a0a4dff4994725fde25a58a701463f8d5e375afadb7ae6c9be96396aa92fbcbf3198f4c1de656e8ccc9f67b606e7e5d5ccde483fb9126efa46ce7f29dc9a56d6bbc8dcb4b21eea2dc6f41ccbfb762edca6171b7c26dc990ef3e78b7f3efe2f7a26b6e9473cb24be43970e4a3328ef9e47b3d9ff2199ff3055ff2155ff34dfacf2ddff182eff901e32b7fe3c7499f567d4ada555ee3757ec9aff835bf493336f82d6ff23bde4a639b77f83def66bde5397fe03dfec8fb697ce2033ee4cf69c617aeb866958666c30db765fd8efbac9619437285e60bb2349223bfd453a038e9e9888e8b7a9f4ee894cee89c2ed28c4bbaa26bd67443b73fd6d3091fd01d2de89e1e92fe2b7d4b3e2cf58f3fd243fd44abb446eb49fd925ed16b7a431bf496368b7ee4757af737f5166d27f50ebda75d9ad307daa38fb43fe9e9131dd0217d4e3e7ea12aa96b5249adc950432d75d427f560d9d2942f6be9c98ed6d1c27a1b6c5ac71ed9e3149b3d7b92e2b249fb497dfa7d3dd8337b6e2fd2b8b45789aeed8dbdb5777661693952b3a0ff763dff6bfa3f7e5ef9138fb14e09</data> - </image> - <image name="image1" > - <data format="XPM.GZ" length="2493" >789ca59459531b391446dff9152ef4464dddb8dbbd566a1eb2af10c84a929a87de8c0dd86c76623235ff3dfa8eb0878c3309a9e850a64fe9d3b5a4967c6babb7bfbbdddbbab57131ab66e3a6d78caaf3de563b9f4c2e3ffef5e7df1b9b71dcf37f45de8b37ffd8d8dc9bf59adecec9b493d8dc8bebd3f0311e09fc151e0b7c07af05fe146f84dca9b88b1241ff17794cc347782ac89fc90791a07f8a27026ff042e043bc128c3fc51b417f8db7028ff14ee0bbc1b3a62af177f850e07bc1b3b60aeb3b90277d81bfc0a33caac37c3b9c86bfc67381b77821f00778990f9bd09fe0b5c01fe26d91b561bf2a79da17acf7088f044e7db693bc9be003c1f847c1cb7e17fad9ff341178a84f23ff12cf04fe18cfcbbc633f1dfb91760277f2ac2fc8e7782ce83fc60782fe90e70be83fc77dbbdaef27782ee83fc40b814f975e87fdb8c0ebacaec3f933bc13f878e94d582fe7271b0afc64e94da8cff9c9fdfb6dc2f9e1fbf381c039df795aa55d78df255e0abcc03b81bf97737cc378e65b1455d186f1295e099cfd28ea2a6d42bd7dbc15cc8ffb500e04fd039c463ff7b96c05fd91bc4a05fe1c2f57f7611baf57e7bf8fb702ff20e7ba87f7fb0c4f933809e7330b2ef0b7f850e097f22616cc8ffbc2750df35fe089c0efe079522661fdbc9fa62cea229c8f37782df0bbf2364eda24cc77125ce0fc3eb449e11bfe19678138e7b3ed047e4fdec5abfbc3ef5397e4691ed6c7fdeb0a817fc22b81df970fe3b44ccbf0637b737e276fce2aabadf14fad7536bc7a3ab0918dd7f376684776ec99d8d44e3ca776e69fce3d1736b3f9b7799ffe649f6de1b9f47cb13b76d7eed97dfff4c01eda237b1c4684bc3df1b5437a39e2a93db3e7b6edd9b117b66b7b9ef92affd2cf63710d8d187b5e79c6365fb2cabffe4f5e23deb09a7f797b2dff6e2d2ff6ed3dff3f58df7f46d7f2f177f3034b2cb5cc726c3d5f58e9cc3957b93a8c708d1f915c8dfe79fd856b9577ddffe44b3774076ee419933ef4335fb8237774d3fadfb09677c77ee6233771ad9b527f0427eb7977fa6bf5dd19f54757d55b774efd095c7c273ffbc5f9cffddb8e7e8cbb767e18f1537ef73ede28ffcfed8daf804d6c7a</data> - </image> - <image name="image2" > - <data format="XPM.GZ" length="1232" >789ccdd24b4fe2501c86f13d9fa2811d99a8ad9442cc2c44f082327169625c1c4e5b4f552e721398cc771f9f570907837bff0f8bfef226400287d5e0eeb617540f4bd399991536b0ce4c826a3a1f0c56f70fbfff96ca5114bcbf6a6110967f95ca07810dfe8c8619cfeefdb972a483e7306c107c84518de0293c360473312598c15a83602a1a8256b404fb30d64103eb09c10a4c9a047bb019119c8931c12e3475821dd88f094ec53ac1b5a8834bd1127c13738237d08604afc498e0b5a88313982604dba221f82a5a82633127b882594470211e137c116382976242f0496c121c8929c10b3127f80cf3238267624870282604e76293604bd4978603516f0d0b51a7ffd8dedb2c15d3b7699ae58feecb522936e7dcee62b6cb93db59fadbe5f9c5f98bdd0c03371c8d9db7a4dee770fb96e275329ded5f8af9e2eddb65f9a396cc5f566b6f392d8ad6fcf3ceda1d6f396f5d5c2e3e6ed5beea7a8b1b5fdf2c3f6edde9f6bce5c0ed9cff6b7fff3fd8b3fc3b29fd07f8c43cbd</data> - </image> - </images> </ui> diff --git a/tools/testcon/testcon.pro b/tools/testcon/testcon.pro index 5c3645d..ead0055 100644 --- a/tools/testcon/testcon.pro +++ b/tools/testcon/testcon.pro @@ -7,6 +7,7 @@ SOURCES = main.cpp docuwindow.cpp mainwindow.cpp invokemethod.cpp changepropert HEADERS = docuwindow.h mainwindow.h invokemethod.h changeproperties.h ambientproperties.h controlinfo.h FORMS = mainwindow.ui invokemethod.ui changeproperties.ui ambientproperties.ui controlinfo.ui RC_FILE = testcon.rc +RESOURCES += testcon.qrc !mingw:QMAKE_POST_LINK = midl $$shell_quote($$shell_path($$PWD/testcon.idl)) && move testcon.tlb $(TARGETDIR) diff --git a/tools/testcon/testcon.qrc b/tools/testcon/testcon.qrc new file mode 100644 index 0000000..871a32b --- /dev/null +++ b/tools/testcon/testcon.qrc @@ -0,0 +1,7 @@ +<RCC> +<qresource> + <file>images/controlmethods.png</file> + <file>images/controlproperties.png</file> + <file>images/filenew.png</file> +</qresource> +</RCC> |