Changeset View
Changeset View
Standalone View
Standalone View
kcms/componentchooser/componentchooserbrowser.cpp
Show All 26 Lines | |||||
27 | #include <QUrl> | 27 | #include <QUrl> | ||
28 | 28 | | |||
29 | CfgBrowser::CfgBrowser(QWidget *parent) | 29 | CfgBrowser::CfgBrowser(QWidget *parent) | ||
30 | : QWidget(parent), Ui::BrowserConfig_UI(),CfgPlugin() | 30 | : QWidget(parent), Ui::BrowserConfig_UI(),CfgPlugin() | ||
31 | { | 31 | { | ||
32 | setupUi(this); | 32 | setupUi(this); | ||
33 | connect(lineExec, &KLineEdit::textChanged, this, &CfgBrowser::configChanged); | 33 | connect(lineExec, &KLineEdit::textChanged, this, &CfgBrowser::configChanged); | ||
34 | connect(radioKIO, &QRadioButton::toggled, this, &CfgBrowser::configChanged); | 34 | connect(radioKIO, &QRadioButton::toggled, this, &CfgBrowser::configChanged); | ||
35 | connect(radioService, &QRadioButton::toggled, this, &CfgBrowser::configChanged); | 35 | connect(radioService, &QRadioButton::toggled, this, &CfgBrowser::selectBrowserApp); | ||
36 | connect(browserCombo, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated), this, [this](int index) { | 36 | connect(browserCombo, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated), this, &CfgBrowser::selectBrowserApp); | ||
37 | const QString &storageId = browserCombo->itemData(index).toString(); | | |||
38 | m_browserService = KService::serviceByStorageId(storageId); | | |||
39 | m_browserExec.clear(); | | |||
40 | emit configChanged(); | | |||
41 | }); | | |||
42 | connect(radioExec, &QRadioButton::toggled, this, &CfgBrowser::configChanged); | 37 | connect(radioExec, &QRadioButton::toggled, this, &CfgBrowser::configChanged); | ||
43 | connect(btnSelectApplication, &QToolButton::clicked, this, &CfgBrowser::selectBrowser); | 38 | connect(btnSelectApplication, &QToolButton::clicked, this, &CfgBrowser::selectBrowser); | ||
44 | } | 39 | } | ||
45 | 40 | | |||
46 | CfgBrowser::~CfgBrowser() { | 41 | CfgBrowser::~CfgBrowser() { | ||
47 | } | 42 | } | ||
48 | 43 | | |||
44 | void CfgBrowser::selectBrowserApp() | ||||
45 | { | ||||
46 | const QString &storageId = browserCombo->currentData().toString(); | ||||
47 | m_browserService = KService::serviceByStorageId(storageId); | ||||
48 | m_browserExec.clear(); | ||||
49 | configChanged(); | ||||
davidedmundson: this "emit" looks wrong | |||||
What should it be instead? That line is just copy-pasted from the original inline function. ngraham: What should it be instead? That line is just copy-pasted from the original inline function. | |||||
davidedmundson: just "configChanged();"
as it's a method not a signal.
| |||||
50 | } | ||||
51 | | ||||
49 | void CfgBrowser::configChanged() | 52 | void CfgBrowser::configChanged() | ||
50 | { | 53 | { | ||
51 | emit changed(true); | 54 | emit changed(true); | ||
52 | } | 55 | } | ||
53 | 56 | | |||
54 | void CfgBrowser::defaults() | 57 | void CfgBrowser::defaults() | ||
55 | { | 58 | { | ||
56 | load(0); | 59 | load(0); | ||
▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines |
this "emit" looks wrong