diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-07-14 14:55:13 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-07-14 14:23:07 +0000 |
commit | e9ee58208f5eea55e5225513f1403a27dbdd2d60 (patch) | |
tree | 623c5c6c3f39a06222bb92cca02e67c98c4498fe | |
parent | cddd08a9ed92aff9f86b0fde86cfac980bec52ea (diff) | |
download | qtactiveqt-e9ee58208f5eea55e5225513f1403a27dbdd2d60.tar.gz |
Print warning message when we can't get type information
Task-number: QTBUG-85467
Change-Id: I47920180626ea3ecbda3ea8e59600bf2f653f7fe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
(cherry picked from commit 88b4ca5ea5b7a20cb4d44d45eb4cb0b777bb9201)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/activeqt/container/qaxbase.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp index 910cacb..3203096 100644 --- a/src/activeqt/container/qaxbase.cpp +++ b/src/activeqt/container/qaxbase.cpp @@ -2193,7 +2193,7 @@ void MetaObjectGenerator::readClassInfo() if (dispInfo && !typelib) dispInfo->GetContainingTypeLib(&typelib, &index); - if (!typelib) { + if (!typelib && !that->control().isEmpty()) { QSettings controls(QLatin1String("HKEY_LOCAL_MACHINE\\Software"), QSettings::NativeFormat); QString tlid = controls.value(QLatin1String("/Classes/CLSID/") + that->control() + QLatin1String("/TypeLib/.")).toString(); QString tlfile; @@ -2260,8 +2260,11 @@ void MetaObjectGenerator::readClassInfo() } } - if (!d || !dispInfo || !cacheKey.isEmpty() || !d->tryCache) + if (!d || !dispInfo || !cacheKey.isEmpty() || !d->tryCache) { + if (disp && !dispInfo) + qWarning("%s: IDispatch %p does not provide interface information", Q_FUNC_INFO, disp); return; + } TYPEATTR *typeattr = nullptr; dispInfo->GetTypeAttr(&typeattr); |