diff --git a/src/blackcore/application.cpp b/src/blackcore/application.cpp index acc8664fa..c01a22719 100644 --- a/src/blackcore/application.cpp +++ b/src/blackcore/application.cpp @@ -747,7 +747,7 @@ namespace BlackCore if (!fi.dir().exists()) { return nullptr; } // function called with reply when done - CallbackSlot callbackSlot([ = ](QNetworkReply * reply) + CallbackSlot callbackSlot(this, [ = ](QNetworkReply * reply) { QScopedPointer nwReply(reply); CStatusMessage msg; @@ -769,9 +769,8 @@ namespace BlackCore callback(msg); }); }); - callbackSlot.setObject(this); // object for thread - ProgressSlot progressSlot([ = ](int, qint64, qint64, const QUrl &) + ProgressSlot progressSlot(this, [ = ](int, qint64, qint64, const QUrl &) { // so far not implemented }); diff --git a/src/blackmisc/slot.h b/src/blackmisc/slot.h index 5752d1f17..c712367ba 100644 --- a/src/blackmisc/slot.h +++ b/src/blackmisc/slot.h @@ -83,11 +83,6 @@ namespace BlackMisc Q_ASSERT_X(object, Q_FUNC_INFO, "Need object"); } - //! Construct a slot from the given object passing a function - CSlot(std::function function) : - m_function(function) - {} - //! Construct a slot from the given object passing a function and a object template CSlot(T *object, std::function function) :