Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KMail
Commits
9d3046bd
Commit
9d3046bd
authored
Nov 18, 2021
by
Laurent Montel
😁
Browse files
Add new autotests
parent
503ff5e6
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/historyswitchfolder/autotests/CMakeLists.txt
View file @
9d3046bd
...
...
@@ -8,3 +8,4 @@ endmacro ()
add_kmail_historyswitchfolder_unittest
(
collectionswitchertreeviewtest.cpp
)
add_kmail_historyswitchfolder_unittest
(
collectionswitchertreeviewmanagertest.cpp
)
src/historyswitchfolder/autotests/collectionswitchertreeviewmanagertest.cpp
0 → 100644
View file @
9d3046bd
/*
This file is part of KMail, the KDE mail client.
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-only
*/
#include "collectionswitchertreeviewmanagertest.h"
#include "historyswitchfolder/collectionswitchertreeviewmanager.h"
#include <QTest>
QTEST_MAIN
(
CollectionSwitcherTreeViewManagerTest
)
CollectionSwitcherTreeViewManagerTest
::
CollectionSwitcherTreeViewManagerTest
(
QObject
*
parent
)
:
QObject
{
parent
}
{
}
void
CollectionSwitcherTreeViewManagerTest
::
shouldHaveDefaultValues
()
{
CollectionSwitcherTreeViewManager
m
;
QVERIFY
(
!
m
.
parentWidget
());
}
src/historyswitchfolder/autotests/collectionswitchertreeviewmanagertest.h
0 → 100644
View file @
9d3046bd
/*
This file is part of KMail, the KDE mail client.
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-only
*/
#pragma once
#include <QObject>
class
CollectionSwitcherTreeViewManagerTest
:
public
QObject
{
Q_OBJECT
public:
explicit
CollectionSwitcherTreeViewManagerTest
(
QObject
*
parent
=
nullptr
);
~
CollectionSwitcherTreeViewManagerTest
()
override
=
default
;
private
Q_SLOTS
:
void
shouldHaveDefaultValues
();
};
src/historyswitchfolder/collectionswitchertreeviewmanager.h
View file @
9d3046bd
...
...
@@ -6,13 +6,15 @@ SPDX-License-Identifier: GPL-2.0-only
*/
#pragma once
#include "kmail_private_export.h"
#include <Akonadi/Collection>
#include <QList>
#include <QObject>
class
CollectionSwitcherTreeView
;
class
CollectionSwitcherModel
;
class
QAction
;
class
CollectionSwitcherTreeViewManager
:
public
QObject
class
KMAILTESTS_TESTS_EXPORT
CollectionSwitcherTreeViewManager
:
public
QObject
{
Q_OBJECT
public:
...
...
@@ -28,7 +30,7 @@ public:
void
selectBackward
();
void
updateViewGeometry
();
void
addHistory
(
const
Akonadi
::
Collection
&
currentCol
,
const
QString
&
fullPath
=
{}
);
void
addHistory
(
const
Akonadi
::
Collection
&
currentCol
,
const
QString
&
fullPath
);
Q_SIGNALS:
void
switchToFolder
(
const
Akonadi
::
Collection
&
col
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment