diff options
author | Andre de la Rocha <andre.rocha@qt.io> | 2018-06-26 18:01:55 +0200 |
---|---|---|
committer | Andre de la Rocha <andre.rocha@qt.io> | 2018-06-27 23:31:26 +0000 |
commit | 92666ff5218491671ec97fdd5d7405566d110a2b (patch) | |
tree | 0fb0fb1ac03269ed0f3e9d2e93f207e3f0ce89b0 /src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.cpp | |
parent | aaf60da01cc903c3bdb08e6ff11cad0511c6fc05 (diff) |
Fix minor stuff in Windows UI Automation support
Adding missing "override" keywords in overridden interfaces, using
"#if QT_CONFIG(accessibility)" instead of "#ifndef QT_NO_ACCESSIBILITY",
and other minor bits. No change in behavior expected.
Change-Id: Ief0e23cb7b577dd3e4af21750b6beccc80d6a2f8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.cpp')
-rw-r--r-- | src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.cpp index 3934fe37b9..1be186f6b3 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.cpp +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.cpp @@ -37,8 +37,8 @@ ** ****************************************************************************/ -#include <QtCore/qconfig.h> -#ifndef QT_NO_ACCESSIBILITY +#include <QtGui/qtguiglobal.h> +#if QT_CONFIG(accessibility) #include "qwindowsuiatextrangeprovider.h" #include "qwindowsuiamainprovider.h" @@ -46,7 +46,7 @@ #include "qwindowscontext.h" #include <QtGui/qaccessible.h> -#include <QtCore/qdebug.h> +#include <QtCore/qloggingcategory.h> #include <QtCore/qstring.h> QT_BEGIN_NAMESPACE @@ -237,12 +237,12 @@ HRESULT QWindowsUiaTextRangeProvider::GetBoundingRectangles(SAFEARRAY **pRetVal) int endRange = qMin(end, m_endOffset); if (startRange < endRange) { // Calculates a bounding rectangle for the line and adds it to the list. - QRect startRect = textInterface->characterRect(startRange); - QRect endRect = textInterface->characterRect(endRange - 1); - QRect lineRect(qMin(startRect.x(), endRect.x()), - qMin(startRect.y(), endRect.y()), - qMax(startRect.x() + startRect.width(), endRect.x() + endRect.width()) - qMin(startRect.x(), endRect.x()), - qMax(startRect.y() + startRect.height(), endRect.y() + endRect.height()) - qMin(startRect.y(), endRect.y())); + const QRect startRect = textInterface->characterRect(startRange); + const QRect endRect = textInterface->characterRect(endRange - 1); + const QRect lineRect(qMin(startRect.x(), endRect.x()), + qMin(startRect.y(), endRect.y()), + qMax(startRect.x() + startRect.width(), endRect.x() + endRect.width()) - qMin(startRect.x(), endRect.x()), + qMax(startRect.y() + startRect.height(), endRect.y() + endRect.height()) - qMin(startRect.y(), endRect.y())); rectList.append(lineRect); } if (end >= len) break; @@ -518,9 +518,9 @@ HRESULT QWindowsUiaTextRangeProvider::Select() } // Not supported. -HRESULT QWindowsUiaTextRangeProvider::FindTextW(BSTR /* text */, BOOL /* backward */, - BOOL /* ignoreCase */, - ITextRangeProvider **pRetVal) +HRESULT QWindowsUiaTextRangeProvider::FindText(BSTR /* text */, BOOL /* backward */, + BOOL /* ignoreCase */, + ITextRangeProvider **pRetVal) { if (!pRetVal) return E_INVALIDARG; @@ -550,4 +550,4 @@ HRESULT QWindowsUiaTextRangeProvider::unselect() QT_END_NAMESPACE -#endif // QT_NO_ACCESSIBILITY +#endif // QT_CONFIG(accessibility) |