aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2020-10-26 18:59:45 +0100
committerRobert Loehning <robert.loehning@qt.io>2020-10-27 11:24:17 +0000
commiteef708192e340551c37a7307085c77fa326a0a78 (patch)
tree3898797a55665458b677d2804d45cf55a06bd5e2
parent2b32b2e4400c58f464fa44375adc819b4d5a0fd7 (diff)
SSH: Use Utils::PathChooser::browseButtonLabel() for button
We have not used this yet to avoid depending on Utils. Now that the depedency is there anyway, we can use this simplification. Change-Id: Ic3ff8174aaebc4da289daf1ab4331a10536cdf98 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--src/libs/ssh/sshkeycreationdialog.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/libs/ssh/sshkeycreationdialog.cpp b/src/libs/ssh/sshkeycreationdialog.cpp
index 9c4fe8db2b..538315850a 100644
--- a/src/libs/ssh/sshkeycreationdialog.cpp
+++ b/src/libs/ssh/sshkeycreationdialog.cpp
@@ -29,6 +29,7 @@
#include "sshsettings.h"
#include <utils/fileutils.h>
+#include <utils/pathchooser.h>
#include <QApplication>
#include <QDir>
@@ -45,12 +46,7 @@ SshKeyCreationDialog::SshKeyCreationDialog(QWidget *parent)
: QDialog(parent), m_ui(new Ui::SshKeyCreationDialog)
{
m_ui->setupUi(this);
- // Not using Utils::PathChooser::browseButtonLabel to avoid dependency
-#ifdef Q_OS_MAC
- m_ui->privateKeyFileButton->setText(tr("Choose..."));
-#else
- m_ui->privateKeyFileButton->setText(tr("Browse..."));
-#endif
+ m_ui->privateKeyFileButton->setText(Utils::PathChooser::browseButtonLabel());
const QString defaultPath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation)
+ QLatin1String("/.ssh/qtc_id");
setPrivateKeyFile(defaultPath);