File indexing completed on 2024-12-22 05:01:09
0001 /* 0002 This file is part of KMail, the KDE mail client. 0003 SPDX-FileCopyrightText: 2021-2024 Laurent Montel <montel@kde.org> 0004 0005 SPDX-License-Identifier: GPL-2.0-only 0006 */ 0007 #include "collectionswitchertreeviewtest.h" 0008 #include "historyswitchfolder/collectionswitchertreeview.h" 0009 #include <QTest> 0010 0011 QTEST_MAIN(CollectionSwitcherTreeViewTest) 0012 0013 CollectionSwitcherTreeViewTest::CollectionSwitcherTreeViewTest(QObject *parent) 0014 : QObject{parent} 0015 { 0016 } 0017 0018 void CollectionSwitcherTreeViewTest::shouldHaveDefaultValues() 0019 { 0020 CollectionSwitcherTreeView w(nullptr); 0021 QVERIFY(!w.rootIsDecorated()); 0022 QCOMPARE(w.selectionBehavior(), QAbstractItemView::SelectRows); 0023 QCOMPARE(w.selectionMode(), QAbstractItemView::SingleSelection); 0024 QCOMPARE(w.textElideMode(), Qt::ElideMiddle); 0025 QCOMPARE(w.horizontalScrollBarPolicy(), Qt::ScrollBarAlwaysOff); 0026 QVERIFY(w.isHeaderHidden()); 0027 QCOMPARE(w.windowFlags(), Qt::Popup | Qt::FramelessWindowHint); 0028 } 0029 0030 #include "moc_collectionswitchertreeviewtest.cpp"