mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-02-16 12:05:38 +00:00
Fixed some Clang compiler warnings
This commit is contained in:
parent
3a5c4a7605
commit
8689b3aecf
|
@ -89,7 +89,7 @@ void TextEditComponent::onSizeChanged()
|
|||
onTextChanged(); // Wrap point probably changed.
|
||||
}
|
||||
|
||||
void TextEditComponent::setValue(const std::string& val, bool update)
|
||||
void TextEditComponent::setText(const std::string& val, bool update)
|
||||
{
|
||||
mText = val;
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ public:
|
|||
|
||||
void onSizeChanged() override;
|
||||
|
||||
void setValue(const std::string& val, bool update = true);
|
||||
void setText(const std::string& val, bool update = true);
|
||||
std::string getValue() const override;
|
||||
|
||||
void startEditing();
|
||||
|
|
|
@ -135,7 +135,7 @@ GuiTextEditKeyboardPopup::GuiTextEditKeyboardPopup(
|
|||
glm::ivec2 {mHorizontalKeyCount, static_cast<int>(kbLayout.size()) / 3});
|
||||
|
||||
mText = std::make_shared<TextEditComponent>(mMultiLine);
|
||||
mText->setValue(initValue, false);
|
||||
mText->setText(initValue, false);
|
||||
|
||||
// Header.
|
||||
mGrid.setEntry(mTitle, glm::ivec2 {0, 0}, false, true);
|
||||
|
@ -685,12 +685,12 @@ std::shared_ptr<ButtonComponent> GuiTextEditKeyboardPopup::makeButton(
|
|||
return;
|
||||
}
|
||||
else if (key == _("LOAD")) {
|
||||
mText->setValue(mDefaultValue->getValue());
|
||||
mText->setText(mDefaultValue->getValue());
|
||||
mText->setCursor(mDefaultValue->getValue().size());
|
||||
return;
|
||||
}
|
||||
else if (key == _("CLEAR")) {
|
||||
mText->setValue("");
|
||||
mText->setText("");
|
||||
return;
|
||||
}
|
||||
else if (key == _("CANCEL")) {
|
||||
|
|
|
@ -56,7 +56,7 @@ GuiTextEditPopup::GuiTextEditPopup(const HelpStyle& helpstyle,
|
|||
}
|
||||
|
||||
mText = std::make_shared<TextEditComponent>(mMultiLine);
|
||||
mText->setValue(initValue, false);
|
||||
mText->setText(initValue, false);
|
||||
|
||||
std::vector<std::shared_ptr<ButtonComponent>> buttons;
|
||||
buttons.push_back(
|
||||
|
@ -67,14 +67,14 @@ GuiTextEditPopup::GuiTextEditPopup(const HelpStyle& helpstyle,
|
|||
if (mComplexMode) {
|
||||
buttons.push_back(
|
||||
std::make_shared<ButtonComponent>(_("LOAD"), loadBtnHelpText, [this, defaultValue] {
|
||||
mText->setValue(defaultValue);
|
||||
mText->setText(defaultValue);
|
||||
mText->setCursor(0);
|
||||
mText->setCursor(defaultValue.size());
|
||||
}));
|
||||
}
|
||||
|
||||
buttons.push_back(std::make_shared<ButtonComponent>(_("CLEAR"), clearBtnHelpText,
|
||||
[this] { mText->setValue(""); }));
|
||||
[this] { mText->setText(""); }));
|
||||
|
||||
buttons.push_back(std::make_shared<ButtonComponent>(_("CANCEL"), _("discard changes"),
|
||||
[this] { delete this; }));
|
||||
|
|
Loading…
Reference in a new issue