From e69c43ce5b871427e465ecca35b0f55ee141844b Mon Sep 17 00:00:00 2001 From: Dmitry Degtyarev Date: Wed, 30 Jun 2021 14:24:51 +0400 Subject: [PATCH] clang-format --- tests/admc_test.cpp | 12 ++++++------ tests/admc_test.h | 7 +++---- tests/admc_test_attributes_tab.cpp | 12 ++++++------ tests/admc_test_attributes_tab.h | 2 +- tests/admc_test_member_of_tab.cpp | 4 ++-- tests/admc_test_member_of_tab.h | 2 +- tests/admc_test_members_tab.cpp | 4 ++-- tests/admc_test_members_tab.h | 2 +- tests/admc_test_object_menu.cpp | 12 ++++++------ tests/admc_test_object_menu.h | 1 - tests/admc_test_select_object_dialog.cpp | 8 ++++---- tests/admc_test_select_object_dialog.h | 2 +- 12 files changed, 33 insertions(+), 35 deletions(-) diff --git a/tests/admc_test.cpp b/tests/admc_test.cpp index 14fcf938..7a38c16d 100644 --- a/tests/admc_test.cpp +++ b/tests/admc_test.cpp @@ -22,21 +22,21 @@ #include "adldap.h" #include "console_types/console_object.h" -#include "globals.h" -#include "utils.h" -#include "select_object_dialog.h" -#include "select_object_advanced_dialog.h" #include "filter_widget/filter_widget_simple_tab.h" #include "filter_widget/select_base_widget.h" +#include "globals.h" #include "select_container_dialog.h" +#include "select_object_advanced_dialog.h" +#include "select_object_dialog.h" +#include "utils.h" +#include #include #include #include #include #include #include -#include #define PRINT_FOCUS_WIDGET_BEFORE_TAB false #define PRINT_FOCUS_WIDGET_AFTER_TAB false @@ -239,7 +239,7 @@ void ADMCTest::select_in_select_dialog(SelectObjectDialog *select_dialog, const void ADMCTest::select_object_dialog_select(const QString &dn) { auto select_dialog = parent_widget->findChild(); QVERIFY(select_dialog != nullptr); - + auto select_base_widget = select_dialog->findChild(); QVERIFY(select_base_widget != nullptr); select_base_widget_add(select_base_widget, test_arena_dn()); diff --git a/tests/admc_test.h b/tests/admc_test.h index 7d4c8f62..4db43336 100644 --- a/tests/admc_test.h +++ b/tests/admc_test.h @@ -93,9 +93,9 @@ protected: // This is for message boxes opened using exec(), i.e. // the ones opened by message box static f-ns. Message - // boxes block executation because they are // opened - // using exec(). Therefore when testing f-ns that can - // open messageboxes, call this to to close messageboxes + // boxes block executation because they are opened using + // exec(). Therefore when testing f-ns that can open + // messageboxes, call this to to close messageboxes // later. void close_message_box_later(); @@ -112,7 +112,6 @@ protected: void select_object_dialog_select(const QString &dn); private: - }; void navigate_until_object(QTreeView *view, const QString &target_dn, const int dn_role); diff --git a/tests/admc_test_attributes_tab.cpp b/tests/admc_test_attributes_tab.cpp index ad589609..b24ed1ff 100644 --- a/tests/admc_test_attributes_tab.cpp +++ b/tests/admc_test_attributes_tab.cpp @@ -23,14 +23,14 @@ #include "editors/multi_editor.h" #include "editors/string_editor.h" -#include -#include -#include -#include -#include #include +#include #include +#include +#include +#include #include +#include // NOTE: can't be set because order is important. Read only // has to be set first to enable other filters. @@ -150,7 +150,7 @@ void ADMCTestAttributesTab::filter() { // changes void ADMCTestAttributesTab::apply() { const QString correct_value = "test description"; - + navigate_until_object(view, "description", Qt::DisplayRole); edit_button->click(); diff --git a/tests/admc_test_attributes_tab.h b/tests/admc_test_attributes_tab.h index bf12a7c3..f6f31d30 100644 --- a/tests/admc_test_attributes_tab.h +++ b/tests/admc_test_attributes_tab.h @@ -31,7 +31,7 @@ class QPushButton; class QTreeView; class ADMCTestAttributesTab : public ADMCTest { -Q_OBJECT + Q_OBJECT private slots: void init() override; diff --git a/tests/admc_test_member_of_tab.cpp b/tests/admc_test_member_of_tab.cpp index aaa306ea..03de1a8a 100644 --- a/tests/admc_test_member_of_tab.cpp +++ b/tests/admc_test_member_of_tab.cpp @@ -23,10 +23,10 @@ #include "select_object_dialog.h" #include "tabs/membership_tab.h" -#include -#include #include +#include #include +#include // TODO: test primary functionality diff --git a/tests/admc_test_member_of_tab.h b/tests/admc_test_member_of_tab.h index abf2ab9b..e09c632d 100644 --- a/tests/admc_test_member_of_tab.h +++ b/tests/admc_test_member_of_tab.h @@ -29,7 +29,7 @@ class QStandardItemModel; class QPushButton; class ADMCTestMemberOfTab : public ADMCTest { -Q_OBJECT + Q_OBJECT private slots: void init() override; diff --git a/tests/admc_test_members_tab.cpp b/tests/admc_test_members_tab.cpp index 5728c61f..354f82a0 100644 --- a/tests/admc_test_members_tab.cpp +++ b/tests/admc_test_members_tab.cpp @@ -23,10 +23,10 @@ #include "select_object_dialog.h" #include "tabs/membership_tab.h" -#include -#include #include +#include #include +#include // TODO: test primary functionality diff --git a/tests/admc_test_members_tab.h b/tests/admc_test_members_tab.h index 2f715517..796e307f 100644 --- a/tests/admc_test_members_tab.h +++ b/tests/admc_test_members_tab.h @@ -29,7 +29,7 @@ class QStandardItemModel; class QPushButton; class ADMCTestMembersTab : public ADMCTest { -Q_OBJECT + Q_OBJECT private slots: void init() override; diff --git a/tests/admc_test_object_menu.cpp b/tests/admc_test_object_menu.cpp index c629ef73..0f7be8f0 100644 --- a/tests/admc_test_object_menu.cpp +++ b/tests/admc_test_object_menu.cpp @@ -23,27 +23,27 @@ #include "adldap.h" #include "console_types/console_object.h" #include "create_object_dialog.h" +#include "filter_widget/filter_widget_advanced_tab.h" +#include "filter_widget/filter_widget_simple_tab.h" #include "find_object_dialog.h" -#include "select_object_advanced_dialog.h" #include "find_widget.h" #include "move_object_dialog.h" #include "password_dialog.h" #include "rename_object_dialog.h" #include "select_container_dialog.h" +#include "select_object_advanced_dialog.h" #include "select_object_dialog.h" -#include "filter_widget/filter_widget_simple_tab.h" -#include "filter_widget/filter_widget_advanced_tab.h" #include "utils.h" #include #include +#include #include +#include #include +#include #include #include -#include -#include -#include void ADMCTestObjectMenu::object_menu_new_user() { const QString name = TEST_USER; diff --git a/tests/admc_test_object_menu.h b/tests/admc_test_object_menu.h index 915094a7..c7d07861 100644 --- a/tests/admc_test_object_menu.h +++ b/tests/admc_test_object_menu.h @@ -41,7 +41,6 @@ private slots: void object_menu_find_advanced(); private: - }; #endif /* ADMC_TEST_OBJECT_MENU_H */ diff --git a/tests/admc_test_select_object_dialog.cpp b/tests/admc_test_select_object_dialog.cpp index 1ab44f4b..734bca9a 100644 --- a/tests/admc_test_select_object_dialog.cpp +++ b/tests/admc_test_select_object_dialog.cpp @@ -21,13 +21,13 @@ #include "admc_test_select_object_dialog.h" #include "admc_test_select_base_widget.h" -#include "select_object_dialog.h" #include "console_types/console_object.h" #include "filter_widget/select_base_widget.h" +#include "select_object_dialog.h" #include -#include #include +#include #include void ADMCTestSelectObjectDialog::init() { @@ -129,7 +129,7 @@ void ADMCTestSelectObjectDialog::multiple_match_duplicate() { QVERIFY(create_success2); select_object_in_multi_match_dialog(TEST_USER, dn2); - + const QList selected_first = dialog->get_selected(); QVERIFY(selected_first == QList({dn2})); @@ -156,7 +156,7 @@ void ADMCTestSelectObjectDialog::select_object_in_multi_match_dialog(const QStri auto ok_button = match_dialog->findChild(); QVERIFY(ok_button != nullptr); - + ok_button->click(); close_message_box(); diff --git a/tests/admc_test_select_object_dialog.h b/tests/admc_test_select_object_dialog.h index f86ebd3d..00690ff6 100644 --- a/tests/admc_test_select_object_dialog.h +++ b/tests/admc_test_select_object_dialog.h @@ -28,7 +28,7 @@ class QPushButton; class SelectObjectDialog; class ADMCTestSelectObjectDialog : public ADMCTest { -Q_OBJECT + Q_OBJECT private slots: void init() override;