From 5bbb71e90ec7ad1f0b410dab7d4b894da41a15d0 Mon Sep 17 00:00:00 2001 From: Philip Date: Mon, 31 Oct 2016 11:57:23 +0100 Subject: [PATCH] =?UTF-8?q?[libcalamaresui]=20try=20to=20fix=20issue=20wit?= =?UTF-8?q?h=20=E2=80=98pythonConsoleButton=E2=80=99=20not=20declared=20in?= =?UTF-8?q?=20this=20scope?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libcalamaresui/utils/DebugWindow.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libcalamaresui/utils/DebugWindow.cpp b/src/libcalamaresui/utils/DebugWindow.cpp index 5e41e732d..f202f6bdf 100644 --- a/src/libcalamaresui/utils/DebugWindow.cpp +++ b/src/libcalamaresui/utils/DebugWindow.cpp @@ -82,7 +82,7 @@ DebugWindow::DebugWindow() moduleConfigView->setModel( moduleConfigModel ); #ifdef WITH_PYTHONQT - QPushButton* pythonConsoleButton = new QPushButton; + QPushButton* pythonConsoleButton = new QPushButton( this ); pythonConsoleButton->setText( "Attach Python console" ); modulesVerticalLayout->insertWidget( 1, pythonConsoleButton ); pythonConsoleButton->hide(); @@ -149,8 +149,13 @@ DebugWindow::DebugWindow() #endif +#ifdef WITH_PYTHONQT connect( modulesListView->selectionModel(), &QItemSelectionModel::selectionChanged, this, [ this, moduleConfigModel, pythonConsoleButton ] +#else + connect( modulesListView->selectionModel(), &QItemSelectionModel::selectionChanged, + this, [ this, moduleConfigModel ] +#endif { QString moduleName = modulesListView->currentIndex().data().toString(); Module* module = ModuleManager::instance()->moduleInstance( moduleName );