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