Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
f7b09f13
Commit
f7b09f13
authored
Sep 06, 2010
by
Friedemann Kleint
Browse files
Customwizard: Remove unused code.
parent
7b52a2ab
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/customwizard/customwizard.cpp
View file @
f7b09f13
...
...
@@ -189,7 +189,7 @@ Core::GeneratedFiles CustomWizard::generateFiles(const QWizard *dialog, QString
QTC_ASSERT
(
cwp
,
return
Core
::
GeneratedFiles
())
CustomWizardContextPtr
ctx
=
context
();
ctx
->
targetPath
=
cwp
->
path
();
ctx
->
path
=
ctx
->
targetPath
=
cwp
->
path
();
ctx
->
replacements
=
replacementMap
(
dialog
);
if
(
CustomWizardPrivate
::
verbose
)
{
QString
logText
;
...
...
@@ -493,19 +493,14 @@ Core::GeneratedFiles CustomProjectWizard::generateFiles(const QWizard *w, QStrin
QTC_ASSERT
(
dialog
,
return
Core
::
GeneratedFiles
())
// Add project name as macro. Path is here under project directory
CustomWizardContextPtr
ctx
=
context
();
ctx
->
targetPath
=
dialog
->
path
()
+
QLatin1Char
(
'/'
)
+
dialog
->
projectName
();
ctx
->
path
=
dialog
->
path
();
ctx
->
targetPath
=
ctx
->
path
+
QLatin1Char
(
'/'
)
+
dialog
->
projectName
();
FieldReplacementMap
fieldReplacementMap
=
replacementMap
(
dialog
);
fieldReplacementMap
.
insert
(
QLatin1String
(
"ProjectName"
),
dialog
->
projectName
());
ctx
->
replacements
=
fieldReplacementMap
;
if
(
CustomWizardPrivate
::
verbose
)
qDebug
()
<<
"CustomProjectWizard::generateFiles"
<<
dialog
<<
ctx
->
targetPath
<<
ctx
->
replacements
;
const
Core
::
GeneratedFiles
generatedFiles
=
generateWizardFiles
(
errorMessage
);
// Find the project file and store in context
foreach
(
const
Core
::
GeneratedFile
&
f
,
generatedFiles
)
if
(
f
.
attributes
()
&
Core
::
GeneratedFile
::
OpenProjectAttribute
)
{
ctx
->
projectFilePath
=
f
.
path
();
break
;
}
return
generatedFiles
;
}
...
...
src/plugins/projectexplorer/customwizard/customwizardparameters.cpp
View file @
f7b09f13
...
...
@@ -791,8 +791,8 @@ void CustomWizardContext::reset()
baseReplacements
.
insert
(
QLatin1String
(
"CppHeaderSuffix"
),
mdb
->
preferredSuffixByType
(
QLatin1String
(
CppTools
::
Constants
::
CPP_HEADER_MIMETYPE
)));
replacements
.
clear
();
path
.
clear
();
targetPath
.
clear
();
projectFilePath
.
clear
();
}
QString
CustomWizardContext
::
processFile
(
const
FieldReplacementMap
&
fm
,
QString
in
)
...
...
src/plugins/projectexplorer/customwizard/customwizardparameters.h
View file @
f7b09f13
...
...
@@ -143,10 +143,11 @@ struct CustomWizardContext {
FieldReplacementMap
baseReplacements
;
FieldReplacementMap
replacements
;
// Where files should be created, that is, choosen path for simple wizards
// or "path/project" for project wizards.
QString
path
;
// Where files should be created, that is, 'path' for simple wizards
// or "path + project" for project wizards.
QString
targetPath
;
QString
projectFilePath
;
};
extern
const
char
customWizardFileOpenEditorAttributeC
[];
...
...
src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.h
View file @
f7b09f13
...
...
@@ -48,11 +48,11 @@ struct GeneratorScriptArgument;
* attribute of the <files> element) which actually creates files.
* The command line of the script must follow the convention
*
* script [--dry-run] [Field1=Value1 [Field2=Value2] [Field3:Filename3]]]...
* script [--dry-run] [options]
*
* Options containing field placeholders are configured in the XML files
* and will be passed with them replaced by their values.
*
* Multiline texts will be passed on as temporary files using the colon
* separator.
* The parameters are the field values from the UI.
* As Qt Creator needs to know the file names before actually creates them to
* do overwrite checking etc., this is 2-step process:
* 1) Determine file names and attributes: The script is called with the
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment