From 25bfdc92c87df606ea4e94d438704cc59894d5f6 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 15 Oct 2024 14:06:36 +0200 Subject: [PATCH] Core: Use ModuleIO in MainWindow::loadUrls --- src/Gui/MainWindow.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index 4687940d18..73d671d747 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -92,6 +92,7 @@ #include "DownloadManager.h" #include "FileDialog.h" #include "MenuManager.h" +#include "ModuleIO.h" #include "NotificationArea.h" #include "OverlayManager.h" #include "ProgressBar.h" @@ -2428,12 +2429,7 @@ void MainWindow::loadUrls(App::Document* doc, const QList& urls) } QByteArray docName = doc ? QByteArray(doc->getName()) : qApp->translate("StdCmdNew","Unnamed").toUtf8(); - SelectModule::Dict dict = SelectModule::importHandler(files); - // load the files with the associated modules - for (SelectModule::Dict::iterator it = dict.begin(); it != dict.end(); ++it) { - // if the passed document name doesn't exist the module should create it, if needed - Application::Instance->importFrom(it.key().toUtf8(), docName, it.value().toLatin1()); - } + ModuleIO::importFiles(files, docName); } void MainWindow::changeEvent(QEvent *e)