forked from qt-creator/qt-creator
ProjectExplorer: Documentation for some run configuration aspects
Change-Id: I27568facbe0fa992b33c9d3b5b2588b486a85c63 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -52,6 +52,12 @@ namespace ProjectExplorer {
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class ProjectExplorer::TerminalAspect
|
\class ProjectExplorer::TerminalAspect
|
||||||
|
\inmodule QtCreator
|
||||||
|
|
||||||
|
\brief The TerminalAspect class lets a user specify that an executable
|
||||||
|
should be run in a separate terminal.
|
||||||
|
|
||||||
|
The initial value is provided as a hint from the build systems.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
TerminalAspect::TerminalAspect()
|
TerminalAspect::TerminalAspect()
|
||||||
@@ -64,6 +70,9 @@ TerminalAspect::TerminalAspect()
|
|||||||
this, &TerminalAspect::calculateUseTerminal);
|
this, &TerminalAspect::calculateUseTerminal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\reimp
|
||||||
|
*/
|
||||||
void TerminalAspect::addToLayout(LayoutBuilder &builder)
|
void TerminalAspect::addToLayout(LayoutBuilder &builder)
|
||||||
{
|
{
|
||||||
QTC_CHECK(!m_checkBox);
|
QTC_CHECK(!m_checkBox);
|
||||||
@@ -77,6 +86,9 @@ void TerminalAspect::addToLayout(LayoutBuilder &builder)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\reimp
|
||||||
|
*/
|
||||||
void TerminalAspect::fromMap(const QVariantMap &map)
|
void TerminalAspect::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
if (map.contains(settingsKey())) {
|
if (map.contains(settingsKey())) {
|
||||||
@@ -90,6 +102,9 @@ void TerminalAspect::fromMap(const QVariantMap &map)
|
|||||||
m_checkBox->setChecked(m_useTerminal);
|
m_checkBox->setChecked(m_useTerminal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\reimp
|
||||||
|
*/
|
||||||
void TerminalAspect::toMap(QVariantMap &data) const
|
void TerminalAspect::toMap(QVariantMap &data) const
|
||||||
{
|
{
|
||||||
if (m_userSet)
|
if (m_userSet)
|
||||||
@@ -114,17 +129,26 @@ void TerminalAspect::calculateUseTerminal()
|
|||||||
m_checkBox->setChecked(m_useTerminal);
|
m_checkBox->setChecked(m_useTerminal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns whether a separate terminal should be used.
|
||||||
|
*/
|
||||||
bool TerminalAspect::useTerminal() const
|
bool TerminalAspect::useTerminal() const
|
||||||
{
|
{
|
||||||
return m_useTerminal;
|
return m_useTerminal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Sets the initial value to \a hint.
|
||||||
|
*/
|
||||||
void TerminalAspect::setUseTerminalHint(bool hint)
|
void TerminalAspect::setUseTerminalHint(bool hint)
|
||||||
{
|
{
|
||||||
m_useTerminalHint = hint;
|
m_useTerminalHint = hint;
|
||||||
calculateUseTerminal();
|
calculateUseTerminal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns whether the user set the value.
|
||||||
|
*/
|
||||||
bool TerminalAspect::isUserSet() const
|
bool TerminalAspect::isUserSet() const
|
||||||
{
|
{
|
||||||
return m_userSet;
|
return m_userSet;
|
||||||
@@ -132,6 +156,10 @@ bool TerminalAspect::isUserSet() const
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class ProjectExplorer::WorkingDirectoryAspect
|
\class ProjectExplorer::WorkingDirectoryAspect
|
||||||
|
\inmodule QtCreator
|
||||||
|
|
||||||
|
\brief The WorkingDirectoryAspect class lets the user specify a
|
||||||
|
working directory for running the executable.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
WorkingDirectoryAspect::WorkingDirectoryAspect()
|
WorkingDirectoryAspect::WorkingDirectoryAspect()
|
||||||
@@ -141,6 +169,9 @@ WorkingDirectoryAspect::WorkingDirectoryAspect()
|
|||||||
setSettingsKey("RunConfiguration.WorkingDirectory");
|
setSettingsKey("RunConfiguration.WorkingDirectory");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\reimp
|
||||||
|
*/
|
||||||
void WorkingDirectoryAspect::addToLayout(LayoutBuilder &builder)
|
void WorkingDirectoryAspect::addToLayout(LayoutBuilder &builder)
|
||||||
{
|
{
|
||||||
QTC_CHECK(!m_chooser);
|
QTC_CHECK(!m_chooser);
|
||||||
@@ -187,6 +218,9 @@ void WorkingDirectoryAspect::resetPath()
|
|||||||
m_chooser->setFilePath(m_defaultWorkingDirectory);
|
m_chooser->setFilePath(m_defaultWorkingDirectory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\reimp
|
||||||
|
*/
|
||||||
void WorkingDirectoryAspect::fromMap(const QVariantMap &map)
|
void WorkingDirectoryAspect::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
m_workingDirectory = FilePath::fromString(map.value(settingsKey()).toString());
|
m_workingDirectory = FilePath::fromString(map.value(settingsKey()).toString());
|
||||||
@@ -199,6 +233,9 @@ void WorkingDirectoryAspect::fromMap(const QVariantMap &map)
|
|||||||
m_chooser->setFilePath(m_workingDirectory.isEmpty() ? m_defaultWorkingDirectory : m_workingDirectory);
|
m_chooser->setFilePath(m_workingDirectory.isEmpty() ? m_defaultWorkingDirectory : m_workingDirectory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\reimp
|
||||||
|
*/
|
||||||
void WorkingDirectoryAspect::toMap(QVariantMap &data) const
|
void WorkingDirectoryAspect::toMap(QVariantMap &data) const
|
||||||
{
|
{
|
||||||
const QString wd = m_workingDirectory == m_defaultWorkingDirectory
|
const QString wd = m_workingDirectory == m_defaultWorkingDirectory
|
||||||
@@ -207,6 +244,11 @@ void WorkingDirectoryAspect::toMap(QVariantMap &data) const
|
|||||||
data.insert(keyForDefaultWd(), m_defaultWorkingDirectory.toString());
|
data.insert(keyForDefaultWd(), m_defaultWorkingDirectory.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns the selected directory.
|
||||||
|
|
||||||
|
Macros in the value are expanded using \a expander.
|
||||||
|
*/
|
||||||
FilePath WorkingDirectoryAspect::workingDirectory(const MacroExpander *expander) const
|
FilePath WorkingDirectoryAspect::workingDirectory(const MacroExpander *expander) const
|
||||||
{
|
{
|
||||||
const Utils::Environment env = m_envAspect ? m_envAspect->environment()
|
const Utils::Environment env = m_envAspect ? m_envAspect->environment()
|
||||||
@@ -222,11 +264,19 @@ FilePath WorkingDirectoryAspect::defaultWorkingDirectory() const
|
|||||||
return m_defaultWorkingDirectory;
|
return m_defaultWorkingDirectory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns the selected directory.
|
||||||
|
|
||||||
|
Macros in the value are not expanded.
|
||||||
|
*/
|
||||||
FilePath WorkingDirectoryAspect::unexpandedWorkingDirectory() const
|
FilePath WorkingDirectoryAspect::unexpandedWorkingDirectory() const
|
||||||
{
|
{
|
||||||
return m_workingDirectory;
|
return m_workingDirectory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Sets the default value to \a defaultWorkingDir.
|
||||||
|
*/
|
||||||
void WorkingDirectoryAspect::setDefaultWorkingDirectory(const FilePath &defaultWorkingDir)
|
void WorkingDirectoryAspect::setDefaultWorkingDirectory(const FilePath &defaultWorkingDir)
|
||||||
{
|
{
|
||||||
if (defaultWorkingDir == m_defaultWorkingDirectory)
|
if (defaultWorkingDir == m_defaultWorkingDirectory)
|
||||||
@@ -244,6 +294,9 @@ void WorkingDirectoryAspect::setDefaultWorkingDirectory(const FilePath &defaultW
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\internal
|
||||||
|
*/
|
||||||
PathChooser *WorkingDirectoryAspect::pathChooser() const
|
PathChooser *WorkingDirectoryAspect::pathChooser() const
|
||||||
{
|
{
|
||||||
return m_chooser;
|
return m_chooser;
|
||||||
@@ -252,6 +305,10 @@ PathChooser *WorkingDirectoryAspect::pathChooser() const
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class ProjectExplorer::ArgumentsAspect
|
\class ProjectExplorer::ArgumentsAspect
|
||||||
|
\inmodule QtCreator
|
||||||
|
|
||||||
|
\brief The ArgumentsAspect class lets a user specify command line
|
||||||
|
arguments for an executable.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ArgumentsAspect::ArgumentsAspect()
|
ArgumentsAspect::ArgumentsAspect()
|
||||||
@@ -262,6 +319,11 @@ ArgumentsAspect::ArgumentsAspect()
|
|||||||
m_labelText = tr("Command line arguments:");
|
m_labelText = tr("Command line arguments:");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns the main value of this aspect.
|
||||||
|
|
||||||
|
Macros in the value are expanded using \a expander.
|
||||||
|
*/
|
||||||
QString ArgumentsAspect::arguments(const MacroExpander *expander) const
|
QString ArgumentsAspect::arguments(const MacroExpander *expander) const
|
||||||
{
|
{
|
||||||
QTC_ASSERT(expander, return m_arguments);
|
QTC_ASSERT(expander, return m_arguments);
|
||||||
@@ -274,11 +336,19 @@ QString ArgumentsAspect::arguments(const MacroExpander *expander) const
|
|||||||
return expanded;
|
return expanded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns the main value of this aspect.
|
||||||
|
|
||||||
|
Macros in the value are not expanded.
|
||||||
|
*/
|
||||||
QString ArgumentsAspect::unexpandedArguments() const
|
QString ArgumentsAspect::unexpandedArguments() const
|
||||||
{
|
{
|
||||||
return m_arguments;
|
return m_arguments;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Sets the main value of this aspect to \a arguments.
|
||||||
|
*/
|
||||||
void ArgumentsAspect::setArguments(const QString &arguments)
|
void ArgumentsAspect::setArguments(const QString &arguments)
|
||||||
{
|
{
|
||||||
if (arguments != m_arguments) {
|
if (arguments != m_arguments) {
|
||||||
@@ -291,16 +361,26 @@ void ArgumentsAspect::setArguments(const QString &arguments)
|
|||||||
m_multiLineChooser->setPlainText(arguments);
|
m_multiLineChooser->setPlainText(arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Sets the displayes label text to \a labelText.
|
||||||
|
*/
|
||||||
void ArgumentsAspect::setLabelText(const QString &labelText)
|
void ArgumentsAspect::setLabelText(const QString &labelText)
|
||||||
{
|
{
|
||||||
m_labelText = labelText;
|
m_labelText = labelText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Adds a button to reset the main value of this aspect to the value
|
||||||
|
computed by \a resetter.
|
||||||
|
*/
|
||||||
void ArgumentsAspect::setResetter(const std::function<QString()> &resetter)
|
void ArgumentsAspect::setResetter(const std::function<QString()> &resetter)
|
||||||
{
|
{
|
||||||
m_resetter = resetter;
|
m_resetter = resetter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Resets the main value of this aspect.
|
||||||
|
*/
|
||||||
void ArgumentsAspect::resetArguments()
|
void ArgumentsAspect::resetArguments()
|
||||||
{
|
{
|
||||||
QString arguments;
|
QString arguments;
|
||||||
@@ -309,6 +389,9 @@ void ArgumentsAspect::resetArguments()
|
|||||||
setArguments(arguments);
|
setArguments(arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\reimp
|
||||||
|
*/
|
||||||
void ArgumentsAspect::fromMap(const QVariantMap &map)
|
void ArgumentsAspect::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
QVariant args = map.value(settingsKey());
|
QVariant args = map.value(settingsKey());
|
||||||
@@ -328,12 +411,18 @@ void ArgumentsAspect::fromMap(const QVariantMap &map)
|
|||||||
m_multiLineChooser->setPlainText(m_arguments);
|
m_multiLineChooser->setPlainText(m_arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\reimp
|
||||||
|
*/
|
||||||
void ArgumentsAspect::toMap(QVariantMap &map) const
|
void ArgumentsAspect::toMap(QVariantMap &map) const
|
||||||
{
|
{
|
||||||
map.insert(settingsKey(), m_arguments);
|
map.insert(settingsKey(), m_arguments);
|
||||||
map.insert(settingsKey() + ".multi", m_multiLine);
|
map.insert(settingsKey() + ".multi", m_multiLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\internal
|
||||||
|
*/
|
||||||
QWidget *ArgumentsAspect::setupChooser()
|
QWidget *ArgumentsAspect::setupChooser()
|
||||||
{
|
{
|
||||||
if (m_multiLine) {
|
if (m_multiLine) {
|
||||||
@@ -354,6 +443,9 @@ QWidget *ArgumentsAspect::setupChooser()
|
|||||||
return m_chooser.data();
|
return m_chooser.data();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\reimp
|
||||||
|
*/
|
||||||
void ArgumentsAspect::addToLayout(LayoutBuilder &builder)
|
void ArgumentsAspect::addToLayout(LayoutBuilder &builder)
|
||||||
{
|
{
|
||||||
QTC_CHECK(!m_chooser && !m_multiLineChooser && !m_multiLineButton);
|
QTC_CHECK(!m_chooser && !m_multiLineChooser && !m_multiLineButton);
|
||||||
@@ -404,6 +496,13 @@ void ArgumentsAspect::addToLayout(LayoutBuilder &builder)
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class ProjectExplorer::ExecutableAspect
|
\class ProjectExplorer::ExecutableAspect
|
||||||
|
\inmodule QtCreator
|
||||||
|
|
||||||
|
\brief The ExecutableAspect class provides a building block to provide an
|
||||||
|
executable for a RunConfiguration.
|
||||||
|
|
||||||
|
It combines a StringAspect that is typically updated automatically
|
||||||
|
by the build system's parsing results with an optional manual override.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ExecutableAspect::ExecutableAspect()
|
ExecutableAspect::ExecutableAspect()
|
||||||
@@ -419,12 +518,21 @@ ExecutableAspect::ExecutableAspect()
|
|||||||
this, &ExecutableAspect::changed);
|
this, &ExecutableAspect::changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\internal
|
||||||
|
*/
|
||||||
ExecutableAspect::~ExecutableAspect()
|
ExecutableAspect::~ExecutableAspect()
|
||||||
{
|
{
|
||||||
delete m_alternativeExecutable;
|
delete m_alternativeExecutable;
|
||||||
m_alternativeExecutable = nullptr;
|
m_alternativeExecutable = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Sets the display style of the paths to the default used on \a osType,
|
||||||
|
backslashes on Windows, forward slashes elsewhere.
|
||||||
|
|
||||||
|
\sa Utils::StringAspect::setDisplayFilter()
|
||||||
|
*/
|
||||||
void ExecutableAspect::setExecutablePathStyle(OsType osType)
|
void ExecutableAspect::setExecutablePathStyle(OsType osType)
|
||||||
{
|
{
|
||||||
m_executable.setDisplayFilter([osType](const QString &pathName) {
|
m_executable.setDisplayFilter([osType](const QString &pathName) {
|
||||||
@@ -432,6 +540,11 @@ void ExecutableAspect::setExecutablePathStyle(OsType osType)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Sets the settings key for history completion to \a historyCompleterKey.
|
||||||
|
|
||||||
|
\sa Utils::PathChooser::setHistoryCompleter()
|
||||||
|
*/
|
||||||
void ExecutableAspect::setHistoryCompleter(const QString &historyCompleterKey)
|
void ExecutableAspect::setHistoryCompleter(const QString &historyCompleterKey)
|
||||||
{
|
{
|
||||||
m_executable.setHistoryCompleter(historyCompleterKey);
|
m_executable.setHistoryCompleter(historyCompleterKey);
|
||||||
@@ -439,6 +552,11 @@ void ExecutableAspect::setHistoryCompleter(const QString &historyCompleterKey)
|
|||||||
m_alternativeExecutable->setHistoryCompleter(historyCompleterKey);
|
m_alternativeExecutable->setHistoryCompleter(historyCompleterKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Sets the acceptable kind of path values to \a expectedKind.
|
||||||
|
|
||||||
|
\sa Utils::PathChooser::setExpectedKind()
|
||||||
|
*/
|
||||||
void ExecutableAspect::setExpectedKind(const PathChooser::Kind expectedKind)
|
void ExecutableAspect::setExpectedKind(const PathChooser::Kind expectedKind)
|
||||||
{
|
{
|
||||||
m_executable.setExpectedKind(expectedKind);
|
m_executable.setExpectedKind(expectedKind);
|
||||||
@@ -446,6 +564,13 @@ void ExecutableAspect::setExpectedKind(const PathChooser::Kind expectedKind)
|
|||||||
m_alternativeExecutable->setExpectedKind(expectedKind);
|
m_alternativeExecutable->setExpectedKind(expectedKind);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Sets the environment in which paths will be searched when the expected kind
|
||||||
|
of paths is chosen as PathChooser::Command or PathChooser::ExistingCommand
|
||||||
|
to \a env.
|
||||||
|
|
||||||
|
\sa Utils::StringAspect::setEnvironment()
|
||||||
|
*/
|
||||||
void ExecutableAspect::setEnvironment(const Environment &env)
|
void ExecutableAspect::setEnvironment(const Environment &env)
|
||||||
{
|
{
|
||||||
m_executable.setEnvironment(env);
|
m_executable.setEnvironment(env);
|
||||||
@@ -453,11 +578,25 @@ void ExecutableAspect::setEnvironment(const Environment &env)
|
|||||||
m_alternativeExecutable->setEnvironment(env);
|
m_alternativeExecutable->setEnvironment(env);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Sets the display \a style for aspect.
|
||||||
|
|
||||||
|
\sa Utils::StringAspect::setDisplayStyle()
|
||||||
|
*/
|
||||||
void ExecutableAspect::setDisplayStyle(StringAspect::DisplayStyle style)
|
void ExecutableAspect::setDisplayStyle(StringAspect::DisplayStyle style)
|
||||||
{
|
{
|
||||||
m_executable.setDisplayStyle(style);
|
m_executable.setDisplayStyle(style);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Makes an auto-detected executable overridable by the user.
|
||||||
|
|
||||||
|
The \a overridingKey specifies the settings key for the user-provided executable,
|
||||||
|
the \a useOverridableKey the settings key for the fact that it
|
||||||
|
is actually overridden the user.
|
||||||
|
|
||||||
|
\sa Utils::StringAspect::makeCheckable()
|
||||||
|
*/
|
||||||
void ExecutableAspect::makeOverridable(const QString &overridingKey, const QString &useOverridableKey)
|
void ExecutableAspect::makeOverridable(const QString &overridingKey, const QString &useOverridableKey)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(!m_alternativeExecutable, return);
|
QTC_ASSERT(!m_alternativeExecutable, return);
|
||||||
@@ -471,6 +610,13 @@ void ExecutableAspect::makeOverridable(const QString &overridingKey, const QStri
|
|||||||
this, &ExecutableAspect::changed);
|
this, &ExecutableAspect::changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns the path of the executable specified by this aspect. In case
|
||||||
|
the user selected a manual override this will be the value specified
|
||||||
|
by the user.
|
||||||
|
|
||||||
|
\sa makeOverridable()
|
||||||
|
*/
|
||||||
FilePath ExecutableAspect::executable() const
|
FilePath ExecutableAspect::executable() const
|
||||||
{
|
{
|
||||||
if (m_alternativeExecutable && m_alternativeExecutable->isChecked())
|
if (m_alternativeExecutable && m_alternativeExecutable->isChecked())
|
||||||
@@ -479,6 +625,9 @@ FilePath ExecutableAspect::executable() const
|
|||||||
return m_executable.filePath();
|
return m_executable.filePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\reimp
|
||||||
|
*/
|
||||||
void ExecutableAspect::addToLayout(LayoutBuilder &builder)
|
void ExecutableAspect::addToLayout(LayoutBuilder &builder)
|
||||||
{
|
{
|
||||||
m_executable.addToLayout(builder);
|
m_executable.addToLayout(builder);
|
||||||
@@ -486,28 +635,49 @@ void ExecutableAspect::addToLayout(LayoutBuilder &builder)
|
|||||||
m_alternativeExecutable->addToLayout(builder.finishRow());
|
m_alternativeExecutable->addToLayout(builder.finishRow());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Sets the label text for the main chooser to
|
||||||
|
\a labelText.
|
||||||
|
|
||||||
|
\sa Utils::StringAspect::setLabelText()
|
||||||
|
*/
|
||||||
void ExecutableAspect::setLabelText(const QString &labelText)
|
void ExecutableAspect::setLabelText(const QString &labelText)
|
||||||
{
|
{
|
||||||
m_executable.setLabelText(labelText);
|
m_executable.setLabelText(labelText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Sets the place holder text for the main chooser to
|
||||||
|
\a placeHolderText.
|
||||||
|
|
||||||
|
\sa Utils::StringAspect::setPlaceHolderText()
|
||||||
|
*/
|
||||||
void ExecutableAspect::setPlaceHolderText(const QString &placeHolderText)
|
void ExecutableAspect::setPlaceHolderText(const QString &placeHolderText)
|
||||||
{
|
{
|
||||||
m_executable.setPlaceHolderText(placeHolderText);
|
m_executable.setPlaceHolderText(placeHolderText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Sets the value of the main chooser to \a executable.
|
||||||
|
*/
|
||||||
void ExecutableAspect::setExecutable(const FilePath &executable)
|
void ExecutableAspect::setExecutable(const FilePath &executable)
|
||||||
{
|
{
|
||||||
m_executable.setFilePath(executable);
|
m_executable.setFilePath(executable);
|
||||||
m_executable.setShowToolTipOnLabel(true);
|
m_executable.setShowToolTipOnLabel(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Sets the settings key to \a key.
|
||||||
|
*/
|
||||||
void ExecutableAspect::setSettingsKey(const QString &key)
|
void ExecutableAspect::setSettingsKey(const QString &key)
|
||||||
{
|
{
|
||||||
BaseAspect::setSettingsKey(key);
|
BaseAspect::setSettingsKey(key);
|
||||||
m_executable.setSettingsKey(key);
|
m_executable.setSettingsKey(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\reimp
|
||||||
|
*/
|
||||||
void ExecutableAspect::fromMap(const QVariantMap &map)
|
void ExecutableAspect::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
m_executable.fromMap(map);
|
m_executable.fromMap(map);
|
||||||
@@ -515,6 +685,9 @@ void ExecutableAspect::fromMap(const QVariantMap &map)
|
|||||||
m_alternativeExecutable->fromMap(map);
|
m_alternativeExecutable->fromMap(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\reimp
|
||||||
|
*/
|
||||||
void ExecutableAspect::toMap(QVariantMap &map) const
|
void ExecutableAspect::toMap(QVariantMap &map) const
|
||||||
{
|
{
|
||||||
m_executable.toMap(map);
|
m_executable.toMap(map);
|
||||||
@@ -525,6 +698,14 @@ void ExecutableAspect::toMap(QVariantMap &map) const
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class ProjectExplorer::UseLibraryPathsAspect
|
\class ProjectExplorer::UseLibraryPathsAspect
|
||||||
|
\inmodule QtCreator
|
||||||
|
|
||||||
|
\brief The UseLibraryPathsAspect class lets a user specify whether build
|
||||||
|
library search paths should be added to the relevant environment
|
||||||
|
variables.
|
||||||
|
|
||||||
|
This modifies DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH on Mac, PATH
|
||||||
|
on Windows and LD_LIBRARY_PATH everywhere else.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
UseLibraryPathsAspect::UseLibraryPathsAspect()
|
UseLibraryPathsAspect::UseLibraryPathsAspect()
|
||||||
@@ -543,8 +724,13 @@ UseLibraryPathsAspect::UseLibraryPathsAspect()
|
|||||||
setValue(ProjectExplorerPlugin::projectExplorerSettings().addLibraryPathsToRunEnv);
|
setValue(ProjectExplorerPlugin::projectExplorerSettings().addLibraryPathsToRunEnv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class ProjectExplorer::UseDyldSuffixAspect
|
\class ProjectExplorer::UseDyldSuffixAspect
|
||||||
|
\inmodule QtCreator
|
||||||
|
|
||||||
|
\brief The UseDyldSuffixAspect class lets a user specify whether the
|
||||||
|
DYLD_IMAGE_SUFFIX environment variable should be used on Mac.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
UseDyldSuffixAspect::UseDyldSuffixAspect()
|
UseDyldSuffixAspect::UseDyldSuffixAspect()
|
||||||
|
@@ -81,7 +81,7 @@ public:
|
|||||||
Utils::FilePath workingDirectory(const Utils::MacroExpander *expander) const;
|
Utils::FilePath workingDirectory(const Utils::MacroExpander *expander) const;
|
||||||
Utils::FilePath defaultWorkingDirectory() const;
|
Utils::FilePath defaultWorkingDirectory() const;
|
||||||
Utils::FilePath unexpandedWorkingDirectory() const;
|
Utils::FilePath unexpandedWorkingDirectory() const;
|
||||||
void setDefaultWorkingDirectory(const Utils::FilePath &defaultWorkingDir);
|
void setDefaultWorkingDirectory(const Utils::FilePath &defaultWorkingDirectory);
|
||||||
Utils::PathChooser *pathChooser() const;
|
Utils::PathChooser *pathChooser() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Reference in New Issue
Block a user