diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-06-22 16:22:15 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-06-22 16:22:15 +0200 |
commit | 696cfa043215d4140b0d9c5ac2fdb8b8789b92c9 (patch) | |
tree | 4ff1cd4d7e733d73370217c5f060128495e8c915 /src/plugins/qt4projectmanager/wizards/librarywizard.cpp | |
parent | 1b168b686d8eaeca536891096d7e1620331b87f9 (diff) | |
download | qt-creator-696cfa043215d4140b0d9c5ac2fdb8b8789b92c9.tar.gz |
Add a license template setting to the CppTools settings.
Acked-by: con <qtc-committer@nokia.com>
Diffstat (limited to 'src/plugins/qt4projectmanager/wizards/librarywizard.cpp')
-rw-r--r-- | src/plugins/qt4projectmanager/wizards/librarywizard.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/qt4projectmanager/wizards/librarywizard.cpp b/src/plugins/qt4projectmanager/wizards/librarywizard.cpp index 82e24a3977..9707f9dd43 100644 --- a/src/plugins/qt4projectmanager/wizards/librarywizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/librarywizard.cpp @@ -34,6 +34,7 @@ #include <utils/codegeneration.h> #include <utils/pathchooser.h> +#include <cpptools/cppmodelmanagerinterface.h> #include <QtCore/QDir> #include <QtCore/QFileInfo> @@ -73,6 +74,7 @@ Core::GeneratedFiles LibraryWizard::generateFiles(const QWizard *w, const QtProjectParameters projectParams = dialog->parameters(); const QString projectPath = projectParams.projectPath(); const LibraryParameters params = dialog->libraryParameters(); + const QString license = CppTools::AbstractEditorSupport::licenseTemplate(); const QString sharedLibExportMacro = QtProjectParameters::exportMacro(projectParams.name); @@ -91,7 +93,7 @@ Core::GeneratedFiles LibraryWizard::generateFiles(const QWizard *w, const QString globalHeaderName = buildFileName(projectPath, projectParams.name + QLatin1String(sharedHeaderPostfixC), headerSuffix()); Core::GeneratedFile globalHeader(globalHeaderName); globalHeaderFileName = QFileInfo(globalHeader.path()).fileName(); - globalHeader.setContents(LibraryParameters::generateSharedHeader(globalHeaderFileName, projectParams.name, sharedLibExportMacro)); + globalHeader.setContents(license + LibraryParameters::generateSharedHeader(globalHeaderFileName, projectParams.name, sharedLibExportMacro)); rc.push_back(globalHeader); } @@ -101,8 +103,8 @@ Core::GeneratedFiles LibraryWizard::generateFiles(const QWizard *w, globalHeaderFileName, sharedLibExportMacro, /* indentation*/ 4, &headerContents, &sourceContents); - source.setContents(sourceContents); - header.setContents(headerContents); + source.setContents(license + sourceContents); + header.setContents(license + headerContents); rc.push_back(source); rc.push_back(header); // Create files: profile |