forked from qt-creator/qt-creator
QmakeProjectManager: Modernize
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using modernize-use-equals-default Change-Id: I7642992eee6838bb2566921de87390c1771ebcbe Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Tobias Hunger
parent
02d46e6c2c
commit
cd5066d86b
@@ -42,7 +42,7 @@ namespace Internal {
|
||||
// refuses placeholders and invalid characters.
|
||||
class ClassModel : public QStandardItemModel {
|
||||
public:
|
||||
explicit ClassModel(QObject *parent = 0);
|
||||
explicit ClassModel(QObject *parent = nullptr);
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
|
||||
|
||||
void appendPlaceHolder() { appendClass(m_newClassPlaceHolder); }
|
||||
@@ -68,7 +68,7 @@ ClassModel::ClassModel(QObject *parent) :
|
||||
|
||||
void ClassModel::appendClass(const QString &c)
|
||||
{
|
||||
QStandardItem *item = new QStandardItem(c);
|
||||
auto *item = new QStandardItem(c);
|
||||
item->setFlags(Qt::ItemIsEnabled|Qt::ItemIsEditable);
|
||||
appendRow(item);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ CustomWidgetWidgetsWizardPage::CustomWidgetWidgetsWizardPage(QWidget *parent) :
|
||||
m_ui->deleteButton->setEnabled(false);
|
||||
|
||||
// Disabled dummy for <new class> column>.
|
||||
ClassDefinition *dummy = new ClassDefinition;
|
||||
auto *dummy = new ClassDefinition;
|
||||
dummy->setFileNamingParameters(m_fileNamingParameters);
|
||||
dummy->setEnabled(false);
|
||||
m_tabStackLayout->addWidget(dummy);
|
||||
@@ -89,7 +89,7 @@ void CustomWidgetWidgetsWizardPage::slotCurrentRowChanged(int row)
|
||||
|
||||
void CustomWidgetWidgetsWizardPage::on_classList_classAdded(const QString &name)
|
||||
{
|
||||
ClassDefinition *cdef = new ClassDefinition;
|
||||
auto *cdef = new ClassDefinition;
|
||||
cdef->setFileNamingParameters(m_fileNamingParameters);
|
||||
const int index = m_uiClassDefs.count();
|
||||
m_tabStackLayout->insertWidget(index, cdef);
|
||||
|
||||
@@ -62,7 +62,7 @@ Core::BaseFileWizard *CustomWidgetWizard::create(QWidget *parent, const Core::Wi
|
||||
Core::GeneratedFiles CustomWidgetWizard::generateFiles(const QWizard *w,
|
||||
QString *errorMessage) const
|
||||
{
|
||||
const CustomWidgetWizardDialog *cw = qobject_cast<const CustomWidgetWizardDialog *>(w);
|
||||
const auto *cw = qobject_cast<const CustomWidgetWizardDialog *>(w);
|
||||
Q_ASSERT(w);
|
||||
GenerationParameters p;
|
||||
p.fileName = cw->projectName();
|
||||
|
||||
Reference in New Issue
Block a user