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; } KiwixSchemeHandler* getSchemeHandler() { return &schemeHandler; }
KiwixRequestInterceptor* getRequestInterceptor() { return &requestIntercetor; } KiwixRequestInterceptor* getRequestInterceptor() { return &requestIntercetor; }
Library* getLibrary() { return &library; } Library* getLibrary() { return &library; }
MainWindow* getMainWindow() { return mainWindow; }
private: private:
Library library; Library library;
MainWindow* mainWindow; MainWindow* mainWindow;

View File

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