Utils: Modernize further

Many issues, mostly in headers, were not addressed in
e38410b76c

modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-default-member-init
modernize-use-equals-default

Change-Id: I320a51726db881e582b898948d53735ebb06887a
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Alessandro Portale
2018-07-23 10:45:40 +02:00
parent 00c926b6b4
commit f6943a712a
53 changed files with 117 additions and 173 deletions

View File

@@ -114,7 +114,6 @@ QSize AnnotatedItemDelegate::sizeHint(const QStyleOptionViewItem &option,
PathChooserDelegate::PathChooserDelegate(QObject *parent)
: QStyledItemDelegate(parent)
, m_kind(Utils::PathChooser::ExistingDirectory)
{
}
@@ -133,7 +132,7 @@ QWidget *PathChooserDelegate::createEditor(QWidget *parent, const QStyleOptionVi
Q_UNUSED(option);
Q_UNUSED(index);
Utils::PathChooser *editor = new Utils::PathChooser(parent);
auto editor = new Utils::PathChooser(parent);
editor->setHistoryCompleter(m_historyKey);
editor->setAutoFillBackground(true); // To hide the text beneath the editor widget
@@ -157,7 +156,7 @@ void PathChooserDelegate::setEditorData(QWidget *editor, const QModelIndex &inde
void PathChooserDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
{
Utils::PathChooser *pathChooser = qobject_cast<Utils::PathChooser *>(editor);
auto pathChooser = qobject_cast<Utils::PathChooser *>(editor);
if (!pathChooser)
return;