forked from qt-creator/qt-creator
Fixes: Introduce a cpp settingspage containing file naming conventions (lower case and suffixes). Reorder VCS settings pages.
Task: 241959, 248085 RevBy: Optics/Naming checked by con Details: Give IOptionPage an id() to differentiate from trName(). Make showOptionsDialog return a bool (applied) and give it an optional parent. Change Cpp and form class wizards, give them a Configure... button to change those settings.
This commit is contained in:
@@ -34,10 +34,12 @@
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <cppeditor/cppeditorconstants.h>
|
||||
#include <cpptools/cpptoolsconstants.h>
|
||||
|
||||
#include <QtCore/QFile>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QSettings>
|
||||
|
||||
using namespace Designer;
|
||||
using namespace Designer::Internal;
|
||||
@@ -62,13 +64,21 @@ QString FormClassWizard::formSuffix() const
|
||||
return preferredSuffix(QLatin1String(Constants::FORM_MIMETYPE));
|
||||
}
|
||||
|
||||
// Retrieve settings of CppTools plugin.
|
||||
static inline bool lowerCaseFiles()
|
||||
{
|
||||
QString camelCaseSettingsKey = QLatin1String(CppTools::Constants::CPPTOOLS_SETTINGSGROUP);
|
||||
camelCaseSettingsKey += QLatin1Char('/');
|
||||
camelCaseSettingsKey += QLatin1String(CppTools::Constants::LOWERCASE_CPPFILES_KEY);
|
||||
return Core::ICore::instance()->settings()->value(camelCaseSettingsKey, QVariant(false)).toBool();
|
||||
}
|
||||
|
||||
QWizard *FormClassWizard::createWizardDialog(QWidget *parent,
|
||||
const QString &defaultPath,
|
||||
const WizardPageList &extensionPages) const
|
||||
{
|
||||
FormClassWizardDialog *wizardDialog = new FormClassWizardDialog(extensionPages,
|
||||
parent);
|
||||
wizardDialog->setSuffixes(headerSuffix(), sourceSuffix(), formSuffix());
|
||||
wizardDialog->setPath(defaultPath);
|
||||
return wizardDialog;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user