mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Make some Group methods private.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include <QtTest/QTest>
|
||||
|
||||
#include "core/Database.h"
|
||||
#include "core/Group.h"
|
||||
|
||||
void TestGroup::initTestCase()
|
||||
{
|
||||
@@ -46,7 +47,7 @@ void TestGroup::testParenting()
|
||||
g2->setParent(g1);
|
||||
g4->setParent(g3);
|
||||
g3->setParent(g1);
|
||||
g1->setParent(db);
|
||||
db->setRootGroup(g1);
|
||||
|
||||
QVERIFY(g1->parent() == db);
|
||||
QVERIFY(g2->parent() == g1);
|
||||
@@ -91,7 +92,7 @@ void TestGroup::testSignals()
|
||||
{
|
||||
Database* db = new Database();
|
||||
QPointer<Group> root = new Group();
|
||||
root->setParent(db);
|
||||
db->setRootGroup(root);
|
||||
|
||||
Group* g1 = new Group();
|
||||
Group* g2 = new Group();
|
||||
|
||||
@@ -35,7 +35,7 @@ void TestGroupModel::test()
|
||||
Database* db = new Database();
|
||||
|
||||
Group* groupRoot = new Group();
|
||||
groupRoot->setParent(db);
|
||||
db->setRootGroup(groupRoot);
|
||||
groupRoot->setName("groupRoot");
|
||||
|
||||
Group* group1 = new Group();
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "config-keepassx-tests.h"
|
||||
#include "core/Database.h"
|
||||
#include "core/Group.h"
|
||||
#include "core/Metadata.h"
|
||||
#include "crypto/Crypto.h"
|
||||
#include "format/KeePass2Reader.h"
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
#include <QtTest/QTest>
|
||||
|
||||
#include "core/Database.h"
|
||||
#include "core/Group.h"
|
||||
#include "core/Metadata.h"
|
||||
#include "crypto/Crypto.h"
|
||||
#include "format/KeePass2Reader.h"
|
||||
#include "format/KeePass2Writer.h"
|
||||
#include "keys/PasswordKey.h"
|
||||
|
||||
#include "format/KeePass2XmlWriter.h"
|
||||
void TestKeePass2Writer::initTestCase()
|
||||
{
|
||||
Crypto::init();
|
||||
@@ -40,13 +40,12 @@ void TestKeePass2Writer::initTestCase()
|
||||
m_dbOrg->metadata()->setName("TESTDB");
|
||||
Group* group = new Group();
|
||||
group->setUuid(Uuid::random());
|
||||
group->setParent(m_dbOrg);
|
||||
m_dbOrg->setRootGroup(group);
|
||||
Entry* entry = new Entry();
|
||||
entry->setUuid(Uuid::random());
|
||||
entry->addAttribute("test", "protectedTest", true);
|
||||
QVERIFY(entry->isAttributeProtected("test"));
|
||||
group->addEntry(entry);
|
||||
entry->setGroup(group);
|
||||
|
||||
QBuffer buffer;
|
||||
buffer.open(QBuffer::ReadWrite);
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <QtTest/QTest>
|
||||
|
||||
#include "core/Database.h"
|
||||
#include "core/Group.h"
|
||||
#include "core/Metadata.h"
|
||||
#include "format/KeePass2XmlReader.h"
|
||||
#include "config-keepassx-tests.h"
|
||||
|
||||
Reference in New Issue
Block a user