Pass the mainWindow as parent for the fileOpenDialog.

This commit is contained in:
Matthieu Gautier 2018-07-17 16:02:59 +02:00
parent f07b074ab6
commit 6ee087c876
2 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@ public:
KiwixSchemeHandler* getSchemeHandler() { return &schemeHandler; }
KiwixRequestInterceptor* getRequestInterceptor() { return &requestIntercetor; }
Library* getLibrary() { return &library; }
MainWindow* getMainWindow() { return mainWindow; }
private:
Library library;
MainWindow* mainWindow;

View File

@ -16,7 +16,7 @@ int main(int argc, char *argv[])
QString zimfile;
auto positionalArguments = parser.positionalArguments();
if (positionalArguments.size() < 1){
zimfile = QFileDialog::getOpenFileName(nullptr,
zimfile = QFileDialog::getOpenFileName(a.getMainWindow(),
"Open Zim",
QString(),
"ZimFile (*.zim*)");