summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-09-07 10:53:04 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-09-07 21:15:52 +0200
commit15744be7b78e300dc92c06c37b59dbbb5a12f915 (patch)
tree1ae380dd73e3fabed44a9a64d88384cdf0318e36
parentc6f202a36e9421ec1acaaa77a382584830d94cd9 (diff)
Bump dependency version and fix compile errors
- Adapt to explicit constructor of QUuid - QString changes - Renamed Qt::MidButton to Qt::MiddleButton - QMetaType-related deprecations Change-Id: Icdea2b300c3f33bec3a4ad010ee3150a3b2156de Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r--dependencies.yaml2
-rw-r--r--src/activeqt/container/qaxbase.cpp8
-rw-r--r--src/activeqt/container/qaxwidget.cpp8
-rw-r--r--src/activeqt/control/qaxfactory.h4
-rw-r--r--src/activeqt/control/qaxserver.cpp3
-rw-r--r--src/activeqt/control/qaxserverbase.cpp2
-rw-r--r--src/activeqt/control/qaxservermain.cpp2
7 files changed, 15 insertions, 14 deletions
diff --git a/dependencies.yaml b/dependencies.yaml
index 6dda841..566da31 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,4 +1,4 @@
dependencies:
../qtbase:
- ref: 5f729da74a5c12a8d33389dcc874c8277044abe0
+ ref: c93b91c766dc02efdb1955fb5a8a937c75108981
required: true
diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp
index fda1f2e..3ad5e1c 100644
--- a/src/activeqt/container/qaxbase.cpp
+++ b/src/activeqt/container/qaxbase.cpp
@@ -581,8 +581,8 @@ QAxBasePrivate::QAxBasePrivate()
QMutexLocker locker(&cache_mutex);
mo_cache_ref++;
- qRegisterMetaType<IUnknown*>("IUnknown*", &ptr);
- qRegisterMetaType<IDispatch*>("IDispatch*", &disp);
+ qRegisterMetaType<IUnknown*>("IUnknown*");
+ qRegisterMetaType<IDispatch*>("IDispatch*");
}
QAxBasePrivate::~QAxBasePrivate()
@@ -3115,7 +3115,7 @@ void QAxBase::connectNotify()
IID conniid;
cpoint->GetConnectionInterface(&conniid);
// workaround for typelibrary bug of Word.Application
- QString connuuid(QUuid(conniid).toString());
+ const QUuid connuuid(conniid);
if (d->eventSink.contains(connuuid))
break;
@@ -3166,7 +3166,7 @@ void QAxBase::connectNotify()
// make sure we don't try again
if (!d->eventSink.count())
- d->eventSink.insert(QString(), 0);
+ d->eventSink.insert(QUuid{}, nullptr);
}
/*!
diff --git a/src/activeqt/container/qaxwidget.cpp b/src/activeqt/container/qaxwidget.cpp
index c7f2609..6316fac 100644
--- a/src/activeqt/container/qaxwidget.cpp
+++ b/src/activeqt/container/qaxwidget.cpp
@@ -462,9 +462,9 @@ static const ushort mouseTbl[] = {
WM_RBUTTONDOWN, QEvent::MouseButtonPress, Qt::RightButton,
WM_RBUTTONUP, QEvent::MouseButtonRelease, Qt::RightButton,
WM_RBUTTONDBLCLK, QEvent::MouseButtonDblClick, Qt::RightButton,
- WM_MBUTTONDOWN, QEvent::MouseButtonPress, Qt::MidButton,
- WM_MBUTTONUP, QEvent::MouseButtonRelease, Qt::MidButton,
- WM_MBUTTONDBLCLK, QEvent::MouseButtonDblClick, Qt::MidButton,
+ WM_MBUTTONDOWN, QEvent::MouseButtonPress, Qt::MiddleButton,
+ WM_MBUTTONUP, QEvent::MouseButtonRelease, Qt::MiddleButton,
+ WM_MBUTTONDBLCLK, QEvent::MouseButtonDblClick, Qt::MiddleButton,
0, 0, 0
};
@@ -474,7 +474,7 @@ static Qt::MouseButtons translateMouseButtonState(int s)
if (s & MK_LBUTTON)
bst |= Qt::LeftButton;
if (s & MK_MBUTTON)
- bst |= Qt::MidButton;
+ bst |= Qt::MiddleButton;
if (s & MK_RBUTTON)
bst |= Qt::RightButton;
diff --git a/src/activeqt/control/qaxfactory.h b/src/activeqt/control/qaxfactory.h
index ce2fcbd..0a4c1f0 100644
--- a/src/activeqt/control/qaxfactory.h
+++ b/src/activeqt/control/qaxfactory.h
@@ -198,7 +198,7 @@ class QAxClass : public QAxFactory
{
public:
explicit QAxClass(const QString &libId, const QString &appId)
- : QAxFactory(libId, appId)
+ : QAxFactory(QUuid(libId), QUuid(appId))
{}
const QMetaObject *metaObject(const QString &) const override { return &T::staticMetaObject; }
@@ -257,7 +257,7 @@ private:
QHash<QString, bool> creatable; \
public: \
QAxFactoryList() \
- : QAxFactory(IDTypeLib, IDApp) \
+ : QAxFactory(QUuid(IDTypeLib), QUuid(IDApp)) \
{ \
QAxFactory *factory = nullptr; \
QStringList keys; \
diff --git a/src/activeqt/control/qaxserver.cpp b/src/activeqt/control/qaxserver.cpp
index a103290..c456df7 100644
--- a/src/activeqt/control/qaxserver.cpp
+++ b/src/activeqt/control/qaxserver.cpp
@@ -819,7 +819,8 @@ static QByteArray addDefaultArguments(const QByteArray &prototype, int numDefArg
type += ' ' + ptype.mid(in + 5, ptype.indexOf(' ', in + 5) - in - 5);
if (type == "struct")
type += ' ' + ptype.mid(in + 7, ptype.indexOf(' ', in + 7) - in - 7);
- ptype.replace(in, type.length(), QByteArray("VARIANT /*was: ") + type + "*/");
+ const QByteArray replacement = QByteArray("VARIANT /*was: ") + type + "*/";
+ ptype.replace(in, type.length(), replacement);
--numDefArgs;
}
diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp
index 6e825c0..cbd4cd1 100644
--- a/src/activeqt/control/qaxserverbase.cpp
+++ b/src/activeqt/control/qaxserverbase.cpp
@@ -2661,7 +2661,7 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid,
unsigned contextID = 0;
const int br = context.indexOf(QLatin1Char('[')); // "error[42]"
if (br != -1) {
- contextID = context.midRef(br + 1, context.size() - br - 2).toUInt();
+ contextID = context.mid(br + 1, context.size() - br - 2).toUInt();
context.truncate(br-1);
}
pexcepinfo->bstrHelpFile = QStringToBSTR(context);
diff --git a/src/activeqt/control/qaxservermain.cpp b/src/activeqt/control/qaxservermain.cpp
index 74739a2..dfed97b 100644
--- a/src/activeqt/control/qaxservermain.cpp
+++ b/src/activeqt/control/qaxservermain.cpp
@@ -209,7 +209,7 @@ static inline QStringList commandLineArguments()
static inline bool matchesOption(const QString &arg, const char *option)
{
return (arg.startsWith(QLatin1Char('/')) || arg.startsWith(QLatin1Char('-')))
- && arg.rightRef(arg.size() - 1).compare(QLatin1String(option), Qt::CaseInsensitive) == 0;
+ && arg.right(arg.size() - 1).compare(QLatin1String(option), Qt::CaseInsensitive) == 0;
}
namespace {