MainWindow: re-enable dropping a database onto the application

and also clicking on a database to open it in the current
inkarnation on macOS
This commit is contained in:
Christian Hohnstaedt 2021-05-02 18:51:16 +02:00
parent 261f84c409
commit 4aad4233b5

View File

@ -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();
}