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
Tobias Hunger
qt-creator
Commits
cff2c1df
Commit
cff2c1df
authored
Nov 26, 2009
by
dt
Browse files
QMakeStep some API cleanup
Rename arguments to allArguments(), qmakeArguments() to userArguments()
parent
6e01bf60
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/buildconfiguration.h
View file @
cff2c1df
...
...
@@ -120,8 +120,6 @@ public:
// restores a BuildConfiguration with the name and adds it to the project
virtual
BuildConfiguration
*
restore
()
const
=
0
;
// TODO display name unique, in different ways
signals:
void
availableCreationTypesChanged
();
};
...
...
src/plugins/qt4projectmanager/qmakestep.cpp
View file @
cff2c1df
...
...
@@ -58,7 +58,7 @@ QMakeStep::QMakeStep(ProjectExplorer::BuildConfiguration *bc)
QMakeStep
::
QMakeStep
(
QMakeStep
*
bs
,
ProjectExplorer
::
BuildConfiguration
*
bc
)
:
AbstractMakeStep
(
bs
,
bc
),
m_forced
(
false
),
m_
qmake
Args
(
bs
->
m_
qmake
Args
)
m_
user
Args
(
bs
->
m_
user
Args
)
{
}
...
...
@@ -72,9 +72,9 @@ Qt4BuildConfiguration *QMakeStep::qt4BuildConfiguration() const
return
static_cast
<
Qt4BuildConfiguration
*>
(
buildConfiguration
());
}
QStringList
QMakeStep
::
arguments
()
QStringList
QMakeStep
::
a
llA
rguments
()
{
QStringList
additonalArguments
=
m_
qmake
Args
;
QStringList
additonalArguments
=
m_
user
Args
;
Qt4BuildConfiguration
*
bc
=
qt4BuildConfiguration
();
QStringList
arguments
;
arguments
<<
buildConfiguration
()
->
project
()
->
file
()
->
fileName
();
...
...
@@ -129,7 +129,7 @@ bool QMakeStep::init()
return
false
;
}
QStringList
args
=
arguments
();
QStringList
args
=
a
llA
rguments
();
QString
workingDirectory
=
qt4bc
->
buildDirectory
();
QString
program
=
qtVersion
->
qmakeCommand
();
...
...
@@ -220,24 +220,24 @@ bool QMakeStep::processFinished(int exitCode, QProcess::ExitStatus status)
void
QMakeStep
::
setQMakeArguments
(
const
QStringList
&
arguments
)
{
m_
qmake
Args
=
arguments
;
m_
user
Args
=
arguments
;
emit
changed
();
}
QStringList
QMakeStep
::
qmake
Arguments
()
QStringList
QMakeStep
::
user
Arguments
()
{
return
m_
qmake
Args
;
return
m_
user
Args
;
}
void
QMakeStep
::
restoreFromLocalMap
(
const
QMap
<
QString
,
QVariant
>
&
map
)
{
m_
qmake
Args
=
map
.
value
(
"qmakeArgs"
).
toStringList
();
m_
user
Args
=
map
.
value
(
"qmakeArgs"
).
toStringList
();
AbstractProcessStep
::
restoreFromLocalMap
(
map
);
}
void
QMakeStep
::
storeIntoLocalMap
(
QMap
<
QString
,
QVariant
>
&
map
)
{
map
[
"qmakeArgs"
]
=
m_
qmake
Args
;
map
[
"qmakeArgs"
]
=
m_
user
Args
;
AbstractProcessStep
::
storeIntoLocalMap
(
map
);
}
...
...
@@ -276,7 +276,7 @@ void QMakeStepConfigWidget::updateTitleLabel()
return
;
}
QStringList
args
=
m_step
->
arguments
();
QStringList
args
=
m_step
->
a
llA
rguments
();
// We don't want the full path to the .pro file
const
QString
projectFileName
=
m_step
->
buildConfiguration
()
->
project
()
->
file
()
->
fileName
();
int
index
=
args
.
indexOf
(
projectFileName
);
...
...
@@ -331,7 +331,7 @@ void QMakeStepConfigWidget::update()
void
QMakeStepConfigWidget
::
init
()
{
QString
qmakeArgs
=
ProjectExplorer
::
Environment
::
joinArgumentList
(
m_step
->
qmake
Arguments
());
QString
qmakeArgs
=
ProjectExplorer
::
Environment
::
joinArgumentList
(
m_step
->
user
Arguments
());
m_ui
.
qmakeAdditonalArgumentsLineEdit
->
setText
(
qmakeArgs
);
ProjectExplorer
::
BuildConfiguration
*
bc
=
m_step
->
buildConfiguration
();
bool
debug
=
QtVersion
::
QmakeBuildConfig
(
bc
->
value
(
"buildConfiguration"
).
toInt
())
&
QtVersion
::
DebugBuild
;
...
...
@@ -346,7 +346,7 @@ void QMakeStepConfigWidget::updateEffectiveQMakeCall()
const
QtVersion
*
qtVersion
=
qt4bc
->
qtVersion
();
if
(
qtVersion
)
{
QString
program
=
QFileInfo
(
qtVersion
->
qmakeCommand
()).
fileName
();
m_ui
.
qmakeArgumentsEdit
->
setPlainText
(
program
+
QLatin1Char
(
' '
)
+
ProjectExplorer
::
Environment
::
joinArgumentList
(
m_step
->
arguments
()));
m_ui
.
qmakeArgumentsEdit
->
setPlainText
(
program
+
QLatin1Char
(
' '
)
+
ProjectExplorer
::
Environment
::
joinArgumentList
(
m_step
->
a
llA
rguments
()));
}
else
{
m_ui
.
qmakeArgumentsEdit
->
setPlainText
(
tr
(
"No valid Qt version set."
));
}
...
...
src/plugins/qt4projectmanager/qmakestep.h
View file @
cff2c1df
...
...
@@ -78,11 +78,11 @@ public:
virtual
QString
displayName
();
virtual
ProjectExplorer
::
BuildStepConfigWidget
*
createConfigWidget
();
virtual
bool
immutable
()
const
;
QStringList
arguments
();
void
setForced
(
bool
b
);
bool
forced
();
QStringList
qmakeArguments
();
QStringList
allArguments
();
QStringList
userArguments
();
void
setQMakeArguments
(
const
QStringList
&
arguments
);
virtual
void
restoreFromLocalMap
(
const
QMap
<
QString
,
QVariant
>
&
map
);
...
...
@@ -100,7 +100,7 @@ private:
QStringList
m_lastEnv
;
bool
m_forced
;
bool
m_needToRunQMake
;
// set in init(), read in run()
QStringList
m_
qmake
Args
;
QStringList
m_
user
Args
;
};
...
...
src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
View file @
cff2c1df
...
...
@@ -284,7 +284,7 @@ bool Qt4BuildConfiguration::compareBuildConfigurationToImportFrom(const QString
// now compare arguments lists
// we have to compare without the spec/platform cmd argument
// and compare that on its own
QString
actualSpec
=
extractSpecFromArgumentList
(
qs
->
qmake
Arguments
(),
workingDirectory
,
version
);
QString
actualSpec
=
extractSpecFromArgumentList
(
qs
->
user
Arguments
(),
workingDirectory
,
version
);
if
(
actualSpec
.
isEmpty
())
{
// Easy one the user has choosen not to override the settings
actualSpec
=
version
->
mkspec
();
...
...
@@ -292,7 +292,7 @@ bool Qt4BuildConfiguration::compareBuildConfigurationToImportFrom(const QString
QString
parsedSpec
=
extractSpecFromArgumentList
(
result
.
second
,
workingDirectory
,
version
);
QStringList
actualArgs
=
removeSpecFromArgumentList
(
qs
->
qmake
Arguments
());
QStringList
actualArgs
=
removeSpecFromArgumentList
(
qs
->
user
Arguments
());
QStringList
parsedArgs
=
removeSpecFromArgumentList
(
result
.
second
);
if
(
debug
)
{
...
...
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