[libcalamaresui] Fix PythonQt code w/ moved enums
This commit is contained in:
parent
f60ac5e101
commit
a99eccf19d
@ -46,14 +46,14 @@ namespace Calamares
|
||||
Module::Type
|
||||
PythonQtViewModule::type() const
|
||||
{
|
||||
return View;
|
||||
return Module::Type::View;
|
||||
}
|
||||
|
||||
|
||||
Module::Interface
|
||||
PythonQtViewModule::interface() const
|
||||
{
|
||||
return PythonQtInterface;
|
||||
return Module::Interface::PythonQt;
|
||||
}
|
||||
|
||||
|
||||
|
@ -98,16 +98,16 @@ DebugWindow::DebugWindow()
|
||||
#ifdef WITH_PYTHONQT
|
||||
QPushButton* pythonConsoleButton = new QPushButton;
|
||||
pythonConsoleButton->setText( "Attach Python console" );
|
||||
modulesVerticalLayout->insertWidget( 1, pythonConsoleButton );
|
||||
m_ui->modulesVerticalLayout->insertWidget( 1, pythonConsoleButton );
|
||||
pythonConsoleButton->hide();
|
||||
|
||||
QObject::connect( pythonConsoleButton, &QPushButton::clicked,
|
||||
this, [ this, moduleConfigModel ]
|
||||
{
|
||||
QString moduleName = modulesListView->currentIndex().data().toString();
|
||||
QString moduleName = m_ui->modulesListView->currentIndex().data().toString();
|
||||
Module* module = ModuleManager::instance()->moduleInstance( moduleName );
|
||||
if ( module->interface() != Module::PythonQtInterface ||
|
||||
module->type() != Module::View )
|
||||
if ( module->interface() != Module::Interface::PythonQt ||
|
||||
module->type() != Module::Type::View )
|
||||
return;
|
||||
|
||||
for ( ViewStep* step : ViewManager::instance()->viewSteps() )
|
||||
@ -180,8 +180,8 @@ DebugWindow::DebugWindow()
|
||||
m_ui->moduleInterfaceLabel->setText( module->interfaceString() );
|
||||
#ifdef WITH_PYTHONQT
|
||||
pythonConsoleButton->setVisible(
|
||||
module->interface() == Module::PythonQtInterface &&
|
||||
module->type() == Module::View );
|
||||
module->interface() == Module::Interface::PythonQt &&
|
||||
module->type() == Module::Type::View );
|
||||
#endif
|
||||
}
|
||||
} );
|
||||
|
Loading…
Reference in New Issue
Block a user