summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@digia.com>2013-03-19 08:22:46 +0100
committerSergio Ahumada <sergio.ahumada@digia.com>2013-03-19 08:23:27 +0100
commit7d74448570bec6f6951fd78ddd5c298d7cb8c2d6 (patch)
tree2770d4fa758d6c5fc7c55bacf01a1c2bdbd1d29a
parent4929a38d1d6b7e7044f3b549c703f160586cdef6 (diff)
parent935fd0d0dbdc8d2d7a568c17d1871ac85df3f27b (diff)
Merge branch 'dev' into stable
This starts Qt 5.1 release cycle Change-Id: Id15d554ef88f18638f2662abb6611faaa1a72e05
-rw-r--r--src/activeqt/container/container.pro2
-rw-r--r--src/activeqt/container/filterwidget.cpp321
-rw-r--r--src/activeqt/container/filterwidget_p.h151
-rw-r--r--src/activeqt/container/qaxbase.cpp2
-rw-r--r--src/activeqt/container/qaxbase.h4
-rw-r--r--src/activeqt/container/qaxobject.h4
-rw-r--r--src/activeqt/container/qaxscript.h4
-rw-r--r--src/activeqt/container/qaxselect.cpp74
-rw-r--r--src/activeqt/container/qaxselect.h17
-rw-r--r--src/activeqt/container/qaxselect.ui201
-rw-r--r--src/activeqt/container/qaxwidget.h4
-rw-r--r--src/activeqt/control/qaxaggregated.h4
-rw-r--r--src/activeqt/control/qaxbindable.h4
-rw-r--r--src/activeqt/control/qaxfactory.h4
-rw-r--r--src/activeqt/control/qaxserverbase.cpp81
-rw-r--r--src/activeqt/control/qaxservermain.cpp28
-rw-r--r--src/activeqt/shared/qaxtypefunctions.h4
-rw-r--r--src/activeqt/shared/qaxtypes.cpp4
-rw-r--r--src/activeqt/shared/qaxtypes.h4
-rw-r--r--tools/dumpcpp/main.cpp5
-rw-r--r--tools/dumpdoc/main.cpp5
-rw-r--r--tools/testcon/ambientproperties.cpp5
-rw-r--r--tools/testcon/changeproperties.cpp9
-rw-r--r--tools/testcon/controlinfo.cpp2
-rw-r--r--tools/testcon/mainwindow.cpp13
25 files changed, 666 insertions, 290 deletions
diff --git a/src/activeqt/container/container.pro b/src/activeqt/container/container.pro
index 904a024..27edf66 100644
--- a/src/activeqt/container/container.pro
+++ b/src/activeqt/container/container.pro
@@ -9,6 +9,7 @@ HEADERS = ../control/qaxaggregated.h \
qaxobject.h \
qaxscript.h \
qaxselect.h \
+ filterwidget_p.h \
../shared/qaxtypes.h \
../shared/qaxutils_p.h
@@ -19,6 +20,7 @@ SOURCES = qaxbase.cpp \
qaxscript.cpp \
qaxscriptwrapper.cpp \
qaxselect.cpp \
+ filterwidget.cpp \
../shared/qaxtypes.cpp \
../shared/qaxutils.cpp
diff --git a/src/activeqt/container/filterwidget.cpp b/src/activeqt/container/filterwidget.cpp
new file mode 100644
index 0000000..0e6912a
--- /dev/null
+++ b/src/activeqt/container/filterwidget.cpp
@@ -0,0 +1,321 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the ActiveQt framework of the Qt Toolkit
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "filterwidget_p.h"
+
+#include <QtWidgets/QVBoxLayout>
+#include <QtWidgets/QHBoxLayout>
+#include <QtWidgets/QLineEdit>
+#include <QtGui/QFocusEvent>
+#include <QtGui/QPalette>
+#include <QtGui/QCursor>
+#include <QtWidgets/QToolButton>
+#include <QtGui/QPainter>
+#include <QtWidgets/QStyle>
+#include <QtWidgets/QStyleOption>
+
+#include <QtCore/QDebug>
+#include <QtCore/QPropertyAnimation>
+
+enum { debugFilter = 0 };
+
+/* XPM */
+static const char *cleartext_xpm[] = {
+"16 16 53 1",
+" c None",
+". c #2B2B2B",
+"+ c #2D2D2D",
+"@ c #2F2F2F",
+"# c #323232",
+"$ c #373737",
+"% c #3C3C3C",
+"& c #3E3E3E",
+"* c #363636",
+"= c #404040",
+"- c #494949",
+"; c #4E4E4E",
+"> c #525252",
+", c #444444",
+"' c #4F4F4F",
+") c #9C9C9C",
+"! c #6B6B6B",
+"~ c #626262",
+"{ c #333333",
+"] c #414141",
+"^ c #9B9B9B",
+"/ c #FFFFFF",
+"( c #E5E5E5",
+"_ c #737373",
+": c #3A3A3A",
+"< c #4A4A4A",
+"[ c #555555",
+"} c #5D5D5D",
+"| c #E0E0E0",
+"1 c #E7E7E7",
+"2 c #3F3F3F",
+"3 c #5A5A5A",
+"4 c #4B4B4B",
+"5 c #E2E2E2",
+"6 c #424242",
+"7 c #5E5E5E",
+"8 c #5B5B5B",
+"9 c #505050",
+"0 c #6A6A6A",
+"a c #E3E3E3",
+"b c #4D4D4D",
+"c c #545454",
+"d c #999999",
+"e c #DEDEDE",
+"f c #474747",
+"g c #878787",
+"h c #434343",
+"i c #414140",
+"j c #454545",
+"k c #484848",
+"l c #484949",
+"m c #484748",
+"n c #444544",
+" ",
+" .+@@+. ",
+" #$%&&%$# ",
+" *=-;>>;-=* ",
+" $,')!~~!)',$ ",
+" {]'^/(__(/^']{ ",
+" :<[}|/11/|}[<: ",
+" 2'3>45//54>3'2 ",
+" 6>}785//587}>6 ",
+" ]930a/||/a039] ",
+" &bcd/e%%e/dcb& ",
+" f;6gh]ihg6;f ",
+" -f=j99j=f- ",
+" k<b99b<k ",
+" jkl-mn ",
+" "};
+
+QT_BEGIN_NAMESPACE
+
+HintLineEdit::HintLineEdit(QWidget *parent) :
+ QLineEdit(parent),
+ m_defaultFocusPolicy(focusPolicy()),
+ m_refuseFocus(false)
+{
+}
+
+IconButton::IconButton(QWidget *parent)
+ : QToolButton(parent), m_fader(0)
+{
+ setCursor(Qt::ArrowCursor);
+}
+
+void IconButton::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+ // Note isDown should really use the active state but in most styles
+ // this has no proper feedback
+ QIcon::Mode state = QIcon::Disabled;
+ if (isEnabled())
+ state = isDown() ? QIcon::Selected : QIcon::Normal;
+ QPixmap iconpixmap = icon().pixmap(QSize(ICONBUTTON_SIZE, ICONBUTTON_SIZE),
+ state, QIcon::Off);
+ QRect pixmapRect = QRect(0, 0, iconpixmap.width(), iconpixmap.height());
+ pixmapRect.moveCenter(rect().center());
+ painter.setOpacity(m_fader);
+ painter.drawPixmap(pixmapRect, iconpixmap);
+}
+
+void IconButton::animateShow(bool visible)
+{
+ if (visible) {
+ QPropertyAnimation *animation = new QPropertyAnimation(this, "fader");
+ animation->setDuration(160);
+ animation->setEndValue(1.0);
+ animation->start(QAbstractAnimation::DeleteWhenStopped);
+ } else {
+ QPropertyAnimation *animation = new QPropertyAnimation(this, "fader");
+ animation->setDuration(160);
+ animation->setEndValue(0.0);
+ animation->start(QAbstractAnimation::DeleteWhenStopped);
+ }
+}
+
+bool HintLineEdit::refuseFocus() const
+{
+ return m_refuseFocus;
+}
+
+void HintLineEdit::setRefuseFocus(bool v)
+{
+ if (v == m_refuseFocus)
+ return;
+ m_refuseFocus = v;
+ setFocusPolicy(m_refuseFocus ? Qt::NoFocus : m_defaultFocusPolicy);
+}
+
+void HintLineEdit::mousePressEvent(QMouseEvent *e)
+{
+ if (debugFilter)
+ qDebug() << Q_FUNC_INFO;
+ // Explicitly focus on click.
+ if (m_refuseFocus && !hasFocus())
+ setFocus(Qt::OtherFocusReason);
+ QLineEdit::mousePressEvent(e);
+}
+
+void HintLineEdit::focusInEvent(QFocusEvent *e)
+{
+ if (debugFilter)
+ qDebug() << Q_FUNC_INFO;
+ if (m_refuseFocus) {
+ // Refuse the focus if the mouse is outside. In addition to the mouse
+ // press logic, this prevents a re-focusing which occurs once
+ // we actually have focus
+ const Qt::FocusReason reason = e->reason();
+ if (reason == Qt::ActiveWindowFocusReason || reason == Qt::PopupFocusReason) {
+ const QPoint mousePos = mapFromGlobal(QCursor::pos());
+ const bool refuse = !geometry().contains(mousePos);
+ if (debugFilter)
+ qDebug() << Q_FUNC_INFO << refuse;
+ if (refuse) {
+ e->ignore();
+ return;
+ }
+ }
+ }
+
+ QLineEdit::focusInEvent(e);
+}
+
+// ------------------- FilterWidget
+FilterWidget::FilterWidget(QWidget *parent, LayoutMode lm) :
+ QWidget(parent),
+ m_editor(new HintLineEdit(this)),
+ m_button(new IconButton(m_editor)),
+ m_buttonwidth(0)
+{
+ m_editor->setPlaceholderText(tr("Filter"));
+
+ // Let the style determine minimum height for our widget
+ QSize size(ICONBUTTON_SIZE + 6, ICONBUTTON_SIZE + 2);
+
+ // Note KDE does not reserve space for the highlight color
+ if (style()->inherits("OxygenStyle"))
+ size = size.expandedTo(QSize(24, 0));
+
+ // Make room for clear icon
+ QMargins margins = m_editor->textMargins();
+ if (layoutDirection() == Qt::LeftToRight)
+ margins.setRight(size.width());
+ else
+ margins.setLeft(size.width());
+
+ m_editor->setTextMargins(margins);
+
+ QHBoxLayout *l = new QHBoxLayout(this);
+ l->setMargin(0);
+ l->setSpacing(0);
+ if (lm == LayoutAlignRight)
+ l->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
+
+ l->addWidget(m_editor);
+
+ // KDE has custom icons for this. Notice that icon namings are counter intuitive
+ // If these icons are not available we use the freedesktop standard name before
+ // falling back to a bundled resource
+ QIcon icon = QIcon::fromTheme(layoutDirection() == Qt::LeftToRight ?
+ QStringLiteral("edit-clear-locationbar-rtl") :
+ QStringLiteral("edit-clear-locationbar-ltr"),
+ QIcon::fromTheme(QStringLiteral("edit-clear"),
+ QIcon(QPixmap(cleartext_xpm))));
+ Q_ASSERT(!icon.availableSizes().isEmpty());
+ m_button->setIcon(icon);
+ m_button->setToolTip(tr("Clear text"));
+ connect(m_button, SIGNAL(clicked()), this, SLOT(reset()));
+ connect(m_editor, SIGNAL(textChanged(QString)), this, SLOT(checkButton(QString)));
+ connect(m_editor, SIGNAL(textEdited(QString)), this, SIGNAL(filterChanged(QString)));
+}
+
+QString FilterWidget::text() const
+{
+ return m_editor->text();
+}
+
+void FilterWidget::checkButton(const QString &text)
+{
+ if (m_oldText.isEmpty() || text.isEmpty())
+ m_button->animateShow(!m_editor->text().isEmpty());
+ m_oldText = text;
+}
+
+void FilterWidget::reset()
+{
+ if (debugFilter)
+ qDebug() << Q_FUNC_INFO;
+
+ if (!m_editor->text().isEmpty()) {
+ // Editor has lost focus once this is pressed
+ m_editor->clear();
+ emit filterChanged(QString());
+ }
+}
+
+void FilterWidget::resizeEvent(QResizeEvent *)
+{
+ QRect contentRect = m_editor->rect();
+ if (layoutDirection() == Qt::LeftToRight) {
+ const int iconoffset = m_editor->textMargins().right() + 4;
+ m_button->setGeometry(contentRect.adjusted(m_editor->width() - iconoffset, 0, 0, 0));
+ } else {
+ const int iconoffset = m_editor->textMargins().left() + 4;
+ m_button->setGeometry(contentRect.adjusted(0, 0, -m_editor->width() + iconoffset, 0));
+ }
+}
+
+bool FilterWidget::refuseFocus() const
+{
+ return m_editor->refuseFocus();
+}
+
+void FilterWidget::setRefuseFocus(bool v)
+{
+ m_editor->setRefuseFocus(v);
+}
+
+QT_END_NAMESPACE
diff --git a/src/activeqt/container/filterwidget_p.h b/src/activeqt/container/filterwidget_p.h
new file mode 100644
index 0000000..48c555e
--- /dev/null
+++ b/src/activeqt/container/filterwidget_p.h
@@ -0,0 +1,151 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the ActiveQt framework of the Qt Toolkit
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of Qt Designer. This header
+// file may change from version to version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#ifndef FILTERWIDGET_H
+#define FILTERWIDGET_H
+
+#include <QtWidgets/QWidget>
+#include <QtWidgets/QLineEdit>
+#include <QtGui/QColor>
+#include <QtWidgets/QToolButton>
+
+QT_BEGIN_NAMESPACE
+
+class QToolButton;
+
+/* Note: This a copy of the filter widget found in the qtools repository
+ * which was modified to contain cleartext.png as inline XPM image data
+ * and to have LayoutAlignNone as default parameter in the constructor to
+ * to suit the QAxSelect dialog's needs.
+ *
+ * This widget should never have initial focus
+ * (ie, be the first widget of a dialog, otherwise the hint cannot be displayed.
+ * For situations, where it is the only focusable control (widget box),
+ * there is a special "refuseFocus()" mode, in which it clears the focus
+ * policy and focuses explicitly on click (note that setting Qt::ClickFocus
+ * is not sufficient for that as an ActivationFocus will occur). */
+
+#define ICONBUTTON_SIZE 16
+
+class HintLineEdit : public QLineEdit {
+ Q_OBJECT
+public:
+ explicit HintLineEdit(QWidget *parent = 0);
+
+ bool refuseFocus() const;
+ void setRefuseFocus(bool v);
+
+protected:
+ virtual void mousePressEvent(QMouseEvent *event);
+ virtual void focusInEvent(QFocusEvent *e);
+
+private:
+ const Qt::FocusPolicy m_defaultFocusPolicy;
+ bool m_refuseFocus;
+};
+
+// IconButton: This is a simple helper class that represents clickable icons
+
+class IconButton: public QToolButton
+{
+ Q_OBJECT
+ Q_PROPERTY(float fader READ fader WRITE setFader)
+public:
+ IconButton(QWidget *parent);
+ void paintEvent(QPaintEvent *event);
+ float fader() { return m_fader; }
+ void setFader(float value) { m_fader = value; update(); }
+ void animateShow(bool visible);
+
+private:
+ float m_fader;
+};
+
+// FilterWidget: For filtering item views, with reset button Uses HintLineEdit.
+
+class FilterWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ enum LayoutMode {
+ // For use in toolbars: Expand to the right
+ LayoutAlignRight,
+ // No special alignment
+ LayoutAlignNone
+ };
+
+ explicit FilterWidget(QWidget *parent = 0, LayoutMode lm = LayoutAlignNone);
+
+ QString text() const;
+ void resizeEvent(QResizeEvent *);
+ bool refuseFocus() const; // see HintLineEdit
+ void setRefuseFocus(bool v);
+
+signals:
+ void filterChanged(const QString &);
+
+public slots:
+ void reset();
+
+private slots:
+ void checkButton(const QString &text);
+
+private:
+ HintLineEdit *m_editor;
+ IconButton *m_button;
+ int m_buttonwidth;
+ QString m_oldText;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp
index 87dd7f1..1aae1ad 100644
--- a/src/activeqt/container/qaxbase.cpp
+++ b/src/activeqt/container/qaxbase.cpp
@@ -3682,7 +3682,7 @@ int QAxBase::internalInvoke(QMetaObject::Call call, int index, void **v)
QByteArray type = d->metaobj->paramType(signature, p, &out);
QVariant::Type vt = QVariant::nameToType(type);
QVariant qvar;
- if (vt != QVariant::UserType && vt != QMetaType::QVariant)
+ if (vt != QVariant::UserType && vt != int(QMetaType::QVariant))
qvar = QVariant(vt, v[p + 1]);
if (!qvar.isValid()) {
diff --git a/src/activeqt/container/qaxbase.h b/src/activeqt/container/qaxbase.h
index 7177718..a745b9a 100644
--- a/src/activeqt/container/qaxbase.h
+++ b/src/activeqt/container/qaxbase.h
@@ -49,8 +49,6 @@
struct IUnknown;
struct IDispatch;
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
#ifndef QT_NO_WIN_ACTIVEQT
@@ -231,6 +229,4 @@ Q_DECLARE_METATYPE(IDispatch*)
#endif // QT_NO_WIN_ACTIVEQT
-QT_END_HEADER
-
#endif // QAXBASE_H
diff --git a/src/activeqt/container/qaxobject.h b/src/activeqt/container/qaxobject.h
index e3654bf..bbd6e84 100644
--- a/src/activeqt/container/qaxobject.h
+++ b/src/activeqt/container/qaxobject.h
@@ -43,8 +43,6 @@
#include <ActiveQt/qaxbase.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
#ifndef QT_NO_WIN_ACTIVEQT
@@ -97,6 +95,4 @@ Q_DECLARE_METATYPE(QAxObject*)
#endif // QT_NO_WIN_ACTIVEQT
-QT_END_HEADER
-
#endif // QAXOBJECT_H
diff --git a/src/activeqt/container/qaxscript.h b/src/activeqt/container/qaxscript.h
index 7831979..be71bb3 100644
--- a/src/activeqt/container/qaxscript.h
+++ b/src/activeqt/container/qaxscript.h
@@ -45,8 +45,6 @@
struct IActiveScript;
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
#ifndef QT_NO_WIN_ACTIVEQT
@@ -242,6 +240,4 @@ inline void QAxScriptManager::addObject(QObject *object)
QT_END_NAMESPACE
#endif // QT_NO_WIN_ACTIVEQT
-QT_END_HEADER
-
#endif // QAXSCRIPT_H
diff --git a/src/activeqt/container/qaxselect.cpp b/src/activeqt/container/qaxselect.cpp
index 00f8e57..f08ec34 100644
--- a/src/activeqt/container/qaxselect.cpp
+++ b/src/activeqt/container/qaxselect.cpp
@@ -43,6 +43,10 @@
#ifndef QT_NO_WIN_ACTIVEQT
#include "ui_qaxselect.h"
+#include <QtCore/QSortFilterProxyModel>
+#include <QtCore/QItemSelectionModel>
+#include <QtWidgets/QPushButton>
+
#include <qt_windows.h>
QT_BEGIN_NAMESPACE
@@ -121,6 +125,26 @@ QVariant ControlList::data(const QModelIndex &index, int role) const
return QVariant();
}
+class QAxSelectPrivate {
+public:
+ inline QString clsidAt(const QModelIndex &index) const
+ {
+ if (index.isValid()) {
+ const QModelIndex sourceIndex = filterModel->mapToSource(index);
+ if (sourceIndex.isValid())
+ return sourceIndex.data(Qt::UserRole).toString();
+ }
+ return QString();
+ }
+
+ inline QPushButton *okButton() const { return selectUi.buttonBox->button(QDialogButtonBox::Ok); }
+
+ inline void setOkButtonEnabled(bool enabled) { okButton()->setEnabled(enabled); }
+
+ Ui::QAxSelect selectUi;
+ QSortFilterProxyModel *filterModel;
+};
+
/*!
\class QAxSelect
\brief The QAxSelect class provides a selection dialog for registered COM components.
@@ -141,22 +165,36 @@ QVariant ControlList::data(const QModelIndex &index, int role) const
optionally specified with \a parent and \a flags parameters, respectively.
*/
QAxSelect::QAxSelect(QWidget *parent, Qt::WindowFlags flags)
-: QDialog(parent, flags), selectUi(new Ui::QAxSelect)
+ : QDialog(parent, flags)
+ , d(new QAxSelectPrivate)
{
+ setWindowFlags(windowFlags() &~ Qt::WindowContextHelpButtonHint);
+ d->selectUi.setupUi(this);
+ d->setOkButtonEnabled(false);
+
#ifndef QT_NO_CURSOR
QApplication::setOverrideCursor(Qt::WaitCursor);
#endif
- selectUi->setupUi(this);
- selectUi->ActiveXList->setModel(new ControlList(this));
- connect(selectUi->ActiveXList->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)),
- this, SLOT(on_ActiveXList_clicked(QModelIndex)));
+
+ d->filterModel = new QSortFilterProxyModel(this);
+ d->filterModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
+ 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()));
+
#ifndef QT_NO_CURSOR
QApplication::restoreOverrideCursor();
#endif
- selectUi->ActiveXList->setFocus();
+ d->selectUi.ActiveXList->setFocus();
- connect(selectUi->buttonOk, SIGNAL(clicked()), this, SLOT(accept()));
- connect(selectUi->buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
+ connect(d->selectUi.buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
+ connect(d->selectUi.buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+ connect(d->selectUi.filterLineEdit, SIGNAL(filterChanged(QString)),
+ this, SLOT(onFilterLineEditChanged(QString)));
}
/*!
@@ -173,21 +211,25 @@ QAxSelect::~QAxSelect()
*/
QString QAxSelect::clsid() const
{
- return selectUi->ActiveX->text();
+ return d->selectUi.ActiveX->text().trimmed();
}
-void QAxSelect::on_ActiveXList_clicked(const QModelIndex &index)
+void QAxSelect::onActiveXListCurrentChanged(const QModelIndex &index)
{
- QVariant clsid = selectUi->ActiveXList->model()->data(index, Qt::UserRole);
- selectUi->ActiveX->setText(clsid.toString());
+ const QString newClsid = d->clsidAt(index);
+ d->selectUi.ActiveX->setText(newClsid);
+ d->setOkButtonEnabled(!newClsid.isEmpty());
}
-void QAxSelect::on_ActiveXList_doubleClicked(const QModelIndex &index)
+void QAxSelect::onActiveXListActivated()
{
- QVariant clsid = selectUi->ActiveXList->model()->data(index, Qt::UserRole);
- selectUi->ActiveX->setText(clsid.toString());
+ if (!clsid().isEmpty())
+ d->okButton()->animateClick();
+}
- accept();
+void QAxSelect::onFilterLineEditChanged(const QString &text)
+{
+ d->filterModel->setFilterFixedString(text);
}
QT_END_NAMESPACE
diff --git a/src/activeqt/container/qaxselect.h b/src/activeqt/container/qaxselect.h
index 612a10a..228598c 100644
--- a/src/activeqt/container/qaxselect.h
+++ b/src/activeqt/container/qaxselect.h
@@ -42,15 +42,12 @@
#define QAXSELECT_H
#include <QtWidgets/QDialog>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
#ifndef QT_NO_WIN_ACTIVEQT
-namespace Ui {
- class QAxSelect;
-}
+class QAxSelectPrivate;
+class QModelIndex;
class QAxSelect : public QDialog
{
@@ -61,15 +58,15 @@ public:
QString clsid() const;
private Q_SLOTS:
- void on_ActiveXList_clicked(const QModelIndex &index);
- void on_ActiveXList_doubleClicked(const QModelIndex &index);
+ void onActiveXListCurrentChanged(const QModelIndex &);
+ void onActiveXListActivated();
+ void onFilterLineEditChanged(const QString &);
+
private:
- QScopedPointer<Ui::QAxSelect> selectUi;
+ QScopedPointer<QAxSelectPrivate> d;
};
QT_END_NAMESPACE
#endif // QT_NO_WIN_ACTIVEQT
-QT_END_HEADER
-
#endif // QAXSELECT_H
diff --git a/src/activeqt/container/qaxselect.ui b/src/activeqt/container/qaxselect.ui
index dfc8159..6c088c7 100644
--- a/src/activeqt/container/qaxselect.ui
+++ b/src/activeqt/container/qaxselect.ui
@@ -39,136 +39,79 @@
** $QT_END_LICENSE$
**
*********************************************************************</comment>
- <widget class="QDialog" name="QAxSelect" >
- <property name="objectName" >
- <string notr="true" >QAxSelect</string>
- </property>
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>439</width>
- <height>326</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Select ActiveX Control</string>
- </property>
- <property name="sizeGripEnabled" >
- <bool>true</bool>
- </property>
- <layout class="QGridLayout" >
- <property name="objectName" >
- <string notr="true" >unnamed</string>
- </property>
- <property name="margin" >
- <number>11</number>
- </property>
- <property name="spacing" >
+ <class>QAxSelect</class>
+ <widget class="QDialog" name="QAxSelect">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>439</width>
+ <height>326</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Select ActiveX Control</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="FilterWidget" name="filterLineEdit"/>
+ </item>
+ <item>
+ <widget class="QListView" name="ActiveXList"/>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="unnamed">
+ <property name="spacing">
<number>6</number>
- </property>
- <item rowspan="2" row="0" column="1" colspan="1" >
- <layout class="QVBoxLayout" >
- <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="QPushButton" name="buttonOk" >
- <property name="objectName" >
- <string notr="true" >buttonOk</string>
- </property>
- <property name="text" >
- <string>OK</string>
- </property>
- <property name="autoDefault" >
- <bool>true</bool>
- </property>
- <property name="default" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="buttonCancel" >
- <property name="objectName" >
- <string notr="true" >buttonCancel</string>
- </property>
- <property name="text" >
- <string>&amp;Cancel</string>
- </property>
- <property name="autoDefault" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="Spacer2" >
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>0</height>
- </size>
- </property>
- <property name="sizeType" >
- <enum>Expanding</enum>
- </property>
- <property name="orientation" >
- <enum>Vertical</enum>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item row="0" column="0" >
- <widget class="QListView" name="ActiveXList" >
- <property name="objectName" >
- <string notr="true" >ActiveXList</string>
- </property>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="TextLabel1">
+ <property name="text">
+ <string>COM &amp;Object:</string>
+ </property>
+ <property name="buddy">
+ <cstring>ActiveX</cstring>
+ </property>
</widget>
- </item>
- <item row="1" column="0" >
- <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="QLabel" name="TextLabel1" >
- <property name="objectName" >
- <string notr="true" >TextLabel1</string>
- </property>
- <property name="text" >
- <string>COM &amp;Object:</string>
- </property>
- <property name="buddy" stdset="0" >
- <cstring>ActiveX</cstring>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="ActiveX" >
- <property name="objectName" >
- <string notr="true" >ActiveX</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="ActiveX"/>
+ </item>
+ </layout>
+ </item>
</layout>
- </widget>
- <layoutdefault spacing="6" margin="11" />
- <includes>
- <include location="local" >qaxwidget.h</include>
- </includes>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <customwidgets>
+ <customwidget>
+ <class>FilterWidget</class>
+ <extends>QWidget</extends>
+ <header>filterwidget_p.h</header>
+ </customwidget>
+ </customwidgets>
+ <includes>
+ <include location="local">qaxwidget.h</include>
+ </includes>
+ <resources/>
+ <connections/>
</ui>
diff --git a/src/activeqt/container/qaxwidget.h b/src/activeqt/container/qaxwidget.h
index 00dc44f..b889cd1 100644
--- a/src/activeqt/container/qaxwidget.h
+++ b/src/activeqt/container/qaxwidget.h
@@ -44,8 +44,6 @@
#include <ActiveQt/qaxbase.h>
#include <QtWidgets/QWidget>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
#ifndef QT_NO_WIN_ACTIVEQT
@@ -119,6 +117,4 @@ template <> inline QAxWidget *qobject_cast<QAxWidget*>(QObject *o)
QT_END_NAMESPACE
#endif // QT_NO_WIN_ACTIVEQT
-QT_END_HEADER
-
#endif // QAXWIDGET_H
diff --git a/src/activeqt/control/qaxaggregated.h b/src/activeqt/control/qaxaggregated.h
index 615a208..99b7710 100644
--- a/src/activeqt/control/qaxaggregated.h
+++ b/src/activeqt/control/qaxaggregated.h
@@ -45,8 +45,6 @@
struct IUnknown;
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
#ifndef QT_NO_WIN_ACTIVEQT
@@ -87,6 +85,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QAXAGGREGATED_H
diff --git a/src/activeqt/control/qaxbindable.h b/src/activeqt/control/qaxbindable.h
index 8a20e9b..81e642f 100644
--- a/src/activeqt/control/qaxbindable.h
+++ b/src/activeqt/control/qaxbindable.h
@@ -45,8 +45,6 @@
struct IUnknown;
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
#ifndef QT_NO_WIN_ACTIVEQT
@@ -81,6 +79,4 @@ private:
QT_END_NAMESPACE
#endif // QT_NO_WIN_ACTIVEQT
-QT_END_HEADER
-
#endif // QAXBINDABLE_H
diff --git a/src/activeqt/control/qaxfactory.h b/src/activeqt/control/qaxfactory.h
index 7411744..115997a 100644
--- a/src/activeqt/control/qaxfactory.h
+++ b/src/activeqt/control/qaxfactory.h
@@ -50,8 +50,6 @@
struct IUnknown;
struct IDispatch;
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
#ifndef QT_NO_WIN_ACTIVEQT
@@ -307,6 +305,4 @@ Q_DECLARE_METATYPE(IDispatch*)
#endif // QT_NO_WIN_ACTIVEQT
-QT_END_HEADER
-
#endif // QAXFACTORY_H
diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp
index 671b112..97f46b3 100644
--- a/src/activeqt/control/qaxserverbase.cpp
+++ b/src/activeqt/control/qaxserverbase.cpp
@@ -1008,9 +1008,13 @@ QAxServerBase::QAxServerBase(const QString &classname, IUnknown *outerUnknown)
Constructs a QAxServerBase object wrapping \a o.
*/
QAxServerBase::QAxServerBase(QObject *o)
-: aggregatedObject(0), ref(0), ole_ref(0),
- m_hWnd(0), hmenuShared(0), hwndMenuOwner(0),
- m_outerUnknown(0)
+ : aggregatedObject(0)
+ , m_hWnd(0)
+ , hmenuShared(0)
+ , hwndMenuOwner(0)
+ , ref(0)
+ , ole_ref(0)
+ , m_outerUnknown(0)
{
init();
@@ -1832,76 +1836,6 @@ void QAxServerBase::updateMask()
DeleteObject(hrgn);
}
-static bool checkHRESULT(HRESULT hres)
-{
- const char *name = 0;
- Q_UNUSED(name);
- switch(hres) {
- case S_OK:
- return true;
- case DISP_E_BADPARAMCOUNT:
-#if defined(QT_CHECK_STATE)
- qWarning("QAxBase: Error calling IDispatch member %s: Bad parameter count", name);
-#endif
- return false;
- case DISP_E_BADVARTYPE:
-#if defined(QT_CHECK_STATE)
- qWarning("QAxBase: Error calling IDispatch member %s: Bad variant type", name);
-#endif
- return false;
- case DISP_E_EXCEPTION:
-#if defined(QT_CHECK_STATE)
- qWarning("QAxBase: Error calling IDispatch member %s: Exception thrown by server", name);
-#endif
- return false;
- case DISP_E_MEMBERNOTFOUND:
-#if defined(QT_CHECK_STATE)
- qWarning("QAxBase: Error calling IDispatch member %s: Member not found", name);
-#endif
- return false;
- case DISP_E_NONAMEDARGS:
-#if defined(QT_CHECK_STATE)
- qWarning("QAxBase: Error calling IDispatch member %s: No named arguments", name);
-#endif
- return false;
- case DISP_E_OVERFLOW:
-#if defined(QT_CHECK_STATE)
- qWarning("QAxBase: Error calling IDispatch member %s: Overflow", name);
-#endif
- return false;
- case DISP_E_PARAMNOTFOUND:
-#if defined(QT_CHECK_STATE)
- qWarning("QAxBase: Error calling IDispatch member %s: Parameter not found", name);
-#endif
- return false;
- case DISP_E_TYPEMISMATCH:
-#if defined(QT_CHECK_STATE)
- qWarning("QAxBase: Error calling IDispatch member %s: Type mismatch", name);
-#endif
- return false;
- case DISP_E_UNKNOWNINTERFACE:
-#if defined(QT_CHECK_STATE)
- qWarning("QAxBase: Error calling IDispatch member %s: Unknown interface", name);
-#endif
- return false;
- case DISP_E_UNKNOWNLCID:
-#if defined(QT_CHECK_STATE)
- qWarning("QAxBase: Error calling IDispatch member %s: Unknown locale ID", name);
-#endif
- return false;
- case DISP_E_PARAMNOTOPTIONAL:
-#if defined(QT_CHECK_STATE)
- qWarning("QAxBase: Error calling IDispatch member %s: Non-optional parameter missing", name);
-#endif
- return false;
- default:
-#if defined(QT_CHECK_STATE)
- qWarning("QAxBase: Error calling IDispatch member %s: Unknown error", name);
-#endif
- return false;
- }
-}
-
static inline QByteArray paramType(const QByteArray &ptype, bool *out)
{
*out = ptype.endsWith('&') || ptype.endsWith("**");
@@ -2974,6 +2908,7 @@ HRESULT WINAPI QAxServerBase::Load(IPropertyBag *bag, IErrorLog * /*log*/)
updateGeometry();
+ Q_UNUSED(error)
return /*error ? E_FAIL :*/ S_OK;
}
diff --git a/src/activeqt/control/qaxservermain.cpp b/src/activeqt/control/qaxservermain.cpp
index 1849b47..de86ed6 100644
--- a/src/activeqt/control/qaxservermain.cpp
+++ b/src/activeqt/control/qaxservermain.cpp
@@ -252,19 +252,21 @@ EXTERN_C int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR,
}
if (run) {
- HRESULT hRes = CoInitialize(0);
-
- int argc;
- QVector<char*> argv(8);
- qWinMain(hInstance, hPrevInstance, unprocessed.data(), nShowCmd, argc, argv);
- qAxInit();
- if (runServer)
- QAxFactory::startServer();
- nRet = ::main(argc, argv.data());
- QAxFactory::stopServer();
- qAxCleanup();
- CoUninitialize();
-
+ if (SUCCEEDED(CoInitialize(0))) {
+ int argc;
+ QVector<char*> argv(8);
+ qWinMain(hInstance, hPrevInstance, unprocessed.data(), nShowCmd, argc, argv);
+ qAxInit();
+ if (runServer)
+ QAxFactory::startServer();
+ nRet = ::main(argc, argv.data());
+ QAxFactory::stopServer();
+ qAxCleanup();
+ CoUninitialize();
+ } else {
+ qErrnoWarning("CoInitialize() failed.");
+ nRet = -1;
+ }
}
return nRet;
diff --git a/src/activeqt/shared/qaxtypefunctions.h b/src/activeqt/shared/qaxtypefunctions.h
index b697e68..59968c2 100644
--- a/src/activeqt/shared/qaxtypefunctions.h
+++ b/src/activeqt/shared/qaxtypefunctions.h
@@ -49,8 +49,6 @@
#include <QtCore/qdatetime.h>
#include <QtCore/qvariant.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
#ifndef QT_NO_WIN_ACTIVEQT
@@ -91,6 +89,4 @@ QT_END_NAMESPACE
#endif // QT_NO_WIN_ACTIVEQT
-QT_END_HEADER
-
#endif // QAXTYPEFUNCTIONS_P_H
diff --git a/src/activeqt/shared/qaxtypes.cpp b/src/activeqt/shared/qaxtypes.cpp
index a4658cd..755ab5a 100644
--- a/src/activeqt/shared/qaxtypes.cpp
+++ b/src/activeqt/shared/qaxtypes.cpp
@@ -243,7 +243,7 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type
QVariant qvar = var;
// "type" is the expected type, so coerce if necessary
QVariant::Type proptype = typeName.isEmpty() ? QVariant::Invalid : QVariant::nameToType(typeName);
- if ((proptype == QVariant::UserType || proptype == QMetaType::QVariant) && !typeName.isEmpty()) {
+ if ((proptype == QVariant::UserType || proptype == int(QMetaType::QVariant)) && !typeName.isEmpty()) {
if (typeName == "short" || typeName == "char")
proptype = QVariant::Int;
else if (typeName == "float")
@@ -251,7 +251,7 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type
}
if (proptype != QVariant::Invalid
&& proptype != QVariant::UserType
- && proptype != QMetaType::QVariant
+ && proptype != int(QMetaType::QVariant)
&& proptype != qvar.type()) {
if (qvar.canConvert(proptype))
qvar.convert(proptype);
diff --git a/src/activeqt/shared/qaxtypes.h b/src/activeqt/shared/qaxtypes.h
index ed53ece..f3b0da1 100644
--- a/src/activeqt/shared/qaxtypes.h
+++ b/src/activeqt/shared/qaxtypes.h
@@ -43,8 +43,6 @@
#include "qaxtypefunctions.h"
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
#ifndef QT_NO_WIN_ACTIVEQT
@@ -76,6 +74,4 @@ inline QVariant VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName
QT_END_NAMESPACE
#endif // QT_NO_WIN_ACTIVEQT
-QT_END_HEADER
-
#endif // QAXTYPES_H
diff --git a/tools/dumpcpp/main.cpp b/tools/dumpcpp/main.cpp
index c2dbcef..0f90873 100644
--- a/tools/dumpcpp/main.cpp
+++ b/tools/dumpcpp/main.cpp
@@ -1494,7 +1494,10 @@ int main(int argc, char **argv)
{
qax_dispatchEqualsIDispatch = false;
- CoInitialize(0);
+ if (FAILED(CoInitialize(0))) {
+ qErrnoWarning("CoInitialize() failed.");
+ return -1;
+ }
uint category = DefaultObject;
diff --git a/tools/dumpdoc/main.cpp b/tools/dumpdoc/main.cpp
index 5e9c55f..7314086 100644
--- a/tools/dumpdoc/main.cpp
+++ b/tools/dumpdoc/main.cpp
@@ -48,7 +48,10 @@ QT_USE_NAMESPACE
int main(int argc, char **argv)
{
- CoInitialize(0);
+ if (FAILED(CoInitialize(0))) {
+ qErrnoWarning("CoInitialize() failed.");
+ return -1;
+ }
enum State {
Default = 0,
diff --git a/tools/testcon/ambientproperties.cpp b/tools/testcon/ambientproperties.cpp
index ba1d489..0bf6544 100644
--- a/tools/testcon/ambientproperties.cpp
+++ b/tools/testcon/ambientproperties.cpp
@@ -41,7 +41,10 @@
#include "ambientproperties.h"
-#include <QtWidgets>
+#include <QtWidgets/QColorDialog>
+#include <QtWidgets/QFontDialog>
+#include <QtWidgets/QMdiArea>
+#include <QtWidgets/QMdiSubWindow>
QT_BEGIN_NAMESPACE
diff --git a/tools/testcon/changeproperties.cpp b/tools/testcon/changeproperties.cpp
index fb3b3a7..41936ef 100644
--- a/tools/testcon/changeproperties.cpp
+++ b/tools/testcon/changeproperties.cpp
@@ -41,9 +41,12 @@
#include "changeproperties.h"
-#include <QtWidgets>
-#include <qt_windows.h>
-#include <ActiveQt/ActiveQt>
+#include <QtWidgets/QMessageBox>
+#include <QtWidgets/QFileDialog>
+#include <QtCore/qt_windows.h>
+#include <QtCore/QMetaObject>
+#include <QtCore/QMetaProperty>
+#include <ActiveQt/QAxWidget>
QT_BEGIN_NAMESPACE
diff --git a/tools/testcon/controlinfo.cpp b/tools/testcon/controlinfo.cpp
index 4c3010c..bb7e0f2 100644
--- a/tools/testcon/controlinfo.cpp
+++ b/tools/testcon/controlinfo.cpp
@@ -41,7 +41,7 @@
#include "controlinfo.h"
-#include <QtGui>
+#include <QtCore/QMetaClassInfo>
QT_BEGIN_NAMESPACE
diff --git a/tools/testcon/mainwindow.cpp b/tools/testcon/mainwindow.cpp
index 563a9c2..cb3c00e 100644
--- a/tools/testcon/mainwindow.cpp
+++ b/tools/testcon/mainwindow.cpp
@@ -46,9 +46,16 @@
#include "controlinfo.h"
#include "docuwindow.h"
-#include <QtWidgets>
-#include <qt_windows.h>
-#include <ActiveQt/ActiveQt>
+#include <QtWidgets/QMdiArea>
+#include <QtWidgets/QMdiSubWindow>
+#include <QtWidgets/QFileDialog>
+#include <QtWidgets/QInputDialog>
+#include <QtWidgets/QMessageBox>
+#include <QtCore/qt_windows.h>
+#include <ActiveQt/QAxScriptManager>
+#include <ActiveQt/QAxSelect>
+#include <ActiveQt/QAxWidget>
+#include <ActiveQt/qaxtypes.h>
QT_BEGIN_NAMESPACE