Changeset View
Changeset View
Standalone View
Standalone View
libs/editor/widgets/settingwidget.cpp
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | 57 | { | |||
---|---|---|---|---|---|
64 | QList<QLineEdit *> lineEdits = findChildren<QLineEdit *>(); | 64 | QList<QLineEdit *> lineEdits = findChildren<QLineEdit *>(); | ||
65 | Q_FOREACH (QLineEdit *lineedit, lineEdits) { | 65 | Q_FOREACH (QLineEdit *lineedit, lineEdits) { | ||
66 | connect(lineedit, &QLineEdit::textChanged, this, &SettingWidget::settingChanged); | 66 | connect(lineedit, &QLineEdit::textChanged, this, &SettingWidget::settingChanged); | ||
67 | } | 67 | } | ||
68 | 68 | | |||
69 | // Connect all QComboBox widgets | 69 | // Connect all QComboBox widgets | ||
70 | QList<QComboBox *> comboboxes = findChildren<QComboBox *>(); | 70 | QList<QComboBox *> comboboxes = findChildren<QComboBox *>(); | ||
71 | Q_FOREACH (QComboBox *combobox, comboboxes) { | 71 | Q_FOREACH (QComboBox *combobox, comboboxes) { | ||
72 | connect(combobox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &SettingWidget::settingChanged); | 72 | connect(combobox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SettingWidget::settingChanged); | ||
73 | connect(combobox, &QComboBox::currentTextChanged, this, &SettingWidget::settingChanged); | 73 | connect(combobox, &QComboBox::currentTextChanged, this, &SettingWidget::settingChanged); | ||
74 | } | 74 | } | ||
75 | 75 | | |||
76 | // Connect all QCheckBox widgets | 76 | // Connect all QCheckBox widgets | ||
77 | QList<QCheckBox *> checkboxes = findChildren<QCheckBox *>(); | 77 | QList<QCheckBox *> checkboxes = findChildren<QCheckBox *>(); | ||
78 | Q_FOREACH (QCheckBox *checkbox, checkboxes) { | 78 | Q_FOREACH (QCheckBox *checkbox, checkboxes) { | ||
79 | connect(checkbox, &QCheckBox::stateChanged, this, &SettingWidget::settingChanged); | 79 | connect(checkbox, &QCheckBox::stateChanged, this, &SettingWidget::settingChanged); | ||
80 | } | 80 | } | ||
81 | 81 | | |||
82 | // Connect all QPushButton widgets | 82 | // Connect all QPushButton widgets | ||
83 | QList<QPushButton *> pushbuttons = findChildren<QPushButton *>(); | 83 | QList<QPushButton *> pushbuttons = findChildren<QPushButton *>(); | ||
84 | Q_FOREACH (QPushButton *pushbutton, pushbuttons) { | 84 | Q_FOREACH (QPushButton *pushbutton, pushbuttons) { | ||
85 | connect(pushbutton, &QPushButton::clicked, this, &SettingWidget::settingChanged); | 85 | connect(pushbutton, &QPushButton::clicked, this, &SettingWidget::settingChanged); | ||
86 | } | 86 | } | ||
87 | 87 | | |||
88 | // Connect all QSpinBox widgets | 88 | // Connect all QSpinBox widgets | ||
89 | QList<QSpinBox *> spinboxes = findChildren<QSpinBox *>(); | 89 | QList<QSpinBox *> spinboxes = findChildren<QSpinBox *>(); | ||
90 | Q_FOREACH (QSpinBox *spinbox, spinboxes) { | 90 | Q_FOREACH (QSpinBox *spinbox, spinboxes) { | ||
91 | connect(spinbox, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &SettingWidget::settingChanged); | 91 | connect(spinbox, QOverload<int>::of(&QSpinBox::valueChanged), this, &SettingWidget::settingChanged); | ||
92 | } | 92 | } | ||
93 | 93 | | |||
94 | // Connect all KUrlRequester widgets | 94 | // Connect all KUrlRequester widgets | ||
95 | QList<KUrlRequester *> urlrequesters = findChildren<KUrlRequester *>(); | 95 | QList<KUrlRequester *> urlrequesters = findChildren<KUrlRequester *>(); | ||
96 | Q_FOREACH (KUrlRequester *urlrequester, urlrequesters) { | 96 | Q_FOREACH (KUrlRequester *urlrequester, urlrequesters) { | ||
97 | connect(urlrequester, &KUrlRequester::textChanged, this, &SettingWidget::settingChanged); | 97 | connect(urlrequester, &KUrlRequester::textChanged, this, &SettingWidget::settingChanged); | ||
98 | connect(urlrequester, &KUrlRequester::urlSelected, this, &SettingWidget::settingChanged); | 98 | connect(urlrequester, &KUrlRequester::urlSelected, this, &SettingWidget::settingChanged); | ||
99 | } | 99 | } | ||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |