forked from qt-creator/qt-creator
EnvironmentWidget: Devirtualize aspect() method
The RemoteLinuxEnvironmentAspectWidget subclass was overloading it, however, it was returning the subclass of EnvironmentAspect (i.e. returning RemoteLinuxEnvironmentAspect). Instead, we use the base aspect() method in RemoteLinuxEnvironmentAspectWidget subclass and we cast it into expected RemoteLinuxEnvironmentAspect class. Move some methods into protected section, as they are used only in subclass. Use qobject_cast instead of dynamic_cast inside UploadAndInstallTarPackageStep. Change-Id: Ic3119ca15d46187e0aa7b8b4013e7fc4efec4bd9 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -92,11 +92,6 @@ EnvironmentAspectWidget::EnvironmentAspectWidget(EnvironmentAspect *aspect, QWid
|
||||
this, &EnvironmentAspectWidget::environmentChanged);
|
||||
}
|
||||
|
||||
EnvironmentAspect *EnvironmentAspectWidget::aspect() const
|
||||
{
|
||||
return m_aspect;
|
||||
}
|
||||
|
||||
QWidget *EnvironmentAspectWidget::additionalWidget() const
|
||||
{
|
||||
return m_additionalWidget;
|
||||
|
||||
Reference in New Issue
Block a user