diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-08-21 08:53:02 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-08-21 10:07:15 +0000 |
commit | 5a96e491450446eb2a2696cc9a6bef311e84f0d9 (patch) | |
tree | 20b057564d4f464cdd5f6be589320a6b5862e630 /src | |
parent | 561acde140da7a06285f3acd71220d64e7a508c8 (diff) |
Windows QPA: Replace some ugly typedefs by auto.
Change-Id: I5fc6afe1e67dccb4fb7745edbbdf7d742b26d384
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsdrag.cpp | 6 | ||||
-rw-r--r-- | src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp | 4 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/plugins/platforms/windows/qwindowsdrag.cpp b/src/plugins/platforms/windows/qwindowsdrag.cpp index d24cba3c68..955f5792a9 100644 --- a/src/plugins/platforms/windows/qwindowsdrag.cpp +++ b/src/plugins/platforms/windows/qwindowsdrag.cpp @@ -239,8 +239,6 @@ private: }; typedef QMap<Qt::DropAction, CursorEntry> ActionCursorMap; - typedef ActionCursorMap::Iterator ActionCursorMapIt; - typedef ActionCursorMap::ConstIterator ActionCursorMapConstIt; const Mode m_mode; QWindowsDrag *m_drag; @@ -318,7 +316,7 @@ void QWindowsOleDropSource::createCursors() if (cursorPixmap.isNull()) cursorPixmap = m_drag->defaultCursor(action); const qint64 cacheKey = cursorPixmap.cacheKey(); - const ActionCursorMapIt it = m_cursors.find(action); + const auto it = m_cursors.find(action); if (it != m_cursors.end() && it.value().cacheKey == cacheKey) continue; if (cursorPixmap.isNull()) { @@ -447,7 +445,7 @@ QWindowsOleDropSource::GiveFeedback(DWORD dwEffect) m_drag->updateAction(action); const qint64 currentCacheKey = m_drag->currentDrag()->dragCursor(action).cacheKey(); - ActionCursorMapConstIt it = m_cursors.constFind(action); + auto it = m_cursors.constFind(action); // If a custom drag cursor is set, check its cache key to detect changes. if (it == m_cursors.constEnd() || (currentCacheKey && currentCacheKey != it.value().cacheKey)) { createCursors(); diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp index 795554698c..d827607bc5 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp +++ b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp @@ -145,10 +145,8 @@ static FontKeys &fontKeys() static const FontKey *findFontKey(const QString &name, int *indexIn = Q_NULLPTR) { - typedef FontKeys::ConstIterator ConstIt; - const FontKeys &keys = fontKeys(); - for (ConstIt it = keys.constBegin(), cend = keys.constEnd(); it != cend; ++it) { + for (auto it = keys.constBegin(), cend = keys.constEnd(); it != cend; ++it) { const int index = it->fontNames.indexOf(name); if (index >= 0) { if (indexIn) |