Commit 6b9364bf authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Improve autotest

parent 4426d4a2
Pipeline #98768 passed with stage
in 13 minutes and 25 seconds
......@@ -6,6 +6,7 @@ SPDX-License-Identifier: GPL-2.0-only
*/
#include "collectionswitchertreeviewmanagertest.h"
#include "historyswitchfolder/collectionswitchertreeview.h"
#include "historyswitchfolder/collectionswitchertreeviewmanager.h"
#include <QTest>
QTEST_MAIN(CollectionSwitcherTreeViewManagerTest)
......@@ -18,4 +19,7 @@ void CollectionSwitcherTreeViewManagerTest::shouldHaveDefaultValues()
{
CollectionSwitcherTreeViewManager m;
QVERIFY(!m.parentWidget());
QVERIFY(m.collectionSwitcherTreeView());
QVERIFY(m.collectionSwitcherTreeView()->model());
}
......@@ -86,6 +86,11 @@ void CollectionSwitcherTreeViewManager::selectCollection(const int from, const i
mCollectionSwitcherTreeView->selectionModel()->setCurrentIndex(index, QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows);
}
CollectionSwitcherTreeView *CollectionSwitcherTreeViewManager::collectionSwitcherTreeView() const
{
return mCollectionSwitcherTreeView;
}
void CollectionSwitcherTreeViewManager::selectForward()
{
selectCollection(0, mCollectionSwitcherModel->rowCount() - 1);
......
......@@ -32,6 +32,8 @@ public:
void addHistory(const Akonadi::Collection &currentCol, const QString &fullPath);
Q_REQUIRED_RESULT CollectionSwitcherTreeView *collectionSwitcherTreeView() const;
Q_SIGNALS:
void switchToFolder(const Akonadi::Collection &col);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment