Warning, /frameworks/kirigami/autotests/tst_spellcheck.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: 2023 ivan tkachenko <me@ratijas.tk> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 import QtQuick 0008 import QtQuick.Templates as T 0009 import QtTest 0010 import org.kde.kirigami as Kirigami 0011 0012 TestCase { 0013 name: "SpellCheckAttachedTest" 0014 visible: true 0015 when: windowShown 0016 0017 width: 500 0018 height: 500 0019 0020 Component { 0021 id: emptyComponent 0022 T.TextArea {} 0023 } 0024 0025 Component { 0026 id: attachedComponent 0027 T.TextArea { 0028 Kirigami.SpellCheck.enabled: true 0029 } 0030 } 0031 0032 function test_defaults() { 0033 const area = createTemporaryObject(emptyComponent, this); 0034 verify(area); 0035 0036 verify(!area.Kirigami.SpellCheck.enabled); 0037 area.Kirigami.SpellCheck.enabled = true; 0038 verify(area.Kirigami.SpellCheck.enabled); 0039 } 0040 0041 function test_createAttached() { 0042 const area = createTemporaryObject(attachedComponent, this); 0043 verify(area); 0044 0045 verify(area.Kirigami.SpellCheck.enabled); 0046 } 0047 }