summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp')
-rw-r--r--tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp38
1 files changed, 7 insertions, 31 deletions
diff --git a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
index fb7296f834..67fef3cf44 100644
--- a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
+++ b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QTest>
@@ -498,10 +473,15 @@ void tst_QKeySequence::toStringFromKeycode_data()
QTest::newRow("A") << QKeySequence(Qt::Key_A) << "A";
QTest::newRow("-1") << QKeySequence(-1) << "";
QTest::newRow("Unknown") << QKeySequence(Qt::Key_unknown) << "";
+ QTest::newRow("Ctrl+Unknown") << QKeySequence(Qt::ControlModifier | Qt::Key_unknown) << "";
QTest::newRow("Ctrl+Num+Ins") << QKeySequence(Qt::ControlModifier | Qt::KeypadModifier | Qt::Key_Insert) << "Ctrl+Num+Ins";
QTest::newRow("Ctrl+Num+Del") << QKeySequence(Qt::ControlModifier | Qt::KeypadModifier | Qt::Key_Delete) << "Ctrl+Num+Del";
QTest::newRow("Ctrl+Alt+Num+Del") << QKeySequence(Qt::ControlModifier | Qt::AltModifier | Qt::KeypadModifier | Qt::Key_Delete) << "Ctrl+Alt+Num+Del";
QTest::newRow("Ctrl+Ins") << QKeySequence(Qt::ControlModifier | Qt::Key_Insert) << "Ctrl+Ins";
+ QTest::newRow("Ctrl") << QKeySequence(Qt::Key_Control) << "Control";
+ QTest::newRow("Alt") << QKeySequence(Qt::Key_Alt) << "Alt";
+ QTest::newRow("Shift") << QKeySequence(Qt::Key_Shift) << "Shift";
+ QTest::newRow("Meta") << QKeySequence(Qt::Key_Meta) << "Meta";
}
void tst_QKeySequence::toStringFromKeycode()
@@ -579,10 +559,6 @@ void tst_QKeySequence::parseString_data()
//QTest::newRow("Ctrl") << "Ctrl" << QKeySequence(Qt::CTRL);
//QTest::newRow("Shift") << "Shift" << QKeySequence(Qt::SHIFT);
- // Only Keys
- QTest::newRow("a") << "a" << QKeySequence(Qt::Key_A);
- QTest::newRow("A") << "A" << QKeySequence(Qt::Key_A);
-
// Incomplete
QTest::newRow("Meta+Shift+") << "Meta+Shift+" << QKeySequence(Qt::Key_unknown);
}