diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-02-28 08:40:53 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-02-28 09:48:30 +0100 |
commit | a450cce6b670dbcac84fcc4a66fc632b31ce8414 (patch) | |
tree | 35b77fa22c4def97b619bd3a87f6d394e452bb2e /src/corelib/thread/qrunnable.cpp | |
parent | f6f6eab89f57fb0db8f623f4a92a7b9c4ba6e9ea (diff) | |
parent | 4c86e667d220e27bb4b6e370675ffb2872e8521c (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I469b0501cc65fc5ce4d797a69ae89405cc69c7f8
Diffstat (limited to 'src/corelib/thread/qrunnable.cpp')
-rw-r--r-- | src/corelib/thread/qrunnable.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/thread/qrunnable.cpp b/src/corelib/thread/qrunnable.cpp index 5b883a05da..32f3cd657e 100644 --- a/src/corelib/thread/qrunnable.cpp +++ b/src/corelib/thread/qrunnable.cpp @@ -115,29 +115,29 @@ QRunnable::~QRunnable() class FunctionRunnable : public QRunnable { - std::function<void()> m_functor; + std::function<void()> m_functionToRun; public: - FunctionRunnable(std::function<void()> functor) : m_functor(std::move(functor)) + FunctionRunnable(std::function<void()> functionToRun) : m_functionToRun(std::move(functionToRun)) { } void run() override { - m_functor(); + m_functionToRun(); } }; /*! \since 5.15 - Creates a QRunnable that calls \a fun in run(). + Creates a QRunnable that calls \a functionToRun in run(). Auto-deletion is enabled by default. \sa run(), autoDelete() */ -QRunnable *QRunnable::create(std::function<void()> fun) +QRunnable *QRunnable::create(std::function<void()> functionToRun) { - return new FunctionRunnable(std::move(fun)); + return new FunctionRunnable(std::move(functionToRun)); } QT_END_NAMESPACE |