Device support: Ensure UI changes are always propagated to the device.

The original problem was that we cannot assume
QLineEdit::editingFinished() is emitted when clicking a button while a
QLineEdit has the focus (QTCREATORBUG-1675). The original solution to
that introduced two more bugs, namely that changes are not visible in
other tabs until the dialog has been closed and reopened and that
pressing "Apply" also applies changes that are done later and which the
user intends to revert by by pressing "Cancel" (QTCREATORBUG-7288).
This patch intends to fix all of these issues.

Task-number: QTCREATORBUG-1675
Task-number: QTCREATORBUG-7288
Change-Id: I569a89f64843e08ee389e3eba6bdcb473ba22393
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Christian Kandeler
2012-09-27 10:20:43 +02:00
parent 30b5534667
commit dff0761406
7 changed files with 45 additions and 9 deletions

View File

@@ -151,6 +151,17 @@ void GenericLinuxDeviceConfigurationWidget::createNewKey()
setPrivateKey(dialog.privateKeyFilePath());
}
void GenericLinuxDeviceConfigurationWidget::updateDeviceFromUi()
{
hostNameEditingFinished();
sshPortEditingFinished();
timeoutEditingFinished();
userNameEditingFinished();
passwordEditingFinished();
keyFileEditingFinished();
handleFreePortsChanged();
}
void GenericLinuxDeviceConfigurationWidget::updatePortsWarningLabel()
{
m_ui->portsWarningLabel->setVisible(!device()->freePorts().hasMore());