summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-04 10:11:24 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-05 10:26:13 +0200
commitf562ee4402c957d66f4a5ae5b39cd2679d0c4b24 (patch)
tree14869b9080d5569e1f3b23413bfab1710992b3f2
parent96b70c3a3e269c671f6ecae9c81a0cf7aad1f325 (diff)
downloadqttools-f562ee4402c957d66f4a5ae5b39cd2679d0c4b24.tar.gz
Qt Designer: Replace 'typedef' by 'using'
Apply Fixits by Qt Creator with some amendments (use Qt standard typedefs for QWidget/QObjectList and QOverload for slots). Change-Id: Icf0600d8e5381e83ae8037895c07a09d7e6b481a Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
-rw-r--r--src/designer/src/components/buddyeditor/buddyeditor.cpp2
-rw-r--r--src/designer/src/components/formeditor/default_actionprovider.h6
-rw-r--r--src/designer/src/components/formeditor/default_container.h10
-rw-r--r--src/designer/src/components/formeditor/dpi_chooser.cpp4
-rw-r--r--src/designer/src/components/formeditor/embeddedoptionspage.cpp6
-rw-r--r--src/designer/src/components/formeditor/formwindow.cpp6
-rw-r--r--src/designer/src/components/formeditor/formwindowcursor.cpp2
-rw-r--r--src/designer/src/components/formeditor/itemview_propertysheet.h6
-rw-r--r--src/designer/src/components/formeditor/line_propertysheet.h2
-rw-r--r--src/designer/src/components/formeditor/previewactiongroup.cpp4
-rw-r--r--src/designer/src/components/formeditor/qdesigner_resource.cpp2
-rw-r--r--src/designer/src/components/formeditor/qdesigner_resource.h2
-rw-r--r--src/designer/src/components/formeditor/qlayoutwidget_propertysheet.h2
-rw-r--r--src/designer/src/components/formeditor/qmainwindow_container.cpp2
-rw-r--r--src/designer/src/components/formeditor/qmainwindow_container.h2
-rw-r--r--src/designer/src/components/formeditor/qmdiarea_container.cpp2
-rw-r--r--src/designer/src/components/formeditor/qmdiarea_container.h4
-rw-r--r--src/designer/src/components/formeditor/qwizard_container.cpp4
-rw-r--r--src/designer/src/components/formeditor/qwizard_container.h6
-rw-r--r--src/designer/src/components/formeditor/spacer_propertysheet.h2
-rw-r--r--src/designer/src/components/objectinspector/objectinspector.cpp4
-rw-r--r--src/designer/src/components/objectinspector/objectinspectormodel.cpp8
-rw-r--r--src/designer/src/components/objectinspector/objectinspectormodel_p.h6
-rw-r--r--src/designer/src/components/propertyeditor/designerpropertymanager.h2
-rw-r--r--src/designer/src/components/propertyeditor/fontpropertymanager.h10
-rw-r--r--src/designer/src/components/propertyeditor/paletteeditor.cpp4
-rw-r--r--src/designer/src/components/signalsloteditor/connectdialog.cpp2
-rw-r--r--src/designer/src/components/signalsloteditor/signalslot_utils.cpp2
-rw-r--r--src/designer/src/components/signalsloteditor/signalslot_utils_p.h2
-rw-r--r--src/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp10
-rw-r--r--src/designer/src/components/taskmenu/button_taskmenu.cpp4
-rw-r--r--src/designer/src/components/taskmenu/button_taskmenu.h6
-rw-r--r--src/designer/src/components/taskmenu/inplace_widget_helper.cpp4
-rw-r--r--src/designer/src/components/taskmenu/label_taskmenu.h2
-rw-r--r--src/designer/src/components/taskmenu/layouttaskmenu.h4
-rw-r--r--src/designer/src/components/taskmenu/lineedit_taskmenu.h2
-rw-r--r--src/designer/src/components/taskmenu/listwidget_taskmenu.h2
-rw-r--r--src/designer/src/components/taskmenu/menutaskmenu.h4
-rw-r--r--src/designer/src/components/taskmenu/tablewidget_taskmenu.h2
-rw-r--r--src/designer/src/components/taskmenu/textedit_taskmenu.h4
-rw-r--r--src/designer/src/components/taskmenu/toolbar_taskmenu.h4
-rw-r--r--src/designer/src/components/widgetbox/widgetboxcategorylistview.cpp2
-rw-r--r--src/designer/src/components/widgetbox/widgetboxtreewidget.cpp2
-rw-r--r--src/designer/src/components/widgetbox/widgetboxtreewidget.h8
-rw-r--r--src/designer/src/designer/appfontdialog.cpp6
-rw-r--r--src/designer/src/designer/mainwindow.cpp2
-rw-r--r--src/designer/src/designer/mainwindow.h4
-rw-r--r--src/designer/src/designer/qdesigner_actions.cpp8
-rw-r--r--src/designer/src/designer/qdesigner_workbench.cpp2
-rw-r--r--src/designer/src/designer/qdesigner_workbench.h2
-rw-r--r--src/designer/src/designer/saveformastemplate.cpp4
-rw-r--r--src/designer/src/lib/extension/qextensionmanager.h2
-rw-r--r--src/designer/src/lib/sdk/abstractintegration.cpp4
-rw-r--r--src/designer/src/lib/sdk/abstractpromotioninterface.h2
-rw-r--r--src/designer/src/lib/sdk/abstractwidgetbox.h4
-rw-r--r--src/designer/src/lib/shared/actioneditor_p.h2
-rw-r--r--src/designer/src/lib/shared/actionrepository_p.h6
-rw-r--r--src/designer/src/lib/shared/connectionedit_p.h8
-rw-r--r--src/designer/src/lib/shared/formlayoutmenu.cpp5
-rw-r--r--src/designer/src/lib/shared/formlayoutmenu_p.h2
-rw-r--r--src/designer/src/lib/shared/formwindowbase.cpp2
-rw-r--r--src/designer/src/lib/shared/grid.cpp2
-rw-r--r--src/designer/src/lib/shared/layout.cpp2
-rw-r--r--src/designer/src/lib/shared/morphmenu.cpp2
-rw-r--r--src/designer/src/lib/shared/morphmenu_p.h2
-rw-r--r--src/designer/src/lib/shared/newformwidget.cpp6
-rw-r--r--src/designer/src/lib/shared/newformwidget_p.h6
-rw-r--r--src/designer/src/lib/shared/pluginmanager.cpp8
-rw-r--r--src/designer/src/lib/shared/pluginmanager_p.h2
-rw-r--r--src/designer/src/lib/shared/previewconfigurationwidget.cpp6
-rw-r--r--src/designer/src/lib/shared/previewmanager.cpp6
-rw-r--r--src/designer/src/lib/shared/promotionmodel.cpp4
-rw-r--r--src/designer/src/lib/shared/promotiontaskmenu_p.h4
-rw-r--r--src/designer/src/lib/shared/qdesigner_command.cpp4
-rw-r--r--src/designer/src/lib/shared/qdesigner_command_p.h18
-rw-r--r--src/designer/src/lib/shared/qdesigner_dnditem_p.h2
-rw-r--r--src/designer/src/lib/shared/qdesigner_formbuilder_p.h2
-rw-r--r--src/designer/src/lib/shared/qdesigner_formwindowcommand.cpp2
-rw-r--r--src/designer/src/lib/shared/qdesigner_introspection.cpp6
-rw-r--r--src/designer/src/lib/shared/qdesigner_introspection_p.h2
-rw-r--r--src/designer/src/lib/shared/qdesigner_membersheet.cpp5
-rw-r--r--src/designer/src/lib/shared/qdesigner_menubar.cpp2
-rw-r--r--src/designer/src/lib/shared/qdesigner_promotion.cpp6
-rw-r--r--src/designer/src/lib/shared/qdesigner_promotiondialog.cpp2
-rw-r--r--src/designer/src/lib/shared/qdesigner_propertycommand.cpp10
-rw-r--r--src/designer/src/lib/shared/qdesigner_propertycommand_p.h18
-rw-r--r--src/designer/src/lib/shared/qdesigner_propertyeditor.cpp4
-rw-r--r--src/designer/src/lib/shared/qdesigner_propertyeditor_p.h2
-rw-r--r--src/designer/src/lib/shared/qdesigner_propertysheet.cpp26
-rw-r--r--src/designer/src/lib/shared/qdesigner_stackedbox_p.h2
-rw-r--r--src/designer/src/lib/shared/qdesigner_tabwidget.cpp2
-rw-r--r--src/designer/src/lib/shared/qdesigner_tabwidget_p.h2
-rw-r--r--src/designer/src/lib/shared/qdesigner_taskmenu_p.h2
-rw-r--r--src/designer/src/lib/shared/qdesigner_toolbar.cpp2
-rw-r--r--src/designer/src/lib/shared/qdesigner_toolbox.cpp2
-rw-r--r--src/designer/src/lib/shared/qdesigner_toolbox_p.h2
-rw-r--r--src/designer/src/lib/shared/qdesigner_utils_p.h8
-rw-r--r--src/designer/src/lib/shared/qlayout_widget.cpp14
-rw-r--r--src/designer/src/lib/shared/qsimpleresource_p.h2
-rw-r--r--src/designer/src/lib/shared/qtresourcemodel.cpp2
-rw-r--r--src/designer/src/lib/shared/selectsignaldialog.cpp2
-rw-r--r--src/designer/src/lib/shared/shared_settings_p.h2
-rw-r--r--src/designer/src/lib/shared/widgetdatabase.cpp6
-rw-r--r--src/designer/src/lib/shared/widgetdatabase_p.h4
-rw-r--r--src/designer/src/lib/shared/widgetfactory_p.h4
-rw-r--r--src/designer/src/lib/shared/zoomwidget.cpp4
-rw-r--r--src/designer/src/lib/uilib/abstractformbuilder.cpp6
-rw-r--r--src/designer/src/lib/uilib/abstractformbuilder.h4
-rw-r--r--src/designer/src/lib/uilib/formbuilderextra_p.h10
-rw-r--r--src/designer/src/uitools/quiloader.cpp2
110 files changed, 229 insertions, 257 deletions
diff --git a/src/designer/src/components/buddyeditor/buddyeditor.cpp b/src/designer/src/components/buddyeditor/buddyeditor.cpp
index 8218fb43a..7593326db 100644
--- a/src/designer/src/components/buddyeditor/buddyeditor.cpp
+++ b/src/designer/src/components/buddyeditor/buddyeditor.cpp
@@ -83,7 +83,7 @@ static QString buddy(QLabel *label, QDesignerFormEditorInterface *core)
return sheet->property(prop_idx).toString();
}
-typedef QList<QLabel*> LabelList;
+using LabelList = QList<QLabel *>;
namespace qdesigner_internal {
diff --git a/src/designer/src/components/formeditor/default_actionprovider.h b/src/designer/src/components/formeditor/default_actionprovider.h
index 85619f33d..15e5683bd 100644
--- a/src/designer/src/components/formeditor/default_actionprovider.h
+++ b/src/designer/src/components/formeditor/default_actionprovider.h
@@ -107,9 +107,9 @@ private:
QMenu *m_widget;
};
-typedef ExtensionFactory<QDesignerActionProviderExtension, QToolBar, QToolBarActionProvider> QToolBarActionProviderFactory;
-typedef ExtensionFactory<QDesignerActionProviderExtension, QMenuBar, QMenuBarActionProvider> QMenuBarActionProviderFactory;
-typedef ExtensionFactory<QDesignerActionProviderExtension, QMenu, QMenuActionProvider> QMenuActionProviderFactory;
+using QToolBarActionProviderFactory = ExtensionFactory<QDesignerActionProviderExtension, QToolBar, QToolBarActionProvider>;
+using QMenuBarActionProviderFactory = ExtensionFactory<QDesignerActionProviderExtension, QMenuBar, QMenuBarActionProvider>;
+using QMenuActionProviderFactory = ExtensionFactory<QDesignerActionProviderExtension, QMenu, QMenuActionProvider>;
} // namespace qdesigner_internal
diff --git a/src/designer/src/components/formeditor/default_container.h b/src/designer/src/components/formeditor/default_container.h
index 337ddc445..f79fbd6e5 100644
--- a/src/designer/src/components/formeditor/default_container.h
+++ b/src/designer/src/components/formeditor/default_container.h
@@ -191,11 +191,11 @@ public:
explicit QDockWidgetContainer(QDockWidget *widget, QObject *parent = nullptr);
};
-typedef ExtensionFactory<QDesignerContainerExtension, QStackedWidget, QStackedWidgetContainer> QDesignerStackedWidgetContainerFactory;
-typedef ExtensionFactory<QDesignerContainerExtension, QTabWidget, QTabWidgetContainer> QDesignerTabWidgetContainerFactory;
-typedef ExtensionFactory<QDesignerContainerExtension, QToolBox, QToolBoxContainer> QDesignerToolBoxContainerFactory;
-typedef ExtensionFactory<QDesignerContainerExtension, QScrollArea, QScrollAreaContainer> QScrollAreaContainerFactory;
-typedef ExtensionFactory<QDesignerContainerExtension, QDockWidget, QDockWidgetContainer> QDockWidgetContainerFactory;
+using QDesignerStackedWidgetContainerFactory = ExtensionFactory<QDesignerContainerExtension, QStackedWidget, QStackedWidgetContainer>;
+using QDesignerTabWidgetContainerFactory = ExtensionFactory<QDesignerContainerExtension, QTabWidget, QTabWidgetContainer>;
+using QDesignerToolBoxContainerFactory = ExtensionFactory<QDesignerContainerExtension, QToolBox, QToolBoxContainer>;
+using QScrollAreaContainerFactory = ExtensionFactory<QDesignerContainerExtension, QScrollArea, QScrollAreaContainer>;
+using QDockWidgetContainerFactory = ExtensionFactory<QDesignerContainerExtension, QDockWidget, QDockWidgetContainer>;
} // namespace qdesigner_internal
QT_END_NAMESPACE
diff --git a/src/designer/src/components/formeditor/dpi_chooser.cpp b/src/designer/src/components/formeditor/dpi_chooser.cpp
index d20f2ef05..5e2f9f605 100644
--- a/src/designer/src/components/formeditor/dpi_chooser.cpp
+++ b/src/designer/src/components/formeditor/dpi_chooser.cpp
@@ -78,8 +78,6 @@ DPI_Chooser::DPI_Chooser(QWidget *parent) :
m_dpiXSpinBox(new QSpinBox),
m_dpiYSpinBox(new QSpinBox)
{
- typedef void (QComboBox::*QComboIntSignal)(int);
-
// Predefined settings: System
DeviceProfile::systemResolution(&(m_systemEntry->dpiX), &(m_systemEntry->dpiY));
m_systemEntry->description = nullptr;
@@ -96,7 +94,7 @@ DPI_Chooser::DPI_Chooser(QWidget *parent) :
setFocusProxy(m_predefinedCombo);
m_predefinedCombo->setEditable(false);
m_predefinedCombo->setCurrentIndex(0);
- connect(m_predefinedCombo, static_cast<QComboIntSignal>(&QComboBox::currentIndexChanged),
+ connect(m_predefinedCombo, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &DPI_Chooser::syncSpinBoxes);
// top row with predefined settings
QVBoxLayout *vBoxLayout = new QVBoxLayout;
diff --git a/src/designer/src/components/formeditor/embeddedoptionspage.cpp b/src/designer/src/components/formeditor/embeddedoptionspage.cpp
index 6f70c2872..96a6c7c4a 100644
--- a/src/designer/src/components/formeditor/embeddedoptionspage.cpp
+++ b/src/designer/src/components/formeditor/embeddedoptionspage.cpp
@@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
namespace qdesigner_internal {
-typedef QList<DeviceProfile> DeviceProfileList;
+using DeviceProfileList = QList<DeviceProfile>;
enum { profileComboIndexOffset = 1 };
@@ -137,8 +137,6 @@ EmbeddedOptionsControlPrivate::EmbeddedOptionsControlPrivate(QDesignerFormEditor
void EmbeddedOptionsControlPrivate::init(EmbeddedOptionsControl *q)
{
- typedef void (QComboBox::*QComboIntSignal)(int);
-
m_q = q;
QVBoxLayout *vLayout = new QVBoxLayout;
QHBoxLayout *hLayout = new QHBoxLayout;
@@ -146,7 +144,7 @@ void EmbeddedOptionsControlPrivate::init(EmbeddedOptionsControl *q)
m_profileCombo->setEditable(false);
hLayout->addWidget(m_profileCombo);
m_profileCombo->addItem(EmbeddedOptionsControl::tr("None"));
- EmbeddedOptionsControl::connect(m_profileCombo, static_cast<QComboIntSignal>(&QComboBox::currentIndexChanged),
+ EmbeddedOptionsControl::connect(m_profileCombo, QOverload<int>::of(&QComboBox::currentIndexChanged),
m_q, &EmbeddedOptionsControl::slotProfileIndexChanged);
m_addButton->setIcon(createIconSet(QString::fromUtf8("plus.png")));
diff --git a/src/designer/src/components/formeditor/formwindow.cpp b/src/designer/src/components/formeditor/formwindow.cpp
index 41035d722..464d7f618 100644
--- a/src/designer/src/components/formeditor/formwindow.cpp
+++ b/src/designer/src/components/formeditor/formwindow.cpp
@@ -162,7 +162,7 @@ public:
private:
- typedef QList<WidgetSelection *> SelectionPool;
+ using SelectionPool = QList<WidgetSelection *>;
SelectionPool m_selectionPool;
typedef QHash<QWidget *, WidgetSelection *> SelectionHash;
@@ -1137,7 +1137,7 @@ static QSet<QString> languageKeywords()
bool FormWindow::unify(QObject *w, QString &s, bool changeIt)
{
- typedef QSet<QString> StringSet;
+ using StringSet = QSet<QString>;
QWidget *main = mainContainer();
if (!main)
@@ -2413,7 +2413,7 @@ void FormWindow::simplifySelection(QWidgetList *sel) const
sel->push_back(mainC);
return;
}
- typedef QVector<QWidget *> WidgetVector;
+ using WidgetVector = QVector<QWidget *>;
WidgetVector toBeRemoved;
toBeRemoved.reserve(sel->size());
const QWidgetList::const_iterator scend = sel->constEnd();
diff --git a/src/designer/src/components/formeditor/formwindowcursor.cpp b/src/designer/src/components/formeditor/formwindowcursor.cpp
index 0e83de8e8..31dcdfebb 100644
--- a/src/designer/src/components/formeditor/formwindowcursor.cpp
+++ b/src/designer/src/components/formeditor/formwindowcursor.cpp
@@ -155,7 +155,7 @@ void FormWindowCursor::setProperty(const QString &name, const QVariant &value)
const int N = selectedWidgetCount();
Q_ASSERT(N);
- SetPropertyCommand::ObjectList selection;
+ QObjectList selection;
for (int i=0; i<N; ++i)
selection.push_back(selectedWidget(i));
diff --git a/src/designer/src/components/formeditor/itemview_propertysheet.h b/src/designer/src/components/formeditor/itemview_propertysheet.h
index c5cd1f410..5a72095d2 100644
--- a/src/designer/src/components/formeditor/itemview_propertysheet.h
+++ b/src/designer/src/components/formeditor/itemview_propertysheet.h
@@ -68,10 +68,8 @@ private:
ItemViewPropertySheetPrivate *d;
};
-typedef QDesignerPropertySheetFactory<QTreeView, ItemViewPropertySheet>
- QTreeViewPropertySheetFactory;
-typedef QDesignerPropertySheetFactory<QTableView, ItemViewPropertySheet>
- QTableViewPropertySheetFactory;
+using QTreeViewPropertySheetFactory = QDesignerPropertySheetFactory<QTreeView, ItemViewPropertySheet>;
+using QTableViewPropertySheetFactory = QDesignerPropertySheetFactory<QTableView, ItemViewPropertySheet>;
} // namespace qdesigner_internal
QT_END_NAMESPACE
diff --git a/src/designer/src/components/formeditor/line_propertysheet.h b/src/designer/src/components/formeditor/line_propertysheet.h
index ebd3960d7..6d0ef613a 100644
--- a/src/designer/src/components/formeditor/line_propertysheet.h
+++ b/src/designer/src/components/formeditor/line_propertysheet.h
@@ -50,7 +50,7 @@ public:
QString propertyGroup(int index) const override;
};
-typedef QDesignerPropertySheetFactory<Line, LinePropertySheet> LinePropertySheetFactory;
+using LinePropertySheetFactory = QDesignerPropertySheetFactory<Line, LinePropertySheet>;
} // namespace qdesigner_internal
QT_END_NAMESPACE
diff --git a/src/designer/src/components/formeditor/previewactiongroup.cpp b/src/designer/src/components/formeditor/previewactiongroup.cpp
index cc6e2dc1e..89c3a0ae7 100644
--- a/src/designer/src/components/formeditor/previewactiongroup.cpp
+++ b/src/designer/src/components/formeditor/previewactiongroup.cpp
@@ -91,8 +91,8 @@ PreviewActionGroup::PreviewActionGroup(QDesignerFormEditorInterface *core, QObje
void PreviewActionGroup::updateDeviceProfiles()
{
- typedef QList<DeviceProfile> DeviceProfileList;
- typedef QList<QAction *> ActionList;
+ using DeviceProfileList = QList<DeviceProfile>;
+ using ActionList = QList<QAction *>;
const QDesignerSharedSettings settings(m_core);
const DeviceProfileList profiles = settings.deviceProfiles();
diff --git a/src/designer/src/components/formeditor/qdesigner_resource.cpp b/src/designer/src/components/formeditor/qdesigner_resource.cpp
index 72ad5ab2a..bfb86ee33 100644
--- a/src/designer/src/components/formeditor/qdesigner_resource.cpp
+++ b/src/designer/src/components/formeditor/qdesigner_resource.cpp
@@ -108,7 +108,7 @@ Q_DECLARE_METATYPE(QWidgetList)
QT_BEGIN_NAMESPACE
namespace {
- typedef QList<DomProperty*> DomPropertyList;
+ using DomPropertyList = QList<DomProperty *>;
}
static const char *currentUiVersion = "4.0";
diff --git a/src/designer/src/components/formeditor/qdesigner_resource.h b/src/designer/src/components/formeditor/qdesigner_resource.h
index c0e925f87..d667f1372 100644
--- a/src/designer/src/components/formeditor/qdesigner_resource.h
+++ b/src/designer/src/components/formeditor/qdesigner_resource.h
@@ -145,7 +145,7 @@ private:
QStringList mergeWithLoadedPaths(const QStringList &paths) const;
void applyAttributesToPropertySheet(const DomWidget *ui_widget, QWidget *widget);
- typedef QList<DomCustomWidget*> DomCustomWidgetList;
+ using DomCustomWidgetList = QList<DomCustomWidget *>;
void addCustomWidgetsToWidgetDatabase(DomCustomWidgetList& list);
FormWindow *m_formWindow;
bool m_isMainWidget;
diff --git a/src/designer/src/components/formeditor/qlayoutwidget_propertysheet.h b/src/designer/src/components/formeditor/qlayoutwidget_propertysheet.h
index e50df88f4..f0a66787e 100644
--- a/src/designer/src/components/formeditor/qlayoutwidget_propertysheet.h
+++ b/src/designer/src/components/formeditor/qlayoutwidget_propertysheet.h
@@ -51,7 +51,7 @@ public:
bool dynamicPropertiesAllowed() const override;
};
-typedef QDesignerPropertySheetFactory<QLayoutWidget, QLayoutWidgetPropertySheet> QLayoutWidgetPropertySheetFactory;
+using QLayoutWidgetPropertySheetFactory = QDesignerPropertySheetFactory<QLayoutWidget, QLayoutWidgetPropertySheet>;
} // namespace qdesigner_internal
QT_END_NAMESPACE
diff --git a/src/designer/src/components/formeditor/qmainwindow_container.cpp b/src/designer/src/components/formeditor/qmainwindow_container.cpp
index cf0cbdaa1..180c38e79 100644
--- a/src/designer/src/components/formeditor/qmainwindow_container.cpp
+++ b/src/designer/src/components/formeditor/qmainwindow_container.cpp
@@ -74,7 +74,7 @@ void QMainWindowContainer::setCurrentIndex(int index)
namespace {
// Pair of <area,break_before>
- typedef QPair<Qt::ToolBarArea,bool> ToolBarData;
+ using ToolBarData = QPair<Qt::ToolBarArea,bool> ;
ToolBarData toolBarData(QToolBar *me) {
const QMainWindow *mw = qobject_cast<const QMainWindow*>(me->parentWidget());
diff --git a/src/designer/src/components/formeditor/qmainwindow_container.h b/src/designer/src/components/formeditor/qmainwindow_container.h
index 96991f411..9551d8ffa 100644
--- a/src/designer/src/components/formeditor/qmainwindow_container.h
+++ b/src/designer/src/components/formeditor/qmainwindow_container.h
@@ -60,7 +60,7 @@ private:
QWidgetList m_widgets;
};
-typedef ExtensionFactory<QDesignerContainerExtension, QMainWindow, QMainWindowContainer> QMainWindowContainerFactory;
+using QMainWindowContainerFactory = ExtensionFactory<QDesignerContainerExtension, QMainWindow, QMainWindowContainer>;
} // namespace qdesigner_internal
QT_END_NAMESPACE
diff --git a/src/designer/src/components/formeditor/qmdiarea_container.cpp b/src/designer/src/components/formeditor/qmdiarea_container.cpp
index 2726cfcee..e33c99367 100644
--- a/src/designer/src/components/formeditor/qmdiarea_container.cpp
+++ b/src/designer/src/components/formeditor/qmdiarea_container.cpp
@@ -142,7 +142,7 @@ QMdiAreaPropertySheet::QMdiAreaPropertySheet(QWidget *mdiArea, QObject *parent)
QMdiAreaPropertySheet::MdiAreaProperty QMdiAreaPropertySheet::mdiAreaProperty(const QString &name)
{
- typedef QHash<QString, MdiAreaProperty> MdiAreaPropertyHash;
+ using MdiAreaPropertyHash = QHash<QString, MdiAreaProperty>;
static MdiAreaPropertyHash mdiAreaPropertyHash;
if (mdiAreaPropertyHash.empty()) {
mdiAreaPropertyHash.insert(QLatin1String(subWindowNameC), MdiAreaSubWindowName);
diff --git a/src/designer/src/components/formeditor/qmdiarea_container.h b/src/designer/src/components/formeditor/qmdiarea_container.h
index 47669af3a..6bca44840 100644
--- a/src/designer/src/components/formeditor/qmdiarea_container.h
+++ b/src/designer/src/components/formeditor/qmdiarea_container.h
@@ -94,8 +94,8 @@ private:
// Factories
-typedef ExtensionFactory<QDesignerContainerExtension, QMdiArea, QMdiAreaContainer> QMdiAreaContainerFactory;
-typedef QDesignerPropertySheetFactory<QMdiArea, QMdiAreaPropertySheet> QMdiAreaPropertySheetFactory;
+using QMdiAreaContainerFactory = ExtensionFactory<QDesignerContainerExtension, QMdiArea, QMdiAreaContainer>;
+using QMdiAreaPropertySheetFactory = QDesignerPropertySheetFactory<QMdiArea, QMdiAreaPropertySheet>;
} // namespace qdesigner_internal
QT_END_NAMESPACE
diff --git a/src/designer/src/components/formeditor/qwizard_container.cpp b/src/designer/src/components/formeditor/qwizard_container.cpp
index 36e73c6ea..dbc7084eb 100644
--- a/src/designer/src/components/formeditor/qwizard_container.cpp
+++ b/src/designer/src/components/formeditor/qwizard_container.cpp
@@ -36,8 +36,8 @@
QT_BEGIN_NAMESPACE
-typedef QList<int> IdList;
-typedef QList<QWizardPage *> WizardPageList;
+using IdList = QList<int>;
+using WizardPageList = QList<QWizardPage *>;
namespace qdesigner_internal {
diff --git a/src/designer/src/components/formeditor/qwizard_container.h b/src/designer/src/components/formeditor/qwizard_container.h
index fe7cdbc2f..0c4241ea0 100644
--- a/src/designer/src/components/formeditor/qwizard_container.h
+++ b/src/designer/src/components/formeditor/qwizard_container.h
@@ -99,9 +99,9 @@ private:
};
// Factories
-typedef QDesignerPropertySheetFactory<QWizard, QWizardPropertySheet> QWizardPropertySheetFactory;
-typedef QDesignerPropertySheetFactory<QWizardPage, QWizardPagePropertySheet> QWizardPagePropertySheetFactory;
-typedef ExtensionFactory<QDesignerContainerExtension, QWizard, QWizardContainer> QWizardContainerFactory;
+using QWizardPropertySheetFactory = QDesignerPropertySheetFactory<QWizard, QWizardPropertySheet>;
+using QWizardPagePropertySheetFactory = QDesignerPropertySheetFactory<QWizardPage, QWizardPagePropertySheet>;
+using QWizardContainerFactory = ExtensionFactory<QDesignerContainerExtension, QWizard, QWizardContainer>;
} // namespace qdesigner_internal
QT_END_NAMESPACE
diff --git a/src/designer/src/components/formeditor/spacer_propertysheet.h b/src/designer/src/components/formeditor/spacer_propertysheet.h
index 05dfb7d32..a2b00dbdb 100644
--- a/src/designer/src/components/formeditor/spacer_propertysheet.h
+++ b/src/designer/src/components/formeditor/spacer_propertysheet.h
@@ -51,7 +51,7 @@ public:
bool dynamicPropertiesAllowed() const override;
};
-typedef QDesignerPropertySheetFactory<Spacer, SpacerPropertySheet> SpacerPropertySheetFactory;
+using SpacerPropertySheetFactory = QDesignerPropertySheetFactory<Spacer, SpacerPropertySheet>;
} // namespace qdesigner_internal
QT_END_NAMESPACE
diff --git a/src/designer/src/components/objectinspector/objectinspector.cpp b/src/designer/src/components/objectinspector/objectinspector.cpp
index 32e9bc987..4267fea22 100644
--- a/src/designer/src/components/objectinspector/objectinspector.cpp
+++ b/src/designer/src/components/objectinspector/objectinspector.cpp
@@ -90,7 +90,7 @@ namespace {
// A widget managed by the form window cursor
ManagedWidgetSelection };
- typedef QVector<QObject*> QObjectVector;
+ using QObjectVector = QVector<QObject *>;
}
static inline SelectionType selectionType(const QDesignerFormWindowInterface *fw, QObject *o)
@@ -421,7 +421,7 @@ bool ObjectInspector::ObjectInspectorPrivate::selectObject(QObject *o)
if (!m_core->metaDataBase()->item(o))
return false;
- typedef QSet<QModelIndex> ModelIndexSet;
+ using ModelIndexSet = QSet<QModelIndex>;
const QModelIndexList objectIndexes = indexesOf(o);
if (objectIndexes.empty())
diff --git a/src/designer/src/components/objectinspector/objectinspectormodel.cpp b/src/designer/src/components/objectinspector/objectinspectormodel.cpp
index 72b905ecf..6baf4bcdc 100644
--- a/src/designer/src/components/objectinspector/objectinspectormodel.cpp
+++ b/src/designer/src/components/objectinspector/objectinspectormodel.cpp
@@ -260,7 +260,7 @@ namespace qdesigner_internal {
setItemsDisplayData(row, icons, ClassNameChanged|ObjectNameChanged|ClassIconChanged|TypeChanged|LayoutTypeChanged);
}
- typedef QList<ObjectData> ObjectModel;
+ using ObjectModel = QList<ObjectData>;
// Recursive routine that creates the model by traversing the form window object tree.
void createModelRecursion(const QDesignerFormWindowInterface *fwi,
@@ -269,8 +269,8 @@ namespace qdesigner_internal {
ObjectModel &model,
const ModelRecursionContext &ctx)
{
- typedef QList<QButtonGroup *> ButtonGroupList;
- typedef QList<QAction *> ActionList;
+ using ButtonGroupList = QList<QButtonGroup *>;
+ using ActionList = QList<QAction *>;
// 1) Create entry
const ObjectData entry(parent, object, ctx);
@@ -442,7 +442,7 @@ namespace qdesigner_internal {
{
// Change text and icon. Keep a set of changed object
// as for example actions might occur several times in the tree.
- typedef QSet<QObject *> QObjectSet;
+ using QObjectSet = QSet<QObject *>;
QObjectSet changedObjects;
diff --git a/src/designer/src/components/objectinspector/objectinspectormodel_p.h b/src/designer/src/components/objectinspector/objectinspectormodel_p.h
index 5a4593e6c..f138253a5 100644
--- a/src/designer/src/components/objectinspector/objectinspectormodel_p.h
+++ b/src/designer/src/components/objectinspector/objectinspectormodel_p.h
@@ -75,7 +75,7 @@ namespace qdesigner_internal {
ExtensionContainer // QTabWidget and the like, container extension
};
- typedef QList<QStandardItem *> StandardItemList;
+ using StandardItemList = QList<QStandardItem *>;
explicit ObjectData(QObject *parent, QObject *object, const ModelRecursionContext &ctx);
ObjectData();
@@ -114,13 +114,13 @@ namespace qdesigner_internal {
inline bool operator==(const ObjectData &e1, const ObjectData &e2) { return e1.equals(e2); }
inline bool operator!=(const ObjectData &e1, const ObjectData &e2) { return !e1.equals(e2); }
- typedef QList<ObjectData> ObjectModel;
+ using ObjectModel = QList<ObjectData>;
// QStandardItemModel for ObjectInspector. Uses ObjectData/ObjectModel
// internally for its updates.
class ObjectInspectorModel : public QStandardItemModel {
public:
- typedef QList<QStandardItem *> StandardItemList;
+ using StandardItemList = QList<QStandardItem *>;
enum { ObjectNameColumn, ClassNameColumn, NumColumns };
explicit ObjectInspectorModel(QObject *parent);
diff --git a/src/designer/src/components/propertyeditor/designerpropertymanager.h b/src/designer/src/components/propertyeditor/designerpropertymanager.h
index ee3652c69..8fa974117 100644
--- a/src/designer/src/components/propertyeditor/designerpropertymanager.h
+++ b/src/designer/src/components/propertyeditor/designerpropertymanager.h
@@ -44,7 +44,7 @@
QT_BEGIN_NAMESPACE
typedef QPair<QString, uint> DesignerIntPair;
-typedef QList<DesignerIntPair> DesignerFlagList;
+using DesignerFlagList = QList<DesignerIntPair>;
class QDesignerFormEditorInterface;
class QLineEdit;
diff --git a/src/designer/src/components/propertyeditor/fontpropertymanager.h b/src/designer/src/components/propertyeditor/fontpropertymanager.h
index 13d0e52c7..1041cd357 100644
--- a/src/designer/src/components/propertyeditor/fontpropertymanager.h
+++ b/src/designer/src/components/propertyeditor/fontpropertymanager.h
@@ -55,8 +55,8 @@ class FontPropertyManager {
public:
FontPropertyManager();
- typedef QMap<QtProperty *, bool> ResetMap;
- typedef QMap<QString, QString> NameMap;
+ using ResetMap = QMap<QtProperty *, bool>;
+ using NameMap = QMap<QString, QString>;
// Call before QtVariantPropertyManager::initializeProperty.
void preInitializeProperty(QtProperty *property, int type, ResetMap &resetMap);
@@ -80,9 +80,9 @@ public:
static bool readFamilyMapping(NameMap *rc, QString *errorMessage);
private:
- typedef QMap<QtProperty *, QtProperty *> PropertyToPropertyMap;
- typedef QList<QtProperty *> PropertyList;
- typedef QMap<QtProperty *, PropertyList> PropertyToSubPropertiesMap;
+ using PropertyToPropertyMap = QMap<QtProperty *, QtProperty *>;
+ using PropertyList = QList<QtProperty *>;
+ using PropertyToSubPropertiesMap = QMap<QtProperty *, PropertyList>;
void removeAntialiasingProperty(QtProperty *);
void updateModifiedState(QtProperty *property, const QVariant &value);
diff --git a/src/designer/src/components/propertyeditor/paletteeditor.cpp b/src/designer/src/components/propertyeditor/paletteeditor.cpp
index 89a3a4a19..4bb1bf450 100644
--- a/src/designer/src/components/propertyeditor/paletteeditor.cpp
+++ b/src/designer/src/components/propertyeditor/paletteeditor.cpp
@@ -500,10 +500,8 @@ QWidget *ColorDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem
//editor->installEventFilter(const_cast<ColorDelegate *>(this));
ed = editor;
} else {
- typedef void (BrushEditor::*BrushEditorWidgetSignal)(QWidget *);
-
BrushEditor *editor = new BrushEditor(m_core, parent);
- connect(editor, static_cast<BrushEditorWidgetSignal>(&BrushEditor::changed),
+ connect(editor, QOverload<QWidget *>::of(&BrushEditor::changed),
this, &ColorDelegate::commitData);
editor->setFocusPolicy(Qt::NoFocus);
editor->installEventFilter(const_cast<ColorDelegate *>(this));
diff --git a/src/designer/src/components/signalsloteditor/connectdialog.cpp b/src/designer/src/components/signalsloteditor/connectdialog.cpp
index 34c7d9e68..571ddba12 100644
--- a/src/designer/src/components/signalsloteditor/connectdialog.cpp
+++ b/src/designer/src/components/signalsloteditor/connectdialog.cpp
@@ -43,7 +43,7 @@
QT_BEGIN_NAMESPACE
namespace {
- typedef QList<QListWidgetItem*> ListWidgetItems;
+ using ListWidgetItems = QList<QListWidgetItem *>;
}
static QString realClassName(QDesignerFormEditorInterface *core, QWidget *widget)
diff --git a/src/designer/src/components/signalsloteditor/signalslot_utils.cpp b/src/designer/src/components/signalsloteditor/signalslot_utils.cpp
index 72cd292b8..f913b5bdf 100644
--- a/src/designer/src/components/signalsloteditor/signalslot_utils.cpp
+++ b/src/designer/src/components/signalsloteditor/signalslot_utils.cpp
@@ -42,7 +42,7 @@
QT_BEGIN_NAMESPACE
-typedef QPair<QString, QString> ClassNameSignaturePair;
+using ClassNameSignaturePair = QPair<QString, QString>;
// Find all member functions that match a predicate on the signature string
// using the member sheet and the fake methods stored in the widget
diff --git a/src/designer/src/components/signalsloteditor/signalslot_utils_p.h b/src/designer/src/components/signalsloteditor/signalslot_utils_p.h
index 7fb6166d5..acc240a43 100644
--- a/src/designer/src/components/signalsloteditor/signalslot_utils_p.h
+++ b/src/designer/src/components/signalsloteditor/signalslot_utils_p.h
@@ -71,7 +71,7 @@ struct ClassMemberFunctions
QStringList m_memberList;
};
-typedef QList<ClassMemberFunctions> ClassesMemberFunctions;
+using ClassesMemberFunctions = QList<ClassMemberFunctions>;
// Return classes and members in reverse class order to
// populate of the combo of the ToolWindow.
diff --git a/src/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp b/src/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
index 2ec519261..f44c3cd5a 100644
--- a/src/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
+++ b/src/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
@@ -65,8 +65,6 @@
QT_BEGIN_NAMESPACE
-typedef void (QComboBox::*QComboIntSignal)(int);
-
// Add suitable form widgets to a list of objects for the signal slot
// editor. Prevent special widgets from showing up there.
static void addWidgetToObjectList(const QWidget *w, QStringList &r)
@@ -81,8 +79,8 @@ static void addWidgetToObjectList(const QWidget *w, QStringList &r)
static QStringList objectNameList(QDesignerFormWindowInterface *form)
{
- typedef QList<QAction*> ActionList;
- typedef QList<QButtonGroup *> ButtonGroupList;
+ using ActionList = QList<QAction *>;
+ using ButtonGroupList = QList<QButtonGroup *>;
QStringList result;
@@ -519,7 +517,7 @@ InlineEditor::InlineEditor(QWidget *parent) :
setModel(m_model = new InlineEditorModel(0, 4, this));
setFrame(false);
m_idx = -1;
- connect(this, static_cast<QComboIntSignal>(&QComboBox::activated),
+ connect(this, QOverload<int>::of(&QComboBox::activated),
this, &InlineEditor::checkSelection);
}
@@ -657,7 +655,7 @@ QWidget *ConnectionDelegate::createEditor(QWidget *parent,
break;
}
- connect(inline_editor, static_cast<QComboIntSignal>(&QComboBox::activated),
+ connect(inline_editor, QOverload<int>::of(&QComboBox::activated),
this, &ConnectionDelegate::emitCommitData);
return inline_editor;
diff --git a/src/designer/src/components/taskmenu/button_taskmenu.cpp b/src/designer/src/components/taskmenu/button_taskmenu.cpp
index b9860f67b..5791c6991 100644
--- a/src/designer/src/components/taskmenu/button_taskmenu.cpp
+++ b/src/designer/src/components/taskmenu/button_taskmenu.cpp
@@ -56,8 +56,8 @@ namespace qdesigner_internal {
enum { debugButtonMenu = 0 };
-typedef QList<QAbstractButton *> ButtonList;
-typedef QList<QButtonGroup *> ButtonGroupList;
+using ButtonList = QList<QAbstractButton *>;
+using ButtonGroupList = QList<QButtonGroup *>;
// ButtonGroupCommand: Base for commands handling button groups and button lists
// addButtonsToGroup() and removeButtonsFromGroup() are low-level helpers for
diff --git a/src/designer/src/components/taskmenu/button_taskmenu.h b/src/designer/src/components/taskmenu/button_taskmenu.h
index 994cf3dd7..ab58c0630 100644
--- a/src/designer/src/components/taskmenu/button_taskmenu.h
+++ b/src/designer/src/components/taskmenu/button_taskmenu.h
@@ -147,9 +147,9 @@ public:
explicit CommandLinkButtonTaskMenu(QCommandLinkButton *button, QObject *parent = nullptr);
};
-typedef ExtensionFactory<QDesignerTaskMenuExtension, QButtonGroup, ButtonGroupTaskMenu> ButtonGroupTaskMenuFactory;
-typedef ExtensionFactory<QDesignerTaskMenuExtension, QCommandLinkButton, CommandLinkButtonTaskMenu> CommandLinkButtonTaskMenuFactory;
-typedef ExtensionFactory<QDesignerTaskMenuExtension, QAbstractButton, ButtonTaskMenu> ButtonTaskMenuFactory;
+using ButtonGroupTaskMenuFactory = ExtensionFactory<QDesignerTaskMenuExtension, QButtonGroup, ButtonGroupTaskMenu>;
+using CommandLinkButtonTaskMenuFactory = ExtensionFactory<QDesignerTaskMenuExtension, QCommandLinkButton, CommandLinkButtonTaskMenu>;
+using ButtonTaskMenuFactory = ExtensionFactory<QDesignerTaskMenuExtension, QAbstractButton, ButtonTaskMenu>;
} // namespace qdesigner_internal
QT_END_NAMESPACE
diff --git a/src/designer/src/components/taskmenu/inplace_widget_helper.cpp b/src/designer/src/components/taskmenu/inplace_widget_helper.cpp
index d96fd915b..44145bdba 100644
--- a/src/designer/src/components/taskmenu/inplace_widget_helper.cpp
+++ b/src/designer/src/components/taskmenu/inplace_widget_helper.cpp
@@ -43,14 +43,12 @@ namespace qdesigner_internal {
m_parentWidget(parentWidget),
m_noChildEvent(m_parentWidget->testAttribute(Qt::WA_NoChildEventsForParent))
{
- typedef void (QWidget::*QWidgetVoidSlot)();
-
m_editorWidget->setAttribute(Qt::WA_DeleteOnClose);
m_editorWidget->setParent(m_parentWidget->window());
m_parentWidget->installEventFilter(this);
m_editorWidget->installEventFilter(this);
connect(m_editorWidget, &QObject::destroyed,
- fw->mainContainer(), static_cast<QWidgetVoidSlot>(&QWidget::setFocus));
+ fw->mainContainer(), QOverload<>::of(&QWidget::setFocus));
}
InPlaceWidgetHelper::~InPlaceWidgetHelper()
diff --git a/src/designer/src/components/taskmenu/label_taskmenu.h b/src/designer/src/components/taskmenu/label_taskmenu.h
index a47cc7e6b..a1744b583 100644
--- a/src/designer/src/components/taskmenu/label_taskmenu.h
+++ b/src/designer/src/components/taskmenu/label_taskmenu.h
@@ -60,7 +60,7 @@ private:
QAction *m_editPlainTextAction;
};
-typedef ExtensionFactory<QDesignerTaskMenuExtension, QLabel, LabelTaskMenu> LabelTaskMenuFactory;
+using LabelTaskMenuFactory = ExtensionFactory<QDesignerTaskMenuExtension, QLabel, LabelTaskMenu>;
} // namespace qdesigner_internal
QT_END_NAMESPACE
diff --git a/src/designer/src/components/taskmenu/layouttaskmenu.h b/src/designer/src/components/taskmenu/layouttaskmenu.h
index f7ccc2c73..afd1afe0f 100644
--- a/src/designer/src/components/taskmenu/layouttaskmenu.h
+++ b/src/designer/src/components/taskmenu/layouttaskmenu.h
@@ -72,8 +72,8 @@ public:
};
-typedef qdesigner_internal::ExtensionFactory<QDesignerTaskMenuExtension, QLayoutWidget, LayoutWidgetTaskMenu> LayoutWidgetTaskMenuFactory;
-typedef qdesigner_internal::ExtensionFactory<QDesignerTaskMenuExtension, Spacer, SpacerTaskMenu> SpacerTaskMenuFactory;
+using LayoutWidgetTaskMenuFactory = qdesigner_internal::ExtensionFactory<QDesignerTaskMenuExtension, QLayoutWidget, LayoutWidgetTaskMenu>;
+using SpacerTaskMenuFactory = qdesigner_internal::ExtensionFactory<QDesignerTaskMenuExtension, Spacer, SpacerTaskMenu>;
QT_END_NAMESPACE
diff --git a/src/designer/src/components/taskmenu/lineedit_taskmenu.h b/src/designer/src/components/taskmenu/lineedit_taskmenu.h
index fb7aae81f..e28ab7336 100644
--- a/src/designer/src/components/taskmenu/lineedit_taskmenu.h
+++ b/src/designer/src/components/taskmenu/lineedit_taskmenu.h
@@ -53,7 +53,7 @@ private:
QAction *m_editTextAction;
};
-typedef ExtensionFactory<QDesignerTaskMenuExtension, QLineEdit, LineEditTaskMenu> LineEditTaskMenuFactory;
+using LineEditTaskMenuFactory = ExtensionFactory<QDesignerTaskMenuExtension, QLineEdit, LineEditTaskMenu>;
} // namespace qdesigner_internal
QT_END_NAMESPACE
diff --git a/src/designer/src/components/taskmenu/listwidget_taskmenu.h b/src/designer/src/components/taskmenu/listwidget_taskmenu.h
index 799710f11..63708be61 100644
--- a/src/designer/src/components/taskmenu/listwidget_taskmenu.h
+++ b/src/designer/src/components/taskmenu/listwidget_taskmenu.h
@@ -64,7 +64,7 @@ private:
QAction *m_editItemsAction;
};
-typedef ExtensionFactory<QDesignerTaskMenuExtension, QListWidget, ListWidgetTaskMenu> ListWidgetTaskMenuFactory;
+using ListWidgetTaskMenuFactory = ExtensionFactory<QDesignerTaskMenuExtension, QListWidget, ListWidgetTaskMenu>;
} // namespace qdesigner_internal
QT_END_NAMESPACE
diff --git a/src/designer/src/components/taskmenu/menutaskmenu.h b/src/designer/src/components/taskmenu/menutaskmenu.h
index fa272f515..935836896 100644
--- a/src/designer/src/components/taskmenu/menutaskmenu.h
+++ b/src/designer/src/components/taskmenu/menutaskmenu.h
@@ -83,8 +83,8 @@ private:
QDesignerMenuBar *m_bar;
};
-typedef ExtensionFactory<QDesignerTaskMenuExtension, QDesignerMenu, MenuTaskMenu> MenuTaskMenuFactory;
-typedef ExtensionFactory<QDesignerTaskMenuExtension, QDesignerMenuBar, MenuBarTaskMenu> MenuBarTaskMenuFactory;
+using MenuTaskMenuFactory = ExtensionFactory<QDesignerTaskMenuExtension, QDesignerMenu, MenuTaskMenu>;
+using MenuBarTaskMenuFactory = ExtensionFactory<QDesignerTaskMenuExtension, QDesignerMenuBar, MenuBarTaskMenu>;
} // namespace qdesigner_internal
diff --git a/src/designer/src/components/taskmenu/tablewidget_taskmenu.h b/src/designer/src/components/taskmenu/tablewidget_taskmenu.h
index 1d76ad5f9..b4d5462f2 100644
--- a/src/designer/src/components/taskmenu/tablewidget_taskmenu.h
+++ b/src/designer/src/components/taskmenu/tablewidget_taskmenu.h
@@ -64,7 +64,7 @@ private:
QAction *m_editItemsAction;
};
-typedef ExtensionFactory<QDesignerTaskMenuExtension, QTableWidget, TableWidgetTaskMenu> TableWidgetTaskMenuFactory;
+using TableWidgetTaskMenuFactory = ExtensionFactory<QDesignerTaskMenuExtension, QTableWidget, TableWidgetTaskMenu>;
} // namespace qdesigner_internal
QT_END_NAMESPACE
diff --git a/src/designer/src/components/taskmenu/textedit_taskmenu.h b/src/designer/src/components/taskmenu/textedit_taskmenu.h
index fdc206be9..2e50b8ca1 100644
--- a/src/designer/src/components/taskmenu/textedit_taskmenu.h
+++ b/src/designer/src/components/taskmenu/textedit_taskmenu.h
@@ -67,8 +67,8 @@ private:
QAction *m_editTextAction;
};
-typedef ExtensionFactory<QDesignerTaskMenuExtension, QTextEdit, TextEditTaskMenu> TextEditTaskMenuFactory;
-typedef ExtensionFactory<QDesignerTaskMenuExtension, QPlainTextEdit, TextEditTaskMenu> PlainTextEditTaskMenuFactory;
+using TextEditTaskMenuFactory = ExtensionFactory<QDesignerTaskMenuExtension, QTextEdit, TextEditTaskMenu>;
+using PlainTextEditTaskMenuFactory = ExtensionFactory<QDesignerTaskMenuExtension, QPlainTextEdit, TextEditTaskMenu>;
} // namespace qdesigner_internal
QT_END_NAMESPACE
diff --git a/src/designer/src/components/taskmenu/toolbar_taskmenu.h b/src/designer/src/components/taskmenu/toolbar_taskmenu.h
index e81997f5e..3e8d5909b 100644
--- a/src/designer/src/components/taskmenu/toolbar_taskmenu.h
+++ b/src/designer/src/components/taskmenu/toolbar_taskmenu.h
@@ -76,8 +76,8 @@ private:
PromotionTaskMenu *m_promotionTaskMenu;
};
-typedef ExtensionFactory<QDesignerTaskMenuExtension, QToolBar, ToolBarTaskMenu> ToolBarTaskMenuFactory;
-typedef ExtensionFactory<QDesignerTaskMenuExtension, QStatusBar, StatusBarTaskMenu> StatusBarTaskMenuFactory;
+using ToolBarTaskMenuFactory = ExtensionFactory<QDesignerTaskMenuExtension, QToolBar, ToolBarTaskMenu>;
+using StatusBarTaskMenuFactory = ExtensionFactory<QDesignerTaskMenuExtension, QStatusBar, StatusBarTaskMenu>;
} // namespace qdesigner_internal
diff --git a/src/designer/src/components/widgetbox/widgetboxcategorylistview.cpp b/src/designer/src/components/widgetbox/widgetboxcategorylistview.cpp
index f103cb006..5b00ea68f 100644
--- a/src/designer/src/components/widgetbox/widgetboxcategorylistview.cpp
+++ b/src/designer/src/components/widgetbox/widgetboxcategorylistview.cpp
@@ -129,7 +129,7 @@ public:
bool removeCustomWidgets();
private:
- typedef QList<WidgetBoxCategoryEntry> WidgetBoxCategoryEntrys;
+ using WidgetBoxCategoryEntrys = QList<WidgetBoxCategoryEntry>;
QDesignerFormEditorInterface *m_core;
WidgetBoxCategoryEntrys m_items;
diff --git a/src/designer/src/components/widgetbox/widgetboxtreewidget.cpp b/src/designer/src/components/widgetbox/widgetboxtreewidget.cpp
index df59c392c..dd17b3a4e 100644
--- a/src/designer/src/components/widgetbox/widgetboxtreewidget.cpp
+++ b/src/designer/src/components/widgetbox/widgetboxtreewidget.cpp
@@ -152,7 +152,7 @@ void WidgetBoxTreeWidget::saveExpandedState() const
void WidgetBoxTreeWidget::restoreExpandedState()
{
- typedef QSet<QString> StringSet;
+ using StringSet = QSet<QString>;
QDesignerSettingsInterface *settings = m_core->settingsManager();
const QString groupKey = QLatin1String(widgetBoxSettingsGroupC) + QLatin1Char('/');
m_iconMode = settings->value(groupKey + QLatin1String(widgetBoxViewModeKeyC)).toBool();
diff --git a/src/designer/src/components/widgetbox/widgetboxtreewidget.h b/src/designer/src/components/widgetbox/widgetboxtreewidget.h
index a770a19e7..99d15314f 100644
--- a/src/designer/src/components/widgetbox/widgetboxtreewidget.h
+++ b/src/designer/src/components/widgetbox/widgetboxtreewidget.h
@@ -55,9 +55,9 @@ class WidgetBoxTreeWidget : public QTreeWidget
Q_OBJECT
public:
- typedef QDesignerWidgetBoxInterface::Widget Widget;
- typedef QDesignerWidgetBoxInterface::Category Category;
- typedef QDesignerWidgetBoxInterface::CategoryList CategoryList;
+ using Widget = QDesignerWidgetBoxInterface::Widget;
+ using Category = QDesignerWidgetBoxInterface::Category;
+ using CategoryList = QDesignerWidgetBoxInterface::CategoryList;
explicit WidgetBoxTreeWidget(QDesignerFormEditorInterface *core, QWidget *parent = nullptr);
~WidgetBoxTreeWidget();
@@ -123,7 +123,7 @@ private:
QDesignerFormEditorInterface *m_core;
QString m_file_name;
- typedef QHash<QString, QIcon> IconCache;
+ using IconCache = QHash<QString, QIcon>;
mutable IconCache m_pluginIcons;
bool m_iconMode;
QTimer *m_scratchPadDeleteTimer;
diff --git a/src/designer/src/designer/appfontdialog.cpp b/src/designer/src/designer/appfontdialog.cpp
index e8df6efe8..c7608acad 100644
--- a/src/designer/src/designer/appfontdialog.cpp
+++ b/src/designer/src/designer/appfontdialog.cpp
@@ -81,8 +81,8 @@ public:
bool removeAt(int index, QString *errorMessage);
// Store loaded fonts as pair of file name and Id
- typedef QPair<QString,int> FileNameFontIdPair;
- typedef QList<FileNameFontIdPair> FileNameFontIdPairs;
+ using FileNameFontIdPair = QPair<QString,int>;
+ using FileNameFontIdPairs = QList<FileNameFontIdPair>;
const FileNameFontIdPairs &fonts() const;
private:
@@ -230,7 +230,7 @@ AppFontModel::AppFontModel(QObject * parent) :
void AppFontModel::init(const AppFontManager &mgr)
{
- typedef AppFontManager::FileNameFontIdPairs FileNameFontIdPairs;
+ using FileNameFontIdPairs = AppFontManager::FileNameFontIdPairs;
const FileNameFontIdPairs &fonts = mgr.fonts();
const FileNameFontIdPairs::const_iterator cend = fonts.constEnd();
diff --git a/src/designer/src/designer/mainwindow.cpp b/src/designer/src/designer/mainwindow.cpp
index d856e396e..3a1ae3ce9 100644
--- a/src/designer/src/designer/mainwindow.cpp
+++ b/src/designer/src/designer/mainwindow.cpp
@@ -56,7 +56,7 @@ static const char *uriListMimeFormatC = "text/uri-list";
QT_BEGIN_NAMESPACE
-typedef QList<QAction *> ActionList;
+using ActionList = QList<QAction *>;
// Helpers for creating toolbars and menu
diff --git a/src/designer/src/designer/mainwindow.h b/src/designer/src/designer/mainwindow.h
index f080b7c90..3bbfbb7fd 100644
--- a/src/designer/src/designer/mainwindow.h
+++ b/src/designer/src/designer/mainwindow.h
@@ -141,8 +141,8 @@ class DockedMainWindow : public MainWindowBase {
Q_OBJECT
Q_DISABLE_COPY_MOVE(DockedMainWindow)
public:
- typedef QVector<QDesignerToolWindow *> DesignerToolWindowList;
- typedef QVector<QDockWidget *> DockWidgetList;
+ using DesignerToolWindowList = QVector<QDesignerToolWindow *>;
+ using DockWidgetList = QVector<QDockWidget *>;
explicit DockedMainWindow(QDesignerWorkbench *wb,
QMenu *toolBarMenu,
diff --git a/src/designer/src/designer/qdesigner_actions.cpp b/src/designer/src/designer/qdesigner_actions.cpp
index 5ac2c565c..970599f14 100644
--- a/src/designer/src/designer/qdesigner_actions.cpp
+++ b/src/designer/src/designer/qdesigner_actions.cpp
@@ -194,8 +194,6 @@ QDesignerActions::QDesignerActions(QDesignerWorkbench *workbench)
m_preferencesAction(new QAction(tr("Preferences..."), this)),
m_appFontAction(new QAction(tr("Additional Fonts..."), this))
{
- typedef void (QDesignerActions::*VoidSlot)();
-
#if defined (Q_OS_UNIX) && !defined(Q_OS_MACOS)
m_newFormAction->setIcon(QIcon::fromTheme(QStringLiteral("document-new"), m_newFormAction->icon()));
m_openFormAction->setIcon(QIcon::fromTheme(QStringLiteral("document-open"), m_openFormAction->icon()));
@@ -255,10 +253,12 @@ QDesignerActions::QDesignerActions(QDesignerWorkbench *workbench)
m_fileActions->addAction(createSeparator(this));
m_saveFormAction->setShortcut(QKeySequence::Save);
- connect(m_saveFormAction, &QAction::triggered, this, static_cast<VoidSlot>(&QDesignerActions::saveForm));
+ connect(m_saveFormAction, &QAction::triggered, this,
+ QOverload<>::of(&QDesignerActions::saveForm));
m_fileActions->addAction(m_saveFormAction);
- connect(m_saveFormAsAction, &QAction::triggered, this, static_cast<VoidSlot>(&QDesignerActions::saveFormAs));
+ connect(m_saveFormAsAction, &QAction::triggered, this,
+ QOverload<>::of(&QDesignerActions::saveFormAs));
m_fileActions->addAction(m_saveFormAsAction);
#ifdef Q_OS_MACOS
diff --git a/src/designer/src/designer/qdesigner_workbench.cpp b/src/designer/src/designer/qdesigner_workbench.cpp
index 2de61bea1..f2a8b5d1c 100644
--- a/src/designer/src/designer/qdesigner_workbench.cpp
+++ b/src/designer/src/designer/qdesigner_workbench.cpp
@@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE
static const char *appFontPrefixC = "AppFonts";
-typedef QList<QAction *> ActionList;
+using ActionList = QList<QAction *>;
static QMdiSubWindow *mdiSubWindowOf(const QWidget *w)
{
diff --git a/src/designer/src/designer/qdesigner_workbench.h b/src/designer/src/designer/qdesigner_workbench.h
index 9f11ce12f..fea02d59f 100644
--- a/src/designer/src/designer/qdesigner_workbench.h
+++ b/src/designer/src/designer/qdesigner_workbench.h
@@ -189,7 +189,7 @@ private:
// main window in MDI mode)
QPoint m_position;
};
- typedef QHash<QWidget*, Position> PositionMap;
+ using PositionMap = QHash<QWidget*, Position>;
PositionMap m_Positions;
enum State { StateInitializing, StateUp, StateClosing };
diff --git a/src/designer/src/designer/saveformastemplate.cpp b/src/designer/src/designer/saveformastemplate.cpp
index 637d7a433..4b338308e 100644
--- a/src/designer/src/designer/saveformastemplate.cpp
+++ b/src/designer/src/designer/saveformastemplate.cpp
@@ -46,8 +46,6 @@ SaveFormAsTemplate::SaveFormAsTemplate(QDesignerFormEditorInterface *core,
m_core(core),
m_formWindow(formWindow)
{
- typedef void (QComboBox::*QComboIntSignal)(int);
-
ui.setupUi(this);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
@@ -62,7 +60,7 @@ SaveFormAsTemplate::SaveFormAsTemplate(QDesignerFormEditorInterface *core,
m_addPathIndex = ui.categoryCombo->count() - 1;
connect(ui.templateNameEdit, &QLineEdit::textChanged,
this, &SaveFormAsTemplate::updateOKButton);
- connect(ui.categoryCombo, static_cast<QComboIntSignal>(&QComboBox::activated),
+ connect(ui.categoryCombo, QOverload<int>::of(&QComboBox::activated),
this, &SaveFormAsTemplate::checkToAddPath);
}
diff --git a/src/designer/src/lib/extension/qextensionmanager.h b/src/designer/src/lib/extension/qextensionmanager.h
index c283a11cb..49dd56224 100644
--- a/src/designer/src/lib/extension/qextensionmanager.h
+++ b/src/designer/src/lib/extension/qextensionmanager.h
@@ -51,7 +51,7 @@ public:
QObject *extension(QObject *object, const QString &iid) const override;
private:
- typedef QList<QAbstractExtensionFactory*> FactoryList;
+ using FactoryList = QList<QAbstractExtensionFactory *>;
typedef QHash<QString, FactoryList> FactoryMap;
FactoryMap m_extensions;
FactoryList m_globalExtension;
diff --git a/src/designer/src/lib/sdk/abstractintegration.cpp b/src/designer/src/lib/sdk/abstractintegration.cpp
index 84b3a67e2..ce37e8a4b 100644
--- a/src/designer/src/lib/sdk/abstractintegration.cpp
+++ b/src/designer/src/lib/sdk/abstractintegration.cpp
@@ -332,8 +332,6 @@ QDesignerIntegrationPrivate::QDesignerIntegrationPrivate(QDesignerIntegration *q
void QDesignerIntegrationPrivate::initialize()
{
- typedef void (QDesignerIntegration::*QDesignerIntegrationUpdatePropertySlot3)(const QString &, const QVariant &, bool);
-
//
// integrate the `Form Editor component'
//
@@ -342,7 +340,7 @@ void QDesignerIntegrationPrivate::initialize()
QDesignerFormEditorInterface *core = q->core();
if (QDesignerPropertyEditor *designerPropertyEditor= qobject_cast<QDesignerPropertyEditor *>(core->propertyEditor())) {
QObject::connect(designerPropertyEditor, &QDesignerPropertyEditor::propertyValueChanged,
- q, static_cast<QDesignerIntegrationUpdatePropertySlot3>(&QDesignerIntegration::updateProperty));
+ q, QOverload<const QString &, const QVariant &, bool>::of(&QDesignerIntegration::updateProperty));
QObject::connect(designerPropertyEditor, &QDesignerPropertyEditor::resetProperty,
q, &QDesignerIntegration::resetProperty);
QObject::connect(designerPropertyEditor, &QDesignerPropertyEditor::addDynamicProperty,
diff --git a/src/designer/src/lib/sdk/abstractpromotioninterface.h b/src/designer/src/lib/sdk/abstractpromotioninterface.h
index 41cb2281c..94c863116 100644
--- a/src/designer/src/lib/sdk/abstractpromotioninterface.h
+++ b/src/designer/src/lib/sdk/abstractpromotioninterface.h
@@ -49,7 +49,7 @@ public:
QDesignerWidgetDataBaseItemInterface *promotedItem;
};
- typedef QList<PromotedClass> PromotedClasses;
+ using PromotedClasses = QList<PromotedClass>;
virtual PromotedClasses promotedClasses() const = 0;
diff --git a/src/designer/src/lib/sdk/abstractwidgetbox.h b/src/designer/src/lib/sdk/abstractwidgetbox.h
index 2b1b42bca..7d7600e5b 100644
--- a/src/designer/src/lib/sdk/abstractwidgetbox.h
+++ b/src/designer/src/lib/sdk/abstractwidgetbox.h
@@ -71,8 +71,6 @@ public:
QSharedDataPointer<QDesignerWidgetBoxWidgetData> m_data;
};
- typedef QList<Widget> WidgetList;
-
class Category {
public:
enum Type { Default, Scratchpad };
@@ -96,7 +94,7 @@ public:
Type m_type;
QList<Widget> m_widget_list;
};
- typedef QList<Category> CategoryList;
+ using CategoryList = QList<Category>;
explicit QDesignerWidgetBoxInterface(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
virtual ~QDesignerWidgetBoxInterface();
diff --git a/src/designer/src/lib/shared/actioneditor_p.h b/src/designer/src/lib/shared/actioneditor_p.h
index 39705b256..321dbfb32 100644
--- a/src/designer/src/lib/shared/actioneditor_p.h
+++ b/src/designer/src/lib/shared/actioneditor_p.h
@@ -122,7 +122,7 @@ signals:
void contextMenuRequested(QMenu *menu, QAction *item);
private:
- typedef QList<QAction *> ActionList;
+ using ActionList = QList<QAction *>;
void deleteActions(QDesignerFormWindowInterface *formWindow, const ActionList &);
#if QT_CONFIG(clipboard)
void copyActions(QDesignerFormWindowInterface *formWindow, const ActionList &);
diff --git a/src/designer/src/lib/shared/actionrepository_p.h b/src/designer/src/lib/shared/actionrepository_p.h
index 5f13d786e..a68b3371f 100644
--- a/src/designer/src/lib/shared/actionrepository_p.h
+++ b/src/designer/src/lib/shared/actionrepository_p.h
@@ -98,7 +98,7 @@ signals:
void resourceImageDropped(const QString &path, QAction *action);
private:
- typedef QList<QStandardItem *> QStandardItemList;
+ using QStandardItemList = QList<QStandardItem *>;
void initializeHeaders();
static void setItems(QDesignerFormEditorInterface *core, QAction *a,
@@ -203,7 +203,7 @@ public:
QAction *currentAction() const;
void setCurrentIndex(const QModelIndex &index);
- typedef QList<QAction*> ActionList;
+ using ActionList = QList<QAction *>;
ActionList selectedActions() const;
QItemSelection selection() const;
@@ -232,7 +232,7 @@ class QDESIGNER_SHARED_EXPORT ActionRepositoryMimeData: public QMimeData
{
Q_OBJECT
public:
- typedef QList<QAction*> ActionList;
+ using ActionList = QList<QAction *>;
ActionRepositoryMimeData(const ActionList &, Qt::DropAction dropAction);
ActionRepositoryMimeData(QAction *, Qt::DropAction dropAction);
diff --git a/src/designer/src/lib/shared/connectionedit_p.h b/src/designer/src/lib/shared/connectionedit_p.h
index c17057d27..6fd623457 100644
--- a/src/designer/src/lib/shared/connectionedit_p.h
+++ b/src/designer/src/lib/shared/connectionedit_p.h
@@ -67,15 +67,15 @@ class ConnectionEdit;
class QDESIGNER_SHARED_EXPORT CETypes
{
public:
- typedef QList<Connection*> ConnectionList;
- typedef QHash<Connection*, Connection*> ConnectionSet;
- typedef QHash<QWidget*, QWidget*> WidgetSet;
+ using ConnectionList = QList<Connection *>;
+ using ConnectionSet = QHash<Connection*, Connection*> ;
+ using WidgetSet = QHash<QWidget*, QWidget*>;
class EndPoint {
public:
enum Type { Source, Target };
explicit EndPoint(Connection *_con = nullptr, Type _type = Source) : con(_con), type(_type) {}
- bool isNull() const { return con == 0; }
+ bool isNull() const { return con == nullptr; }
bool operator == (const EndPoint &other) const { return con == other.con && type == other.type; }
bool operator != (const EndPoint &other) const { return !operator == (other); }
Connection *con;
diff --git a/src/designer/src/lib/shared/formlayoutmenu.cpp b/src/designer/src/lib/shared/formlayoutmenu.cpp
index cab6bc1cb..c6bc492ab 100644
--- a/src/designer/src/lib/shared/formlayoutmenu.cpp
+++ b/src/designer/src/lib/shared/formlayoutmenu.cpp
@@ -131,8 +131,6 @@ FormLayoutRowDialog::FormLayoutRowDialog(QDesignerFormEditorInterface *core,
m_fieldNameEdited(false),
m_buddyClicked(false)
{
- typedef void (QComboBox::*QComboIntSignal)(int);
-
Q_ASSERT(m_buddyMarkerRegexp.isValid());
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
@@ -155,7 +153,8 @@ FormLayoutRowDialog::FormLayoutRowDialog(QDesignerFormEditorInterface *core,
m_ui.fieldClassComboBox->addItems(fieldWidgetClasses(core));
m_ui.fieldClassComboBox->setCurrentIndex(0);
- connect(m_ui.fieldClassComboBox, static_cast<QComboIntSignal>(&QComboBox::currentIndexChanged),
+ connect(m_ui.fieldClassComboBox,
+ QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &FormLayoutRowDialog::fieldClassChanged);
updateOkButton();
diff --git a/src/designer/src/lib/shared/formlayoutmenu_p.h b/src/designer/src/lib/shared/formlayoutmenu_p.h
index e5a197fe0..d4b56ac96 100644
--- a/src/designer/src/lib/shared/formlayoutmenu_p.h
+++ b/src/designer/src/lib/shared/formlayoutmenu_p.h
@@ -61,7 +61,7 @@ class QDESIGNER_SHARED_EXPORT FormLayoutMenu : public QObject
Q_DISABLE_COPY_MOVE(FormLayoutMenu)
Q_OBJECT
public:
- typedef QList<QAction *> ActionList;
+ using ActionList = QList<QAction *>;
explicit FormLayoutMenu(QObject *parent);
diff --git a/src/designer/src/lib/shared/formwindowbase.cpp b/src/designer/src/lib/shared/formwindowbase.cpp
index 73a468b2b..82d8cba60 100644
--- a/src/designer/src/lib/shared/formwindowbase.cpp
+++ b/src/designer/src/lib/shared/formwindowbase.cpp
@@ -462,7 +462,7 @@ void FormWindowBase::deleteWidgetList(const QWidgetList &widget_list)
QMenu *FormWindowBase::createExtensionTaskMenu(QDesignerFormWindowInterface *fw, QObject *o, bool trailingSeparator)
{
- typedef QList<QAction *> ActionList;
+ using ActionList = QList<QAction *>;
ActionList actions;
// 1) Standard public extension
QExtensionManager *em = fw->core()->extensionManager();
diff --git a/src/designer/src/lib/shared/grid.cpp b/src/designer/src/lib/shared/grid.cpp
index 5f5f8ea27..d1298d1f0 100644
--- a/src/designer/src/lib/shared/grid.cpp
+++ b/src/designer/src/lib/shared/grid.cpp
@@ -125,7 +125,7 @@ void Grid::paint(QPainter &p, const QWidget *widget, QPaintEvent *e) const
const int xend = e->rect().right();
const int yend = e->rect().bottom();
- typedef QVector<QPointF> Points;
+ using Points = QVector<QPointF>;
static Points points;
points.clear();
diff --git a/src/designer/src/lib/shared/layout.cpp b/src/designer/src/lib/shared/layout.cpp
index 1a5b71d4a..436d5223b 100644
--- a/src/designer/src/lib/shared/layout.cpp
+++ b/src/designer/src/lib/shared/layout.cpp
@@ -931,7 +931,7 @@ void Grid::shrink()
bool Grid::shrinkFormLayoutSpans()
{
bool shrunk = false;
- typedef QSet<QWidget*> WidgetSet;
+ using WidgetSet = QSet<QWidget *>;
// Determine unique set of widgets
WidgetSet widgets;
QWidget **end = m_cells + m_ncols * m_nrows;
diff --git a/src/designer/src/lib/shared/morphmenu.cpp b/src/designer/src/lib/shared/morphmenu.cpp
index 5df701e98..ee09dfafd 100644
--- a/src/designer/src/lib/shared/morphmenu.cpp
+++ b/src/designer/src/lib/shared/morphmenu.cpp
@@ -226,7 +226,7 @@ static QString suggestObjectName(const QString &oldClassName, const QString &new
// Find the label whose buddy the widget is.
QLabel *buddyLabelOf(QDesignerFormWindowInterface *fw, QWidget *w)
{
- typedef QList<QLabel*> LabelList;
+ using LabelList = QList<QLabel *>;
const LabelList labelList = fw->findChildren<QLabel*>();
if (labelList.empty())
return nullptr;
diff --git a/src/designer/src/lib/shared/morphmenu_p.h b/src/designer/src/lib/shared/morphmenu_p.h
index 65c533280..eba1bdf3a 100644
--- a/src/designer/src/lib/shared/morphmenu_p.h
+++ b/src/designer/src/lib/shared/morphmenu_p.h
@@ -55,7 +55,7 @@ class QDESIGNER_SHARED_EXPORT MorphMenu : public QObject {
Q_DISABLE_COPY_MOVE(MorphMenu)
Q_OBJECT
public:
- typedef QList<QAction *> ActionList;
+ using ActionList = QList<QAction *>;
explicit MorphMenu(QObject *parent = nullptr);
diff --git a/src/designer/src/lib/shared/newformwidget.cpp b/src/designer/src/lib/shared/newformwidget.cpp
index 4845e5945..b3853ae21 100644
--- a/src/designer/src/lib/shared/newformwidget.cpp
+++ b/src/designer/src/lib/shared/newformwidget.cpp
@@ -129,8 +129,7 @@ NewFormWidget::NewFormWidget(QDesignerFormEditorInterface *core, QWidget *parent
m_currentItem(nullptr),
m_acceptedItem(nullptr)
{
- typedef void (QComboBox::*QComboIntSignal)(int);
- typedef QList<qdesigner_internal::DeviceProfile> DeviceProfileList;
+ using DeviceProfileList = QList<qdesigner_internal::DeviceProfile>;
m_ui->setupUi(this);
m_ui->treeWidget->setItemDelegate(new qdesigner_internal::SheetDelegate(m_ui->treeWidget, this));
@@ -181,7 +180,8 @@ NewFormWidget::NewFormWidget(QDesignerFormEditorInterface *core, QWidget *parent
// Fill profile combo
m_deviceProfiles = settings.deviceProfiles();
m_ui->profileComboBox->addItem(tr("None"));
- connect(m_ui->profileComboBox, static_cast<QComboIntSignal>(&QComboBox::currentIndexChanged),
+ connect(m_ui->profileComboBox,
+ QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &NewFormWidget::slotDeviceProfileIndexChanged);
if (m_deviceProfiles.empty()) {
m_ui->profileComboBox->setEnabled(false);
diff --git a/src/designer/src/lib/shared/newformwidget_p.h b/src/designer/src/lib/shared/newformwidget_p.h
index 0a53f4768..2f28ed6be 100644
--- a/src/designer/src/lib/shared/newformwidget_p.h
+++ b/src/designer/src/lib/shared/newformwidget_p.h
@@ -71,7 +71,7 @@ class QDESIGNER_SHARED_EXPORT NewFormWidget : public QDesignerNewFormWidgetInter
Q_DISABLE_COPY_MOVE(NewFormWidget)
public:
- typedef QList<qdesigner_internal::DeviceProfile> DeviceProfileList;
+ using DeviceProfileList = QList<qdesigner_internal::DeviceProfile>;
explicit NewFormWidget(QDesignerFormEditorInterface *core, QWidget *parentWidget);
~NewFormWidget() override;
@@ -112,8 +112,8 @@ private:
bool showCurrentItemPixmap();
// Pixmap cache (item, profile combo index)
- typedef QPair<const QTreeWidgetItem *, int> ItemPixmapCacheKey;
- typedef QMap<ItemPixmapCacheKey, QPixmap> ItemPixmapCache;
+ using ItemPixmapCacheKey = QPair<const QTreeWidgetItem *, int>;
+ using ItemPixmapCache = QMap<ItemPixmapCacheKey, QPixmap>;
ItemPixmapCache m_itemPixmapCache;
QDesignerFormEditorInterface *m_core;
diff --git a/src/designer/src/lib/shared/pluginmanager.cpp b/src/designer/src/lib/shared/pluginmanager.cpp
index 7e2408ad6..ddc8cd611 100644
--- a/src/designer/src/lib/shared/pluginmanager.cpp
+++ b/src/designer/src/lib/shared/pluginmanager.cpp
@@ -134,9 +134,9 @@ static inline QString getDesignerLanguage(QDesignerFormEditorInterface *core)
class QDesignerCustomWidgetSharedData : public QSharedData {
public:
// Type of a string property
- typedef QPair<qdesigner_internal::TextPropertyValidationMode, bool> StringPropertyType;
- typedef QHash<QString, StringPropertyType> StringPropertyTypeMap;
- typedef QHash<QString, QString> PropertyToolTipMap;
+ using StringPropertyType = QPair<qdesigner_internal::TextPropertyValidationMode, bool>;
+ using StringPropertyTypeMap = QHash<QString, StringPropertyType>;
+ using PropertyToolTipMap = QHash<QString, QString>;
explicit QDesignerCustomWidgetSharedData(const QString &thePluginPath) : pluginPath(thePluginPath) {}
void clearXML();
@@ -453,7 +453,7 @@ QDesignerCustomWidgetData::ParseResult
class QDesignerPluginManagerPrivate {
public:
- typedef QPair<QString, QString> ClassNamePropertyNameKey;
+ using ClassNamePropertyNameKey = QPair<QString, QString>;
QDesignerPluginManagerPrivate(QDesignerFormEditorInterface *core);
diff --git a/src/designer/src/lib/shared/pluginmanager_p.h b/src/designer/src/lib/shared/pluginmanager_p.h
index 249748e93..373d0fe51 100644
--- a/src/designer/src/lib/shared/pluginmanager_p.h
+++ b/src/designer/src/lib/shared/pluginmanager_p.h
@@ -99,7 +99,7 @@ class QDESIGNER_SHARED_EXPORT QDesignerPluginManager: public QObject
{
Q_OBJECT
public:
- typedef QList<QDesignerCustomWidgetInterface*> CustomWidgetList;
+ using CustomWidgetList = QList<QDesignerCustomWidgetInterface *>;
explicit QDesignerPluginManager(QDesignerFormEditorInterface *core);
~QDesignerPluginManager() override;
diff --git a/src/designer/src/lib/shared/previewconfigurationwidget.cpp b/src/designer/src/lib/shared/previewconfigurationwidget.cpp
index 6352468c3..f9ddb4b5e 100644
--- a/src/designer/src/lib/shared/previewconfigurationwidget.cpp
+++ b/src/designer/src/lib/shared/previewconfigurationwidget.cpp
@@ -57,7 +57,7 @@ static const char *skinExtensionC = "skin";
// Pair of skin name, path
typedef QPair<QString, QString> SkinNamePath;
-typedef QList<SkinNamePath> Skins;
+using Skins = QList<SkinNamePath>;
enum { SkinComboNoneIndex = 0 };
// find default skins (resources)
@@ -314,13 +314,11 @@ PreviewConfigurationWidget::PreviewConfigurationWidget(QDesignerFormEditorInterf
QGroupBox(parent),
m_impl(new PreviewConfigurationWidgetPrivate(core, this))
{
- typedef void (QComboBox::*QComboIntSignal)(int);
-
connect(m_impl->appStyleSheetChangeButton(), &QAbstractButton::clicked,
this, &PreviewConfigurationWidget::slotEditAppStyleSheet);
connect(m_impl->skinRemoveButton(), &QAbstractButton::clicked,
this, &PreviewConfigurationWidget::slotDeleteSkinEntry);
- connect(m_impl->skinCombo(), static_cast<QComboIntSignal>(&QComboBox::currentIndexChanged),
+ connect(m_impl->skinCombo(), QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &PreviewConfigurationWidget::slotSkinChanged);
m_impl->retrieveSettings();
diff --git a/src/designer/src/lib/shared/previewmanager.cpp b/src/designer/src/lib/shared/previewmanager.cpp
index c4a3ddd92..1adfc727b 100644
--- a/src/designer/src/lib/shared/previewmanager.cpp
+++ b/src/designer/src/lib/shared/previewmanager.cpp
@@ -555,7 +555,7 @@ public:
QPointer<QWidget> m_activePreview;
- typedef QList<PreviewData> PreviewDataList;
+ using PreviewDataList = QList<PreviewData>;
PreviewDataList m_previews;
@@ -798,7 +798,7 @@ QWidget *PreviewManager::showPreview(const QDesignerFormWindowInterface *fw,
QWidget *PreviewManager::raise(const QDesignerFormWindowInterface *fw, const PreviewConfiguration &pc)
{
- typedef PreviewManagerPrivate::PreviewDataList PreviewDataList;
+ using PreviewDataList = PreviewManagerPrivate::PreviewDataList;
if (d->m_previews.empty())
return nullptr;
@@ -832,7 +832,7 @@ void PreviewManager::closeAllPreviews()
void PreviewManager::updatePreviewClosed(QWidget *w)
{
- typedef PreviewManagerPrivate::PreviewDataList PreviewDataList;
+ using PreviewDataList = PreviewManagerPrivate::PreviewDataList;
if (d->m_updateBlocked)
return;
// Purge out all 0 or widgets to be deleted
diff --git a/src/designer/src/lib/shared/promotionmodel.cpp b/src/designer/src/lib/shared/promotionmodel.cpp
index 63273c3a7..c2dd25523 100644
--- a/src/designer/src/lib/shared/promotionmodel.cpp
+++ b/src/designer/src/lib/shared/promotionmodel.cpp
@@ -39,7 +39,7 @@
QT_BEGIN_NAMESPACE
namespace {
- typedef QList<QStandardItem *> StandardItemList;
+ using StandardItemList = QList<QStandardItem *>;
// Model columns.
enum { ClassNameColumn, IncludeFileColumn, IncludeTypeColumn, ReferencedColumn, NumColumns };
@@ -120,7 +120,7 @@ namespace qdesigner_internal {
}
void PromotionModel::updateFromWidgetDatabase() {
- typedef QDesignerPromotionInterface::PromotedClasses PromotedClasses;
+ using PromotedClasses = QDesignerPromotionInterface::PromotedClasses;
clear();
initializeHeaders();
diff --git a/src/designer/src/lib/shared/promotiontaskmenu_p.h b/src/designer/src/lib/shared/promotiontaskmenu_p.h
index bb382ac1d..830986968 100644
--- a/src/designer/src/lib/shared/promotiontaskmenu_p.h
+++ b/src/designer/src/lib/shared/promotiontaskmenu_p.h
@@ -82,7 +82,7 @@ public:
// Defaults to "Demote to %1".arg(class).
void setDemoteLabel(const QString &demoteLabel);
- typedef QList<QAction*> ActionList;
+ using ActionList = QList<QAction *>;
enum AddFlags { LeadingSeparator = 1, TrailingSeparator = 2, SuppressGlobalEdit = 4};
@@ -111,7 +111,7 @@ private:
PromotionState createPromotionActions(QDesignerFormWindowInterface *formWindow);
QDesignerFormWindowInterface *formWindow() const;
- typedef QList<QPointer<QWidget> > PromotionSelectionList;
+ using PromotionSelectionList = QList<QPointer<QWidget> >;
PromotionSelectionList promotionSelectionList(QDesignerFormWindowInterface *formWindow) const;
Mode m_mode;
diff --git a/src/designer/src/lib/shared/qdesigner_command.cpp b/src/designer/src/lib/shared/qdesigner_command.cpp
index ed8bde3de..7346b98f3 100644
--- a/src/designer/src/lib/shared/qdesigner_command.cpp
+++ b/src/designer/src/lib/shared/qdesigner_command.cpp
@@ -232,7 +232,7 @@ void InsertWidgetCommand::undo()
void InsertWidgetCommand::refreshBuddyLabels()
{
- typedef QList<QLabel*> LabelList;
+ using LabelList = QList<QLabel *>;
const LabelList label_list = formWindow()->findChildren<QLabel*>();
if (label_list.empty())
@@ -620,7 +620,7 @@ PromoteToCustomWidgetCommand::PromoteToCustomWidgetCommand
{
}
-void PromoteToCustomWidgetCommand::init(const WidgetList &widgets,const QString &customClassName)
+void PromoteToCustomWidgetCommand::init(const WidgetPointerList &widgets,const QString &customClassName)
{
m_widgets = widgets;
m_customClassName = customClassName;
diff --git a/src/designer/src/lib/shared/qdesigner_command_p.h b/src/designer/src/lib/shared/qdesigner_command_p.h
index abb04368d..f967c22f8 100644
--- a/src/designer/src/lib/shared/qdesigner_command_p.h
+++ b/src/designer/src/lib/shared/qdesigner_command_p.h
@@ -179,7 +179,7 @@ private:
// Helper to correctly unmanage a widget and its children for delete operations
class QDESIGNER_SHARED_EXPORT ManageWidgetCommandHelper {
public:
- typedef QVector<QWidget*> WidgetVector;
+ using WidgetVector = QVector<QWidget *>;
ManageWidgetCommandHelper();
void init(const QDesignerFormWindowInterface *fw, QWidget *widget);
@@ -316,24 +316,24 @@ private:
class QDESIGNER_SHARED_EXPORT PromoteToCustomWidgetCommand : public QDesignerFormWindowCommand
{
public:
- typedef QList<QPointer<QWidget> > WidgetList;
+ using WidgetPointerList = QList<QPointer<QWidget> >;
explicit PromoteToCustomWidgetCommand(QDesignerFormWindowInterface *formWindow);
- void init(const WidgetList &widgets, const QString &customClassName);
+ void init(const WidgetPointerList &widgets, const QString &customClassName);
void redo() override;
void undo() override;
private:
void updateSelection();
- WidgetList m_widgets;
+ WidgetPointerList m_widgets;
QString m_customClassName;
};
class QDESIGNER_SHARED_EXPORT DemoteFromCustomWidgetCommand : public QDesignerFormWindowCommand
{
public:
- typedef PromoteToCustomWidgetCommand::WidgetList WidgetList;
+ using WidgetList = PromoteToCustomWidgetCommand::WidgetPointerList;
explicit DemoteFromCustomWidgetCommand(QDesignerFormWindowInterface *formWindow);
@@ -354,7 +354,7 @@ public:
void restore(QDesignerFormWindowInterface *formWindow) const;
private:
- typedef QList<QPointer<QWidget> > WidgetPointerList;
+ using WidgetPointerList = QList<QPointer<QWidget> >;
WidgetPointerList m_selection;
QPointer<QWidget> m_current;
};
@@ -878,8 +878,8 @@ struct QDESIGNER_SHARED_EXPORT ListContents {
// methods to retrieve and apply for ChangeTableContentsCommand
struct QDESIGNER_SHARED_EXPORT TableWidgetContents {
- typedef QPair<int, int> CellRowColumnAddress;
- typedef QMap<CellRowColumnAddress, ItemData> TableItemMap;
+ using CellRowColumnAddress = QPair<int, int>;
+ using TableItemMap = QMap<CellRowColumnAddress, ItemData>;
TableWidgetContents();
void clear();
@@ -1016,7 +1016,7 @@ public:
QAction *before;
QWidget *widget;
};
- typedef QList<ActionDataItem> ActionData;
+ using ActionData = QList<ActionDataItem>;
private:
QAction *m_action;
diff --git a/src/designer/src/lib/shared/qdesigner_dnditem_p.h b/src/designer/src/lib/shared/qdesigner_dnditem_p.h
index 917a37159..36419389b 100644
--- a/src/designer/src/lib/shared/qdesigner_dnditem_p.h
+++ b/src/designer/src/lib/shared/qdesigner_dnditem_p.h
@@ -91,7 +91,7 @@ class QDESIGNER_SHARED_EXPORT QDesignerMimeData : public QMimeData {
Q_OBJECT
public:
- typedef QList<QDesignerDnDItemInterface *> QDesignerDnDItems;
+ using QDesignerDnDItems = QList<QDesignerDnDItemInterface *>;
~QDesignerMimeData() override;
diff --git a/src/designer/src/lib/shared/qdesigner_formbuilder_p.h b/src/designer/src/lib/shared/qdesigner_formbuilder_p.h
index e70bfd507..ceaf1b395 100644
--- a/src/designer/src/lib/shared/qdesigner_formbuilder_p.h
+++ b/src/designer/src/lib/shared/qdesigner_formbuilder_p.h
@@ -122,7 +122,7 @@ protected:
private:
QDesignerFormEditorInterface *m_core;
- typedef QSet<QWidget *> WidgetSet;
+ using WidgetSet = QSet<QWidget *>;
WidgetSet m_customWidgetsWithScript;
const DeviceProfile m_deviceProfile;
diff --git a/src/designer/src/lib/shared/qdesigner_formwindowcommand.cpp b/src/designer/src/lib/shared/qdesigner_formwindowcommand.cpp
index a469dd520..7c44ec4f7 100644
--- a/src/designer/src/lib/shared/qdesigner_formwindowcommand.cpp
+++ b/src/designer/src/lib/shared/qdesigner_formwindowcommand.cpp
@@ -100,7 +100,7 @@ void QDesignerFormWindowCommand::updateBuddies(QDesignerFormWindowInterface *for
{
QExtensionManager* extensionManager = form->core()->extensionManager();
- typedef QList<QLabel*> LabelList;
+ using LabelList = QList<QLabel *>;
const LabelList label_list = form->findChildren<QLabel*>();
if (label_list.empty())
diff --git a/src/designer/src/lib/shared/qdesigner_introspection.cpp b/src/designer/src/lib/shared/qdesigner_introspection.cpp
index a2dfd037f..3001d6b76 100644
--- a/src/designer/src/lib/shared/qdesigner_introspection.cpp
+++ b/src/designer/src/lib/shared/qdesigner_introspection.cpp
@@ -283,13 +283,13 @@ namespace {
const qdesigner_internal::QDesignerIntrospection *m_introspection;
const QMetaObject *m_metaObject;
- typedef QVector<QDesignerMetaEnumInterface *> Enumerators;
+ using Enumerators = QVector<QDesignerMetaEnumInterface *>;
Enumerators m_enumerators;
- typedef QVector<QDesignerMetaMethodInterface *> Methods;
+ using Methods = QVector<QDesignerMetaMethodInterface *>;
Methods m_methods;
- typedef QVector<QDesignerMetaPropertyInterface *> Properties;
+ using Properties = QVector<QDesignerMetaPropertyInterface *>;
Properties m_properties;
QDesignerMetaPropertyInterface *m_userProperty;
diff --git a/src/designer/src/lib/shared/qdesigner_introspection_p.h b/src/designer/src/lib/shared/qdesigner_introspection_p.h
index 3fec4bc47..6c4d37e4d 100644
--- a/src/designer/src/lib/shared/qdesigner_introspection_p.h
+++ b/src/designer/src/lib/shared/qdesigner_introspection_p.h
@@ -60,7 +60,7 @@ namespace qdesigner_internal {
const QDesignerMetaObjectInterface* metaObjectForQMetaObject(const QMetaObject *metaObject) const;
private:
- typedef QMap<const QMetaObject*, QDesignerMetaObjectInterface*> MetaObjectMap;
+ using MetaObjectMap = QMap<const QMetaObject*, QDesignerMetaObjectInterface*>;
mutable MetaObjectMap m_metaObjectMap;
};
diff --git a/src/designer/src/lib/shared/qdesigner_membersheet.cpp b/src/designer/src/lib/shared/qdesigner_membersheet.cpp
index 8f54ac451..93371ac06 100644
--- a/src/designer/src/lib/shared/qdesigner_membersheet.cpp
+++ b/src/designer/src/lib/shared/qdesigner_membersheet.cpp
@@ -73,7 +73,7 @@ public:
bool visible{true};
};
- typedef QHash<int, Info> InfoHash;
+ using InfoHash = QHash<int, Info>;
Info &ensureInfo(int index);
@@ -158,8 +158,7 @@ QString QDesignerMemberSheet::signature(int index) const
bool QDesignerMemberSheet::isVisible(int index) const
{
- typedef QDesignerMemberSheetPrivate::InfoHash InfoHash;
- const InfoHash::const_iterator it = d->m_info.constFind(index);
+ const auto it = d->m_info.constFind(index);
if (it != d->m_info.constEnd())
return it.value().visible;
diff --git a/src/designer/src/lib/shared/qdesigner_menubar.cpp b/src/designer/src/lib/shared/qdesigner_menubar.cpp
index d3aa2a717..e212eff82 100644
--- a/src/designer/src/lib/shared/qdesigner_menubar.cpp
+++ b/src/designer/src/lib/shared/qdesigner_menubar.cpp
@@ -56,7 +56,7 @@ Q_DECLARE_METATYPE(QAction*)
QT_BEGIN_NAMESPACE
-typedef QList<QAction *> ActionList;
+using ActionList = QList<QAction *>;
using namespace qdesigner_internal;
diff --git a/src/designer/src/lib/shared/qdesigner_promotion.cpp b/src/designer/src/lib/shared/qdesigner_promotion.cpp
index d0403866e..2d8169960 100644
--- a/src/designer/src/lib/shared/qdesigner_promotion.cpp
+++ b/src/designer/src/lib/shared/qdesigner_promotion.cpp
@@ -166,7 +166,7 @@ namespace qdesigner_internal {
QList<QDesignerWidgetDataBaseItemInterface *> QDesignerPromotion::promotionBaseClasses() const
{
- typedef QMap<QString, QDesignerWidgetDataBaseItemInterface *> SortedDatabaseItemMap;
+ using SortedDatabaseItemMap = QMap<QString, QDesignerWidgetDataBaseItemInterface *>;
SortedDatabaseItemMap sortedDatabaseItemMap;
QDesignerWidgetDataBaseInterface *widgetDataBase = m_core->widgetDataBase();
@@ -202,9 +202,9 @@ namespace qdesigner_internal {
QDesignerPromotion::PromotedClasses QDesignerPromotion::promotedClasses() const
{
- typedef QMap<QString, QDesignerWidgetDataBaseItemInterface *> ClassNameItemMap;
+ using ClassNameItemMap = QMap<QString, QDesignerWidgetDataBaseItemInterface *>;
// A map containing base classes and their promoted classes.
- typedef QMap<QString, ClassNameItemMap> BaseClassPromotedMap;
+ using BaseClassPromotedMap = QMap<QString, ClassNameItemMap>;
BaseClassPromotedMap baseClassPromotedMap;
diff --git a/src/designer/src/lib/shared/qdesigner_promotiondialog.cpp b/src/designer/src/lib/shared/qdesigner_promotiondialog.cpp
index 1467efbe3..7058b0c81 100644
--- a/src/designer/src/lib/shared/qdesigner_promotiondialog.cpp
+++ b/src/designer/src/lib/shared/qdesigner_promotiondialog.cpp
@@ -288,7 +288,7 @@ namespace qdesigner_internal {
}
const QStringList &QDesignerPromotionDialog::baseClassNames(const QDesignerPromotionInterface *promotion) {
- typedef QList<QDesignerWidgetDataBaseItemInterface *> WidgetDataBaseItemList;
+ using WidgetDataBaseItemList = QList<QDesignerWidgetDataBaseItemInterface *>;
static QStringList rc;
if (rc.empty()) {
// Convert the item list into a string list.
diff --git a/src/designer/src/lib/shared/qdesigner_propertycommand.cpp b/src/designer/src/lib/shared/qdesigner_propertycommand.cpp
index 9f4eec9ce..0e6287137 100644
--- a/src/designer/src/lib/shared/qdesigner_propertycommand.cpp
+++ b/src/designer/src/lib/shared/qdesigner_propertycommand.cpp
@@ -1004,7 +1004,7 @@ PropertyHelper *PropertyListCommand::createPropertyHelper(QObject *object, Speci
}
// Init from a list and make sure referenceObject is added first to obtain the right property group
-bool PropertyListCommand::initList(const ObjectList &list, const QString &apropertyName, QObject *referenceObject)
+bool PropertyListCommand::initList(const QObjectList &list, const QString &apropertyName, QObject *referenceObject)
{
propertyHelperList().clear();
@@ -1209,7 +1209,7 @@ bool SetPropertyCommand::init(QObject *object, const QString &apropertyName, con
return true;
}
-bool SetPropertyCommand::init(const ObjectList &list, const QString &apropertyName, const QVariant &newValue,
+bool SetPropertyCommand::init(const QObjectList &list, const QString &apropertyName, const QVariant &newValue,
QObject *referenceObject, bool enableSubPropertyHandling)
{
if (!initList(list, apropertyName, referenceObject))
@@ -1319,10 +1319,10 @@ bool ResetPropertyCommand::init(QObject *object, const QString &apropertyName)
return true;
}
-bool ResetPropertyCommand::init(const ObjectList &list, const QString &apropertyName, QObject *referenceObject)
+bool ResetPropertyCommand::init(const QObjectList &list, const QString &apropertyName, QObject *referenceObject)
{
- ObjectList modifiedList = list; // filter out modified properties
- for (ObjectList::iterator it = modifiedList.begin(); it != modifiedList.end() ; ) {
+ QObjectList modifiedList = list; // filter out modified properties
+ for (auto it = modifiedList.begin(); it != modifiedList.end() ; ) {
QDesignerPropertySheetExtension* sheet = propertySheet(*it);
Q_ASSERT(sheet);
const int index = sheet->indexOf(apropertyName);
diff --git a/src/designer/src/lib/shared/qdesigner_propertycommand_p.h b/src/designer/src/lib/shared/qdesigner_propertycommand_p.h
index 78ed73181..f1e43617a 100644
--- a/src/designer/src/lib/shared/qdesigner_propertycommand_p.h
+++ b/src/designer/src/lib/shared/qdesigner_propertycommand_p.h
@@ -72,7 +72,7 @@ class QDESIGNER_SHARED_EXPORT PropertyHelper {
Q_DISABLE_COPY(PropertyHelper)
public:
// A pair of Value and changed flag
- typedef QPair<QVariant, bool> Value;
+ using Value = QPair<QVariant, bool>;
enum ObjectType {OT_Object, OT_FreeAction, OT_AssociatedAction, OT_Widget};
@@ -135,8 +135,6 @@ private:
class QDESIGNER_SHARED_EXPORT PropertyListCommand : public QDesignerFormWindowCommand {
public:
- typedef QList<QObject *> ObjectList;
-
explicit PropertyListCommand(QDesignerFormWindowInterface *formWindow, QUndoCommand *parent = nullptr);
QObject* object(int index = 0) const;
@@ -149,14 +147,14 @@ public:
virtual void undo();
protected:
- typedef QSharedPointer<PropertyHelper> PropertyHelperPtr;
- typedef QList<PropertyHelperPtr> PropertyHelperList;
+ using PropertyHelperPtr = QSharedPointer<PropertyHelper>;
+ using PropertyHelperList = QList<PropertyHelperPtr>;
// add an object
bool add(QObject *object, const QString &propertyName);
// Init from a list and make sure referenceObject is added first to obtain the right property group
- bool initList(const ObjectList &list, const QString &apropertyName, QObject *referenceObject = nullptr);
+ bool initList(const QObjectList &list, const QString &apropertyName, QObject *referenceObject = nullptr);
// set a new value, return update mask
unsigned setValue(QVariant value, bool changed, unsigned subPropertyMask);
@@ -207,12 +205,10 @@ class QDESIGNER_SHARED_EXPORT SetPropertyCommand: public PropertyListCommand
{
public:
- typedef QList<QObject *> ObjectList;
-
explicit SetPropertyCommand(QDesignerFormWindowInterface *formWindow, QUndoCommand *parent = nullptr);
bool init(QObject *object, const QString &propertyName, const QVariant &newValue);
- bool init(const ObjectList &list, const QString &propertyName, const QVariant &newValue,
+ bool init(const QObjectList &list, const QString &propertyName, const QVariant &newValue,
QObject *referenceObject = nullptr, bool enableSubPropertyHandling = true);
@@ -241,12 +237,10 @@ class QDESIGNER_SHARED_EXPORT ResetPropertyCommand: public PropertyListCommand
{
public:
- typedef QList<QObject *> ObjectList;
-
explicit ResetPropertyCommand(QDesignerFormWindowInterface *formWindow);
bool init(QObject *object, const QString &propertyName);
- bool init(const ObjectList &list, const QString &propertyName, QObject *referenceObject = nullptr);
+ bool init(const QObjectList &list, const QString &propertyName, QObject *referenceObject = nullptr);
virtual void redo();
diff --git a/src/designer/src/lib/shared/qdesigner_propertyeditor.cpp b/src/designer/src/lib/shared/qdesigner_propertyeditor.cpp
index c226ebae0..3a26553fd 100644
--- a/src/designer/src/lib/shared/qdesigner_propertyeditor.cpp
+++ b/src/designer/src/lib/shared/qdesigner_propertyeditor.cpp
@@ -41,9 +41,9 @@
QT_BEGIN_NAMESPACE
namespace qdesigner_internal {
-typedef QDesignerPropertyEditor::StringPropertyParameters StringPropertyParameters;
+using StringPropertyParameters = QDesignerPropertyEditor::StringPropertyParameters;
// A map of property name to type
-typedef QHash<QString, StringPropertyParameters> PropertyNameTypeMap;
+using PropertyNameTypeMap = QHash<QString, StringPropertyParameters>;
// Compile a map of hard-coded string property types
static const PropertyNameTypeMap &stringPropertyTypes()
diff --git a/src/designer/src/lib/shared/qdesigner_propertyeditor_p.h b/src/designer/src/lib/shared/qdesigner_propertyeditor_p.h
index 2cdd1fc8f..dbb116f65 100644
--- a/src/designer/src/lib/shared/qdesigner_propertyeditor_p.h
+++ b/src/designer/src/lib/shared/qdesigner_propertyeditor_p.h
@@ -59,7 +59,7 @@ public:
explicit QDesignerPropertyEditor(QWidget *parent = nullptr, Qt::WindowFlags flags = nullptr);
// A pair <ValidationMode, bool isTranslatable>.
- typedef QPair<TextPropertyValidationMode, bool> StringPropertyParameters;
+ using StringPropertyParameters = QPair<TextPropertyValidationMode, bool>;
// Return a pair of validation mode and flag indicating whether property is translatable
// for textual properties.
diff --git a/src/designer/src/lib/shared/qdesigner_propertysheet.cpp b/src/designer/src/lib/shared/qdesigner_propertysheet.cpp
index a60f183df..fbb0746aa 100644
--- a/src/designer/src/lib/shared/qdesigner_propertysheet.cpp
+++ b/src/designer/src/lib/shared/qdesigner_propertysheet.cpp
@@ -127,8 +127,8 @@ static bool hasLayoutAttributes(QDesignerFormEditorInterface *core, QObject *obj
// Cache DesignerMetaEnum by scope/name of a QMetaEnum
static const qdesigner_internal::DesignerMetaEnum &designerMetaEnumFor(const QDesignerMetaEnumInterface *me)
{
- typedef QPair<QString, QString> ScopeNameKey;
- typedef QMap<ScopeNameKey, qdesigner_internal::DesignerMetaEnum> DesignerMetaEnumCache;
+ using ScopeNameKey = QPair<QString, QString>;
+ using DesignerMetaEnumCache = QMap<ScopeNameKey, qdesigner_internal::DesignerMetaEnum>;
static DesignerMetaEnumCache cache;
const QString name = me->name();
@@ -149,8 +149,8 @@ static const qdesigner_internal::DesignerMetaEnum &designerMetaEnumFor(const QDe
// Cache DesignerMetaFlags by scope/name of a QMetaEnum
static const qdesigner_internal::DesignerMetaFlags &designerMetaFlagsFor(const QDesignerMetaEnumInterface *me)
{
- typedef QPair<QString, QString> ScopeNameKey;
- typedef QMap<ScopeNameKey, qdesigner_internal::DesignerMetaFlags> DesignerMetaFlagsCache;
+ using ScopeNameKey = QPair<QString, QString>;
+ using DesignerMetaFlagsCache = QMap<ScopeNameKey, qdesigner_internal::DesignerMetaFlags>;
static DesignerMetaFlagsCache cache;
const QString name = me->name();
@@ -171,8 +171,8 @@ static const qdesigner_internal::DesignerMetaFlags &designerMetaFlagsFor(const Q
// ------------ QDesignerMemberSheetPrivate
class QDesignerPropertySheetPrivate {
public:
- typedef QDesignerPropertySheet::PropertyType PropertyType;
- typedef QDesignerPropertySheet::ObjectType ObjectType;
+ using PropertyType = QDesignerPropertySheet::PropertyType;
+ using ObjectType = QDesignerPropertySheet::ObjectType;
explicit QDesignerPropertySheetPrivate(QDesignerPropertySheet *sheetPublic, QObject *object, QObject *sheetParent);
@@ -228,7 +228,7 @@ public:
const QDesignerMetaObjectInterface *m_meta;
const ObjectType m_objectType;
- typedef QHash<int, Info> InfoHash;
+ using InfoHash = QHash<int, Info>;
InfoHash m_info;
QHash<int, QVariant> m_fakeProperties;
QHash<int, QVariant> m_addProperties;
@@ -468,7 +468,7 @@ QDesignerPropertySheet::PropertyType QDesignerPropertySheetPrivate::propertyType
QString QDesignerPropertySheetPrivate::transformLayoutPropertyName(int index) const
{
- typedef QMap<QDesignerPropertySheet::PropertyType, QString> TypeNameMap;
+ using TypeNameMap = QMap<QDesignerPropertySheet::PropertyType, QString>;
static TypeNameMap typeNameMap;
if (typeNameMap.empty()) {
typeNameMap.insert(QDesignerPropertySheet::PropertyLayoutObjectName, QStringLiteral("objectName"));
@@ -560,7 +560,7 @@ QDesignerPropertySheet::QDesignerPropertySheet(QObject *object, QObject *parent)
QObject(parent),
d(new QDesignerPropertySheetPrivate(this, object, parent))
{
- typedef QDesignerPropertySheetPrivate::Info Info;
+ using Info = QDesignerPropertySheetPrivate::Info;
const QDesignerMetaObjectInterface *baseMeta = d->m_meta;
while (baseMeta &&baseMeta->className().startsWith(QStringLiteral("QDesigner"))) {
@@ -674,7 +674,7 @@ QDesignerPropertySheet::QDesignerPropertySheet(QObject *object, QObject *parent)
createFakeProperty(QStringLiteral("floating"));
}
- typedef QList<QByteArray> ByteArrayList;
+ using ByteArrayList = QList<QByteArray>;
const ByteArrayList names = object->dynamicPropertyNames();
if (!names.empty()) {
const ByteArrayList::const_iterator cend = names.constEnd();
@@ -722,7 +722,7 @@ bool QDesignerPropertySheet::canAddDynamicProperty(const QString &propName) cons
int QDesignerPropertySheet::addDynamicProperty(const QString &propName, const QVariant &value)
{
- typedef QDesignerPropertySheetPrivate::Info Info;
+ using Info = QDesignerPropertySheetPrivate::Info;
if (!value.isValid())
return -1; // property has invalid type
if (!canAddDynamicProperty(propName))
@@ -883,7 +883,7 @@ void QDesignerPropertySheet::setIconCache(qdesigner_internal::DesignerIconCache
int QDesignerPropertySheet::createFakeProperty(const QString &propertyName, const QVariant &value)
{
- typedef QDesignerPropertySheetPrivate::Info Info;
+ using Info = QDesignerPropertySheetPrivate::Info;
// fake properties
const int index = d->m_meta->indexOfProperty(propertyName);
if (index != -1) {
@@ -1612,7 +1612,7 @@ struct QDesignerAbstractPropertySheetFactory::PropertySheetFactoryPrivate {
const QString m_propertySheetId;
const QString m_dynamicPropertySheetId;
- typedef QMap<QObject*, QObject*> ExtensionMap;
+ using ExtensionMap = QMap<QObject*, QObject*>;
ExtensionMap m_extensions;
};
diff --git a/src/designer/src/lib/shared/qdesigner_stackedbox_p.h b/src/designer/src/lib/shared/qdesigner_stackedbox_p.h
index 851e3b294..36b876d78 100644
--- a/src/designer/src/lib/shared/qdesigner_stackedbox_p.h
+++ b/src/designer/src/lib/shared/qdesigner_stackedbox_p.h
@@ -144,7 +144,7 @@ private:
QStackedWidget *m_stackedWidget;
};
-typedef QDesignerPropertySheetFactory<QStackedWidget, QStackedWidgetPropertySheet> QStackedWidgetPropertySheetFactory;
+using QStackedWidgetPropertySheetFactory = QDesignerPropertySheetFactory<QStackedWidget, QStackedWidgetPropertySheet>;
QT_END_NAMESPACE
diff --git a/src/designer/src/lib/shared/qdesigner_tabwidget.cpp b/src/designer/src/lib/shared/qdesigner_tabwidget.cpp
index e8b744bb3..2f003cf6c 100644
--- a/src/designer/src/lib/shared/qdesigner_tabwidget.cpp
+++ b/src/designer/src/lib/shared/qdesigner_tabwidget.cpp
@@ -404,7 +404,7 @@ QTabWidgetPropertySheet::QTabWidgetPropertySheet(QTabWidget *object, QObject *pa
QTabWidgetPropertySheet::TabWidgetProperty QTabWidgetPropertySheet::tabWidgetPropertyFromName(const QString &name)
{
- typedef QHash<QString, TabWidgetProperty> TabWidgetPropertyHash;
+ using TabWidgetPropertyHash = QHash<QString, TabWidgetProperty>;
static TabWidgetPropertyHash tabWidgetPropertyHash;
if (tabWidgetPropertyHash.empty()) {
tabWidgetPropertyHash.insert(QLatin1String(currentTabTextKey), PropertyCurrentTabText);
diff --git a/src/designer/src/lib/shared/qdesigner_tabwidget_p.h b/src/designer/src/lib/shared/qdesigner_tabwidget_p.h
index 8a13c13b8..1a488fe69 100644
--- a/src/designer/src/lib/shared/qdesigner_tabwidget_p.h
+++ b/src/designer/src/lib/shared/qdesigner_tabwidget_p.h
@@ -133,7 +133,7 @@ private:
QMap<QWidget *, PageData> m_pageToData;
};
-typedef QDesignerPropertySheetFactory<QTabWidget, QTabWidgetPropertySheet> QTabWidgetPropertySheetFactory;
+using QTabWidgetPropertySheetFactory = QDesignerPropertySheetFactory<QTabWidget, QTabWidgetPropertySheet>;
QT_END_NAMESPACE
diff --git a/src/designer/src/lib/shared/qdesigner_taskmenu_p.h b/src/designer/src/lib/shared/qdesigner_taskmenu_p.h
index c8e9bb58e..b4bc23da4 100644
--- a/src/designer/src/lib/shared/qdesigner_taskmenu_p.h
+++ b/src/designer/src/lib/shared/qdesigner_taskmenu_p.h
@@ -109,7 +109,7 @@ private:
QDesignerTaskMenuPrivate *d;
};
-typedef ExtensionFactory<QDesignerTaskMenuExtension, QWidget, QDesignerTaskMenu> QDesignerTaskMenuFactory;
+using QDesignerTaskMenuFactory = ExtensionFactory<QDesignerTaskMenuExtension, QWidget, QDesignerTaskMenu>;
} // namespace qdesigner_internal
diff --git a/src/designer/src/lib/shared/qdesigner_toolbar.cpp b/src/designer/src/lib/shared/qdesigner_toolbar.cpp
index 753be7b95..28c2ca285 100644
--- a/src/designer/src/lib/shared/qdesigner_toolbar.cpp
+++ b/src/designer/src/lib/shared/qdesigner_toolbar.cpp
@@ -55,7 +55,7 @@ Q_DECLARE_METATYPE(QAction*)
QT_BEGIN_NAMESPACE
-typedef QList<QAction*> ActionList;
+using ActionList = QList<QAction *>;
namespace qdesigner_internal {
// ------------------- ToolBarEventFilter
diff --git a/src/designer/src/lib/shared/qdesigner_toolbox.cpp b/src/designer/src/lib/shared/qdesigner_toolbox.cpp
index 434b22c55..f0c0dc726 100644
--- a/src/designer/src/lib/shared/qdesigner_toolbox.cpp
+++ b/src/designer/src/lib/shared/qdesigner_toolbox.cpp
@@ -254,7 +254,7 @@ QToolBoxWidgetPropertySheet::QToolBoxWidgetPropertySheet(QToolBox *object, QObje
QToolBoxWidgetPropertySheet::ToolBoxProperty QToolBoxWidgetPropertySheet::toolBoxPropertyFromName(const QString &name)
{
- typedef QHash<QString, ToolBoxProperty> ToolBoxPropertyHash;
+ using ToolBoxPropertyHash = QHash<QString, ToolBoxProperty>;
static ToolBoxPropertyHash toolBoxPropertyHash;
if (toolBoxPropertyHash.empty()) {
toolBoxPropertyHash.insert(QLatin1String(currentItemTextKey), PropertyCurrentItemText);
diff --git a/src/designer/src/lib/shared/qdesigner_toolbox_p.h b/src/designer/src/lib/shared/qdesigner_toolbox_p.h
index 70dc68d9d..52a458afe 100644
--- a/src/designer/src/lib/shared/qdesigner_toolbox_p.h
+++ b/src/designer/src/lib/shared/qdesigner_toolbox_p.h
@@ -120,7 +120,7 @@ private:
QMap<QWidget *, PageData> m_pageToData;
};
-typedef QDesignerPropertySheetFactory<QToolBox, QToolBoxWidgetPropertySheet> QToolBoxWidgetPropertySheetFactory;
+using QToolBoxWidgetPropertySheetFactory = QDesignerPropertySheetFactory<QToolBox, QToolBoxWidgetPropertySheet>;
QT_END_NAMESPACE
diff --git a/src/designer/src/lib/shared/qdesigner_utils_p.h b/src/designer/src/lib/shared/qdesigner_utils_p.h
index 12374296b..4013ded7d 100644
--- a/src/designer/src/lib/shared/qdesigner_utils_p.h
+++ b/src/designer/src/lib/shared/qdesigner_utils_p.h
@@ -81,10 +81,10 @@ template <class IntType>
class MetaEnum
{
public:
- typedef QMap<QString, IntType> KeyToValueMap;
+ using KeyToValueMap = QMap<QString, IntType>;
MetaEnum(const QString &name, const QString &scope, const QString &separator);
- MetaEnum() {}
+ MetaEnum() = default;
void addKey(IntType value, const QString &name);
QString valueToKey(IntType value, bool *ok = nullptr) const;
@@ -273,8 +273,8 @@ class QDESIGNER_SHARED_EXPORT PropertySheetIconValue
PropertySheetIconValue themed() const;
PropertySheetIconValue unthemed() const;
- typedef QPair<QIcon::Mode, QIcon::State> ModeStateKey;
- typedef QMap<ModeStateKey, PropertySheetPixmapValue> ModeStateToPixmapMap;
+ using ModeStateKey = QPair<QIcon::Mode, QIcon::State>;
+ using ModeStateToPixmapMap = QMap<ModeStateKey, PropertySheetPixmapValue>;
const ModeStateToPixmapMap &paths() const;
diff --git a/src/designer/src/lib/shared/qlayout_widget.cpp b/src/designer/src/lib/shared/qlayout_widget.cpp
index 9b6911dcd..125eeb2b8 100644
--- a/src/designer/src/lib/shared/qlayout_widget.cpp
+++ b/src/designer/src/lib/shared/qlayout_widget.cpp
@@ -464,12 +464,12 @@ QRect LayoutHelper::itemInfo(QLayout *lt, const QWidget *widget) const
void simplify(const QDesignerFormEditorInterface *, QWidget *, const QRect &) override {}
// Helper for restoring layout states
- typedef QVector <QLayoutItem *> LayoutItemVector;
+ using LayoutItemVector = QVector<QLayoutItem *>;
static LayoutItemVector disassembleLayout(QLayout *lt);
static QLayoutItem *findItemOfWidget(const LayoutItemVector &lv, QWidget *w);
private:
- typedef QVector<QWidget *> BoxLayoutState;
+ using BoxLayoutState = QVector<QWidget *>;
static BoxLayoutState state(const QBoxLayout*lt);
@@ -608,7 +608,7 @@ QRect LayoutHelper::itemInfo(QLayout *lt, const QWidget *widget) const
};
// Horiontal, Vertical pair of state
typedef QPair<DimensionCellState, DimensionCellState> CellState;
- typedef QVector<CellState> CellStates;
+ using CellStates = QVector<CellState>;
// Figure out states of a cell and return as a flat vector of
// [column1, column2,...] (address as row * columnCount + col)
@@ -695,7 +695,7 @@ QRect LayoutHelper::itemInfo(QLayout *lt, const QWidget *widget) const
void GridLayoutState::applyToLayout(const QDesignerFormEditorInterface *core, QWidget *w) const
{
- typedef QHash<QLayoutItem *, QRect> LayoutItemRectMap;
+ using LayoutItemRectMap =QHash<QLayoutItem *, QRect>;
QGridLayout *grid = qobject_cast<QGridLayout *>(LayoutInfo::managedLayout(core, w));
Q_ASSERT(grid);
if (debugLayout)
@@ -1015,7 +1015,7 @@ QRect LayoutHelper::itemInfo(QLayout *lt, const QWidget *widget) const
class FormLayoutHelper : public LayoutHelper {
public:
typedef QPair<QWidget *, QWidget *> WidgetPair;
- typedef QVector<WidgetPair> FormLayoutState;
+ using FormLayoutState = QVector<WidgetPair>;
FormLayoutHelper() {}
@@ -1179,8 +1179,8 @@ QRect LayoutHelper::itemInfo(QLayout *lt, const QWidget *widget) const
void FormLayoutHelper::simplify(const QDesignerFormEditorInterface *core, QWidget *widgetWithManagedLayout, const QRect &restrictionArea)
{
- typedef QPair<QLayoutItem*, QLayoutItem*> LayoutItemPair;
- typedef QVector<LayoutItemPair> LayoutItemPairs;
+ using LayoutItemPair = QPair<QLayoutItem*, QLayoutItem*>;
+ using LayoutItemPairs = QVector<LayoutItemPair>;
QFormLayout *formLayout = qobject_cast<QFormLayout *>(LayoutInfo::managedLayout(core, widgetWithManagedLayout));
Q_ASSERT(formLayout);
diff --git a/src/designer/src/lib/shared/qsimpleresource_p.h b/src/designer/src/lib/shared/qsimpleresource_p.h
index c615f4ee2..be67a43dc 100644
--- a/src/designer/src/lib/shared/qsimpleresource_p.h
+++ b/src/designer/src/lib/shared/qsimpleresource_p.h
@@ -101,7 +101,7 @@ private:
// Contents of clipboard for formbuilder copy and paste operations
// (Actions and widgets)
struct QDESIGNER_SHARED_EXPORT FormBuilderClipboard {
- typedef QList<QAction*> ActionList;
+ using ActionList = QList<QAction *>;
FormBuilderClipboard() {}
FormBuilderClipboard(QWidget *w);
diff --git a/src/designer/src/lib/shared/qtresourcemodel.cpp b/src/designer/src/lib/shared/qtresourcemodel.cpp
index 86eda0190..1586fcf44 100644
--- a/src/designer/src/lib/shared/qtresourcemodel.cpp
+++ b/src/designer/src/lib/shared/qtresourcemodel.cpp
@@ -146,7 +146,7 @@ void QtResourceSet::setModified(const QString &path)
// ------------------- QtResourceModelPrivate
const QByteArray *QtResourceModelPrivate::createResource(const QString &path, QStringList *contents, int *errorCount, QIODevice &errorDevice) const
{
- typedef RCCResourceLibrary::ResourceDataFileMap ResourceDataFileMap;
+ using ResourceDataFileMap = RCCResourceLibrary::ResourceDataFileMap;
const QByteArray *rc = nullptr;
*errorCount = -1;
contents->clear();
diff --git a/src/designer/src/lib/shared/selectsignaldialog.cpp b/src/designer/src/lib/shared/selectsignaldialog.cpp
index 39d1bb145..67b988a56 100644
--- a/src/designer/src/lib/shared/selectsignaldialog.cpp
+++ b/src/designer/src/lib/shared/selectsignaldialog.cpp
@@ -53,7 +53,7 @@ namespace qdesigner_internal {
enum { MethodRole = Qt::UserRole + 1 };
-typedef QVector<SelectSignalDialog::Method> Methods;
+using Methods = QVector<SelectSignalDialog::Method>;
SelectSignalDialog::SelectSignalDialog(QWidget *parent)
: QDialog(parent)
diff --git a/src/designer/src/lib/shared/shared_settings_p.h b/src/designer/src/lib/shared/shared_settings_p.h
index f08691203..65dcf29bc 100644
--- a/src/designer/src/lib/shared/shared_settings_p.h
+++ b/src/designer/src/lib/shared/shared_settings_p.h
@@ -67,7 +67,7 @@ namespace qdesigner_internal {
class QDESIGNER_SHARED_EXPORT QDesignerSharedSettings {
public:
- typedef QList<DeviceProfile> DeviceProfileList;
+ using DeviceProfileList = QList<DeviceProfile>;
explicit QDesignerSharedSettings(QDesignerFormEditorInterface *core);
diff --git a/src/designer/src/lib/shared/widgetdatabase.cpp b/src/designer/src/lib/shared/widgetdatabase.cpp
index 0b79041ce..1a9297e73 100644
--- a/src/designer/src/lib/shared/widgetdatabase.cpp
+++ b/src/designer/src/lib/shared/widgetdatabase.cpp
@@ -348,8 +348,8 @@ static WidgetDataBaseItem *createCustomWidgetItem(const QDesignerCustomWidgetInt
void WidgetDataBase::loadPlugins()
{
typedef QMap<QString, int> NameIndexMap;
- typedef QList<QDesignerWidgetDataBaseItemInterface*> ItemList;
- typedef QSet<QString> NameSet;
+ using ItemList = QList<QDesignerWidgetDataBaseItemInterface *>;
+ using NameSet = QSet<QString>;
// 1) create a map of existing custom classes
NameIndexMap existingCustomClasses;
NameSet nonCustomClasses;
@@ -539,7 +539,7 @@ QStringList WidgetDataBase::customFormWidgetClasses(const QDesignerFormEditorInt
// properties to be suitable for new forms
static QString xmlFromWidgetBox(const QDesignerFormEditorInterface *core, const QString &className, const QString &objectName)
{
- typedef QList<DomProperty*> PropertyList;
+ using PropertyList = QList<DomProperty *>;
QDesignerWidgetBoxInterface::Widget widget;
const bool found = QDesignerWidgetBox::findWidget(core->widgetBox(), className, QString(), &widget);
diff --git a/src/designer/src/lib/shared/widgetdatabase_p.h b/src/designer/src/lib/shared/widgetdatabase_p.h
index e8afa1064..44dcd4f18 100644
--- a/src/designer/src/lib/shared/widgetdatabase_p.h
+++ b/src/designer/src/lib/shared/widgetdatabase_p.h
@@ -136,7 +136,7 @@ private:
enum IncludeType { IncludeLocal, IncludeGlobal };
-typedef QPair<QString, IncludeType> IncludeSpecification;
+using IncludeSpecification = QPair<QString, IncludeType>;
QDESIGNER_SHARED_EXPORT IncludeSpecification includeSpecification(QString includeFile);
QDESIGNER_SHARED_EXPORT QString buildIncludeFile(QString includeFile, IncludeType includeType);
@@ -184,7 +184,7 @@ QDESIGNER_SHARED_EXPORT QDesignerWidgetDataBaseItemInterface
bool promoted,
bool custom);
-typedef QList<QDesignerWidgetDataBaseItemInterface*> WidgetDataBaseItemList;
+using WidgetDataBaseItemList = QList<QDesignerWidgetDataBaseItemInterface *>;
QDESIGNER_SHARED_EXPORT WidgetDataBaseItemList
promotionCandidates(const QDesignerWidgetDataBaseInterface *db,
diff --git a/src/designer/src/lib/shared/widgetfactory_p.h b/src/designer/src/lib/shared/widgetfactory_p.h
index 1c85339c5..e9fd4bfe6 100644
--- a/src/designer/src/lib/shared/widgetfactory_p.h
+++ b/src/designer/src/lib/shared/widgetfactory_p.h
@@ -154,13 +154,13 @@ private:
const Strings m_strings;
QDesignerFormEditorInterface *m_core;
- typedef QMap<QString, QDesignerCustomWidgetInterface*> CustomWidgetFactoryMap;
+ using CustomWidgetFactoryMap = QMap<QString, QDesignerCustomWidgetInterface*>;
CustomWidgetFactoryMap m_customFactory;
QDesignerFormWindowInterface *m_formWindow;
// Points to the cached style or 0 if the default (qApp) is active
QStyle *m_currentStyle;
- typedef QHash<QString, QStyle *> StyleCache;
+ using StyleCache = QHash<QString, QStyle *>;
StyleCache m_styleCache;
};
diff --git a/src/designer/src/lib/shared/zoomwidget.cpp b/src/designer/src/lib/shared/zoomwidget.cpp
index f9d59c3df..fef509a39 100644
--- a/src/designer/src/lib/shared/zoomwidget.cpp
+++ b/src/designer/src/lib/shared/zoomwidget.cpp
@@ -43,8 +43,8 @@
QT_BEGIN_NAMESPACE
-typedef QList<QAction*> ActionList;
-typedef QList<QGraphicsItem *> GraphicsItemList;
+using ActionList = QList<QAction *>;
+using GraphicsItemList = QList<QGraphicsItem *>;
enum { debugZoomWidget = 0 };
diff --git a/src/designer/src/lib/uilib/abstractformbuilder.cpp b/src/designer/src/lib/uilib/abstractformbuilder.cpp
index e759406b8..bc7ba02bf 100644
--- a/src/designer/src/lib/uilib/abstractformbuilder.cpp
+++ b/src/designer/src/lib/uilib/abstractformbuilder.cpp
@@ -199,7 +199,7 @@ QWidget *QAbstractFormBuilder::load(QIODevice *dev, QWidget *parentWidget)
*/
QWidget *QAbstractFormBuilder::create(DomUI *ui, QWidget *parentWidget)
{
- typedef QFormBuilderExtra::ButtonGroupHash ButtonGroupHash;
+ using ButtonGroupHash = QFormBuilderExtra::ButtonGroupHash;
d->clear();
if (const DomLayoutDefault *def = ui->elementLayoutDefault()) {
@@ -2066,7 +2066,7 @@ void QAbstractFormBuilder::saveComboBoxExtraInfo(QComboBox *comboBox, DomWidget
void QAbstractFormBuilder::saveButtonExtraInfo(const QAbstractButton *widget, DomWidget *ui_widget, DomWidget *)
{
- typedef QList<DomProperty*> DomPropertyList;
+ using DomPropertyList = QList<DomProperty *>;
if (const QButtonGroup *buttonGroup = widget->group()) {
DomPropertyList attributes = ui_widget->elementAttribute();
DomString *domString = new DomString();
@@ -2434,7 +2434,7 @@ static QString buttonGroupName(const DomWidget *ui_widget)
void QAbstractFormBuilder::loadButtonExtraInfo(const DomWidget *ui_widget, QAbstractButton *button, QWidget *)
{
- typedef QFormBuilderExtra::ButtonGroupHash ButtonGroupHash;
+ using ButtonGroupHash = QFormBuilderExtra::ButtonGroupHash;
const QString groupName = buttonGroupName(ui_widget);
if (groupName.isEmpty())
diff --git a/src/designer/src/lib/uilib/abstractformbuilder.h b/src/designer/src/lib/uilib/abstractformbuilder.h
index 8d015c91f..bf2e9d5d5 100644
--- a/src/designer/src/lib/uilib/abstractformbuilder.h
+++ b/src/designer/src/lib/uilib/abstractformbuilder.h
@@ -218,7 +218,7 @@ protected:
QVariant toVariant(const QMetaObject *meta, DomProperty *property);
static QString toString(const DomString *str);
- typedef QHash<QString, DomProperty*> DomPropertyHash;
+ using DomPropertyHash = QHash<QString, DomProperty*>;
static DomPropertyHash propertyMap(const QList<DomProperty*> &properties);
void setupColorGroup(QPalette &palette, QPalette::ColorGroup colorGroup, DomColorGroup *group);
@@ -239,7 +239,7 @@ protected:
// Icon/pixmap stuff
//
// A Pair of icon path/qrc path.
- typedef QPair<QString, QString> IconPaths;
+ using IconPaths = QPair<QString, QString>;
IconPaths iconPaths(const QIcon &) const;
IconPaths pixmapPaths(const QPixmap &) const;
diff --git a/src/designer/src/lib/uilib/formbuilderextra_p.h b/src/designer/src/lib/uilib/formbuilderextra_p.h
index 3b46c966b..54fbfbe66 100644
--- a/src/designer/src/lib/uilib/formbuilderextra_p.h
+++ b/src/designer/src/lib/uilib/formbuilderextra_p.h
@@ -147,8 +147,8 @@ public:
// --- Hash used in creating button groups on demand. Store a map of name and pair of dom group and real group
void registerButtonGroups(const DomButtonGroups *groups);
- typedef QPair<DomButtonGroup *, QButtonGroup*> ButtonGroupEntry;
- typedef QHash<QString, ButtonGroupEntry> ButtonGroupHash;
+ using ButtonGroupEntry = QPair<DomButtonGroup *, QButtonGroup*>;
+ using ButtonGroupHash = QHash<QString, ButtonGroupEntry>;
const ButtonGroupHash &buttonGroups() const { return m_buttonGroups; }
ButtonGroupHash &buttonGroups() { return m_buttonGroups; }
@@ -191,7 +191,7 @@ private:
void clearResourceBuilder();
void clearTextBuilder();
- typedef QHash<QLabel*, QString> BuddyHash;
+ using BuddyHash = QHash<QLabel*, QString>;
BuddyHash m_buddies;
QHash<QString, CustomWidgetData> m_customWidgetDataHash;
@@ -256,14 +256,14 @@ struct QDESIGNER_UILIB_EXPORT QFormBuilderStrings {
const QString scriptWidgetVariable;
const QString scriptChildWidgetsVariable;
- typedef QPair<Qt::ItemDataRole, QString> RoleNName;
+ using RoleNName = QPair<Qt::ItemDataRole, QString>;
QList<RoleNName> itemRoles;
QHash<QString, Qt::ItemDataRole> treeItemRoleHash;
// first.first is primary role, first.second is shadow role.
// Shadow is used for either the translation source or the designer
// representation of the string value.
- typedef QPair<QPair<Qt::ItemDataRole, Qt::ItemDataRole>, QString> TextRoleNName;
+ using TextRoleNName = QPair<QPair<Qt::ItemDataRole, Qt::ItemDataRole>, QString>;
QList<TextRoleNName> itemTextRoles;
QHash<QString, QPair<Qt::ItemDataRole, Qt::ItemDataRole> > treeItemTextRoleHash;
};
diff --git a/src/designer/src/uitools/quiloader.cpp b/src/designer/src/uitools/quiloader.cpp
index 2d5bf439a..097512373 100644
--- a/src/designer/src/uitools/quiloader.cpp
+++ b/src/designer/src/uitools/quiloader.cpp
@@ -330,7 +330,7 @@ class FormBuilderPrivate: public QFormBuilder
{
friend class QT_PREPEND_NAMESPACE(QUiLoader);
friend class QT_PREPEND_NAMESPACE(QUiLoaderPrivate);
- typedef QFormBuilder ParentClass;
+ using ParentClass = QFormBuilder;
public:
QUiLoader *loader = nullptr;