Core: De-virtualize IContext widget and context related members

They are not used polymorphic anymore.

Change-Id: Ibb20a5617dcbb65de39214f84c5b29f262f69644
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2024-07-05 10:57:40 +02:00
parent 431c598a34
commit 4992a686e8

View File

@@ -53,13 +53,15 @@ class CORE_EXPORT IContext : public QObject
public:
IContext(QObject *parent = nullptr) : QObject(parent) {}
virtual Context context() const { return m_context; }
virtual QWidget *widget() const { return m_widget; }
QWidget *widget() const { return m_widget; }
void setWidget(QWidget *widget) { m_widget = widget; }
Context context() const { return m_context; }
void setContext(const Context &context) { m_context = context; }
using HelpCallback = std::function<void(const HelpItem &item)>;
virtual void contextHelp(const HelpCallback &callback) const { callback(m_contextHelp); }
virtual void setContext(const Context &context) { m_context = context; }
virtual void setWidget(QWidget *widget) { m_widget = widget; }
virtual void setContextHelp(const HelpItem &id) { m_contextHelp = id; }
static void attach(QWidget *widget,