forked from qt-creator/qt-creator
QmakeProjectManager: Modernize
modernize-* Change-Id: Ib1d4527e223704f81f9470201735e8c2ebb2d89c Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -39,7 +39,7 @@ class ClassDefinition : public QTabWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ClassDefinition(QWidget *parent = 0);
|
||||
explicit ClassDefinition(QWidget *parent = nullptr);
|
||||
void setClassName(const QString &name);
|
||||
|
||||
FileNamingParameters fileNamingParameters() const { return m_fileNamingParameters; }
|
||||
|
@@ -43,12 +43,12 @@ class CustomWidgetPluginWizardPage : public QWizardPage
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CustomWidgetPluginWizardPage(QWidget *parent = 0);
|
||||
virtual ~CustomWidgetPluginWizardPage();
|
||||
explicit CustomWidgetPluginWizardPage(QWidget *parent = nullptr);
|
||||
~CustomWidgetPluginWizardPage() override;
|
||||
|
||||
void init(const CustomWidgetWidgetsWizardPage *widgetsPage);
|
||||
|
||||
virtual bool isComplete() const;
|
||||
bool isComplete() const override;
|
||||
|
||||
FileNamingParameters fileNamingParameters() const { return m_fileNamingParameters; }
|
||||
void setFileNamingParameters(const FileNamingParameters &fnp) {m_fileNamingParameters = fnp; }
|
||||
|
@@ -48,12 +48,12 @@ class CustomWidgetWidgetsWizardPage : public QWizardPage
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CustomWidgetWidgetsWizardPage(QWidget *parent = 0);
|
||||
virtual ~CustomWidgetWidgetsWizardPage();
|
||||
explicit CustomWidgetWidgetsWizardPage(QWidget *parent = nullptr);
|
||||
~CustomWidgetWidgetsWizardPage() override;
|
||||
|
||||
QList<PluginOptions::WidgetOptions> widgetOptions() const;
|
||||
|
||||
virtual bool isComplete() const;
|
||||
bool isComplete() const override;
|
||||
|
||||
FileNamingParameters fileNamingParameters() const { return m_fileNamingParameters; }
|
||||
void setFileNamingParameters(const FileNamingParameters &fnp) {m_fileNamingParameters = fnp; }
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
int classCount() const { return m_uiClassDefs.size(); }
|
||||
QString classNameAt(int i) const;
|
||||
|
||||
virtual void initializePage();
|
||||
void initializePage() override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void on_classList_classAdded(const QString &name);
|
||||
|
@@ -38,9 +38,10 @@ public:
|
||||
CustomWidgetWizard();
|
||||
|
||||
protected:
|
||||
Core::BaseFileWizard *create(QWidget *parent, const Core::WizardDialogParameters ¶meters) const;
|
||||
Core::BaseFileWizard *create(QWidget *parent,
|
||||
const Core::WizardDialogParameters ¶meters) const override;
|
||||
|
||||
Core::GeneratedFiles generateFiles(const QWizard *w, QString *errorMessage) const;
|
||||
Core::GeneratedFiles generateFiles(const QWizard *w, QString *errorMessage) const override;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
@@ -103,12 +103,12 @@ QmakeStaticData::QmakeStaticData()
|
||||
const unsigned count = sizeof(fileTypeDataStorage)/sizeof(FileTypeDataStorage);
|
||||
fileTypeData.reserve(count);
|
||||
|
||||
for (unsigned i = 0 ; i < count; ++i) {
|
||||
const QString desc = QCoreApplication::translate("QmakeProjectManager::QmakePriFile", fileTypeDataStorage[i].typeName);
|
||||
const QString filter = QString::fromUtf8(fileTypeDataStorage[i].addFileFilter);
|
||||
fileTypeData.push_back(QmakeStaticData::FileTypeData(fileTypeDataStorage[i].type,
|
||||
for (const FileTypeDataStorage &fileType : fileTypeDataStorage) {
|
||||
const QString desc = QCoreApplication::translate("QmakeProjectManager::QmakePriFile", fileType.typeName);
|
||||
const QString filter = QString::fromUtf8(fileType.addFileFilter);
|
||||
fileTypeData.push_back(QmakeStaticData::FileTypeData(fileType.type,
|
||||
desc, filter,
|
||||
Core::FileIconProvider::directoryIcon(QLatin1String(fileTypeDataStorage[i].icon))));
|
||||
Core::FileIconProvider::directoryIcon(QLatin1String(fileType.icon))));
|
||||
}
|
||||
// Project icon
|
||||
projectIcon = Core::FileIconProvider::directoryIcon(ProjectExplorer::Constants::FILEOVERLAY_QT);
|
||||
|
@@ -58,9 +58,8 @@ static const char *baseClassesC[] = {"QMainWindow", "QWidget", "QDialog"};
|
||||
static inline QStringList baseClasses()
|
||||
{
|
||||
QStringList rc;
|
||||
const int baseClassCount = sizeof(baseClassesC)/sizeof(const char *);
|
||||
for (int i = 0; i < baseClassCount; i++)
|
||||
rc.push_back(QLatin1String(baseClassesC[i]));
|
||||
for (auto baseClass : baseClassesC)
|
||||
rc.push_back(QLatin1String(baseClass));
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@@ -284,8 +284,8 @@ void LibraryWizardDialog::setupFilesPage()
|
||||
QStringList baseClasses;
|
||||
const int pluginBaseClassCount = sizeof(pluginBaseClasses)/sizeof(PluginBaseClasses);
|
||||
Q_ASSERT(defaultPluginBaseClass < pluginBaseClassCount);
|
||||
for (int i = 0; i < pluginBaseClassCount; i++)
|
||||
baseClasses.push_back(QLatin1String(pluginBaseClasses[i].name));
|
||||
for (const PluginBaseClasses &pluginBaseClasse : pluginBaseClasses)
|
||||
baseClasses.push_back(QLatin1String(pluginBaseClasse.name));
|
||||
m_filesPage->setBaseClassChoices(baseClasses);
|
||||
m_filesPage->setBaseClassName(baseClasses.at(defaultPluginBaseClass));
|
||||
m_pluginBaseClassesInitialized = true;
|
||||
|
@@ -36,8 +36,6 @@
|
||||
#include <QLayout>
|
||||
#include <QWidget>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
using namespace QmakeProjectManager::Internal;
|
||||
|
||||
ModulesPage::ModulesPage(QWidget *parent)
|
||||
|
Reference in New Issue
Block a user