RemoteLinux: Add history completion to a few device property line edits

Change-Id: If871ff31ebd33a055bdcae38438eb0b4b48b904b
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2023-03-27 09:50:01 +02:00
parent 662aabd29f
commit bc4629d427
2 changed files with 12 additions and 7 deletions

View File

@@ -41,8 +41,9 @@ GenericLinuxDeviceConfigurationWidget::GenericLinuxDeviceConfigurationWidget(
m_keyButton = new QRadioButton(Tr::tr("Specific &key")); m_keyButton = new QRadioButton(Tr::tr("Specific &key"));
m_hostLineEdit = new QLineEdit(this); m_hostLineEdit = new FancyLineEdit(this);
m_hostLineEdit->setPlaceholderText(Tr::tr("IP or host name of the device")); m_hostLineEdit->setPlaceholderText(Tr::tr("IP or host name of the device"));
m_hostLineEdit->setHistoryCompleter("HostName");
m_sshPortSpinBox = new QSpinBox(this); m_sshPortSpinBox = new QSpinBox(this);
m_sshPortSpinBox->setMinimum(0); m_sshPortSpinBox->setMinimum(0);
@@ -51,8 +52,9 @@ GenericLinuxDeviceConfigurationWidget::GenericLinuxDeviceConfigurationWidget(
m_hostKeyCheckBox = new QCheckBox(Tr::tr("&Check host key")); m_hostKeyCheckBox = new QCheckBox(Tr::tr("&Check host key"));
m_portsLineEdit = new QLineEdit(this); m_portsLineEdit = new FancyLineEdit(this);
m_portsLineEdit->setToolTip(Tr::tr("You can enter lists and ranges like this: '1024,1026-1028,1030'.")); m_portsLineEdit->setToolTip(Tr::tr("You can enter lists and ranges like this: '1024,1026-1028,1030'."));
m_portsLineEdit->setHistoryCompleter("PortRange");
m_portsWarningLabel = new QLabel(this); m_portsWarningLabel = new QLabel(this);
@@ -62,7 +64,8 @@ GenericLinuxDeviceConfigurationWidget::GenericLinuxDeviceConfigurationWidget(
m_timeoutSpinBox->setValue(1000); m_timeoutSpinBox->setValue(1000);
m_timeoutSpinBox->setSuffix(Tr::tr("s")); m_timeoutSpinBox->setSuffix(Tr::tr("s"));
m_userLineEdit = new QLineEdit(this); m_userLineEdit = new FancyLineEdit(this);
m_userLineEdit->setHistoryCompleter("UserName");
m_keyLabel = new QLabel(Tr::tr("Private key file:")); m_keyLabel = new QLabel(Tr::tr("Private key file:"));
@@ -77,11 +80,13 @@ GenericLinuxDeviceConfigurationWidget::GenericLinuxDeviceConfigurationWidget(
m_gdbServerLineEdit->setExpectedKind(PathChooser::ExistingCommand); m_gdbServerLineEdit->setExpectedKind(PathChooser::ExistingCommand);
m_gdbServerLineEdit->setPlaceholderText(hint); m_gdbServerLineEdit->setPlaceholderText(hint);
m_gdbServerLineEdit->setToolTip(hint); m_gdbServerLineEdit->setToolTip(hint);
m_gdbServerLineEdit->setHistoryCompleter("GdbServer");
m_qmlRuntimeLineEdit = new PathChooser(this); m_qmlRuntimeLineEdit = new PathChooser(this);
m_qmlRuntimeLineEdit->setExpectedKind(PathChooser::ExistingCommand); m_qmlRuntimeLineEdit->setExpectedKind(PathChooser::ExistingCommand);
m_qmlRuntimeLineEdit->setPlaceholderText(hint); m_qmlRuntimeLineEdit->setPlaceholderText(hint);
m_qmlRuntimeLineEdit->setToolTip(hint); m_qmlRuntimeLineEdit->setToolTip(hint);
m_qmlRuntimeLineEdit->setHistoryCompleter("QmlRuntime");
m_sourceProfileCheckBox = m_sourceProfileCheckBox =
new QCheckBox(Tr::tr("Source %1 and %2").arg("/etc/profile").arg("$HOME/.profile")); new QCheckBox(Tr::tr("Source %1 and %2").arg("/etc/profile").arg("$HOME/.profile"));

View File

@@ -9,12 +9,12 @@ QT_BEGIN_NAMESPACE
class QCheckBox; class QCheckBox;
class QComboBox; class QComboBox;
class QLabel; class QLabel;
class QLineEdit;
class QRadioButton; class QRadioButton;
class QSpinBox; class QSpinBox;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace Utils { namespace Utils {
class FancyLineEdit;
class FilePath; class FilePath;
class PathChooser; class PathChooser;
} // Utils } // Utils
@@ -53,12 +53,12 @@ private:
QRadioButton *m_defaultAuthButton; QRadioButton *m_defaultAuthButton;
QLabel *m_keyLabel; QLabel *m_keyLabel;
QRadioButton *m_keyButton; QRadioButton *m_keyButton;
QLineEdit *m_hostLineEdit; Utils::FancyLineEdit *m_hostLineEdit;
QSpinBox *m_sshPortSpinBox; QSpinBox *m_sshPortSpinBox;
QCheckBox *m_hostKeyCheckBox; QCheckBox *m_hostKeyCheckBox;
QLineEdit *m_portsLineEdit; Utils::FancyLineEdit *m_portsLineEdit;
QLabel *m_portsWarningLabel; QLabel *m_portsWarningLabel;
QLineEdit *m_userLineEdit; Utils::FancyLineEdit *m_userLineEdit;
QSpinBox *m_timeoutSpinBox; QSpinBox *m_timeoutSpinBox;
Utils::PathChooser *m_keyFileLineEdit; Utils::PathChooser *m_keyFileLineEdit;
QLabel *m_machineTypeValueLabel; QLabel *m_machineTypeValueLabel;