Remove dependency to main window from DBBrowserDB class

Get rid of the dependency to the MainWindow class in the DBBrowserDB
class. It was only used for calling the log SQL and set database state
functions anyway. The same result can be achieved emitting Qt slots.
This commit is contained in:
Martin Kleusberg
2014-07-12 16:13:32 +02:00
parent bc705b61f1
commit 17cf2018ca
4 changed files with 26 additions and 27 deletions

View File

@@ -64,8 +64,9 @@ MainWindow::~MainWindow()
void MainWindow::init()
{
// Init the SQL log dock
db.mainWindow = this;
// Connect SQL logging and database state setting to main window
connect(&db, SIGNAL(dbChanged(bool)), this, SLOT(dbState(bool)));
connect(&db, SIGNAL(sqlExecuted(QString, int)), this, SLOT(logSql(QString,int)));
// Set the validator for the goto line edit
ui->editGoto->setValidator(gotoValidator);