forked from qt-creator/qt-creator
Beautifier: Replace $HOME with it's actual value
Instead of having options texts like "Use file $HOME/abc", $HOME is eliminated in favor of the actual value of QDir::home(). Change-Id: I9ffe27d73e54a9d30e1f0d4a277fbfbb7969ed45 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
6e6599e0b0
commit
b8080429fc
@@ -51,6 +51,9 @@ ArtisticStyleOptionsPageWidget::ArtisticStyleOptionsPageWidget(ArtisticStyleSett
|
||||
, m_settings(settings)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->useHomeFile->setText(ui->useHomeFile->text().replace(
|
||||
QLatin1String("HOME"),
|
||||
QDir::toNativeSeparators(QDir::home().absolutePath())));
|
||||
ui->command->setExpectedKind(Utils::PathChooser::ExistingCommand);
|
||||
ui->command->setPromptDialogTitle(BeautifierPlugin::msgCommandPromptDialogTitle(
|
||||
QLatin1String(Constants::ArtisticStyle::DISPLAY_NAME)));
|
||||
|
@@ -49,7 +49,7 @@
|
||||
<item>
|
||||
<widget class="QCheckBox" name="useHomeFile">
|
||||
<property name="text">
|
||||
<string>Use $HOME/.astylerc or $HOME/astylerc</string>
|
||||
<string extracomment="HOME is replaced by the user's home directory">Use file .astylerc or astylerc in HOME</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@@ -51,6 +51,9 @@ UncrustifyOptionsPageWidget::UncrustifyOptionsPageWidget(UncrustifySettings *set
|
||||
, m_settings(settings)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->useHomeFile->setText(ui->useHomeFile->text().replace(
|
||||
QLatin1String("HOME"),
|
||||
QDir::toNativeSeparators(QDir::home().absolutePath())));
|
||||
ui->command->setExpectedKind(Utils::PathChooser::ExistingCommand);
|
||||
ui->command->setPromptDialogTitle(BeautifierPlugin::msgCommandPromptDialogTitle(
|
||||
QLatin1String(Constants::Uncrustify::DISPLAY_NAME)));
|
||||
|
@@ -49,7 +49,7 @@
|
||||
<item>
|
||||
<widget class="QCheckBox" name="useHomeFile">
|
||||
<property name="text">
|
||||
<string>Use $HOME/uncrustify.cfg</string>
|
||||
<string extracomment="HOME is replaced by the user's home directory">Use file uncrustify.cfg in HOME</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Reference in New Issue
Block a user