forked from qt-creator/qt-creator
qtc-askpass: Quit after retrieving the password
Task-number: QTCREATORBUG-29619 Change-Id: Ib279ec43b7f67b8eac593d9e2f9800a65db024b7 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -18,8 +18,10 @@ int main(int argc, char *argv[])
|
||||
labelText.append('\n').append(appArgs.at(1));
|
||||
dlg.setLabelText(labelText);
|
||||
dlg.setTextEchoMode(QLineEdit::Password);
|
||||
if (dlg.exec() == QDialog::Accepted)
|
||||
const bool accepted = dlg.exec() == QDialog::Accepted;
|
||||
if (accepted)
|
||||
std::cout << qPrintable(dlg.textValue()) << std::endl;
|
||||
qApp->exit(accepted ? 0 : 1);
|
||||
});
|
||||
return app.exec();
|
||||
}
|
||||
|
Reference in New Issue
Block a user