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 <lars.knoll@qt.io>
This commit is contained in:
Jarek Kobus 2020-04-29 10:09:12 +02:00
parent 4a242963ec
commit a4071c18de

View File

@ -126,7 +126,7 @@ protected:
template <typename T>
class ThreadEngine : public virtual ThreadEngineBase
class ThreadEngine : public ThreadEngineBase
{
public:
typedef T ResultType;