From 6ee087c876e8b7ae41ee34a1520d5baa0401609d Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 17 Jul 2018 16:02:59 +0200 Subject: [PATCH] Pass the mainWindow as parent for the fileOpenDialog. --- kiwixapp.h | 1 + main.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/kiwixapp.h b/kiwixapp.h index ca4fccc..e2e71f3 100644 --- a/kiwixapp.h +++ b/kiwixapp.h @@ -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; diff --git a/main.cpp b/main.cpp index 58f074e..a953892 100644 --- a/main.cpp +++ b/main.cpp @@ -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*)");