diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2014-12-10 15:14:56 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2014-12-11 08:36:05 +0100 |
commit | e717dfbea17afb894c012438c1f59ca028709c9c (patch) | |
tree | a8b530715fef26f13e1cc9e7b20f358daae48700 | |
parent | 5da9700f34215c95d51c80342f0938232e4093e7 (diff) | |
download | qtactiveqt-e717dfbea17afb894c012438c1f59ca028709c9c.tar.gz |
Add categorized logging for registration of Active X controls.
Setting the environment variable
QT_LOGGING_RULES=qt.activeqt.registration.debug=true
produces output about the registration.
Task-number: QTBUG-42824
Change-Id: I964e1eafd345babdf3581399192a7b5702dea5a4
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
-rw-r--r-- | src/activeqt/control/qaxserver.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/activeqt/control/qaxserver.cpp b/src/activeqt/control/qaxserver.cpp index dfff757..c0a7ade 100644 --- a/src/activeqt/control/qaxserver.cpp +++ b/src/activeqt/control/qaxserver.cpp @@ -52,6 +52,8 @@ #include <qsettings.h> #include <qvariant.h> #include <qtextstream.h> +#include <qloggingcategory.h> +#include <qdebug.h> #include <qt_windows.h> #include <olectl.h> @@ -109,6 +111,8 @@ static CRITICAL_SECTION qAxModuleSection; static int initCount = 0; +Q_LOGGING_CATEGORY(lcAxRegistration, "qt.activeqt.registration") + QString qAxInit() { static QString libFile; @@ -347,6 +351,11 @@ HRESULT UpdateRegistry(BOOL bRegister) } delete object; + qCDebug(lcAxRegistration).nospace().noquote() << "Registered \"" << progId + << "\"/" << classId << ", \"" << file << "\" at \"" << keyPath + << "\", insertable=" << insertable << ", control=" << control + << ", olemisc=" << hex << showbase << olemisc + << ", mime=" << mime; } qAxFactory()->registerClass(classNameIn, settings.data()); @@ -428,6 +437,9 @@ HRESULT UpdateRegistry(BOOL bRegister) } } } + qCDebug(lcAxRegistration).nospace().noquote() << "Unregistered \"" + << progId << "\"/" << classId << ", \"" << file << "\" from \"" + << keyPath << '"'; } } @@ -437,6 +449,7 @@ HRESULT UpdateRegistry(BOOL bRegister) qAxCleanup(); if (settings->status() == QSettings::NoError) return S_OK; + qWarning() << module << ": Error writing to " << keyPath; return SELFREG_E_CLASS; } |