diff --git a/kcms/componentchooser/componentchooserbrowser.h b/kcms/componentchooser/componentchooserbrowser.h --- a/kcms/componentchooser/componentchooserbrowser.h +++ b/kcms/componentchooser/componentchooserbrowser.h @@ -32,6 +32,7 @@ protected Q_SLOTS: void selectBrowser(); void configChanged(); + void selectBrowserApp(); Q_SIGNALS: void changed(bool); diff --git a/kcms/componentchooser/componentchooserbrowser.cpp b/kcms/componentchooser/componentchooserbrowser.cpp --- a/kcms/componentchooser/componentchooserbrowser.cpp +++ b/kcms/componentchooser/componentchooserbrowser.cpp @@ -32,20 +32,23 @@ setupUi(this); connect(lineExec, &KLineEdit::textChanged, this, &CfgBrowser::configChanged); connect(radioKIO, &QRadioButton::toggled, this, &CfgBrowser::configChanged); - connect(radioService, &QRadioButton::toggled, this, &CfgBrowser::configChanged); - connect(browserCombo, static_cast(&QComboBox::activated), this, [this](int index) { - const QString &storageId = browserCombo->itemData(index).toString(); - m_browserService = KService::serviceByStorageId(storageId); - m_browserExec.clear(); - emit configChanged(); - }); + connect(radioService, &QRadioButton::toggled, this, &CfgBrowser::selectBrowserApp); + connect(browserCombo, static_cast(&QComboBox::activated), this, &CfgBrowser::selectBrowserApp); connect(radioExec, &QRadioButton::toggled, this, &CfgBrowser::configChanged); connect(btnSelectApplication, &QToolButton::clicked, this, &CfgBrowser::selectBrowser); } CfgBrowser::~CfgBrowser() { } +void CfgBrowser::selectBrowserApp() +{ + const QString &storageId = browserCombo->currentData().toString(); + m_browserService = KService::serviceByStorageId(storageId); + m_browserExec.clear(); + configChanged(); +} + void CfgBrowser::configChanged() { emit changed(true);