From 7cfb29de23836aa1873bbb108e3d25a0e9dcfa6d Mon Sep 17 00:00:00 2001 From: Zach Hilman <zachhilman@gmail.com> Date: Sun, 11 Nov 2018 20:16:38 -0500 Subject: am: Allow applets to push multiple and different channels of data --- src/yuzu/applets/software_keyboard.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/yuzu/applets/software_keyboard.cpp') diff --git a/src/yuzu/applets/software_keyboard.cpp b/src/yuzu/applets/software_keyboard.cpp index fad150ec18..92992ef872 100644 --- a/src/yuzu/applets/software_keyboard.cpp +++ b/src/yuzu/applets/software_keyboard.cpp @@ -97,11 +97,11 @@ void QtSoftwareKeyboardDialog::Reject() { accept(); } -std::u16string QtSoftwareKeyboardDialog::GetText() { +std::u16string QtSoftwareKeyboardDialog::GetText() const { return text; } -bool QtSoftwareKeyboardDialog::GetStatus() { +bool QtSoftwareKeyboardDialog::GetStatus() const { return ok; } @@ -109,13 +109,12 @@ QtSoftwareKeyboard::QtSoftwareKeyboard(GMainWindow& parent) : main_window(parent QtSoftwareKeyboard::~QtSoftwareKeyboard() = default; -bool QtSoftwareKeyboard::GetText(Core::Frontend::SoftwareKeyboardParameters parameters, - std::u16string& text) const { - bool success; +std::optional<std::u16string> QtSoftwareKeyboard::GetText( + Core::Frontend::SoftwareKeyboardParameters parameters) const { + std::optional<std::u16string> success; QMetaObject::invokeMethod(&main_window, "SoftwareKeyboardGetText", Qt::BlockingQueuedConnection, - Q_RETURN_ARG(bool, success), - Q_ARG(Core::Frontend::SoftwareKeyboardParameters, parameters), - Q_ARG(std::u16string&, text)); + Q_RETURN_ARG(std::optional<std::u16string>, success), + Q_ARG(Core::Frontend::SoftwareKeyboardParameters, parameters)); return success; } -- cgit v1.2.3-70-g09d2