From 9f0f08b571ed9626b89f85780febfc21dbca7de0 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 7 Jun 2019 21:06:46 +0200 Subject: [PATCH] [partition] Replace useless qobject_cast - We know the type of the widget, but were declaring it as a QWidget. Just forward-declare the class and be done with it. --- src/modules/partition/gui/PartitionViewStep.cpp | 2 +- src/modules/partition/gui/PartitionViewStep.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/partition/gui/PartitionViewStep.cpp b/src/modules/partition/gui/PartitionViewStep.cpp index 8a190b68a..db282e975 100644 --- a/src/modules/partition/gui/PartitionViewStep.cpp +++ b/src/modules/partition/gui/PartitionViewStep.cpp @@ -75,7 +75,7 @@ PartitionViewStep::PartitionViewStep( QObject* parent ) m_waitingWidget = new WaitingWidget( QString() ); m_widget->addWidget( m_waitingWidget ); - CALAMARES_RETRANSLATE( qobject_cast< WaitingWidget* >( m_waitingWidget )->setText( tr( "Gathering system information..." ) ); ) + CALAMARES_RETRANSLATE( m_waitingWidget->setText( tr( "Gathering system information..." ) ); ) m_core = new PartitionCoreModule( this ); // Unusable before init is complete! // We're not done loading, but we need the configuration map first. diff --git a/src/modules/partition/gui/PartitionViewStep.h b/src/modules/partition/gui/PartitionViewStep.h index 0a62b3aa3..4a378402c 100644 --- a/src/modules/partition/gui/PartitionViewStep.h +++ b/src/modules/partition/gui/PartitionViewStep.h @@ -35,6 +35,7 @@ class ChoicePage; class PartitionPage; class PartitionCoreModule; class QStackedWidget; +class WaitingWidget; template class QFutureWatcher; @@ -82,7 +83,7 @@ private: ChoicePage* m_choicePage; PartitionPage* m_manualPartitionPage; - QWidget* m_waitingWidget; + WaitingWidget* m_waitingWidget; QFutureWatcher* m_future; QSet< PartitionActions::Choices::SwapChoice > m_swapChoices;