[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.
This commit is contained in:
Adriaan de Groot 2019-06-07 21:06:46 +02:00
parent ca9f21d805
commit 9f0f08b571
2 changed files with 3 additions and 2 deletions

View File

@ -75,7 +75,7 @@ PartitionViewStep::PartitionViewStep( QObject* parent )
m_waitingWidget = new WaitingWidget( QString() ); m_waitingWidget = new WaitingWidget( QString() );
m_widget->addWidget( m_waitingWidget ); 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! m_core = new PartitionCoreModule( this ); // Unusable before init is complete!
// We're not done loading, but we need the configuration map first. // We're not done loading, but we need the configuration map first.

View File

@ -35,6 +35,7 @@ class ChoicePage;
class PartitionPage; class PartitionPage;
class PartitionCoreModule; class PartitionCoreModule;
class QStackedWidget; class QStackedWidget;
class WaitingWidget;
template<typename T> class QFutureWatcher; template<typename T> class QFutureWatcher;
@ -82,7 +83,7 @@ private:
ChoicePage* m_choicePage; ChoicePage* m_choicePage;
PartitionPage* m_manualPartitionPage; PartitionPage* m_manualPartitionPage;
QWidget* m_waitingWidget; WaitingWidget* m_waitingWidget;
QFutureWatcher<void>* m_future; QFutureWatcher<void>* m_future;
QSet< PartitionActions::Choices::SwapChoice > m_swapChoices; QSet< PartitionActions::Choices::SwapChoice > m_swapChoices;