diff --git a/src/unit_tests/CustomServiceDialogTest/CustomServiceDialogTest.cpp b/src/unit_tests/CustomServiceDialogTest/CustomServiceDialogTest.cpp index b9caf4a20..93a495669 100644 --- a/src/unit_tests/CustomServiceDialogTest/CustomServiceDialogTest.cpp +++ b/src/unit_tests/CustomServiceDialogTest/CustomServiceDialogTest.cpp @@ -182,10 +182,10 @@ void CustomServiceDialogTest::testDialog() selectComboItem(platform, "iptables"); dialog->platformChanged(); QTest::mouseClick(ipv6, Qt::LeftButton, Qt::NoModifier, QPoint(10,10)); - QVERIFY(service->getAddressFamily() == 10); + QVERIFY(service->getAddressFamily() == AF_INET6); selectComboItem(platform, "PF"); dialog->platformChanged(); - QVERIFY(service->getAddressFamily() == 10); + QVERIFY(service->getAddressFamily() == AF_INET6); // testing that changing address family does not change platform code foreach (QString key, platforms.keys()) @@ -193,11 +193,11 @@ void CustomServiceDialogTest::testDialog() string oldcode = service->getCodeForPlatform(key.toStdString().c_str()); string oldprotocol = service->getProtocol(); QTest::mouseClick(ipv4, Qt::LeftButton, Qt::NoModifier, QPoint(10,10)); - QVERIFY(service->getAddressFamily() == 2); + QVERIFY(service->getAddressFamily() == AF_INET); QVERIFY(oldcode == service->getCodeForPlatform(key.toStdString().c_str())); QVERIFY(oldprotocol == service->getProtocol()); QTest::mouseClick(ipv6, Qt::LeftButton, Qt::NoModifier, QPoint(10,10)); - QVERIFY(service->getAddressFamily() == 10); + QVERIFY(service->getAddressFamily() == AF_INET6); QVERIFY(oldcode == service->getCodeForPlatform(key.toStdString().c_str())); QVERIFY(oldprotocol == service->getProtocol()); } diff --git a/src/unit_tests/RuleSetViewContextMenuTest/RuleSetViewContextMenuTest.cpp b/src/unit_tests/RuleSetViewContextMenuTest/RuleSetViewContextMenuTest.cpp index ebfd826c5..7b2895f94 100644 --- a/src/unit_tests/RuleSetViewContextMenuTest/RuleSetViewContextMenuTest.cpp +++ b/src/unit_tests/RuleSetViewContextMenuTest/RuleSetViewContextMenuTest.cpp @@ -52,6 +52,7 @@ using namespace libfwbuilder; void RuleSetViewContextMenuTest::initTestCase() { + new FWObjectClipboard(); mw = new FWWindow(); mw->show(); mw->move(0,0); @@ -60,7 +61,6 @@ void RuleSetViewContextMenuTest::initTestCase() else mw->resize(1024, 768); mw->startupLoad(); - new FWObjectClipboard(); StartTipDialog *d = mw->findChild(); if (d!=NULL) d->close(); om = dynamic_cast(mw->getCurrentObjectTree()->parent()->parent()); diff --git a/src/unit_tests/RuleSetViewTest/RuleSetViewTest.cpp b/src/unit_tests/RuleSetViewTest/RuleSetViewTest.cpp index 7ca792320..44d5a2103 100644 --- a/src/unit_tests/RuleSetViewTest/RuleSetViewTest.cpp +++ b/src/unit_tests/RuleSetViewTest/RuleSetViewTest.cpp @@ -49,11 +49,11 @@ using namespace libfwbuilder; void RuleSetViewTest::initTestCase() { + new FWObjectClipboard(); mw = new FWWindow(); mw->show(); mw->resize(QSize(800,600)); mw->startupLoad(); - new FWObjectClipboard(); StartTipDialog *d = mw->findChild(); if (d) if (d!=NULL) d->close(); om = dynamic_cast(mw->getCurrentObjectTree()->parent()->parent()); diff --git a/src/unit_tests/instDialogClusterTest/instDialogClusterTest.cpp b/src/unit_tests/instDialogClusterTest/instDialogClusterTest.cpp index a30f7f0e8..b22782e8e 100644 --- a/src/unit_tests/instDialogClusterTest/instDialogClusterTest.cpp +++ b/src/unit_tests/instDialogClusterTest/instDialogClusterTest.cpp @@ -77,11 +77,11 @@ using namespace libfwbuilder; void instDialogClusterTest::initTestCase() { + new FWObjectClipboard(); mw = new FWWindow(); wfl = new UserWorkflow(); mw->show(); mw->loadFile("test_work.fwb", false); - new FWObjectClipboard(); } void instDialogClusterTest::openPolicy(QString fwname) diff --git a/src/unit_tests/instDialogCompileTest/instDialogCompileTest.cpp b/src/unit_tests/instDialogCompileTest/instDialogCompileTest.cpp index 42d9b98f1..2341fedbe 100644 --- a/src/unit_tests/instDialogCompileTest/instDialogCompileTest.cpp +++ b/src/unit_tests/instDialogCompileTest/instDialogCompileTest.cpp @@ -54,10 +54,10 @@ using namespace libfwbuilder; void instDialogCompileTest::initTestCase() { + new FWObjectClipboard(); mw = new FWWindow(); mw->show(); mw->loadFile("test_work.fwb", false); - new FWObjectClipboard(); } bool checkProgress(QTreeWidget *list) diff --git a/src/unit_tests/instDialogInspectTest/instDialogInspectTest.cpp b/src/unit_tests/instDialogInspectTest/instDialogInspectTest.cpp index dd1bd5f5e..0c38a5874 100644 --- a/src/unit_tests/instDialogInspectTest/instDialogInspectTest.cpp +++ b/src/unit_tests/instDialogInspectTest/instDialogInspectTest.cpp @@ -57,10 +57,10 @@ bool checkProgress(QTreeWidget *list) void instDialogInspectTest::initTestCase() { + new FWObjectClipboard(); mw = new FWWindow(); mw->show(); mw->loadFile("test_work.fwb", false); - new FWObjectClipboard(); dialogClosed = false; om = mw->findChild("om"); tree = mw->activeProject()->getCurrentObjectTree(); diff --git a/src/unit_tests/instDialogInstallTest/instDialogInstallTest.cpp b/src/unit_tests/instDialogInstallTest/instDialogInstallTest.cpp index 448a6337c..ce7e9ed01 100644 --- a/src/unit_tests/instDialogInstallTest/instDialogInstallTest.cpp +++ b/src/unit_tests/instDialogInstallTest/instDialogInstallTest.cpp @@ -128,10 +128,10 @@ bool checkProgress(QTreeWidget *list) void instDialogInstallTest::initTestCase() { + new FWObjectClipboard(); mw = new FWWindow(); mw->show(); mw->loadFile("test_work.fwb", false); - new FWObjectClipboard(); ssh_auth_sock = getenv("SSH_AUTH_SOCK"); } diff --git a/src/unit_tests/instDialogObjectListTest/instDialogObjectListTest.cpp b/src/unit_tests/instDialogObjectListTest/instDialogObjectListTest.cpp index f41b2d9eb..7b4eb0137 100644 --- a/src/unit_tests/instDialogObjectListTest/instDialogObjectListTest.cpp +++ b/src/unit_tests/instDialogObjectListTest/instDialogObjectListTest.cpp @@ -105,10 +105,10 @@ using namespace libfwbuilder; void instDialogObjectListTest::initTestCase() { + new FWObjectClipboard(); mw = new FWWindow(); mw->show(); mw->loadFile("test_work.fwb", false); - new FWObjectClipboard(); } void instDialogObjectListTest::openPolicy(QString fwname) diff --git a/src/unit_tests/main/main.cpp b/src/unit_tests/main/main.cpp index 57f87f258..dbf93d0d6 100644 --- a/src/unit_tests/main/main.cpp +++ b/src/unit_tests/main/main.cpp @@ -78,6 +78,4 @@ void build_app(int argc, char** argv, qt_translator.load(QLatin1String("qt_") + QLocale::system().name(), qt_resource_dir); (*app)->installTranslator (&qt_translator); - - new FWObjectClipboard(); }