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*)");