diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-05-22 11:08:08 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-05-23 08:57:00 +0200 |
commit | af0574a7f73f8815f0f276d8727f4cae74a4110a (patch) | |
tree | fbfd0f1e84f58c2b9ed6d91088dac07306092df1 /src/designer/src/components | |
parent | fe5a157cbe37d2516ca69c92c4ec989ce77a25a2 (diff) | |
download | qttools-af0574a7f73f8815f0f276d8727f4cae74a4110a.tar.gz |
Fix deprecation warnings about deprecated container conversions
Fix warnings introduced by
qtbase/92f984273262531f909ede17a324f546fe502b5c.
Change-Id: Iaca85ad36591f7208f63305b885e7ff59c014a72
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/designer/src/components')
3 files changed, 6 insertions, 4 deletions
diff --git a/src/designer/src/components/formeditor/formwindow.cpp b/src/designer/src/components/formeditor/formwindow.cpp index 0ebb5b14a..9f988273a 100644 --- a/src/designer/src/components/formeditor/formwindow.cpp +++ b/src/designer/src/components/formeditor/formwindow.cpp @@ -713,7 +713,7 @@ bool FormWindow::handleMouseMoveEvent(QWidget *, QWidget *, QMouseEvent *e) widget_set.insert(current); } - sel = widget_set.toList(); + sel = widget_set.values(); QDesignerFormWindowCursorInterface *c = cursor(); QWidget *current = c->current(); if (sel.contains(current)) { diff --git a/src/designer/src/components/objectinspector/objectinspector.cpp b/src/designer/src/components/objectinspector/objectinspector.cpp index c74b2110f..f8a004e51 100644 --- a/src/designer/src/components/objectinspector/objectinspector.cpp +++ b/src/designer/src/components/objectinspector/objectinspector.cpp @@ -433,10 +433,11 @@ bool ObjectInspector::ObjectInspectorPrivate::selectObject(QObject *o) return false; QItemSelectionModel *selectionModel = m_treeView->selectionModel(); - const ModelIndexSet currentSelectedItems = selectionModel->selectedRows(0).toSet(); + const auto currentSelectedItemList = selectionModel->selectedRows(0); + const ModelIndexSet currentSelectedItems(currentSelectedItemList.cbegin(), currentSelectedItemList.cend()); // Change in selection? - if (!currentSelectedItems.empty() && currentSelectedItems == objectIndexes.toSet()) + if (!currentSelectedItems.empty() && currentSelectedItems == ModelIndexSet(objectIndexes.cbegin(), objectIndexes.cend())) return true; // do select and update diff --git a/src/designer/src/components/widgetbox/widgetboxtreewidget.cpp b/src/designer/src/components/widgetbox/widgetboxtreewidget.cpp index f12302ba1..9ee316e18 100644 --- a/src/designer/src/components/widgetbox/widgetboxtreewidget.cpp +++ b/src/designer/src/components/widgetbox/widgetboxtreewidget.cpp @@ -157,7 +157,8 @@ void WidgetBoxTreeWidget::restoreExpandedState() const QString groupKey = QLatin1String(widgetBoxSettingsGroupC) + QLatin1Char('/'); m_iconMode = settings->value(groupKey + QLatin1String(widgetBoxViewModeKeyC)).toBool(); updateViewMode(); - const StringSet closedCategories = settings->value(groupKey + QLatin1String(widgetBoxExpandedKeyC), QStringList()).toStringList().toSet(); + const auto &closedCategoryList = settings->value(groupKey + QLatin1String(widgetBoxExpandedKeyC), QStringList()).toStringList(); + const StringSet closedCategories(closedCategoryList.cbegin(), closedCategoryList.cend()); expandAll(); if (closedCategories.empty()) return; |