Make saving of the entered password work to.toStdString
Also when testing a preexisting connection config it will now decode a potential stored password.
This commit is contained in:
parent
c00a0452d1
commit
87cfb84997
6 changed files with 117 additions and 70 deletions
|
|
@ -25,23 +25,27 @@ class ConnectionConfigurationWidget : public QWidget
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
static void editExistingInWindow(ConnectionController *ctrl, const ConnectionConfig &cfg);
|
||||
static void editExistingInWindow(ConnectionController *ctrl, const ConnectionConfig &cfg,
|
||||
std::function<void(ConnectionConfigurationWidget&)> save_func);
|
||||
|
||||
explicit ConnectionConfigurationWidget(ConnectionTreeModel *connection_model, QWidget *parent = nullptr);
|
||||
explicit ConnectionConfigurationWidget(ConnectionController *connection_controller, QWidget *parent = nullptr);
|
||||
|
||||
void retranslateUi();
|
||||
void setData(const ConnectionConfig &cfg);
|
||||
ConnectionConfig data() const;
|
||||
QString group() const;
|
||||
bool savePassword() const;
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
void testConnection();
|
||||
|
||||
private:
|
||||
ConnectionController *m_connectionController;
|
||||
ConnectionTreeModel *m_connectionModel;
|
||||
|
||||
QUuid m_uuid;
|
||||
QByteArray encodedPassword;
|
||||
|
||||
QLabel *lblGroup;
|
||||
QComboBox *cmbbxGroup;
|
||||
|
|
@ -73,7 +77,9 @@ private:
|
|||
QLabel *lblResult;
|
||||
QFormLayout *formLayout;
|
||||
|
||||
|
||||
QFutureWatcher<TestConnectionResult> TestWatcher;
|
||||
|
||||
private slots:
|
||||
void handleTestResult();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue