Use a signal to connect to a slot in main window.

Coding style fixes.

http://gitorious.org/keepassx/keepassx/merge_requests/10
This commit is contained in:
Florian Geyer
2012-05-17 23:59:31 +02:00
committed by Felix Geyer
parent 679398be00
commit d445bf1ecd
4 changed files with 22 additions and 25 deletions

View File

@@ -51,9 +51,10 @@ int main(int argc, char** argv)
}
MainWindow mainWindow;
app.setMainWindow(&mainWindow);
mainWindow.show();
QObject::connect(&app, SIGNAL(openDatabase(QString)), &mainWindow, SLOT(openDatabase(QString)));
if (!filename.isEmpty()) {
mainWindow.openDatabase(filename, password, QString());
}