From a4071c18de94e41a157642cd0dfa0f4748d531af Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 29 Apr 2020 10:09:12 +0200 Subject: [PATCH] Get rid of virtual inheritance from ThreadEngineBase The virtual inheritance causes the issue, when adding new, non-default constructor to the base ThreadEngineBase class. It looks like classes derived from it can't use the non-default constructor, even when it's called explicilty from the subclass. Instead, the default constructor of the ThreadEngineBase class is always required during compilation and called on runtime. In addition, the only sensible use of the virtual inheritance is the multiple inheritance, but apparently it looks like there is no single class in Qt which would multi inherit from the ThreadEngineBase class, so this change shouldn't have any bad side effects. This justifies the current lack of info on why it was introduced originally ages ago. Change-Id: I08266e6f6865d938d1b1e4243ef94d2c02c3a886 Reviewed-by: Lars Knoll --- src/concurrent/qtconcurrentthreadengine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/concurrent/qtconcurrentthreadengine.h b/src/concurrent/qtconcurrentthreadengine.h index b7be48d612..a04f69f8e4 100644 --- a/src/concurrent/qtconcurrentthreadengine.h +++ b/src/concurrent/qtconcurrentthreadengine.h @@ -126,7 +126,7 @@ protected: template -class ThreadEngine : public virtual ThreadEngineBase +class ThreadEngine : public ThreadEngineBase { public: typedef T ResultType;