summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2014-01-10 17:17:12 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-22 12:12:17 +0100
commitdb51ffc0d1fbce85fd542403812fab8783c53e3c (patch)
tree2e7a051dbf6701b477e4c19de014a44dbaf84c37 /src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp
parenta5c288ea5675a382edf0b3ecae42f461a22a7303 (diff)
Port Windows QPA plugin to new logger API.
Introduce logging categories and change most debug statements to qCDebug(). Retrieve the filter rules from the environment variable QT_QPA_VERBOSE (should be removed once the logging framework offers a more convenient way of configuring). Replace the old per-category variables controlling verboseness of the output by a single variable which can be set on the command line. Change-Id: Iae55ecdb0e150efd165b7d3e90b371f72853f194 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp')
-rw-r--r--src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp25
1 files changed, 5 insertions, 20 deletions
diff --git a/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp b/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp
index 8bb7646258..49d4a712d8 100644
--- a/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp
+++ b/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp
@@ -185,23 +185,10 @@ HRESULT STDMETHODCALLTYPE QWindowsEnumerate::Skip(unsigned long celt)
return S_OK;
}
-#ifndef QT_NO_DEBUG
-bool debug_accessibility()
-{
- static int debugging = -1;
- if (debugging == -1)
- debugging = qgetenv("QT_DEBUG_ACCESSIBILITY").toInt();
- return !!debugging;
-}
-#endif
-
#if defined(DEBUG_SHOW_ATCLIENT_COMMANDS)
void accessibleDebugClientCalls_helper(const char* funcName, const QAccessibleInterface *iface)
{
- QString str;
- QDebug dbg(&str);
- dbg << iface << QLatin1String(funcName);
- accessibleDebug("%s", qPrintable(str));
+ qCDebug(lcQpaAccessibility) << iface << funcName;
}
#endif
@@ -216,10 +203,8 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::QueryInterface(REFIID id, LPVO
QByteArray strIID = IIDToString(id);
if (!strIID.isEmpty()) {
- QString ss;
- QDebug dbg(&ss);
- dbg << accessibleInterface();
- accessibleDebug("QWindowsIA2Accessible::QI() - IID:%s, iface:%s ", strIID.constData(), qPrintable(ss));
+ qCDebug(lcQpaAccessibility) << "QWindowsIA2Accessible::QI() - IID:"
+ << strIID << ", iface:" << accessibleInterface();
}
if (id == IID_IUnknown) {
*iface = (IUnknown*)(IDispatch*)this;
@@ -1057,7 +1042,7 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accValue(VARIANT varID, BS
}
*pszValue = 0;
- accessibleDebug("return S_FALSE");
+ qCDebug(lcQpaAccessibility) << "return S_FALSE";
return S_FALSE;
}
@@ -1196,7 +1181,7 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::GetWindow(HWND *phwnd)
QPlatformNativeInterface *platform = QGuiApplication::platformNativeInterface();
Q_ASSERT(platform);
*phwnd = (HWND)platform->nativeResourceForWindow("handle", window);
- accessibleDebug("QWindowsAccessible::GetWindow(): %p", *phwnd);
+ qCDebug(lcQpaAccessibility) << "QWindowsAccessible::GetWindow(): " << *phwnd;
return S_OK;
}