diff options
10 files changed, 19 insertions, 19 deletions
diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp index b7ab952a1d0..cdb4e407d18 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp @@ -466,14 +466,14 @@ inline void QWindowsFileDialogSharedData::setSelectedNameFilter(const QString &f  inline QList<QUrl> QWindowsFileDialogSharedData::selectedFiles() const  {      m_data->mutex.lock(); -    const QList<QUrl> result = m_data->selectedFiles; +    const auto result = m_data->selectedFiles;      m_data->mutex.unlock();      return result;  }  inline QString QWindowsFileDialogSharedData::selectedFile() const  { -    const QList<QUrl> files = selectedFiles(); +    const auto files = selectedFiles();      return files.isEmpty() ? QString() : files.front().toLocalFile();  } diff --git a/src/plugins/platforms/windows/qwindowsdropdataobject.cpp b/src/plugins/platforms/windows/qwindowsdropdataobject.cpp index e1a41c0ede9..c9dd1c7c177 100644 --- a/src/plugins/platforms/windows/qwindowsdropdataobject.cpp +++ b/src/plugins/platforms/windows/qwindowsdropdataobject.cpp @@ -95,7 +95,7 @@ bool QWindowsDropDataObject::shouldIgnore(LPFORMATETC pformatetc) const                  || pformatetc->cfFormat == CF_TEXT                  || formatName == QStringLiteral("UniformResourceLocator")                  || formatName == QStringLiteral("UniformResourceLocatorW")) { -            QList<QUrl> urls = dropData->urls(); +            const auto urls = dropData->urls();              return std::all_of(urls.cbegin(), urls.cend(), [] (const QUrl &u) { return u.isLocalFile(); });          }      } diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp index 4f0f8467494..05094032675 100644 --- a/src/plugins/platforms/windows/qwindowskeymapper.cpp +++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp @@ -1388,7 +1388,7 @@ QList<int> QWindowsKeyMapper::possibleKeys(const QKeyEvent *e) const          if (key && key != baseKey && ((keyMods & neededMods) == neededMods)) {              const Qt::KeyboardModifiers missingMods = keyMods & ~neededMods;              const int matchedKey = int(key) + missingMods; -            const QList<int>::iterator it = +            const auto it =                  std::find_if(result.begin(), result.end(),                               [key] (int k) { return (k & ~Qt::KeyboardModifierMask) == key; });              // QTBUG-67200: Use the match with the least modifiers (prefer diff --git a/src/plugins/platforms/windows/qwindowsmime.cpp b/src/plugins/platforms/windows/qwindowsmime.cpp index b9d8b191f54..1c6c999f056 100644 --- a/src/plugins/platforms/windows/qwindowsmime.cpp +++ b/src/plugins/platforms/windows/qwindowsmime.cpp @@ -107,7 +107,7 @@ static inline QByteArray msgConversionError(const char *func, const char *format      msg += ": Unable to convert DIB image. The image converter plugin for '";      msg += format;      msg += "' is not available. Available formats: "; -    const QList<QByteArray> &formats = QImageReader::supportedImageFormats(); +    const auto &formats = QImageReader::supportedImageFormats();      for (const QByteArray &af : formats) {          msg += af;          msg += ' '; @@ -747,7 +747,7 @@ QWindowsMimeURI::QWindowsMimeURI()  bool QWindowsMimeURI::canConvertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData) const  {      if (mimeData->hasUrls() && getCf(formatetc) == CF_HDROP) { -        const QList<QUrl> urls = mimeData->urls(); +        const auto urls = mimeData->urls();          for (const QUrl &url : urls) {              if (url.isLocalFile())                  return true; @@ -760,7 +760,7 @@ bool QWindowsMimeURI::convertFromMime(const FORMATETC &formatetc, const QMimeDat  {      if (canConvertFromMime(formatetc, mimeData)) {          if (getCf(formatetc) == CF_HDROP) { -            const QList<QUrl> &urls = mimeData->urls(); +            const auto &urls = mimeData->urls();              QStringList fileNames;              int size = sizeof(DROPFILES)+2;              for (const QUrl &url : urls) { @@ -791,7 +791,7 @@ bool QWindowsMimeURI::convertFromMime(const FORMATETC &formatetc, const QMimeDat              return setData(result, pmedium);          }          if (getCf(formatetc) == CF_INETURL_W) { -            QList<QUrl> urls = mimeData->urls(); +            const auto urls = mimeData->urls();              QByteArray result;              if (!urls.isEmpty()) {                  QString url = urls.at(0).toString(); @@ -803,7 +803,7 @@ bool QWindowsMimeURI::convertFromMime(const FORMATETC &formatetc, const QMimeDat              return setData(result, pmedium);          }          if (getCf(formatetc) == CF_INETURL) { -            QList<QUrl> urls = mimeData->urls(); +            const auto urls = mimeData->urls();              QByteArray result;              if (!urls.isEmpty())                  result = urls.at(0).toString().toLocal8Bit(); diff --git a/src/plugins/platforms/windows/qwindowsmime.h b/src/plugins/platforms/windows/qwindowsmime.h index 1c389e88006..f8708f12594 100644 --- a/src/plugins/platforms/windows/qwindowsmime.h +++ b/src/plugins/platforms/windows/qwindowsmime.h @@ -43,7 +43,6 @@  #include <QtCore/qt_windows.h>  #include <QtCore/qvector.h> -#include <QtCore/qlist.h>  #include <QtCore/qvariant.h>  QT_BEGIN_NAMESPACE @@ -95,7 +94,7 @@ public:  private:      void ensureInitialized() const; -    mutable QList<QWindowsMime *> m_mimes; +    mutable QVector<QWindowsMime *> m_mimes;      mutable int m_internalMimeCount = 0;  }; diff --git a/src/plugins/platforms/windows/qwindowsscreen.cpp b/src/plugins/platforms/windows/qwindowsscreen.cpp index df63adf5583..4f76a825445 100644 --- a/src/plugins/platforms/windows/qwindowsscreen.cpp +++ b/src/plugins/platforms/windows/qwindowsscreen.cpp @@ -73,7 +73,7 @@ static inline QDpi monitorDPI(HMONITOR hMonitor)      return {0, 0};  } -using WindowsScreenDataList = QList<QWindowsScreenData>; +using WindowsScreenDataList = QVector<QWindowsScreenData>;  static bool monitorData(HMONITOR hMonitor, QWindowsScreenData *data)  { @@ -467,7 +467,7 @@ bool QWindowsScreenManager::handleDisplayChange(WPARAM wParam, LPARAM lParam)      return false;  } -static inline int indexOfMonitor(const QList<QWindowsScreen *> &screens, +static inline int indexOfMonitor(const QWindowsScreenManager::WindowsScreenList &screens,                                   const QString &monitorName)  {      for (int i= 0; i < screens.size(); ++i) @@ -476,7 +476,7 @@ static inline int indexOfMonitor(const QList<QWindowsScreen *> &screens,      return -1;  } -static inline int indexOfMonitor(const QList<QWindowsScreenData> &screenData, +static inline int indexOfMonitor(const WindowsScreenDataList &screenData,                                   const QString &monitorName)  {      for (int i = 0; i < screenData.size(); ++i) diff --git a/src/plugins/platforms/windows/qwindowsscreen.h b/src/plugins/platforms/windows/qwindowsscreen.h index 2fd56f53cfc..5c095808f2d 100644 --- a/src/plugins/platforms/windows/qwindowsscreen.h +++ b/src/plugins/platforms/windows/qwindowsscreen.h @@ -127,7 +127,7 @@ private:  class QWindowsScreenManager  {  public: -    using WindowsScreenList = QList<QWindowsScreen *>; +    using WindowsScreenList = QVector<QWindowsScreen *>;      QWindowsScreenManager(); diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index ea91e3bb2db..5a4f879d0ff 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -592,7 +592,7 @@ static QPoint calcPosition(const QWindow *w, const QWindowCreationContextPtr &co          return posFrame;      // Find the original screen containing the coordinates. -    const QList<QScreen *> screens = screenForGL->virtualSiblings(); +    const auto screens = screenForGL->virtualSiblings();      const QScreen *orgScreen = nullptr;      for (QScreen *screen : screens) {          if (screen->handle()->availableGeometry().contains(posFrame)) { diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.cpp index 3305e9c5c47..fb41012cf49 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.cpp +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.cpp @@ -49,6 +49,7 @@  #include <QtCore/qloggingcategory.h>  #include <QtCore/qstring.h>  #include <QtCore/qlist.h> +#include <QtCore/qvector.h>  QT_BEGIN_NAMESPACE @@ -78,7 +79,7 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaSelectionProvider::GetSelection(SAFEARRAY *          return UIA_E_ELEMENTNOTAVAILABLE;      // First put selected items in a list, then build a safe array with the right size. -    QList<QAccessibleInterface *> selectedList; +    QVector<QAccessibleInterface *> selectedList;      for (int i = 0; i < accessible->childCount(); ++i) {          if (QAccessibleInterface *child = accessible->child(i)) {              if (child->state().selected) { diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.cpp index 2a94012590e..1348ec7cc0c 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.cpp +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.cpp @@ -80,7 +80,7 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaTableItemProvider::GetRowHeaderItems(SAFEAR      if (!tableCellInterface)          return UIA_E_ELEMENTNOTAVAILABLE; -    QList<QAccessibleInterface *> headers = tableCellInterface->rowHeaderCells(); +    const auto headers = tableCellInterface->rowHeaderCells();      if ((*pRetVal = SafeArrayCreateVector(VT_UNKNOWN, 0, headers.size()))) {          for (LONG i = 0; i < headers.size(); ++i) { @@ -110,7 +110,7 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaTableItemProvider::GetColumnHeaderItems(SAF      if (!tableCellInterface)          return UIA_E_ELEMENTNOTAVAILABLE; -    QList<QAccessibleInterface *> headers = tableCellInterface->columnHeaderCells(); +    const auto headers = tableCellInterface->columnHeaderCells();      if ((*pRetVal = SafeArrayCreateVector(VT_UNKNOWN, 0, headers.size()))) {          for (LONG i = 0; i < headers.size(); ++i) {  | 
