forked from qt-creator/qt-creator
C++-Settings/License template: Add %FILENAME%, %CLASS% placeholders.
... for doxygen. Change logic for known empty keywords to be replaced by an empty string. Task-number: QTCREATORBUG-1854
This commit is contained in:
@@ -341,7 +341,10 @@ bool FormClassWizardParametersPrivate::generateCpp(const FormClassWizardGenerati
|
||||
|
||||
const QString unqualifiedClassName = namespaceList.takeLast();
|
||||
|
||||
const QString license = CppTools::AbstractEditorSupport::licenseTemplate();
|
||||
const QString headerLicense =
|
||||
CppTools::AbstractEditorSupport::licenseTemplate(headerFile, className);
|
||||
const QString sourceLicense =
|
||||
CppTools::AbstractEditorSupport::licenseTemplate(sourceFile, className);
|
||||
// Include guards
|
||||
const QString guard = Utils::headerGuard(headerFile);
|
||||
|
||||
@@ -351,7 +354,7 @@ bool FormClassWizardParametersPrivate::generateCpp(const FormClassWizardGenerati
|
||||
|
||||
// 1) Header file
|
||||
QTextStream headerStr(header);
|
||||
headerStr << license << "#ifndef " << guard
|
||||
headerStr << headerLicense << "#ifndef " << guard
|
||||
<< "\n#define " << guard << '\n' << '\n';
|
||||
|
||||
// Include 'ui_'
|
||||
@@ -409,7 +412,7 @@ bool FormClassWizardParametersPrivate::generateCpp(const FormClassWizardGenerati
|
||||
|
||||
// 2) Source file
|
||||
QTextStream sourceStr(source);
|
||||
sourceStr << license;
|
||||
sourceStr << sourceLicense;
|
||||
Utils::writeIncludeFileDirective(headerFile, false, sourceStr);
|
||||
if (embedding == FormClassWizardGenerationParameters::PointerAggregatedUiClass)
|
||||
Utils::writeIncludeFileDirective(uiInclude, false, sourceStr);
|
||||
|
||||
Reference in New Issue
Block a user