From 9ba91b1ffa45674fbd218bfc192beeb09ddaf65a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Wed, 14 Oct 2020 18:48:14 +0200 Subject: [PATCH] Switch from Qt signals to boost::signals for DownloadManager. --- src/runner/pythonrunner.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/runner/pythonrunner.cpp b/src/runner/pythonrunner.cpp index bb6f3cf..b6ba64c 100644 --- a/src/runner/pythonrunner.cpp +++ b/src/runner/pythonrunner.cpp @@ -131,6 +131,7 @@ BOOST_PYTHON_MODULE(mobase) // Functions: utils::register_functor_converter(); // converter for the onRefreshed-callback utils::register_functor_converter(); + utils::register_functor_converter(); utils::register_functor_converter(); utils::register_functor_converter(); // converter for the onModMoved-callback and onPluginMoved callbacks utils::register_functor_converter&)>(); // converter for the onModStateChanged-callback (IModList) @@ -528,8 +529,10 @@ BOOST_PYTHON_MODULE(mobase) .def("startDownloadURLs", &IDownloadManager::startDownloadURLs, bpy::arg("urls")) .def("startDownloadNexusFile", &IDownloadManager::startDownloadNexusFile, (bpy::arg("mod_id"), "file_id")) .def("downloadPath", &IDownloadManager::downloadPath, bpy::arg("id")) - - Q_DELEGATE(IDownloadManager, QObject, "_object") + .def("onDownloadComplete", &IDownloadManager::onDownloadComplete, bpy::arg("callback")) + .def("onDownloadPaused", &IDownloadManager::onDownloadPaused, bpy::arg("callback")) + .def("onDownloadFailed", &IDownloadManager::onDownloadFailed, bpy::arg("callback")) + .def("onDownloadRemoved", &IDownloadManager::onDownloadRemoved, bpy::arg("callback")) ; bpy::class_("IInstallationManager", bpy::no_init)