summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-16 09:38:51 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-19 12:39:16 +0000
commit52d5b272394f5d1fd84d5c44af78e3b87d264766 (patch)
tree2f03119fab864c4ce41e83185f3c317e647484c4 /tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp
parent240d768ca6ef41bf661a1fb8e1bde408e25ba553 (diff)
tests/auto/widgets: Remove some placeholder formatting.
Use QByteArray/QString addition instead in loops and for test row names. Change-Id: Ia067cd966bf13506e6ca19925eae3158da027b83 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Diffstat (limited to 'tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp')
-rw-r--r--tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp b/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp
index f206a5fe9a..5641e60078 100644
--- a/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp
+++ b/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp
@@ -180,12 +180,13 @@ protected:
QKeyEvent *ke = static_cast<QKeyEvent*>(e);
if (ke->modifiers() && ke->key() > Qt::Key_Any
&& ke->key() < Qt::Key_ydiaeresis) {
+ const QChar c = QLatin1Char(char(ke->key()));
if (ke->modifiers() == Qt::ControlModifier)
- insertPlainText(QString("<Ctrl+%1>").arg(char(ke->key())));
+ insertPlainText(QLatin1String("<Ctrl+") + c + QLatin1Char('>'));
else if (ke->modifiers() == Qt::AltModifier)
- insertPlainText(QString("<Alt+%1>").arg(char(ke->key())));
+ insertPlainText(QLatin1String("<Alt+") + c + QLatin1Char('>'));
else if (ke->modifiers() == Qt::ShiftModifier)
- insertPlainText(QString("<Shift+%1>").arg(char(ke->key())));
+ insertPlainText(QLatin1String("<Shift+") + c + QLatin1Char('>'));
return true;
}
}