mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-06-19 20:24:38 -04:00
Move qRegisterMetaType calls into initTestCase().
This commit is contained in:
parent
36d974649e
commit
c93ac9f6fc
3 changed files with 17 additions and 3 deletions
|
@ -28,13 +28,17 @@ class TestEntryModel : public QObject
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
void initTestCase();
|
||||||
void test();
|
void test();
|
||||||
};
|
};
|
||||||
|
|
||||||
void TestEntryModel::test()
|
void TestEntryModel::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<QModelIndex>("QModelIndex");
|
qRegisterMetaType<QModelIndex>("QModelIndex");
|
||||||
|
}
|
||||||
|
|
||||||
|
void TestEntryModel::test()
|
||||||
|
{
|
||||||
Group* group1 = new Group();
|
Group* group1 = new Group();
|
||||||
Group* group2 = new Group();
|
Group* group2 = new Group();
|
||||||
|
|
||||||
|
@ -94,6 +98,4 @@ void TestEntryModel::test()
|
||||||
|
|
||||||
QTEST_MAIN(TestEntryModel);
|
QTEST_MAIN(TestEntryModel);
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(QModelIndex);
|
|
||||||
|
|
||||||
#include "TestEntryModel.moc"
|
#include "TestEntryModel.moc"
|
||||||
|
|
|
@ -25,11 +25,17 @@ class TestGroup : public QObject
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
void initTestCase();
|
||||||
void testParenting();
|
void testParenting();
|
||||||
void testSignals();
|
void testSignals();
|
||||||
void testEntries();
|
void testEntries();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void TestGroup::initTestCase()
|
||||||
|
{
|
||||||
|
qRegisterMetaType<Group*>("Group*");
|
||||||
|
}
|
||||||
|
|
||||||
void TestGroup::testParenting()
|
void TestGroup::testParenting()
|
||||||
{
|
{
|
||||||
Database* db = new Database();
|
Database* db = new Database();
|
||||||
|
|
|
@ -28,9 +28,15 @@ class TestGroupModel : public QObject
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
void initTestCase();
|
||||||
void test();
|
void test();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void TestGroupModel::initTestCase()
|
||||||
|
{
|
||||||
|
qRegisterMetaType<QModelIndex>("QModelIndex");
|
||||||
|
}
|
||||||
|
|
||||||
void TestGroupModel::test()
|
void TestGroupModel::test()
|
||||||
{
|
{
|
||||||
Database* db = new Database();
|
Database* db = new Database();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue