refactor: remove now-unused SettingPage::createLineEdit (#6290)
This commit is contained in:
@@ -919,13 +919,13 @@ void GeneralPage::initLayout(GeneralPageView &layout)
|
|||||||
note->setStyleSheet("color: #bbb");
|
note->setStyleSheet("color: #bbb");
|
||||||
|
|
||||||
layout.addWidget(note);
|
layout.addWidget(note);
|
||||||
auto *extraIDs = this->createLineEdit(s.additionalExtensionIDs);
|
|
||||||
extraIDs->setPlaceholderText("Extension;IDs;separated;by;semicolons");
|
|
||||||
|
|
||||||
auto form = new QFormLayout();
|
|
||||||
form->addRow("Extra extension IDs:", extraIDs);
|
|
||||||
|
|
||||||
|
auto *form = new QFormLayout();
|
||||||
layout.addLayout(form);
|
layout.addLayout(form);
|
||||||
|
|
||||||
|
SettingWidget::lineEdit("Extra extension IDs", s.additionalExtensionIDs,
|
||||||
|
"Extension;IDs;separated;by;semicolons")
|
||||||
|
->addTo(layout, form);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -134,22 +134,6 @@ QComboBox *SettingsPage::createComboBox(
|
|||||||
return combo;
|
return combo;
|
||||||
}
|
}
|
||||||
|
|
||||||
QLineEdit *SettingsPage::createLineEdit(
|
|
||||||
pajlada::Settings::Setting<QString> &setting)
|
|
||||||
{
|
|
||||||
QLineEdit *edit = new QLineEdit();
|
|
||||||
|
|
||||||
edit->setText(setting);
|
|
||||||
|
|
||||||
// update when setting changes
|
|
||||||
QObject::connect(edit, &QLineEdit::textChanged,
|
|
||||||
[&setting](const QString &newValue) {
|
|
||||||
setting = newValue;
|
|
||||||
});
|
|
||||||
|
|
||||||
return edit;
|
|
||||||
}
|
|
||||||
|
|
||||||
QSpinBox *SettingsPage::createSpinBox(pajlada::Settings::Setting<int> &setting,
|
QSpinBox *SettingsPage::createSpinBox(pajlada::Settings::Setting<int> &setting,
|
||||||
int min, int max)
|
int min, int max)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ public:
|
|||||||
const QString &toolTipText = {});
|
const QString &toolTipText = {});
|
||||||
QComboBox *createComboBox(const QStringList &items,
|
QComboBox *createComboBox(const QStringList &items,
|
||||||
pajlada::Settings::Setting<QString> &setting);
|
pajlada::Settings::Setting<QString> &setting);
|
||||||
QLineEdit *createLineEdit(pajlada::Settings::Setting<QString> &setting);
|
|
||||||
QSpinBox *createSpinBox(pajlada::Settings::Setting<int> &setting,
|
QSpinBox *createSpinBox(pajlada::Settings::Setting<int> &setting,
|
||||||
int min = 0, int max = 2500);
|
int min = 0, int max = 2500);
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|||||||
Reference in New Issue
Block a user