summaryrefslogtreecommitdiff
path: root/src/plugins/qt4projectmanager/wizards
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qt4projectmanager/wizards')
-rw-r--r--src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp6
-rw-r--r--src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp6
-rw-r--r--src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/guiappwizard.cpp6
-rw-r--r--src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/librarywizard.cpp14
-rw-r--r--src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp4
-rw-r--r--src/plugins/qt4projectmanager/wizards/qtprojectparameters.cpp6
-rw-r--r--src/plugins/qt4projectmanager/wizards/qtprojectparameters.h2
-rw-r--r--src/plugins/qt4projectmanager/wizards/qtwizard.cpp4
-rw-r--r--src/plugins/qt4projectmanager/wizards/testwizard.cpp6
-rw-r--r--src/plugins/qt4projectmanager/wizards/testwizarddialog.cpp4
13 files changed, 32 insertions, 32 deletions
diff --git a/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp b/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp
index 4456b6a87c..c3477a5ef9 100644
--- a/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp
@@ -66,10 +66,10 @@ QWizard *ConsoleAppWizard::createWizardDialog(QWidget *parent,
const QString &defaultPath,
const WizardPageList &extensionPages) const
{
- ConsoleAppWizardDialog *dialog = new ConsoleAppWizardDialog(name(), icon(), extensionPages,
+ ConsoleAppWizardDialog *dialog = new ConsoleAppWizardDialog(displayName(), icon(), extensionPages,
showModulesPageForApplications(), parent);
dialog->setPath(defaultPath);
- dialog->setName(ConsoleAppWizardDialog::projectName(defaultPath));
+ dialog->setProjectName(ConsoleAppWizardDialog::uniqueProjectName(defaultPath));
return dialog;
}
@@ -88,7 +88,7 @@ Core::GeneratedFiles
Core::GeneratedFile source(sourceFileName);
source.setContents(license + QLatin1String(mainCppC));
// Create files: Profile
- const QString profileName = Core::BaseFileWizard::buildFileName(projectPath, params.name,profileSuffix());
+ const QString profileName = Core::BaseFileWizard::buildFileName(projectPath, params.fileName, profileSuffix());
Core::GeneratedFile profile(profileName);
QString contents;
diff --git a/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp
index 445a34620a..4a7a84dd4b 100644
--- a/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp
@@ -59,7 +59,7 @@ QtProjectParameters ConsoleAppWizardDialog::parameters() const
{
QtProjectParameters rc;
rc.type = QtProjectParameters::ConsoleApp;
- rc.name = name();
+ rc.fileName = projectName();
rc.path = path();
rc.selectedModules = selectedModules();
diff --git a/src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp b/src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp
index b16ea2dbe1..cb8ab14caa 100644
--- a/src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp
@@ -46,9 +46,9 @@ QWizard *EmptyProjectWizard::createWizardDialog(QWidget *parent,
const QString &defaultPath,
const WizardPageList &extensionPages) const
{
- EmptyProjectWizardDialog *dialog = new EmptyProjectWizardDialog(name(), icon(), extensionPages, parent);
+ EmptyProjectWizardDialog *dialog = new EmptyProjectWizardDialog(displayName(), icon(), extensionPages, parent);
dialog->setPath(defaultPath);
- dialog->setName(EmptyProjectWizardDialog::projectName(defaultPath));
+ dialog->setProjectName(EmptyProjectWizardDialog::uniqueProjectName(defaultPath));
return dialog;
}
@@ -59,7 +59,7 @@ Core::GeneratedFiles
const EmptyProjectWizardDialog *wizard = qobject_cast< const EmptyProjectWizardDialog *>(w);
const QtProjectParameters params = wizard->parameters();
const QString projectPath = params.projectPath();
- const QString profileName = Core::BaseFileWizard::buildFileName(projectPath, params.name, profileSuffix());
+ const QString profileName = Core::BaseFileWizard::buildFileName(projectPath, params.fileName, profileSuffix());
Core::GeneratedFile profile(profileName);
return Core::GeneratedFiles() << profile;
diff --git a/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp
index b32bb7bf03..bd09c18690 100644
--- a/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp
@@ -53,7 +53,7 @@ QtProjectParameters EmptyProjectWizardDialog::parameters() const
{
QtProjectParameters rc;
rc.type = QtProjectParameters::EmptyProject;
- rc.name = name();
+ rc.fileName = projectName();
rc.path = path();
return rc;
}
diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp b/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp
index 0634a69d87..871cf20cec 100644
--- a/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp
@@ -83,11 +83,11 @@ QWizard *GuiAppWizard::createWizardDialog(QWidget *parent,
const QString &defaultPath,
const WizardPageList &extensionPages) const
{
- GuiAppWizardDialog *dialog = new GuiAppWizardDialog(name(), icon(), extensionPages,
+ GuiAppWizardDialog *dialog = new GuiAppWizardDialog(displayName(), icon(), extensionPages,
showModulesPageForApplications(),
parent);
dialog->setPath(defaultPath);
- dialog->setName(GuiAppWizardDialog::projectName(defaultPath));
+ dialog->setProjectName(GuiAppWizardDialog::uniqueProjectName(defaultPath));
// Order! suffixes first to generate files correctly
dialog->setLowerCaseFiles(QtWizard::lowerCaseFiles());
dialog->setSuffixes(headerSuffix(), sourceSuffix(), formSuffix());
@@ -169,7 +169,7 @@ Core::GeneratedFiles GuiAppWizard::generateFiles(const QWizard *w,
formHeader.setContents(license + contents);
}
// Create files: profile
- const QString profileName = buildFileName(projectPath, projectParams.name, profileSuffix());
+ const QString profileName = buildFileName(projectPath, projectParams.fileName, profileSuffix());
Core::GeneratedFile profile(profileName);
contents.clear();
{
diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp
index 2c1769369a..97750490c5 100644
--- a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp
@@ -87,7 +87,7 @@ QtProjectParameters GuiAppWizardDialog::projectParameters() const
{
QtProjectParameters rc;
rc.type = QtProjectParameters::GuiApp;
- rc.name = name();
+ rc.fileName = projectName();
rc.path = path();
rc.selectedModules = selectedModules();
rc.deselectedModules = deselectedModules();
diff --git a/src/plugins/qt4projectmanager/wizards/librarywizard.cpp b/src/plugins/qt4projectmanager/wizards/librarywizard.cpp
index cd5cbe0855..6a9ffb3ba8 100644
--- a/src/plugins/qt4projectmanager/wizards/librarywizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/librarywizard.cpp
@@ -58,11 +58,11 @@ QWizard *LibraryWizard::createWizardDialog(QWidget *parent,
const QString &defaultPath,
const WizardPageList &extensionPages) const
{
- LibraryWizardDialog *dialog = new LibraryWizardDialog(name(), icon(), extensionPages,
+ LibraryWizardDialog *dialog = new LibraryWizardDialog(displayName(), icon(), extensionPages,
showModulesPageForLibraries(), parent);
dialog->setLowerCaseFiles(QtWizard::lowerCaseFiles());
dialog->setPath(defaultPath);
- dialog->setName(LibraryWizardDialog::projectName(defaultPath));
+ dialog->setProjectName(LibraryWizardDialog::uniqueProjectName(defaultPath));
dialog->setSuffixes(headerSuffix(), sourceSuffix(), formSuffix());
return dialog;
}
@@ -78,7 +78,7 @@ Core::GeneratedFiles LibraryWizard::generateFiles(const QWizard *w,
const LibraryParameters params = dialog->libraryParameters();
const QString license = CppTools::AbstractEditorSupport::licenseTemplate();
- const QString sharedLibExportMacro = QtProjectParameters::exportMacro(projectParams.name);
+ const QString sharedLibExportMacro = QtProjectParameters::exportMacro(projectParams.fileName);
Core::GeneratedFiles rc;
// Class header + source
@@ -92,16 +92,16 @@ Core::GeneratedFiles LibraryWizard::generateFiles(const QWizard *w,
// Create files: global header for shared libs
QString globalHeaderFileName;
if (projectParams.type == QtProjectParameters::SharedLibrary) {
- const QString globalHeaderName = buildFileName(projectPath, projectParams.name + QLatin1String(sharedHeaderPostfixC), headerSuffix());
+ const QString globalHeaderName = buildFileName(projectPath, projectParams.fileName + QLatin1String(sharedHeaderPostfixC), headerSuffix());
Core::GeneratedFile globalHeader(globalHeaderName);
globalHeaderFileName = QFileInfo(globalHeader.path()).fileName();
- globalHeader.setContents(license + LibraryParameters::generateSharedHeader(globalHeaderFileName, projectParams.name, sharedLibExportMacro));
+ globalHeader.setContents(license + LibraryParameters::generateSharedHeader(globalHeaderFileName, projectParams.fileName, sharedLibExportMacro));
rc.push_back(globalHeader);
}
// Generate code
QString headerContents, sourceContents;
- params.generateCode(projectParams.type, projectParams.name, headerFileName,
+ params.generateCode(projectParams.type, projectParams.fileName, headerFileName,
globalHeaderFileName, sharedLibExportMacro,
/* indentation*/ 4, &headerContents, &sourceContents);
@@ -110,7 +110,7 @@ Core::GeneratedFiles LibraryWizard::generateFiles(const QWizard *w,
rc.push_back(source);
rc.push_back(header);
// Create files: profile
- const QString profileName = buildFileName(projectPath, projectParams.name, profileSuffix());
+ const QString profileName = buildFileName(projectPath, projectParams.fileName, profileSuffix());
Core::GeneratedFile profile(profileName);
QString profileContents;
{
diff --git a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
index e445f62854..fb6102c503 100644
--- a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
@@ -192,7 +192,7 @@ QtProjectParameters LibraryWizardDialog::parameters() const
{
QtProjectParameters rc;
rc.type = type();
- rc.name = name();
+ rc.fileName = projectName();
rc.path = path();
if (rc.type == QtProjectParameters::Qt4Plugin) {
// Plugin: Dependencies & Target directory
@@ -236,7 +236,7 @@ void LibraryWizardDialog::slotCurrentIdChanged(int id)
break;
default: {
// Urrm, figure out a good class name. Use project name this time
- QString className = name();
+ QString className = projectName();
if (!className.isEmpty())
className[0] = className.at(0).toUpper();
m_filesPage->setClassName(className);
diff --git a/src/plugins/qt4projectmanager/wizards/qtprojectparameters.cpp b/src/plugins/qt4projectmanager/wizards/qtprojectparameters.cpp
index e91aedaa62..4a8ddcfdf7 100644
--- a/src/plugins/qt4projectmanager/wizards/qtprojectparameters.cpp
+++ b/src/plugins/qt4projectmanager/wizards/qtprojectparameters.cpp
@@ -50,7 +50,7 @@ QString QtProjectParameters::projectPath() const
QString rc = path;
if (!rc.isEmpty())
rc += QDir::separator();
- rc += name;
+ rc += fileName;
return rc;
}
@@ -60,7 +60,7 @@ void QtProjectParameters::writeProFile(QTextStream &str) const
str << "QT += " << selectedModules << "\n\n";
if (!deselectedModules.isEmpty())
str << "QT -= " << deselectedModules << "\n\n";
- const QString &effectiveTarget = target.isEmpty() ? name : target;
+ const QString &effectiveTarget = target.isEmpty() ? fileName : target;
if (!effectiveTarget.isEmpty())
str << "TARGET = " << effectiveTarget << '\n';
switch (type) {
@@ -74,7 +74,7 @@ void QtProjectParameters::writeProFile(QTextStream &str) const
str << "TEMPLATE = lib\nCONFIG += staticlib\n";
break;
case SharedLibrary:
- str << "TEMPLATE = lib\n\nDEFINES += " << libraryMacro(name) << '\n';
+ str << "TEMPLATE = lib\n\nDEFINES += " << libraryMacro(fileName) << '\n';
break;
case Qt4Plugin:
str << "TEMPLATE = lib\nCONFIG += plugin\n";
diff --git a/src/plugins/qt4projectmanager/wizards/qtprojectparameters.h b/src/plugins/qt4projectmanager/wizards/qtprojectparameters.h
index c361404051..63b45e21df 100644
--- a/src/plugins/qt4projectmanager/wizards/qtprojectparameters.h
+++ b/src/plugins/qt4projectmanager/wizards/qtprojectparameters.h
@@ -61,7 +61,7 @@ struct QtProjectParameters {
static QString libraryMacro(const QString &projectName);
Type type;
- QString name;
+ QString fileName;
QString target;
QString path;
QString selectedModules;
diff --git a/src/plugins/qt4projectmanager/wizards/qtwizard.cpp b/src/plugins/qt4projectmanager/wizards/qtwizard.cpp
index 9bd987f7aa..8651accd10 100644
--- a/src/plugins/qt4projectmanager/wizards/qtwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/qtwizard.cpp
@@ -56,9 +56,9 @@ static inline Core::BaseFileWizardParameters
{
Core::BaseFileWizardParameters rc(Core::IWizard::ProjectWizard);
rc.setCategory(QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_CATEGORY));
- rc.setTrCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY));
+ rc.setDisplayCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY));
rc.setIcon(icon);
- rc.setName(name);
+ rc.setDisplayName(name);
rc.setId(id);
rc.setDescription(description);
return rc;
diff --git a/src/plugins/qt4projectmanager/wizards/testwizard.cpp b/src/plugins/qt4projectmanager/wizards/testwizard.cpp
index 2257daa01b..5c1a0fe96d 100644
--- a/src/plugins/qt4projectmanager/wizards/testwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/testwizard.cpp
@@ -53,9 +53,9 @@ QWizard *TestWizard::createWizardDialog(QWidget *parent,
const QString &defaultPath,
const WizardPageList &extensionPages) const
{
- TestWizardDialog *dialog = new TestWizardDialog(name(), icon(), extensionPages, parent);
+ TestWizardDialog *dialog = new TestWizardDialog(displayName(), icon(), extensionPages, parent);
dialog->setPath(defaultPath);
- dialog->setName(TestWizardDialog::projectName(defaultPath));
+ dialog->setProjectName(TestWizardDialog::uniqueProjectName(defaultPath));
return dialog;
}
@@ -160,7 +160,7 @@ Core::GeneratedFiles TestWizard::generateFiles(const QWizard *w, QString *errorM
source.setContents(generateTestCode(testParams, sourceFileInfo.baseName()));
// Create profile with define for base dir to find test data
- const QString profileName = Core::BaseFileWizard::buildFileName(projectPath, projectParams.name, profileSuffix());
+ const QString profileName = Core::BaseFileWizard::buildFileName(projectPath, projectParams.fileName, profileSuffix());
Core::GeneratedFile profile(profileName);
QString contents;
{
diff --git a/src/plugins/qt4projectmanager/wizards/testwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/testwizarddialog.cpp
index 266abb5a33..e84fcd27f8 100644
--- a/src/plugins/qt4projectmanager/wizards/testwizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/testwizarddialog.cpp
@@ -69,7 +69,7 @@ TestWizardDialog::TestWizardDialog(const QString &templateName,
void TestWizardDialog::slotCurrentIdChanged(int id)
{
if (id == TestPageId)
- m_testPage->setProjectName(name());
+ m_testPage->setProjectName(projectName());
}
TestWizardParameters TestWizardDialog::testParameters() const
@@ -81,7 +81,7 @@ QtProjectParameters TestWizardDialog::projectParameters() const
{
QtProjectParameters rc;
rc.type = QtProjectParameters::ConsoleApp;
- rc.name = name();
+ rc.fileName = projectName();
rc.path = path();
// Name binary "tst_xx" after the main source
rc.target = QFileInfo(m_testPage->sourcefileName()).baseName();