diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-02-22 16:58:38 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2016-02-26 08:24:38 +0000 |
commit | 4905bf06549ce33250b13e837d192e92bffffcdb (patch) | |
tree | 7cdac4b62a95096aca094842249725f41b595f62 /src/plugins/platforms/windows/accessible/comutils.h | |
parent | 403b7d4a21bba14bc059ad0c84a7614f221255e9 (diff) |
Windows Accessibility: Fix warnings as shown by Qt Creator's Clang based code model.
Introduce C++ casts and add some conversions. Where possible, increase
const-correctness. Remove trivial conversion function
BSTRToQString().
Task-number: QTBUG-50804
Change-Id: I1820d4693db8bc0dfa6c4a5fecd768cf64a4405c
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows/accessible/comutils.h')
-rw-r--r-- | src/plugins/platforms/windows/accessible/comutils.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/plugins/platforms/windows/accessible/comutils.h b/src/plugins/platforms/windows/accessible/comutils.h index 113d79d473..d5476aa6e8 100644 --- a/src/plugins/platforms/windows/accessible/comutils.h +++ b/src/plugins/platforms/windows/accessible/comutils.h @@ -47,14 +47,9 @@ class QVariant; // Originally QVariantToVARIANT copied from ActiveQt - renamed to avoid conflicts in static builds. bool QVariant2VARIANT(const QVariant &var, VARIANT &arg, const QByteArray &typeName, bool out); -inline QString BSTRToQString(const BSTR &bstr) -{ - return QString((QChar*)bstr); -} - inline BSTR QStringToBSTR(const QString &str) { - return SysAllocStringLen((OLECHAR*)str.unicode(), str.length()); + return SysAllocStringLen(reinterpret_cast<const OLECHAR *>(str.unicode()), UINT(str.length())); } QT_END_NAMESPACE |