From 4aad4233b53ec017a203ce6a0ba36b7f71bb97e8 Mon Sep 17 00:00:00 2001 From: Christian Hohnstaedt Date: Sun, 2 May 2021 18:51:16 +0200 Subject: [PATCH] MainWindow: re-enable dropping a database onto the application and also clicking on a database to open it in the current inkarnation on macOS --- widgets/MainWindow.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/widgets/MainWindow.cpp b/widgets/MainWindow.cpp index 6f2f1e4a..e7290e6f 100644 --- a/widgets/MainWindow.cpp +++ b/widgets/MainWindow.cpp @@ -162,6 +162,17 @@ void MainWindow::openURLs(QStringList &files) void MainWindow::openURLs() { + foreach(QString file, urlsToOpen) { + if (file.endsWith(".xdb") || + !database_model::splitRemoteDbName(file).isEmpty()) + { + init_database(file); + if (Database.isOpen()) { + urlsToOpen.removeAll(file); + break; + } + } + } importAnything(urlsToOpen); urlsToOpen.clear(); }