Details
-
Suggestion
-
Resolution: Won't Do
-
Not Evaluated
-
None
-
5.15.0
-
None
Description
Qt uses std::function in a number of places (5.15)
// src/corelib/io/qprocess.h typedef std::function<void(CreateProcessArguments *)> CreateProcessArgumentModifier; CreateProcessArgumentModifier createProcessArgumentsModifier() const; void setCreateProcessArgumentsModifier(CreateProcessArgumentModifier modifier); // src/corelib/thread/qrunnable.h static QRunnable *create(std::function<void()> functionToRun); // src/corelib/thread/qthreadpool.h: void start(std::function<void()> functionToRun, int priority = 0); bool tryStart(std::function<void()> functionToRun); // src/widgets/dialogs/qfiledialog.h static void getOpenFileContent(const QString &nameFilter, const std::function<void(const QString &, const QByteArray &)> &fileContentsReady); // src/oauth/qabstractoauth.h typedef std::function<void(Stage, QVariantMap*)> ModifyParametersFunction; ModifyParametersFunction modifyParametersFunction() const; void setModifyParametersFunction(const ModifyParametersFunction &modifyParametersFunction); // src/remoteobjects/qremoteobjectnode.h typedef std::function<void (QUrl)> RemoteObjectSchemaHandler; void registerExternalSchema(const QString &schema, RemoteObjectSchemaHandler handler); typedef std::function<bool(const QString &, const QString &)> RemoteObjectNameFilter; bool proxy(const QUrl ®istryUrl, const QUrl &hostUrl={}, RemoteObjectNameFilter filter=[](const QString &, const QString &) {return true; }); bool reverseProxy(RemoteObjectNameFilter filter=[](const QString &, const QString &) {return true; }); // src/plugins/sensors/android/sensoreventqueue.h using Function = std::function<void()>; explicit FunctionEvent(const Function &function) // src/serialbus/qcanbusdevice.h void setResetControllerFunction(std::function<void()> resetter); void setCanBusStatusGetter(std::function<CanBusStatus()> busStatusGetter); // core/api/qwebenginecookiestore.h void setCookieFilter(const std::function<bool(const FilterRequest &)> &filterCallback); void setCookieFilter(std::function<bool(const FilterRequest &)> &&filterCallback); void setCookie(const QNetworkCookie &cookie, const QUrl &origin = QUrl()); // webenginewidgets/api/qwebengineprofile.h: void setNotificationPresenter(std::function<void(std::unique_ptr<QWebEngineNotification>)> notificationPresenter);
and class QWebEngineCallback, which is a sort of replacement.
Attachments
Issue Links
- is required for
-
PYSIDE-904 Investigate Qt6 opportunities based on current Qt for Python issues
- Closed
- relates to
-
PYSIDE-1815 QtNetworkAuth.QAbstractOAuth is missing modifyParametersFunction/setModifyParametersFunction
- Closed
-
PYSIDE-946 Missing methods for QWebEnginePage with QWebEngineCallback
- Closed