moved passphraseCallback and passphraseDialog to startPage
- made some methods of the servercontroller class private - returned a call to the checkSshConnection() function
This commit is contained in:
parent
4aba34c18b
commit
1aa859b10d
9 changed files with 66 additions and 86 deletions
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include <QFileDialog>
|
||||
#include <QStandardPaths>
|
||||
#include <QEventLoop>
|
||||
|
||||
#ifdef Q_OS_ANDROID
|
||||
#include <QJniObject>
|
||||
|
|
@ -131,11 +132,20 @@ void StartPageLogic::onPushButtonConnect()
|
|||
set_pushButtonConnectText(tr("Connecting..."));
|
||||
|
||||
ErrorCode errorCode = ErrorCode::NoError;
|
||||
#ifdef Q_DEBUG
|
||||
//QString output = m_serverController->checkSshConnection(serverCredentials, &e);
|
||||
#else
|
||||
QString output;
|
||||
#endif
|
||||
|
||||
if (pushButtonConnectKeyChecked()) {
|
||||
auto passphraseCallback = [this]() {
|
||||
emit showPassphraseRequestMessage();
|
||||
QEventLoop loop;
|
||||
QObject::connect(this, &StartPageLogic::passphraseDialogClosed, &loop, &QEventLoop::quit);
|
||||
loop.exec();
|
||||
|
||||
return m_privateKeyPassphrase;
|
||||
};
|
||||
m_serverController->setPassphraseCallback(passphraseCallback);
|
||||
}
|
||||
|
||||
QString output = m_serverController->checkSshConnection(serverCredentials, &errorCode);
|
||||
|
||||
if (pushButtonConnectKeyChecked()) {
|
||||
QString decryptedPrivateKey;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue