From ef0d929251c81b31a525b575e58fb1d7e4b3e0c7 Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Sun, 5 Jan 2025 16:34:26 -0500 Subject: [PATCH] refactor: Hotkey outstream logic more Qt --- src/apps/deskflow-gui/Hotkey.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/apps/deskflow-gui/Hotkey.cpp b/src/apps/deskflow-gui/Hotkey.cpp index 76fc7ecfd..983921ccb 100644 --- a/src/apps/deskflow-gui/Hotkey.cpp +++ b/src/apps/deskflow-gui/Hotkey.cpp @@ -69,15 +69,15 @@ QTextStream &operator<<(QTextStream &outStream, const Hotkey &hotkey) if (hotkey.actions().size() == 0) return outStream; - outStream << "\t" << hotkey.text() << " = "; + QString outText = QStringLiteral("\t%1 = ").arg(hotkey.text()); for (int i = 0; i < hotkey.actions().size(); i++) { - outStream << hotkey.actions()[i]; + outText.append(hotkey.actions().at(i).text()); if (i != hotkey.actions().size() - 1) { - outStream << ", "; + outText.append(QStringLiteral(", ")); } } + outText.append(QStringLiteral("\n")); - outStream << "\n"; - + outStream << outText; return outStream; }