Cleanup old seperate server window.

This commit is contained in:
eelke 2021-04-10 14:44:10 +02:00
parent f0e5488ce0
commit 60bbb4c445
9 changed files with 7 additions and 287 deletions

View file

@ -4,7 +4,6 @@
#include "ConnectionListModel.h"
#include "PasswordManager.h"
#include "DatabaseWindow.h"
#include "ServerWindow.h"
#include "BackupDialog.h"
#include "PasswordPromptDialog.h"
#include "ConnectionConfigurationWidget.h"
@ -72,7 +71,7 @@ void ConnectionController::openBackupDlgForConnection(QModelIndex index)
if (config) {
if (retrieveConnectionPassword(*config)) {
m_connectionTreeModel->save(*config);
auto w = new BackupDialog(nullptr); //new ServerWindow(this, nullptr);
auto w = new BackupDialog(nullptr);
w->setAttribute( Qt::WA_DeleteOnClose );
w->setConfig(*config);
w->show();
@ -138,20 +137,6 @@ std::shared_ptr<PasswordManager> ConnectionController::passwordManager()
return m_passwordManager;
}
void ConnectionController::openServerWindowForConnection(QModelIndex index)
{
auto config = ConnectionTreeModel::getConfigFromModelIndex(index);
if (config) {
if (retrieveConnectionPassword(*config)) {
m_connectionTreeModel->save(*config);
auto w = new ServerWindow(m_masterController, nullptr);
w->setAttribute( Qt::WA_DeleteOnClose );
w->setConfig(*config);
w->show();
}
}
}
bool ConnectionController::retrieveConnectionPassword(ConnectionConfig &cc)
{
auto enc_pwd = cc.encodedPassword();