Commit 78efdfe3 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by hjk

Attach to Core: Consider executable for enabling Ok button

Change-Id: Ie5eead6d50dd4a571ce89f0ab354d2786ae796c1
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 735f23e7
......@@ -321,18 +321,20 @@ bool AttachCoreDialog::isLocal() const
void AttachCoreDialog::changed()
{
bool isValid = d->kitChooser->currentIndex() >= 0;
bool isValid = d->kitChooser->currentIndex() >= 0 && d->localExecFileName->isValid();
if (isLocal()) {
d->localCoreFileName->setVisible(true);
d->remoteCoreFileName->setVisible(false);
d->selectRemoteCoreButton->setVisible(false);
isValid &= d->localCoreFileName->isValid();
if (isValid)
isValid = d->localCoreFileName->isValid();
} else {
d->remoteCoreFileName->setVisible(true);
d->selectRemoteCoreButton->setVisible(true);
d->localCoreFileName->setVisible(false);
isValid &= !remoteCoreFile().isEmpty();
if (isValid)
isValid = !remoteCoreFile().isEmpty();
}
d->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(isValid);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment