From bc8ae43201496ec2fec87e59b9b896b2343ab232 Mon Sep 17 00:00:00 2001 From: Marcos Bento Date: Fri, 1 Dec 2023 16:13:39 +0000 Subject: [PATCH] Adjust source code formatting --- .clang-format | 2 +- ACore/src/ecflow/core/Calendar.cpp | 12 +- ACore/src/ecflow/core/File.cpp | 2 +- ACore/src/ecflow/core/Str.cpp | 2 +- ACore/src/ecflow/core/WhiteListFile.cpp | 2 +- ACore/test/TestCalendar.cpp | 10 +- ACore/test/TestFile.cpp | 18 +- ACore/test/TestRealCalendar.cpp | 6 +- ACore/test/TestStringSplitter.cpp | 16 +- ANattr/src/ecflow/attribute/ClockAttr.cpp | 4 +- ANattr/src/ecflow/attribute/RepeatAttr.cpp | 4 +- ANattr/src/ecflow/attribute/Zombie.cpp | 30 +- ANode/src/ecflow/node/AbstractObserver.hpp | 6 +- ANode/src/ecflow/node/ClientSuites.cpp | 6 +- ANode/src/ecflow/node/Defs.cpp | 12 +- ANode/src/ecflow/node/DefsDelta.cpp | 4 +- ANode/src/ecflow/node/EcfFile.cpp | 4 +- ANode/src/ecflow/node/ExprParser.cpp | 216 ++++++------- ANode/src/ecflow/node/Node.cpp | 6 +- ANode/src/ecflow/node/NodeContainer.cpp | 2 +- ANode/src/ecflow/node/NodeTime.cpp | 6 +- ANode/src/ecflow/node/Submittable.cpp | 2 +- ANode/src/ecflow/node/Suite.cpp | 6 +- ANode/src/ecflow/node/parser/CronParser.cpp | 2 +- ANode/src/ecflow/node/parser/LimitParser.cpp | 2 +- ANode/src/ecflow/node/parser/VerifyParser.cpp | 4 +- ANode/test/TestDefStatus.cpp | 6 +- ANode/test/TestEcfFile.cpp | 2 +- ANode/test/TestExprParser.cpp | 286 +++++++++--------- ANode/test/TestNodeState.cpp | 12 +- ANode/test/TestSingleExprParse.cpp | 2 +- ANode/test/TestTaskScriptGenerator.cpp | 8 +- ANode/test/TestVariableInheritance.cpp | 2 +- ANode/test/TestVariableSubstitution.cpp | 4 +- ANode/test/parser/TestAutoAddExterns.cpp | 2 +- .../parser/TestMementoPersistAndReload.cpp | 4 +- Base/src/ecflow/base/AbstractClientEnv.hpp | 6 +- Base/src/ecflow/base/AbstractServer.hpp | 2 +- Base/src/ecflow/base/Openssl.cpp | 2 +- Base/src/ecflow/base/Stats.cpp | 130 ++++---- Base/src/ecflow/base/ZombieCtrl.cpp | 2 +- Base/src/ecflow/base/cts/CFileCmd.cpp | 2 +- Base/src/ecflow/base/cts/CheckPtCmd.cpp | 2 +- Base/src/ecflow/base/cts/CtsNodeCmd.cpp | 2 +- Base/src/ecflow/base/cts/GroupCTSCmd.cpp | 2 +- Base/src/ecflow/base/cts/OrderNodeCmd.cpp | 2 +- Base/src/ecflow/base/cts/PlugCmd.cpp | 4 +- .../base/stc/SClientHandleSuitesCmd.cpp | 2 +- Base/test/TestInLimitAndLimit.cpp | 2 +- Base/test/TestQueueCmd.cpp | 2 +- Base/test/TestRequeueNodeCmd.cpp | 2 +- Base/test/TestResolveDependencies.cpp | 2 +- CSim/test/TestAnalysis.cpp | 2 +- CSim/test/TestTime.cpp | 2 +- CSim/test/TestToday.cpp | 4 +- Client/src/ecflow/client/Rtt.cpp | 2 +- Client/test/TestClientOptions.cpp | 2 +- Client/test/TestLifeCycle.cpp | 2 +- Client/test/TestUrlCmd.cpp | 2 +- Http/src/ecflow/http/ApiV1.cpp | 32 +- Http/src/ecflow/http/ApiV1Impl.cpp | 62 ++-- Http/src/ecflow/http/Base64.hpp | 2 +- Http/test/TestApiV1.cpp | 6 +- Server/test/TestServerEnvironment.cpp | 4 +- Test/TestCron.cpp | 2 +- Test/TestLimit.cpp | 2 +- Test/TestRepeat.cpp | 2 +- Test/TestSuspend.cpp | 4 +- Test/TestToday.cpp | 4 +- Test/TestWhyCmd.cpp | 14 +- Test/TestZombies.cpp | 2 +- Test/Test_Time.cpp | 8 +- Test/src/ServerTestHarness.cpp | 2 +- Udp/src/ecflow/udp/RequestHandler.cpp | 6 +- Viewer/ecflowUI/src/AbstractNodeModel.hpp | 8 +- Viewer/ecflowUI/src/AbstractNodeView.cpp | 12 +- Viewer/ecflowUI/src/AbstractNodeView.hpp | 2 +- .../src/AbstractTextEditSearchInterface.hpp | 2 +- Viewer/ecflowUI/src/ActionHandler.cpp | 2 +- Viewer/ecflowUI/src/AttributeEditor.cpp | 2 +- Viewer/ecflowUI/src/ChangeNotifyDialog.cpp | 2 +- Viewer/ecflowUI/src/CommandDesignerWidget.cpp | 4 +- Viewer/ecflowUI/src/CommandOutputWidget.cpp | 2 +- Viewer/ecflowUI/src/CompactView.cpp | 24 +- Viewer/ecflowUI/src/ConfigListDelegate.cpp | 2 +- Viewer/ecflowUI/src/ConnectState.cpp | 4 +- Viewer/ecflowUI/src/CustomCommandHandler.cpp | 4 +- Viewer/ecflowUI/src/DashboardTitle.cpp | 12 +- Viewer/ecflowUI/src/DashboardWidget.hpp | 2 +- Viewer/ecflowUI/src/EditProvider.cpp | 4 +- Viewer/ecflowUI/src/EventEditor.cpp | 2 +- Viewer/ecflowUI/src/ExpandState.cpp | 4 +- Viewer/ecflowUI/src/FetchTask.hpp | 2 +- Viewer/ecflowUI/src/GenFileProvider.hpp | 4 +- Viewer/ecflowUI/src/Highlighter.cpp | 6 +- Viewer/ecflowUI/src/InfoPanel.cpp | 6 +- Viewer/ecflowUI/src/InfoPanelHandler.cpp | 2 +- Viewer/ecflowUI/src/InfoPanelItem.cpp | 2 +- Viewer/ecflowUI/src/InfoPanelItem.hpp | 2 +- Viewer/ecflowUI/src/InfoProvider.cpp | 4 +- Viewer/ecflowUI/src/InputEventLog.cpp | 2 +- Viewer/ecflowUI/src/LimitEditor.cpp | 2 +- Viewer/ecflowUI/src/LineEdit.cpp | 2 +- Viewer/ecflowUI/src/LogLoadView.cpp | 66 ++-- Viewer/ecflowUI/src/MenuHandler.cpp | 8 +- Viewer/ecflowUI/src/MessageItemWidget.cpp | 2 +- Viewer/ecflowUI/src/NodeExpression.cpp | 2 +- Viewer/ecflowUI/src/NodeExpression.hpp | 2 +- Viewer/ecflowUI/src/NodePathWidget.cpp | 12 +- Viewer/ecflowUI/src/NodeQuery.cpp | 2 +- Viewer/ecflowUI/src/NodeQueryEditor.cpp | 10 +- Viewer/ecflowUI/src/NodeQueryOption.cpp | 4 +- Viewer/ecflowUI/src/NodeQueryOption.hpp | 2 +- Viewer/ecflowUI/src/NodeQueryOptionEdit.cpp | 8 +- Viewer/ecflowUI/src/NodeQueryResultView.cpp | 2 +- Viewer/ecflowUI/src/NodeQueryViewDelegate.cpp | 4 +- Viewer/ecflowUI/src/NodeViewBase.hpp | 6 +- Viewer/ecflowUI/src/NodeViewDelegate.cpp | 130 ++++---- Viewer/ecflowUI/src/NodeViewDelegate.hpp | 10 +- Viewer/ecflowUI/src/OutputBrowser.cpp | 4 +- Viewer/ecflowUI/src/OutputCache.cpp | 4 +- Viewer/ecflowUI/src/OutputDirClient.cpp | 2 +- Viewer/ecflowUI/src/OutputFileClient.cpp | 2 +- Viewer/ecflowUI/src/OutputFileProvider.cpp | 2 +- Viewer/ecflowUI/src/OutputModel.cpp | 6 +- Viewer/ecflowUI/src/OverviewProvider.cpp | 6 +- .../ecflowUI/src/PlainTextSearchInterface.cpp | 4 +- Viewer/ecflowUI/src/PropertyEditor.cpp | 6 +- Viewer/ecflowUI/src/PropertyLine.cpp | 6 +- Viewer/ecflowUI/src/RepeatEditor.cpp | 2 +- .../ecflowUI/src/RichTextSearchInterface.cpp | 4 +- Viewer/ecflowUI/src/ServerComInfoWidget.cpp | 22 +- Viewer/ecflowUI/src/ServerComQueue.cpp | 2 +- Viewer/ecflowUI/src/ServerHandler.cpp | 4 +- Viewer/ecflowUI/src/ServerList.cpp | 2 +- Viewer/ecflowUI/src/ServerListDialog.cpp | 8 +- Viewer/ecflowUI/src/ShellCommand.cpp | 2 +- Viewer/ecflowUI/src/Spline.cpp | 2 +- Viewer/ecflowUI/src/StandardView.cpp | 20 +- Viewer/ecflowUI/src/SuiteFilter.cpp | 2 +- Viewer/ecflowUI/src/SuiteFilterObserver.hpp | 4 +- Viewer/ecflowUI/src/SuiteItemWidget.cpp | 2 +- Viewer/ecflowUI/src/TableNodeView.cpp | 4 +- Viewer/ecflowUI/src/TableNodeViewDelegate.cpp | 2 +- Viewer/ecflowUI/src/TextFilterWidget.cpp | 8 +- .../src/TextPager/TextPagerCursor.cpp | 2 +- .../ecflowUI/src/TextPager/TextPagerEdit.cpp | 16 +- .../src/TextPager/TextPagerLayout_p.cpp | 14 +- .../TextPager/TextPagerSearchInterface.cpp | 2 +- Viewer/ecflowUI/src/TimelineFileList.cpp | 2 +- Viewer/ecflowUI/src/TimelineHeaderView.cpp | 30 +- Viewer/ecflowUI/src/TimelineInfoDailyView.cpp | 8 +- Viewer/ecflowUI/src/TimelineView.cpp | 14 +- Viewer/ecflowUI/src/TreeNodeModel.cpp | 4 +- Viewer/ecflowUI/src/TreeNodeView.cpp | 2 +- Viewer/ecflowUI/src/TreeNodeViewDelegate.cpp | 42 +-- Viewer/ecflowUI/src/TreeNodeWidget.cpp | 4 +- Viewer/ecflowUI/src/TriggerEditor.cpp | 2 +- .../src/TriggerGraphLayoutBuilder.cpp | 16 +- Viewer/ecflowUI/src/TriggerGraphView.cpp | 4 +- Viewer/ecflowUI/src/VConfig.cpp | 8 +- Viewer/ecflowUI/src/VConfigLoader.cpp | 4 +- Viewer/ecflowUI/src/VDateAttr.cpp | 2 +- Viewer/ecflowUI/src/VDir.cpp | 6 +- Viewer/ecflowUI/src/VFileInfo.cpp | 4 +- Viewer/ecflowUI/src/VFileTransfer.cpp | 6 +- Viewer/ecflowUI/src/VFilter.cpp | 2 +- Viewer/ecflowUI/src/VInfo.hpp | 12 +- Viewer/ecflowUI/src/VModelData.cpp | 8 +- Viewer/ecflowUI/src/VNState.cpp | 4 +- Viewer/ecflowUI/src/VNode.cpp | 2 +- Viewer/ecflowUI/src/VParam.cpp | 2 +- Viewer/ecflowUI/src/VProperty.cpp | 4 +- Viewer/ecflowUI/src/VProperty.hpp | 4 +- Viewer/ecflowUI/src/VRepeatAttr.cpp | 8 +- Viewer/ecflowUI/src/VServerSettings.cpp | 62 ++-- Viewer/ecflowUI/src/VSettingsLoader.cpp | 2 +- Viewer/ecflowUI/src/VSettingsLoader.hpp | 2 +- Viewer/ecflowUI/src/VTaskNode.cpp | 14 +- Viewer/ecflowUI/src/VTimeAttr.cpp | 2 +- Viewer/ecflowUI/src/VariableItemWidget.cpp | 14 +- Viewer/ecflowUI/src/VariableModel.cpp | 4 +- Viewer/ecflowUI/src/VariableModelData.cpp | 4 +- Viewer/ecflowUI/src/VariableView.cpp | 6 +- Viewer/ecflowUI/src/WhyItemWidget.cpp | 2 +- Viewer/ecflowUI/src/ZombieItemWidget.cpp | 6 +- Viewer/libViewer/src/DirectoryHandler.cpp | 4 +- Viewer/libViewer/src/LogData.cpp | 4 +- Viewer/libViewer/src/LogLoadData.cpp | 8 +- Viewer/libViewer/src/MessageLabel.cpp | 24 +- Viewer/libViewer/src/Palette.cpp | 8 +- Viewer/libViewer/src/UserMessage.cpp | 2 +- 192 files changed, 992 insertions(+), 992 deletions(-) diff --git a/.clang-format b/.clang-format index 68a513676..8e76392ad 100644 --- a/.clang-format +++ b/.clang-format @@ -38,7 +38,7 @@ PointerAlignment: Left # Align things as much as possible. AlignOperands: true -AlignConsecutiveAssignments: AcrossEmptyLines +AlignConsecutiveAssignments: Consecutive AlignEscapedNewlines: Left AlignTrailingComments: true diff --git a/ACore/src/ecflow/core/Calendar.cpp b/ACore/src/ecflow/core/Calendar.cpp index 2e8454df5..8ad381963 100644 --- a/ACore/src/ecflow/core/Calendar.cpp +++ b/ACore/src/ecflow/core/Calendar.cpp @@ -104,11 +104,11 @@ void Calendar::assign(const Calendar& rhs) { lastTime_ = rhs.lastTime_; increment_ = rhs.increment_; - day_of_week_ = rhs.day_of_week_; // Cache - day_of_year_ = rhs.day_of_year_; // Cache - day_of_month_ = rhs.day_of_month_; // Cache - month_ = rhs.month_; // Cache - year_ = rhs.year_; // Cache + day_of_week_ = rhs.day_of_week_; // Cache + day_of_year_ = rhs.day_of_year_; // Cache + day_of_month_ = rhs.day_of_month_; // Cache + month_ = rhs.month_; // Cache + year_ = rhs.year_; // Cache } void Calendar::init(Clock_t clock) { @@ -206,7 +206,7 @@ void Calendar::update(const ecf::CalendarUpdateParams& calUpdateParams) { time_duration td = suiteTime_.time_of_day(); - suiteTime_ = ptime(initTime_.date(), td); + suiteTime_ = ptime(initTime_.date(), td); #ifdef DEBUG_CALENDAR cout << "suiteTime_ = " << to_simple_string(suiteTime_) << "\n"; diff --git a/ACore/src/ecflow/core/File.cpp b/ACore/src/ecflow/core/File.cpp index dcd914121..66023b1f5 100644 --- a/ACore/src/ecflow/core/File.cpp +++ b/ACore/src/ecflow/core/File.cpp @@ -1083,7 +1083,7 @@ std::string File::root_build_dir() { std::string stem = current_path.stem().string(); int count = 0; while (stem.find("ecflow") == std::string::npos) { - current_path = current_path.parent_path(); + current_path = current_path.parent_path(); the_current_path = current_path.string(); // cos current_path.string() is returned by reference diff --git a/ACore/src/ecflow/core/Str.cpp b/ACore/src/ecflow/core/Str.cpp index 3787e6cd1..79c3107cb 100644 --- a/ACore/src/ecflow/core/Str.cpp +++ b/ACore/src/ecflow/core/Str.cpp @@ -337,7 +337,7 @@ void Str::split_using_string_view(std::string_view strv, std::vector& output, std::string_view delims) { - size_t first = 0; + size_t first = 0; size_t strv_size = strv.size(); while (first < strv_size) { diff --git a/ACore/src/ecflow/core/WhiteListFile.cpp b/ACore/src/ecflow/core/WhiteListFile.cpp index f2b3fe815..f086c8ab3 100644 --- a/ACore/src/ecflow/core/WhiteListFile.cpp +++ b/ACore/src/ecflow/core/WhiteListFile.cpp @@ -22,7 +22,7 @@ using namespace ecf; using namespace std; using namespace boost; -WhiteListFile::WhiteListFile() = default; +WhiteListFile::WhiteListFile() = default; WhiteListFile::~WhiteListFile() = default; diff --git a/ACore/test/TestCalendar.cpp b/ACore/test/TestCalendar.cpp index e6a5e726e..f29355819 100644 --- a/ACore/test/TestCalendar.cpp +++ b/ACore/test/TestCalendar.cpp @@ -210,7 +210,7 @@ BOOST_AUTO_TEST_CASE(test_calendar_time_series_relative_complex) { calendar.update(minutes(1)); timeSeries.calendarChanged(calendar); - tm suiteTm = to_tm(calendar.suiteTime()); + tm suiteTm = to_tm(calendar.suiteTime()); bool matches = timeSeries.isFree(calendar); @@ -308,7 +308,7 @@ BOOST_AUTO_TEST_CASE(test_calendar_time_series_real_complex) { // Update calendar every minute, then see we can match time series, *RELATIVE* to suite start calendar.update(minutes(1)); - tm suiteTm = to_tm(calendar.suiteTime()); + tm suiteTm = to_tm(calendar.suiteTime()); bool matches = timeSeries.isFree(calendar); @@ -532,9 +532,9 @@ BOOST_AUTO_TEST_CASE(test_calendar_julian) { boost::gregorian::date cal_date = calendar.date(); long boost_julian = cal_date.julian_day(); - std::string iso_string = to_iso_string(cal_date); - auto date_as_long = ecf::convert_to(iso_string); - long ecmwf_julian = Cal::date_to_julian(date_as_long); + std::string iso_string = to_iso_string(cal_date); + auto date_as_long = ecf::convert_to(iso_string); + long ecmwf_julian = Cal::date_to_julian(date_as_long); BOOST_CHECK_MESSAGE(boost_julian == ecmwf_julian, "boost julian " << boost_julian << " != ecmwf julian " << ecmwf_julian << " for " diff --git a/ACore/test/TestFile.cpp b/ACore/test/TestFile.cpp index 07006c241..38e4c5bfd 100644 --- a/ACore/test/TestFile.cpp +++ b/ACore/test/TestFile.cpp @@ -40,7 +40,7 @@ BOOST_AUTO_TEST_CASE(test_splitFileIntoLines) { // This is sanity test for splitFileIntoLines used extensively cout << "ACore:: ...test_splitFileIntoLines\n"; - std::string path = File::test_data("ACore/test/data/test_splitFileIntoLines.txt", "ACore"); + std::string path = File::test_data("ACore/test/data/test_splitFileIntoLines.txt", "ACore"); std::string theText = "This is a test string"; { @@ -122,7 +122,7 @@ BOOST_AUTO_TEST_CASE(test_splitFileIntoLines) { BOOST_AUTO_TEST_CASE(test_file_tokenizer) { cout << "ACore:: ...test_file_tokenizer\n"; - std::string path = File::test_data("ACore/test/data/test_file_tokenizer.txt", "ACore"); + std::string path = File::test_data("ACore/test/data/test_file_tokenizer.txt", "ACore"); size_t linesWithText = 100; std::string theText = "This is a test string"; @@ -181,8 +181,8 @@ BOOST_AUTO_TEST_CASE(test_file_backwardSearch) { std::string rootPath = File::test_data("ACore/test/data", "ACore"); std::string expected = File::test_data("ACore/test/data/", "ACore") + nodePath; - std::string path = rootPath; - std::string dir = "dir"; + std::string path = rootPath; + std::string dir = "dir"; for (int i = 0; i < 6; i++) { path += "/" + dir + ecf::convert_to(i); } @@ -253,8 +253,8 @@ BOOST_AUTO_TEST_CASE(test_file_forwardSearch) { std::string rootPath = File::test_data("ACore/test/data", "ACore"); std::string expected = File::test_data("ACore/test/data", "ACore") + nodePath; - std::string path = rootPath; - std::string dir = "dir"; + std::string path = rootPath; + std::string dir = "dir"; for (int i = 0; i < 6; i++) { if (i == 5) path += "/task"; @@ -335,9 +335,9 @@ BOOST_AUTO_TEST_CASE(test_create_missing_directories) { } cout << "\n"; - std::string nodePath = "dir0/dir1/dir2/dir3/dir4/dir5"; - std::string rootPath = File::test_data("ACore/test/data", "ACore"); - std::string expected = File::test_data("ACore/test/data/", "ACore") + nodePath; + std::string nodePath = "dir0/dir1/dir2/dir3/dir4/dir5"; + std::string rootPath = File::test_data("ACore/test/data", "ACore"); + std::string expected = File::test_data("ACore/test/data/", "ACore") + nodePath; std::string dir_remove = rootPath + "/dir0"; { diff --git a/ACore/test/TestRealCalendar.cpp b/ACore/test/TestRealCalendar.cpp index def97d23d..693fe63a1 100644 --- a/ACore/test/TestRealCalendar.cpp +++ b/ACore/test/TestRealCalendar.cpp @@ -92,7 +92,7 @@ BOOST_AUTO_TEST_CASE(test_REAL_calendar_time_series_relative_complex) { timeSeries.calendarChanged(calendar); - tm suiteTm = to_tm(calendar.suiteTime()); + tm suiteTm = to_tm(calendar.suiteTime()); bool matches = timeSeries.isFree(calendar); @@ -194,7 +194,7 @@ BOOST_AUTO_TEST_CASE(test_REAL_calendar_time_series_complex) { time_now += minutes(1); calendar.update(time_now); - tm suiteTm = to_tm(calendar.suiteTime()); + tm suiteTm = to_tm(calendar.suiteTime()); bool matches = timeSeries.isFree(calendar); @@ -318,7 +318,7 @@ BOOST_AUTO_TEST_CASE(test_REAL_day_changed_for_hybrid) { BOOST_CHECK_MESSAGE(calendar.hybrid(), "calendar type should be real"); // HYBRID calendars allow for day change but not date. - std::string expected_date = to_simple_string(calendar.date()); + std::string expected_date = to_simple_string(calendar.date()); boost::posix_time::ptime time_now = Calendar::second_clock_time(); diff --git a/ACore/test/TestStringSplitter.cpp b/ACore/test/TestStringSplitter.cpp index a34a05df5..c8d947bd2 100644 --- a/ACore/test/TestStringSplitter.cpp +++ b/ACore/test/TestStringSplitter.cpp @@ -289,14 +289,14 @@ static void test_get_token(const std::string& line, const char* delims = " \t") BOOST_AUTO_TEST_CASE(test_StringSplitter_get_token) { cout << "ACore:: ...test_StringSplitter_get_token \n"; - std::vector test_data = {"This is a string", - "a", - " a", - "a ", - " a ", - " a b c d ", - " - ! $ % ^ & * ( ) - + ? ", - "\n"}; + std::vector test_data = {"This is a string", + "a", + " a", + "a ", + " a ", + " a b c d ", + " - ! $ % ^ & * ( ) - + ? ", + "\n"}; std::vector test_data1 = { "/a", diff --git a/ANattr/src/ecflow/attribute/ClockAttr.cpp b/ANattr/src/ecflow/attribute/ClockAttr.cpp index 3f331124a..31d89c39c 100644 --- a/ANattr/src/ecflow/attribute/ClockAttr.cpp +++ b/ANattr/src/ecflow/attribute/ClockAttr.cpp @@ -34,8 +34,8 @@ ClockAttr::ClockAttr(const boost::posix_time::ptime& time, bool hybrid, bool pos month_ = theDate.month(); year_ = theDate.year(); - tm t = to_tm(time); - gain_ = t.tm_hour * 3600 + t.tm_min * 60 + t.tm_sec; + tm t = to_tm(time); + gain_ = t.tm_hour * 3600 + t.tm_min * 60 + t.tm_sec; } ClockAttr::ClockAttr(int day, int month, int year, bool hybrid) diff --git a/ANattr/src/ecflow/attribute/RepeatAttr.cpp b/ANattr/src/ecflow/attribute/RepeatAttr.cpp index da6f9816b..8d3787112 100644 --- a/ANattr/src/ecflow/attribute/RepeatAttr.cpp +++ b/ANattr/src/ecflow/attribute/RepeatAttr.cpp @@ -381,7 +381,7 @@ std::string RepeatDate::value_as_string(int index) const { } std::string RepeatDate::next_value_as_string() const { - long val = last_valid_value(); + long val = last_valid_value(); long julian = Cal::date_to_julian(val); julian += delta_; @@ -396,7 +396,7 @@ std::string RepeatDate::next_value_as_string() const { } std::string RepeatDate::prev_value_as_string() const { - long val = last_valid_value(); + long val = last_valid_value(); long julian = Cal::date_to_julian(val); julian -= delta_; diff --git a/ANattr/src/ecflow/attribute/Zombie.cpp b/ANattr/src/ecflow/attribute/Zombie.cpp index 912210557..51b6b3402 100644 --- a/ANattr/src/ecflow/attribute/Zombie.cpp +++ b/ANattr/src/ecflow/attribute/Zombie.cpp @@ -249,17 +249,17 @@ void Zombie::pretty_print(const std::vector& zombies, std::vector& zombies, std::vector(z.try_no()); - tryno_width = std::max(tryno_width, try_no_int.size()); - child_type_width = std::max(child_type_width, Child::to_string(z.last_child_cmd()).size()); - user_action_width = std::max(user_action_width, z.user_action_str().size()); + std::string try_no_int = ecf::convert_to(z.try_no()); + tryno_width = std::max(tryno_width, try_no_int.size()); + child_type_width = std::max(child_type_width, Child::to_string(z.last_child_cmd()).size()); + user_action_width = std::max(user_action_width, z.user_action_str().size()); switch (z.type()) { case Child::USER: diff --git a/ANode/src/ecflow/node/AbstractObserver.hpp b/ANode/src/ecflow/node/AbstractObserver.hpp index 8f8e9f761..a55a24316 100644 --- a/ANode/src/ecflow/node/AbstractObserver.hpp +++ b/ANode/src/ecflow/node/AbstractObserver.hpp @@ -20,13 +20,13 @@ class Defs; class AbstractObserver { public: - virtual ~AbstractObserver() = default; + virtual ~AbstractObserver() = default; virtual void update_start(const Node*, const std::vector&) = 0; virtual void update_start(const Defs*, const std::vector&) = 0; - virtual void update(const Node*, const std::vector&) = 0; - virtual void update(const Defs*, const std::vector&) = 0; + virtual void update(const Node*, const std::vector&) = 0; + virtual void update(const Defs*, const std::vector&) = 0; /// After this call, the node will be deleted, hence observers must *NOT* use the pointers virtual void update_delete(const Node*) {} diff --git a/ANode/src/ecflow/node/ClientSuites.cpp b/ANode/src/ecflow/node/ClientSuites.cpp index 82a27e011..8b2d410a9 100644 --- a/ANode/src/ecflow/node/ClientSuites.cpp +++ b/ANode/src/ecflow/node/ClientSuites.cpp @@ -184,8 +184,8 @@ defs_ptr ClientSuites::create_defs(defs_ptr server_defs) const { unsigned int suite_state_change_no = suite->state_change_no(); unsigned int suite_modify_change_no = suite->modify_change_no(); - the_max_state_change_no = std::max(the_max_state_change_no, suite_state_change_no); - the_max_modify_change_no = std::max(the_max_modify_change_no, suite_modify_change_no); + the_max_state_change_no = std::max(the_max_state_change_no, suite_state_change_no); + the_max_modify_change_no = std::max(the_max_modify_change_no, suite_modify_change_no); // To avoid copying the suites, we will just add the suites, to the newly created defs // However this presents a problem with the suites defs pointer. To avoid corrupting @@ -270,7 +270,7 @@ void ClientSuites::update_suite_order() { const std::vector& server_suite_vec = defs_->suiteVec(); size_t server_suite_vec_size = server_suite_vec.size(); - auto suites_end = suites_.end(); + auto suites_end = suites_.end(); for (auto i = suites_.begin(); i != suites_end; ++i) { for (size_t s = 0; s < server_suite_vec_size; s++) { if ((*i).name_ == server_suite_vec[s]->name()) { diff --git a/ANode/src/ecflow/node/Defs.cpp b/ANode/src/ecflow/node/Defs.cpp index e90478655..399f4a7d5 100644 --- a/ANode/src/ecflow/node/Defs.cpp +++ b/ANode/src/ecflow/node/Defs.cpp @@ -1397,7 +1397,7 @@ node_ptr Defs::replaceChild(const std::string& path, } // Take a note of begun status, in case the suite is being replaced. - bool begin_node = server_parent->suite()->begun(); + bool begin_node = server_parent->suite()->begun(); node_ptr client_node_to_add = last_client_child->remove(); bool addOk = server_parent->addChild(client_node_to_add, client_child_pos); @@ -2113,11 +2113,11 @@ std::string Defs::stats() const { alias += task->aliases().size(); NodeStats stats; - stats.suites_ = suiteVec_.size(); - stats.family_ = family_vec.size(); - stats.task_ = task_vec.size(); - stats.alias_ = alias; - stats.nodes_ = node_vec.size(); + stats.suites_ = suiteVec_.size(); + stats.family_ = family_vec.size(); + stats.task_ = task_vec.size(); + stats.alias_ = alias; + stats.nodes_ = node_vec.size(); stats.edit_history_nodes_ = edit_history_.size(); for (const auto& i : edit_history_) { diff --git a/ANode/src/ecflow/node/DefsDelta.cpp b/ANode/src/ecflow/node/DefsDelta.cpp index 42cf32a0b..9756b3a7f 100644 --- a/ANode/src/ecflow/node/DefsDelta.cpp +++ b/ANode/src/ecflow/node/DefsDelta.cpp @@ -24,8 +24,8 @@ using namespace std; /// Defs delta can be re-used. reset all data members void DefsDelta::init(unsigned int client_state_change_no, bool sync_suite_clock) { - sync_suite_clock_ = sync_suite_clock; - client_state_change_no_ = client_state_change_no; + sync_suite_clock_ = sync_suite_clock; + client_state_change_no_ = client_state_change_no; server_state_change_no_ = 0; server_modify_change_no_ = 0; diff --git a/ANode/src/ecflow/node/EcfFile.cpp b/ANode/src/ecflow/node/EcfFile.cpp index a590597ea..591375dc7 100644 --- a/ANode/src/ecflow/node/EcfFile.cpp +++ b/ANode/src/ecflow/node/EcfFile.cpp @@ -942,7 +942,7 @@ bool EcfFile::get_used_variables(NameValueMap& used_variables, std::string& erro // get the cached ECF_MICRO variable, typically its one char. string ecfMicro = ecfMicroCache_; - char microChar = ecfMicro[0]; + char microChar = ecfMicro[0]; // We need a stack to properly implement nopp. This is required since we need to pair // the %end, with nopp. i.e need to handle @@ -1186,7 +1186,7 @@ bool EcfFile::extractManual(const std::vector& lines, // get the cached ECF_MICRO variable, typically its one char. string ecfMicro = ecfMicroCache_; - bool add = false; + bool add = false; for (const auto& line : lines) { if (line.find(ecfMicro) == 0) { if (line.find(T_MANUAL) == 1) { diff --git a/ANode/src/ecflow/node/ExprParser.cpp b/ANode/src/ecflow/node/ExprParser.cpp index 89dbd0842..46e415348 100644 --- a/ANode/src/ecflow/node/ExprParser.cpp +++ b/ANode/src/ecflow/node/ExprParser.cpp @@ -67,25 +67,25 @@ typedef treematch_t::tree_iterator tree_iter_t; struct ExpressionGrammer : public grammar { // The parser object is copied a lot, so only use reference/pointer variables as data members - ExpressionGrammer() = default; - ~ExpressionGrammer() = default; - - static const int integer_ID = 1; - static const int dot_path_ID = 2; - static const int equal_1_ID = 3; - static const int equal_2_ID = 4; - static const int not_equal_1_ID = 5; - static const int not_equal_2_ID = 6; - static const int node_name_ID = 7; - static const int greater_equals_1_ID = 8; - static const int greater_equals_2_ID = 9; - static const int less_equals_1_ID = 10; - static const int less_equals_2_ID = 11; - static const int less_than_1_ID = 12; - static const int less_than_2_ID = 13; - static const int greater_than_1_ID = 14; - static const int greater_than_2_ID = 15; - static const int node_state_unknown_ID = 16; + ExpressionGrammer() = default; + ~ExpressionGrammer() = default; + + static const int integer_ID = 1; + static const int dot_path_ID = 2; + static const int equal_1_ID = 3; + static const int equal_2_ID = 4; + static const int not_equal_1_ID = 5; + static const int not_equal_2_ID = 6; + static const int node_name_ID = 7; + static const int greater_equals_1_ID = 8; + static const int greater_equals_2_ID = 9; + static const int less_equals_1_ID = 10; + static const int less_equals_2_ID = 11; + static const int less_than_1_ID = 12; + static const int less_than_2_ID = 13; + static const int greater_than_1_ID = 14; + static const int greater_than_2_ID = 15; + static const int node_state_unknown_ID = 16; static const int node_state_complete_ID = 18; static const int node_state_queued_ID = 19; @@ -93,42 +93,42 @@ struct ExpressionGrammer : public grammar static const int node_state_active_ID = 21; static const int node_state_aborted_ID = 22; - static const int not1_ID = 23; - static const int not2_ID = 24; - static const int not3_ID = 25; - static const int and_ID = 26; - static const int or_ID = 27; - static const int dot_dot_path_ID = 29; - static const int base_trigger_ID = 31; - static const int sub_expression_ID = 32; - static const int node_path_state_ID = 34; - static const int absolute_path_ID = 35; - static const int event_state_ID = 36; - static const int variable_ID = 37; - static const int plus_ID = 42; - static const int minus_ID = 43; - static const int multiply_ID = 44; - static const int divide_ID = 45; - static const int modulo_ID = 46; - static const int calc_expression_ID = 47; - static const int calc_factor_ID = 48; - static const int calc_term_ID = 49; - static const int calc_grouping_ID = 50; - static const int calc_subexpression_ID = 51; - static const int basic_variable_path_ID = 52; - static const int compare_expression_ID = 53; - - static const int cal_date_to_julian_ID = 54; - static const int cal_julian_to_date_ID = 55; - static const int cal_argument_ID = 56; - - static const int flag_path_ID = 57; - static const int flag_late_ID = 58; - static const int flag_zombie_ID = 59; - static const int flag_archived_ID = 60; - static const int flag_ID = 61; - static const int root_path_ID = 62; - static const int parent_variable_ID = 63; + static const int not1_ID = 23; + static const int not2_ID = 24; + static const int not3_ID = 25; + static const int and_ID = 26; + static const int or_ID = 27; + static const int dot_dot_path_ID = 29; + static const int base_trigger_ID = 31; + static const int sub_expression_ID = 32; + static const int node_path_state_ID = 34; + static const int absolute_path_ID = 35; + static const int event_state_ID = 36; + static const int variable_ID = 37; + static const int plus_ID = 42; + static const int minus_ID = 43; + static const int multiply_ID = 44; + static const int divide_ID = 45; + static const int modulo_ID = 46; + static const int calc_expression_ID = 47; + static const int calc_factor_ID = 48; + static const int calc_term_ID = 49; + static const int calc_grouping_ID = 50; + static const int calc_subexpression_ID = 51; + static const int basic_variable_path_ID = 52; + static const int compare_expression_ID = 53; + + static const int cal_date_to_julian_ID = 54; + static const int cal_julian_to_date_ID = 55; + static const int cal_argument_ID = 56; + + static const int flag_path_ID = 57; + static const int flag_late_ID = 58; + static const int flag_zombie_ID = 59; + static const int flag_archived_ID = 60; + static const int flag_ID = 61; + static const int root_path_ID = 62; + static const int parent_variable_ID = 63; template struct definition @@ -221,13 +221,13 @@ struct ExpressionGrammer : public grammar // Integer is distinct from task/family names that are integers, since nodes with integer // names that occur in trigger/complete expression must have path ./0 ./1 - integer = leaf_node_d[uint_p]; - plus = root_node_d[str_p("+")]; - minus = root_node_d[str_p("-")]; - divide = root_node_d[str_p("/")]; - multiply = root_node_d[str_p("*")]; - modulo = root_node_d[str_p("%")]; - operators = plus | minus | divide | multiply | modulo; + integer = leaf_node_d[uint_p]; + plus = root_node_d[str_p("+")]; + minus = root_node_d[str_p("-")]; + divide = root_node_d[str_p("/")]; + multiply = root_node_d[str_p("*")]; + modulo = root_node_d[str_p("%")]; + operators = plus | minus | divide | multiply | modulo; equal_1 = root_node_d[str_p("==")]; equal_2 = root_node_d[str_p("eq")]; @@ -235,28 +235,28 @@ struct ExpressionGrammer : public grammar not_equal_2 = root_node_d[str_p("ne")]; equality_comparible = equal_1 | equal_2 | not_equal_2 | not_equal_1; - greater_equals_1 = root_node_d[str_p(">=")]; - greater_equals_2 = root_node_d[str_p("ge")]; - less_equals_1 = root_node_d[str_p("<=")]; - less_equals_2 = root_node_d[str_p("le")]; - less_than_1 = root_node_d[str_p("<")]; - less_than_2 = root_node_d[str_p("lt")]; - greater_than_1 = root_node_d[str_p(">")]; - greater_than_2 = root_node_d[str_p("gt")]; + greater_equals_1 = root_node_d[str_p(">=")]; + greater_equals_2 = root_node_d[str_p("ge")]; + less_equals_1 = root_node_d[str_p("<=")]; + less_equals_2 = root_node_d[str_p("le")]; + less_than_1 = root_node_d[str_p("<")]; + less_than_2 = root_node_d[str_p("lt")]; + greater_than_1 = root_node_d[str_p(">")]; + greater_than_2 = root_node_d[str_p("gt")]; // Prioritise to most common first, to speed up parsing less_than_comparable = greater_equals_2 | less_equals_2 | greater_than_2 | less_than_2 | greater_equals_1 | less_equals_1 | less_than_1 | greater_than_1; - not1_r = root_node_d[str_p("not ")]; - not2_r = root_node_d[str_p("~")]; - not3_r = root_node_d[str_p("!")]; - not_r = not1_r | not3_r | not2_r; + not1_r = root_node_d[str_p("not ")]; + not2_r = root_node_d[str_p("~")]; + not3_r = root_node_d[str_p("!")]; + not_r = not1_r | not3_r | not2_r; - and_r = root_node_d[str_p("and")] || root_node_d[str_p("&&")] || root_node_d[str_p("AND")]; - or_r = root_node_d[str_p("or")] || root_node_d[str_p("||")] || root_node_d[str_p("OR")]; - and_or = and_r | or_r; + and_r = root_node_d[str_p("and")] || root_node_d[str_p("&&")] || root_node_d[str_p("AND")]; + or_r = root_node_d[str_p("or")] || root_node_d[str_p("||")] || root_node_d[str_p("OR")]; + and_or = and_r | or_r; - event_state = leaf_node_d[str_p("set")] || leaf_node_d[str_p("clear")]; + event_state = leaf_node_d[str_p("set")] || leaf_node_d[str_p("clear")]; node_state_unknown = root_node_d[str_p("unknown")]; node_state_complete = root_node_d[str_p("complete")]; @@ -267,18 +267,18 @@ struct ExpressionGrammer : public grammar nodestate = node_state_complete | node_state_aborted | node_state_queued | node_state_active | node_state_submitted | node_state_unknown; - flag_late = root_node_d[str_p("late")]; - flag_zombie = root_node_d[str_p("zombie")]; - flag_archived = root_node_d[str_p("archived")]; - flag = flag_late | flag_zombie | flag_archived; + flag_late = root_node_d[str_p("late")]; + flag_zombie = root_node_d[str_p("zombie")]; + flag_archived = root_node_d[str_p("archived")]; + flag = flag_late | flag_zombie | flag_archived; variable = leaf_node_d[nodename]; basic_variable_path = nodepath >> discard_node_d[ch_p(':')] >> variable; parent_variable = ch_p(':') >> variable; // if we discard_node, then we get just 'variable' and NOT parent_variable - root_path = leaf_node_d[(str_p("/"))]; - flag_path = (nodepath | root_path) >> discard_node_d[str_p("")] >> flag; + root_path = leaf_node_d[(str_p("/"))]; + flag_path = (nodepath | root_path) >> discard_node_d[str_p("")] >> flag; cal_argument = basic_variable_path | integer; cal_date_to_julian = @@ -290,10 +290,10 @@ struct ExpressionGrammer : public grammar discard_node_d[ch_p('(')] >> calc_expression >> discard_node_d[ch_p(')')] | flag_path | parent_variable | root_node_d[operators] >> calc_factor | cal_date_to_julian | cal_julian_to_date; - calc_term = calc_factor >> *(root_node_d[operators] >> calc_factor); - calc_expression = calc_term >> *(root_node_d[operators] >> calc_term); + calc_term = calc_factor >> *(root_node_d[operators] >> calc_factor); + calc_expression = calc_term >> *(root_node_d[operators] >> calc_term); - nodepathstate = nodepath >> equality_comparible >> nodestate; + nodepathstate = nodepath >> equality_comparible >> nodestate; compare_expression = nodepathstate | basic_variable_path >> equality_comparible >> event_state | root_node_d[calc_expression >> *((equality_comparible | less_than_comparable) >> @@ -301,13 +301,13 @@ struct ExpressionGrammer : public grammar // We need to take special care so that 'and' has a higher priority than 'or' // (( This is done by have a custom rule for the and - andExpr = !not_r >> compare_expression >> *(and_r >> !not_r >> compare_expression); + andExpr = !not_r >> compare_expression >> *(and_r >> !not_r >> compare_expression); - calc_grouping = !not_r >> discard_node_d[ch_p('(')] >> calc_subexpression >> discard_node_d[ch_p(')')]; + calc_grouping = !not_r >> discard_node_d[ch_p('(')] >> calc_subexpression >> discard_node_d[ch_p(')')]; calc_subexpression = (andExpr | calc_grouping) >> *((and_r | or_r) >> calc_subexpression); - expression = calc_subexpression >> end_p; + expression = calc_subexpression >> end_p; BOOST_SPIRIT_DEBUG_NODE(cal_argument); BOOST_SPIRIT_DEBUG_NODE(cal_date_to_julian); @@ -401,22 +401,22 @@ static void populate_rule_names() { rule_names[ExpressionGrammer::dot_dot_path_ID] = "DOT_DOT_PATH"; rule_names[ExpressionGrammer::absolute_path_ID] = "ABSOLUTE_PATH"; - rule_names[ExpressionGrammer::base_trigger_ID] = "BASE_TRIGGER"; - rule_names[ExpressionGrammer::sub_expression_ID] = "SUB_EXPRESSION"; - rule_names[ExpressionGrammer::node_path_state_ID] = "NODE_PATH_STATE"; - rule_names[ExpressionGrammer::flag_path_ID] = "FLAG_PATH"; - - rule_names[ExpressionGrammer::event_state_ID] = "STRING"; - rule_names[ExpressionGrammer::variable_ID] = "VARIABLE"; - - rule_names[ExpressionGrammer::calc_expression_ID] = "calc_expression_ID"; - rule_names[ExpressionGrammer::calc_factor_ID] = "calc_factor_ID"; - rule_names[ExpressionGrammer::calc_term_ID] = "calc_term_ID"; - rule_names[ExpressionGrammer::calc_grouping_ID] = "calc_grouping_ID"; - rule_names[ExpressionGrammer::calc_subexpression_ID] = "calc_subexpression_ID"; - rule_names[ExpressionGrammer::basic_variable_path_ID] = "basic_variable_path_ID"; - rule_names[ExpressionGrammer::parent_variable_ID] = "parent_variable_ID"; - rule_names[ExpressionGrammer::compare_expression_ID] = "compare_expression_ID"; + rule_names[ExpressionGrammer::base_trigger_ID] = "BASE_TRIGGER"; + rule_names[ExpressionGrammer::sub_expression_ID] = "SUB_EXPRESSION"; + rule_names[ExpressionGrammer::node_path_state_ID] = "NODE_PATH_STATE"; + rule_names[ExpressionGrammer::flag_path_ID] = "FLAG_PATH"; + + rule_names[ExpressionGrammer::event_state_ID] = "STRING"; + rule_names[ExpressionGrammer::variable_ID] = "VARIABLE"; + + rule_names[ExpressionGrammer::calc_expression_ID] = "calc_expression_ID"; + rule_names[ExpressionGrammer::calc_factor_ID] = "calc_factor_ID"; + rule_names[ExpressionGrammer::calc_term_ID] = "calc_term_ID"; + rule_names[ExpressionGrammer::calc_grouping_ID] = "calc_grouping_ID"; + rule_names[ExpressionGrammer::calc_subexpression_ID] = "calc_subexpression_ID"; + rule_names[ExpressionGrammer::basic_variable_path_ID] = "basic_variable_path_ID"; + rule_names[ExpressionGrammer::parent_variable_ID] = "parent_variable_ID"; + rule_names[ExpressionGrammer::compare_expression_ID] = "compare_expression_ID"; } } @@ -864,7 +864,7 @@ Ast* doCreateAst(const tree_iter_t& i, const std::map& r // cout << "is_root_node(i) && i->children.size() == 2\n"; AstRoot* someRoot = createRootNode(i, rule_names); - Ast* left = doCreateAst(i->children.begin(), rule_names, someRoot); + Ast* left = doCreateAst(i->children.begin(), rule_names, someRoot); if (left) someRoot->addChild(left); Ast* right = doCreateAst(i->children.begin() + 1, rule_names, someRoot); @@ -889,7 +889,7 @@ Ast* doCreateAst(const tree_iter_t& i, const std::map& r LOG_ASSERT(is_not(i->children.begin()), ""); AstRoot* notRoot = createRootNode(i->children.begin(), rule_names); - Ast* notChild = doCreateAst(i->children.begin() + 1, rule_names, notRoot /*top*/); + Ast* notChild = doCreateAst(i->children.begin() + 1, rule_names, notRoot /*top*/); if (notChild) notRoot->addChild(notChild); diff --git a/ANode/src/ecflow/node/Node.cpp b/ANode/src/ecflow/node/Node.cpp index 30a7e7d19..a198e9767 100644 --- a/ANode/src/ecflow/node/Node.cpp +++ b/ANode/src/ecflow/node/Node.cpp @@ -147,7 +147,7 @@ Node& Node::operator=(const Node& rhs) { st_ = rhs.st_; d_st_ = rhs.d_st_; - vars_ = rhs.vars_; + vars_ = rhs.vars_; delete_attributes(); @@ -180,7 +180,7 @@ Node& Node::operator=(const Node& rhs) { repeat_ = rhs.repeat_; inLimitMgr_ = rhs.inLimitMgr_; inLimitMgr_.set_node(this); - flag_ = rhs.flag_; + flag_ = rhs.flag_; state_change_no_ = 0; variable_change_no_ = 0; @@ -2681,7 +2681,7 @@ void Node::sort_attributes(ecf::Attr::Type attr, bool recursive, const std::vect } } } - auto caseInsen = [](const auto& a, const auto& b) { return Str::caseInsLess(a.name(), b.name()); }; + auto caseInsen = [](const auto& a, const auto& b) { return Str::caseInsLess(a.name(), b.name()); }; state_change_no_ = Ecf::incr_state_change_no(); switch (attr) { diff --git a/ANode/src/ecflow/node/NodeContainer.cpp b/ANode/src/ecflow/node/NodeContainer.cpp index c0a2c1952..a42b79f99 100644 --- a/ANode/src/ecflow/node/NodeContainer.cpp +++ b/ANode/src/ecflow/node/NodeContainer.cpp @@ -1285,7 +1285,7 @@ void NodeContainer::restore() { flag().set(ecf::Flag::RESTORED); // set restored flag, to stop automatic autoarchive add_remove_state_change_no_ = Ecf::incr_state_change_no(); // For sync - string msg = " autorestore "; + string msg = " autorestore "; msg += debugNodePath(); // inform user via log ecf::log(Log::LOG, msg); diff --git a/ANode/src/ecflow/node/NodeTime.cpp b/ANode/src/ecflow/node/NodeTime.cpp index 8586a899f..555aa5fe3 100644 --- a/ANode/src/ecflow/node/NodeTime.cpp +++ b/ANode/src/ecflow/node/NodeTime.cpp @@ -752,9 +752,9 @@ bool Node::time_today_cron_is_free() const { if (!crons_.empty()) noOfTimeDependencies++; - bool oneTodayIsFree = false; - bool oneTimeIsFree = false; - bool oneCronIsFree = false; + bool oneTodayIsFree = false; + bool oneTimeIsFree = false; + bool oneCronIsFree = false; const Calendar& calendar = suite()->calendar(); for (const auto& time : times_) { diff --git a/ANode/src/ecflow/node/Submittable.cpp b/ANode/src/ecflow/node/Submittable.cpp index 253e24fba..179d9b755 100644 --- a/ANode/src/ecflow/node/Submittable.cpp +++ b/ANode/src/ecflow/node/Submittable.cpp @@ -63,7 +63,7 @@ Submittable& Submittable::operator=(const Submittable& rhs) { delete sub_gen_variables_; sub_gen_variables_ = nullptr; - state_change_no_ = Ecf::incr_state_change_no(); + state_change_no_ = Ecf::incr_state_change_no(); } return *this; } diff --git a/ANode/src/ecflow/node/Suite.cpp b/ANode/src/ecflow/node/Suite.cpp index 677bbe1b1..abef8872b 100644 --- a/ANode/src/ecflow/node/Suite.cpp +++ b/ANode/src/ecflow/node/Suite.cpp @@ -59,7 +59,7 @@ Suite& Suite::operator=(const Suite& rhs) { clockAttr_ = std::make_shared(*rhs.clockAttr_); if (rhs.clock_end_attr_.get()) clock_end_attr_ = std::make_shared(*rhs.clock_end_attr_); - cal_ = rhs.cal_; + cal_ = rhs.cal_; state_change_no_ = 0; modify_change_no_ = Ecf::incr_modify_change_no(); @@ -824,8 +824,8 @@ void SuiteGenVariables::update_generated_variables() const { // assert( t.tm_year + 1900 == cal_.year()); // #endif - int hours = time_of_day.hours(); - int minutes = time_of_day.minutes(); + int hours = time_of_day.hours(); + int minutes = time_of_day.minutes(); constexpr int buff_size = 255; char buffer[buff_size]; diff --git a/ANode/src/ecflow/node/parser/CronParser.cpp b/ANode/src/ecflow/node/parser/CronParser.cpp index 00ba96a36..b4676b34c 100644 --- a/ANode/src/ecflow/node/parser/CronParser.cpp +++ b/ANode/src/ecflow/node/parser/CronParser.cpp @@ -37,7 +37,7 @@ bool CronParser::doParse(const std::string& line, std::vector& line bool parse_state = (rootParser()->get_file_type() != PrintStyle::DEFS); - size_t index = 1; // to get over the cron + size_t index = 1; // to get over the cron CronAttr cronAttr; CronAttr::parse(cronAttr, lineTokens, index, parse_state); diff --git a/ANode/src/ecflow/node/parser/LimitParser.cpp b/ANode/src/ecflow/node/parser/LimitParser.cpp index bf1a013a0..6c40967f2 100644 --- a/ANode/src/ecflow/node/parser/LimitParser.cpp +++ b/ANode/src/ecflow/node/parser/LimitParser.cpp @@ -30,7 +30,7 @@ bool LimitParser::doParse(const std::string& line, std::vector& lin int limitValue = Extract::theInt(lineTokens[2], "LimitParser::doParse: Invalid limit value: " + line); - Node* node = nodeStack_top(); + Node* node = nodeStack_top(); if (rootParser()->get_file_type() != PrintStyle::DEFS) { // state diff --git a/ANode/src/ecflow/node/parser/VerifyParser.cpp b/ANode/src/ecflow/node/parser/VerifyParser.cpp index 6d7627226..911f7a527 100644 --- a/ANode/src/ecflow/node/parser/VerifyParser.cpp +++ b/ANode/src/ecflow/node/parser/VerifyParser.cpp @@ -29,11 +29,11 @@ bool VerifyParser::doParse(const std::string& line, std::vector& li throw std::runtime_error("VerifyParser::doParse: Invalid verify :" + line); if (!nodeStack().empty()) { - Node* node = nodeStack_top(); + Node* node = nodeStack_top(); std::string stateInt = lineTokens[1]; - size_t colonPos = stateInt.find_first_of(':'); + size_t colonPos = stateInt.find_first_of(':'); if (colonPos == std::string::npos) throw std::runtime_error("Invalid verify :" + line); diff --git a/ANode/test/TestDefStatus.cpp b/ANode/test/TestDefStatus.cpp index ccfea14a3..987f77b85 100644 --- a/ANode/test/TestDefStatus.cpp +++ b/ANode/test/TestDefStatus.cpp @@ -39,9 +39,9 @@ BOOST_AUTO_TEST_CASE(test_defstatus) { task_ptr t1 = f1->add_task("t1"); task_ptr t2 = f1->add_task("t2"); - family_ptr f2 = suite->add_family("f2"); - task_ptr f2_t1 = f2->add_task("t1"); - task_ptr f2_t2 = f2->add_task("t2"); + family_ptr f2 = suite->add_family("f2"); + task_ptr f2_t1 = f2->add_task("t1"); + task_ptr f2_t2 = f2->add_task("t2"); // Get all nodes and tasks for ease of test vector nodes; diff --git a/ANode/test/TestEcfFile.cpp b/ANode/test/TestEcfFile.cpp index 31746931d..c84dc9ff1 100644 --- a/ANode/test/TestEcfFile.cpp +++ b/ANode/test/TestEcfFile.cpp @@ -900,7 +900,7 @@ BOOST_AUTO_TEST_CASE(test_ecf_file) { } ecf_body += "%VAR3:substitute_var%\n"; } - string tail = "\n%include \n# ==================================="; + string tail = "\n%include \n# ==================================="; string ecf_file = header; ecf_file += manual_head; diff --git a/ANode/test/TestExprParser.cpp b/ANode/test/TestExprParser.cpp index 9e9359ab9..64b94bc0a 100644 --- a/ANode/test/TestExprParser.cpp +++ b/ANode/test/TestExprParser.cpp @@ -191,99 +191,99 @@ BOOST_AUTO_TEST_CASE(test_parser_good_expressions) { exprMap["a eq complete"] = std::make_pair(AstEqual::stype(), false); exprMap["a ne complete"] = std::make_pair(AstNotEqual::stype(), true); - exprMap["0 eq 1"] = std::make_pair(AstEqual::stype(), false); - exprMap["1000 eq 9"] = std::make_pair(AstEqual::stype(), false); - exprMap["10 eq 10"] = std::make_pair(AstEqual::stype(), true); - exprMap["10 ge 4"] = std::make_pair(AstGreaterEqual::stype(), true); - exprMap["10 le 4"] = std::make_pair(AstLessEqual::stype(), false); - - exprMap["0 == 0"] = std::make_pair(AstEqual::stype(), true); - exprMap["0 == 1"] = std::make_pair(AstEqual::stype(), false); - exprMap["0 != 1"] = std::make_pair(AstNotEqual::stype(), true); - exprMap["0 < 1"] = std::make_pair(AstLessThan::stype(), true); - exprMap["10 < 1"] = std::make_pair(AstLessThan::stype(), false); - exprMap["1000 == 9"] = std::make_pair(AstEqual::stype(), false); - exprMap["10 == 10"] = std::make_pair(AstEqual::stype(), true); - exprMap["10 >= 4"] = std::make_pair(AstGreaterEqual::stype(), true); - exprMap["10 <= 4"] = std::make_pair(AstLessEqual::stype(), false); - exprMap["0 > 1"] = std::make_pair(AstGreaterThan::stype(), false); - exprMap["10 > 1"] = std::make_pair(AstGreaterThan::stype(), true); + exprMap["0 eq 1"] = std::make_pair(AstEqual::stype(), false); + exprMap["1000 eq 9"] = std::make_pair(AstEqual::stype(), false); + exprMap["10 eq 10"] = std::make_pair(AstEqual::stype(), true); + exprMap["10 ge 4"] = std::make_pair(AstGreaterEqual::stype(), true); + exprMap["10 le 4"] = std::make_pair(AstLessEqual::stype(), false); + + exprMap["0 == 0"] = std::make_pair(AstEqual::stype(), true); + exprMap["0 == 1"] = std::make_pair(AstEqual::stype(), false); + exprMap["0 != 1"] = std::make_pair(AstNotEqual::stype(), true); + exprMap["0 < 1"] = std::make_pair(AstLessThan::stype(), true); + exprMap["10 < 1"] = std::make_pair(AstLessThan::stype(), false); + exprMap["1000 == 9"] = std::make_pair(AstEqual::stype(), false); + exprMap["10 == 10"] = std::make_pair(AstEqual::stype(), true); + exprMap["10 >= 4"] = std::make_pair(AstGreaterEqual::stype(), true); + exprMap["10 <= 4"] = std::make_pair(AstLessEqual::stype(), false); + exprMap["0 > 1"] = std::make_pair(AstGreaterThan::stype(), false); + exprMap["10 > 1"] = std::make_pair(AstGreaterThan::stype(), true); // Integer is distinct from task/family names that are integers, since nodes with integer // names that occur in trigger/complete expression must have path ./0 ./1 - exprMap["./12:eventname"] = std::make_pair(AstEqual::stype(), false); - exprMap["./12:eventname == 0"] = std::make_pair(AstEqual::stype(), true); - exprMap["./12/b:eventname"] = std::make_pair(AstEqual::stype(), false); - exprMap["/12/b:eventname"] = std::make_pair(AstEqual::stype(), false); - exprMap["../12/b:eventname == set"] = std::make_pair(AstEqual::stype(), false); - exprMap["../12/b:eventname == clear"] = std::make_pair(AstEqual::stype(), true); - exprMap["../12/b:eventname != clear"] = std::make_pair(AstNotEqual::stype(), false); - exprMap["12:eventname == set"] = std::make_pair(AstEqual::stype(), false); - exprMap["12:eventname != set"] = std::make_pair(AstNotEqual::stype(), true); - exprMap["12:eventname == clear"] = std::make_pair(AstEqual::stype(), true); - exprMap["./12:eventname == set"] = std::make_pair(AstEqual::stype(), false); - exprMap["./12:eventname != set"] = std::make_pair(AstNotEqual::stype(), true); - exprMap["./12:eventname == clear"] = std::make_pair(AstEqual::stype(), true); - - exprMap["a:eventname"] = std::make_pair(AstEqual::stype(), false); - exprMap["a:eventname == 0"] = std::make_pair(AstEqual::stype(), true); - exprMap["./a/b:eventname"] = std::make_pair(AstEqual::stype(), false); - exprMap["/a/b:eventname"] = std::make_pair(AstEqual::stype(), false); - exprMap["../a/b:eventname == set"] = std::make_pair(AstEqual::stype(), false); - exprMap["../a/b:eventname == clear"] = std::make_pair(AstEqual::stype(), true); - exprMap["../a/b:eventname != clear"] = std::make_pair(AstNotEqual::stype(), false); - exprMap["a:eventname == set"] = std::make_pair(AstEqual::stype(), false); - exprMap["a:eventname != set"] = std::make_pair(AstNotEqual::stype(), true); - exprMap["a:eventname == clear"] = std::make_pair(AstEqual::stype(), true); - - exprMap["a:metername >= 100"] = std::make_pair(AstGreaterEqual::stype(), false); - exprMap["b:metername le 100"] = std::make_pair(AstLessEqual::stype(), true); - exprMap["./b:metername <= 100"] = std::make_pair(AstLessEqual::stype(), true); - exprMap["../a/b:metername ge 100"] = std::make_pair(AstGreaterEqual::stype(), false); - exprMap["../a/b/c:metername >= 100"] = std::make_pair(AstGreaterEqual::stype(), false); - - exprMap["!a:a && b:b"] = std::make_pair(AstAnd::stype(), false); - exprMap["a:a && ! b:b"] = std::make_pair(AstAnd::stype(), false); - exprMap["! a:a || b:b"] = std::make_pair(AstOr::stype(), true); - exprMap["a:a || ! b:b"] = std::make_pair(AstOr::stype(), true); - exprMap["! a:a && b:b && c:c"] = std::make_pair(AstAnd::stype(), false); - exprMap["! a:a && b:b || c:c"] = std::make_pair(AstOr::stype(), false); - exprMap["a:a && ! b:b && c:c"] = std::make_pair(AstAnd::stype(), false); - exprMap["a:a && ! b:b || c:c"] = std::make_pair(AstOr::stype(), false); - exprMap["a:a || b:b && ! c:c"] = std::make_pair(AstOr::stype(), false); - exprMap["a:a || b:b || ! c:c"] = std::make_pair(AstOr::stype(), true); - - exprMap["a:b && b:c && c:d && ../c:b && ./x:y && z:x"] = std::make_pair(AstAnd::stype(), false); - exprMap["! a:b && b:c && c:d && ../c:b && ./x:y && z:x"] = std::make_pair(AstAnd::stype(), false); - exprMap["! a:b || b:c && c:d && ../c:b && ./x:y && z:x"] = std::make_pair(AstOr::stype(), true); - exprMap["a:b || b:c && ! c:d && ../c:b && ./x:y && z:x"] = std::make_pair(AstOr::stype(), false); - exprMap["a:b && b:c && c:d && ../c:b && ./x:y && ! z:x"] = std::make_pair(AstAnd::stype(), false); - exprMap["x:x || a:b && b:c && c:d && ../c:b && ./x:y && z:x"] = std::make_pair(AstOr::stype(), false); + exprMap["./12:eventname"] = std::make_pair(AstEqual::stype(), false); + exprMap["./12:eventname == 0"] = std::make_pair(AstEqual::stype(), true); + exprMap["./12/b:eventname"] = std::make_pair(AstEqual::stype(), false); + exprMap["/12/b:eventname"] = std::make_pair(AstEqual::stype(), false); + exprMap["../12/b:eventname == set"] = std::make_pair(AstEqual::stype(), false); + exprMap["../12/b:eventname == clear"] = std::make_pair(AstEqual::stype(), true); + exprMap["../12/b:eventname != clear"] = std::make_pair(AstNotEqual::stype(), false); + exprMap["12:eventname == set"] = std::make_pair(AstEqual::stype(), false); + exprMap["12:eventname != set"] = std::make_pair(AstNotEqual::stype(), true); + exprMap["12:eventname == clear"] = std::make_pair(AstEqual::stype(), true); + exprMap["./12:eventname == set"] = std::make_pair(AstEqual::stype(), false); + exprMap["./12:eventname != set"] = std::make_pair(AstNotEqual::stype(), true); + exprMap["./12:eventname == clear"] = std::make_pair(AstEqual::stype(), true); + + exprMap["a:eventname"] = std::make_pair(AstEqual::stype(), false); + exprMap["a:eventname == 0"] = std::make_pair(AstEqual::stype(), true); + exprMap["./a/b:eventname"] = std::make_pair(AstEqual::stype(), false); + exprMap["/a/b:eventname"] = std::make_pair(AstEqual::stype(), false); + exprMap["../a/b:eventname == set"] = std::make_pair(AstEqual::stype(), false); + exprMap["../a/b:eventname == clear"] = std::make_pair(AstEqual::stype(), true); + exprMap["../a/b:eventname != clear"] = std::make_pair(AstNotEqual::stype(), false); + exprMap["a:eventname == set"] = std::make_pair(AstEqual::stype(), false); + exprMap["a:eventname != set"] = std::make_pair(AstNotEqual::stype(), true); + exprMap["a:eventname == clear"] = std::make_pair(AstEqual::stype(), true); + + exprMap["a:metername >= 100"] = std::make_pair(AstGreaterEqual::stype(), false); + exprMap["b:metername le 100"] = std::make_pair(AstLessEqual::stype(), true); + exprMap["./b:metername <= 100"] = std::make_pair(AstLessEqual::stype(), true); + exprMap["../a/b:metername ge 100"] = std::make_pair(AstGreaterEqual::stype(), false); + exprMap["../a/b/c:metername >= 100"] = std::make_pair(AstGreaterEqual::stype(), false); + + exprMap["!a:a && b:b"] = std::make_pair(AstAnd::stype(), false); + exprMap["a:a && ! b:b"] = std::make_pair(AstAnd::stype(), false); + exprMap["! a:a || b:b"] = std::make_pair(AstOr::stype(), true); + exprMap["a:a || ! b:b"] = std::make_pair(AstOr::stype(), true); + exprMap["! a:a && b:b && c:c"] = std::make_pair(AstAnd::stype(), false); + exprMap["! a:a && b:b || c:c"] = std::make_pair(AstOr::stype(), false); + exprMap["a:a && ! b:b && c:c"] = std::make_pair(AstAnd::stype(), false); + exprMap["a:a && ! b:b || c:c"] = std::make_pair(AstOr::stype(), false); + exprMap["a:a || b:b && ! c:c"] = std::make_pair(AstOr::stype(), false); + exprMap["a:a || b:b || ! c:c"] = std::make_pair(AstOr::stype(), true); + + exprMap["a:b && b:c && c:d && ../c:b && ./x:y && z:x"] = std::make_pair(AstAnd::stype(), false); + exprMap["! a:b && b:c && c:d && ../c:b && ./x:y && z:x"] = std::make_pair(AstAnd::stype(), false); + exprMap["! a:b || b:c && c:d && ../c:b && ./x:y && z:x"] = std::make_pair(AstOr::stype(), true); + exprMap["a:b || b:c && ! c:d && ../c:b && ./x:y && z:x"] = std::make_pair(AstOr::stype(), false); + exprMap["a:b && b:c && c:d && ../c:b && ./x:y && ! z:x"] = std::make_pair(AstAnd::stype(), false); + exprMap["x:x || a:b && b:c && c:d && ../c:b && ./x:y && z:x"] = std::make_pair(AstOr::stype(), false); exprMap["x:x == 0 || a:b && b:c && c:d && ../c:b && ./x:y && z:x"] = std::make_pair(AstOr::stype(), true); exprMap["! a:a && ! b:b && ! c:c && ! d:d "] = std::make_pair(AstAnd::stype(), true); exprMap["! a:a || ! b:b || ! c:c || ! d:d "] = std::make_pair(AstOr::stype(), true); - exprMap["./a == unknown"] = std::make_pair(AstEqual::stype(), true); - exprMap["./a/b != queued"] = std::make_pair(AstNotEqual::stype(), true); - exprMap["../a == complete"] = std::make_pair(AstEqual::stype(), false); - exprMap["../a/b == aborted"] = std::make_pair(AstEqual::stype(), false); - exprMap["../a/b/c != aborted"] = std::make_pair(AstNotEqual::stype(), true); + exprMap["./a == unknown"] = std::make_pair(AstEqual::stype(), true); + exprMap["./a/b != queued"] = std::make_pair(AstNotEqual::stype(), true); + exprMap["../a == complete"] = std::make_pair(AstEqual::stype(), false); + exprMap["../a/b == aborted"] = std::make_pair(AstEqual::stype(), false); + exprMap["../a/b/c != aborted"] = std::make_pair(AstNotEqual::stype(), true); - exprMap["inigroup:YMD == ! 1"] = std::make_pair(AstEqual::stype(), true); - exprMap["1 != ! 1"] = std::make_pair(AstNotEqual::stype(), true); - exprMap["b == complete or nodepath:eventname"] = std::make_pair(AstOr::stype(), false); + exprMap["inigroup:YMD == ! 1"] = std::make_pair(AstEqual::stype(), true); + exprMap["1 != ! 1"] = std::make_pair(AstNotEqual::stype(), true); + exprMap["b == complete or nodepath:eventname"] = std::make_pair(AstOr::stype(), false); - exprMap["a eq unknown and b ne complete"] = std::make_pair(AstAnd::stype(), true); - exprMap["a eq complete or b eq complete"] = std::make_pair(AstOr::stype(), false); - exprMap["a eq complete or b eq unknown"] = std::make_pair(AstOr::stype(), true); - exprMap["a eq complete and b eq complete"] = std::make_pair(AstAnd::stype(), false); - exprMap["(a eq complete and b == complete)"] = std::make_pair(AstAnd::stype(), false); + exprMap["a eq unknown and b ne complete"] = std::make_pair(AstAnd::stype(), true); + exprMap["a eq complete or b eq complete"] = std::make_pair(AstOr::stype(), false); + exprMap["a eq complete or b eq unknown"] = std::make_pair(AstOr::stype(), true); + exprMap["a eq complete and b eq complete"] = std::make_pair(AstAnd::stype(), false); + exprMap["(a eq complete and b == complete)"] = std::make_pair(AstAnd::stype(), false); - exprMap["a == unknown && b != complete"] = std::make_pair(AstAnd::stype(), true); - exprMap["a == complete || b == complete"] = std::make_pair(AstOr::stype(), false); - exprMap["a == complete || b == unknown"] = std::make_pair(AstOr::stype(), true); - exprMap["a eq complete && b eq complete"] = std::make_pair(AstAnd::stype(), false); - exprMap["(a == complete && b == complete)"] = std::make_pair(AstAnd::stype(), false); + exprMap["a == unknown && b != complete"] = std::make_pair(AstAnd::stype(), true); + exprMap["a == complete || b == complete"] = std::make_pair(AstOr::stype(), false); + exprMap["a == complete || b == unknown"] = std::make_pair(AstOr::stype(), true); + exprMap["a eq complete && b eq complete"] = std::make_pair(AstAnd::stype(), false); + exprMap["(a == complete && b == complete)"] = std::make_pair(AstAnd::stype(), false); // This should be interpreted as '(a == complete and b == complete) or c == complete' // because 'and' has a higher priority than the 'or'. Hence 'OR' must be at the root. @@ -317,27 +317,27 @@ BOOST_AUTO_TEST_CASE(test_parser_good_expressions) { exprMap["not ../../../prod2diss/operation_is_late:yes or a == complete "] = std::make_pair(AstOr::stype(), true); exprMap["not ../../../prod2diss/operation_is_late:yes or not a == complete "] = std::make_pair(AstOr::stype(), true); - exprMap["not ( a == complete )"] = std::make_pair(AstNot::stype(), true); - exprMap["not ( a == unknown )"] = std::make_pair(AstNot::stype(), false); - exprMap["~ ( a == unknown )"] = std::make_pair(AstNot::stype(), false); - exprMap["~ ( a != unknown )"] = std::make_pair(AstNot::stype(), true); - exprMap["! ( a == unknown )"] = std::make_pair(AstNot::stype(), false); - exprMap["!( a == unknown )"] = std::make_pair(AstNot::stype(), false); - exprMap["inigroup:YMD eq ~ 1"] = std::make_pair(AstEqual::stype(), true); - exprMap["inigroup:YMD eq ~ 0"] = std::make_pair(AstEqual::stype(), false); - exprMap["inigroup:YMD eq ! 0"] = std::make_pair(AstEqual::stype(), false); - exprMap["/net/main:YMD le /net/cleanplus1:YMD and 1"] = std::make_pair(AstAnd::stype(), true); + exprMap["not ( a == complete )"] = std::make_pair(AstNot::stype(), true); + exprMap["not ( a == unknown )"] = std::make_pair(AstNot::stype(), false); + exprMap["~ ( a == unknown )"] = std::make_pair(AstNot::stype(), false); + exprMap["~ ( a != unknown )"] = std::make_pair(AstNot::stype(), true); + exprMap["! ( a == unknown )"] = std::make_pair(AstNot::stype(), false); + exprMap["!( a == unknown )"] = std::make_pair(AstNot::stype(), false); + exprMap["inigroup:YMD eq ~ 1"] = std::make_pair(AstEqual::stype(), true); + exprMap["inigroup:YMD eq ~ 0"] = std::make_pair(AstEqual::stype(), false); + exprMap["inigroup:YMD eq ! 0"] = std::make_pair(AstEqual::stype(), false); + exprMap["/net/main:YMD le /net/cleanplus1:YMD and 1"] = std::make_pair(AstAnd::stype(), true); exprMap["! ../../../operation_is_late:yes == set"] = std::make_pair(AstNot::stype(), true); exprMap["2 == (((/seasplots/lag:YMD / 100 ) % 100) % 3)"] = std::make_pair(AstEqual::stype(), false); exprMap["(((/seasplots/lag:YMD / 100 ) % 100) % 3) == 2"] = std::make_pair(AstEqual::stype(), false); exprMap["! ../../../a:yes == set or ! a == complete or y == aborted"] = std::make_pair(AstOr::stype(), true); - exprMap["bins/wamabs eq complete and links eq complete"] = std::make_pair(AstAnd::stype(), false); - exprMap["/mc/main:YMD le /mc/main/ref:MC_STOP"] = std::make_pair(AstLessEqual::stype(), true); - exprMap["/mc//main:YMD le /mc/main//ref:MC_STOP"] = std::make_pair(AstLessEqual::stype(), true); + exprMap["bins/wamabs eq complete and links eq complete"] = std::make_pair(AstAnd::stype(), false); + exprMap["/mc/main:YMD le /mc/main/ref:MC_STOP"] = std::make_pair(AstLessEqual::stype(), true); + exprMap["/mc//main:YMD le /mc/main//ref:MC_STOP"] = std::make_pair(AstLessEqual::stype(), true); exprMap["( ( /o/main/12/an/slwet eq complete and ( /o/main/12/an/4dvar/ifstraj:finalwave or /o/main/12/an/4dvar " - "eq complete)) or /o/main/12/an eq complete)"] = std::make_pair(AstOr::stype(), false); + "eq complete)) or /o/main/12/an eq complete)"] = std::make_pair(AstOr::stype(), false); exprMap["../../sv/getsvs eq complete and ( getae:1 or getae eq complete)"] = std::make_pair(AstAnd::stype(), false); exprMap["( ( /o/lag:YMD gt /sync/o/o/lag:YMD) or ( /o/main:YMD gt /sync/o/o/main:YMD) or 1 eq 0) and /sync/o ne " @@ -365,33 +365,33 @@ BOOST_AUTO_TEST_CASE(test_parser_good_expressions) { std::make_pair(AstAnd::stype(), false); exprMap["( stage eq complete or ./stage:YMD gt ./retrieve:YMD) and ( ./retrieve:YMD - ./load:YMD lt 5)"] = std::make_pair(AstAnd::stype(), false); - exprMap["./a:YMD - ./b:YMD lt 5"] = std::make_pair(AstLessThan::stype(), true); - - exprMap["comp == complete and notready == complete"] = std::make_pair(AstAnd::stype(), false); - - exprMap["/s/f/tlate"] = std::make_pair(AstFlag::stype(), false); - exprMap["./slate"] = std::make_pair(AstFlag::stype(), false); - exprMap["../s/f/tlate"] = std::make_pair(AstFlag::stype(), false); - exprMap["/s/f/tlate == 0"] = std::make_pair(AstEqual::stype(), true); - exprMap["0 == /s/f/tlate"] = std::make_pair(AstEqual::stype(), true); - exprMap["/s/f/tlate and /s/f/tlate"] = std::make_pair(AstAnd::stype(), false); - exprMap["! /s/f/tlate and ! /s/f/tlate"] = std::make_pair(AstAnd::stype(), true); - exprMap["! /s/f/tlate"] = std::make_pair(AstNot::stype(), true); - exprMap["/s/f/tlate + 2 >= 2"] = std::make_pair(AstGreaterEqual::stype(), true); - exprMap["(/s/f/tlate or 1)"] = std::make_pair(AstOr::stype(), true); - exprMap["/late"] = std::make_pair(AstFlag::stype(), false); - - exprMap["/s/f/tzombie"] = std::make_pair(AstFlag::stype(), false); - exprMap["./szombie"] = std::make_pair(AstFlag::stype(), false); - exprMap["../s/f/tzombie"] = std::make_pair(AstFlag::stype(), false); - exprMap["/s/f/tzombie == 0"] = std::make_pair(AstEqual::stype(), true); - exprMap["0 == /s/f/tzombie"] = std::make_pair(AstEqual::stype(), true); - exprMap["/s/f/tzombie and /s/f/tzombie"] = std::make_pair(AstAnd::stype(), false); - exprMap["/s/f/tzombie or /s/f/tzombie"] = std::make_pair(AstOr::stype(), false); - exprMap["! /s/f/tzombie and ! /s/f/tzombie"] = std::make_pair(AstAnd::stype(), true); - exprMap["! /s/f/tzombie"] = std::make_pair(AstNot::stype(), true); - exprMap["/s/f/tzombie + 2 >= 2"] = std::make_pair(AstGreaterEqual::stype(), true); - exprMap["(/s/f/tzombie or 1)"] = std::make_pair(AstOr::stype(), true); + exprMap["./a:YMD - ./b:YMD lt 5"] = std::make_pair(AstLessThan::stype(), true); + + exprMap["comp == complete and notready == complete"] = std::make_pair(AstAnd::stype(), false); + + exprMap["/s/f/tlate"] = std::make_pair(AstFlag::stype(), false); + exprMap["./slate"] = std::make_pair(AstFlag::stype(), false); + exprMap["../s/f/tlate"] = std::make_pair(AstFlag::stype(), false); + exprMap["/s/f/tlate == 0"] = std::make_pair(AstEqual::stype(), true); + exprMap["0 == /s/f/tlate"] = std::make_pair(AstEqual::stype(), true); + exprMap["/s/f/tlate and /s/f/tlate"] = std::make_pair(AstAnd::stype(), false); + exprMap["! /s/f/tlate and ! /s/f/tlate"] = std::make_pair(AstAnd::stype(), true); + exprMap["! /s/f/tlate"] = std::make_pair(AstNot::stype(), true); + exprMap["/s/f/tlate + 2 >= 2"] = std::make_pair(AstGreaterEqual::stype(), true); + exprMap["(/s/f/tlate or 1)"] = std::make_pair(AstOr::stype(), true); + exprMap["/late"] = std::make_pair(AstFlag::stype(), false); + + exprMap["/s/f/tzombie"] = std::make_pair(AstFlag::stype(), false); + exprMap["./szombie"] = std::make_pair(AstFlag::stype(), false); + exprMap["../s/f/tzombie"] = std::make_pair(AstFlag::stype(), false); + exprMap["/s/f/tzombie == 0"] = std::make_pair(AstEqual::stype(), true); + exprMap["0 == /s/f/tzombie"] = std::make_pair(AstEqual::stype(), true); + exprMap["/s/f/tzombie and /s/f/tzombie"] = std::make_pair(AstAnd::stype(), false); + exprMap["/s/f/tzombie or /s/f/tzombie"] = std::make_pair(AstOr::stype(), false); + exprMap["! /s/f/tzombie and ! /s/f/tzombie"] = std::make_pair(AstAnd::stype(), true); + exprMap["! /s/f/tzombie"] = std::make_pair(AstNot::stype(), true); + exprMap["/s/f/tzombie + 2 >= 2"] = std::make_pair(AstGreaterEqual::stype(), true); + exprMap["(/s/f/tzombie or 1)"] = std::make_pair(AstOr::stype(), true); exprMap["/s/f/tarchived"] = std::make_pair(AstFlag::stype(), false); exprMap["./sarchived"] = std::make_pair(AstFlag::stype(), false); @@ -405,16 +405,16 @@ BOOST_AUTO_TEST_CASE(test_parser_good_expressions) { exprMap["/s/f/tarchived + 2 >= 2"] = std::make_pair(AstGreaterEqual::stype(), true); exprMap["(/s/f/tarchived or 1)"] = std::make_pair(AstOr::stype(), true); - exprMap[":VAR == 0"] = std::make_pair(AstEqual::stype(), true); - exprMap[":VAR == 1"] = std::make_pair(AstEqual::stype(), false); - exprMap[":VAR == /mc/main/ref:MC_STOP"] = std::make_pair(AstEqual::stype(), true); - exprMap[":YMD - :YMD <= 5"] = std::make_pair(AstLessEqual::stype(), true); - exprMap[":YMD + :YMD <= 5"] = std::make_pair(AstLessEqual::stype(), true); - exprMap[":YMD * :YMD <= 5"] = std::make_pair(AstLessEqual::stype(), true); - exprMap[":YMD + 1 == 1"] = std::make_pair(AstEqual::stype(), true); + exprMap[":VAR == 0"] = std::make_pair(AstEqual::stype(), true); + exprMap[":VAR == 1"] = std::make_pair(AstEqual::stype(), false); + exprMap[":VAR == /mc/main/ref:MC_STOP"] = std::make_pair(AstEqual::stype(), true); + exprMap[":YMD - :YMD <= 5"] = std::make_pair(AstLessEqual::stype(), true); + exprMap[":YMD + :YMD <= 5"] = std::make_pair(AstLessEqual::stype(), true); + exprMap[":YMD * :YMD <= 5"] = std::make_pair(AstLessEqual::stype(), true); + exprMap[":YMD + 1 == 1"] = std::make_pair(AstEqual::stype(), true); - int parse_failure = 0; - int ast_failure = 0; + int parse_failure = 0; + int ast_failure = 0; // std::pair > p; for (const auto& p : exprMap) { @@ -430,7 +430,7 @@ BOOST_AUTO_TEST_CASE(test_parser_good_expressions) { string expectedRootType = p.second.first; bool expectedEvaluationResult = p.second.second; - Ast* top = theExprParser.getAst(); + Ast* top = theExprParser.getAst(); if (!top) ast_failure++; BOOST_CHECK_MESSAGE(top, "No abstract syntax tree " + p.first); @@ -484,8 +484,8 @@ BOOST_AUTO_TEST_CASE(test_trigger_functions) { // test 10 digit integer, ie yyyymmddhh exprMap["2457620 == cal::date_to_julian( 2016081912 )"] = std::make_pair(AstEqual::stype(), true); - int parse_failure = 0; - int ast_failure = 0; + int parse_failure = 0; + int ast_failure = 0; for (std::pair> p : exprMap) { // cout << "parsing: " << p.first << "\n"; @@ -500,7 +500,7 @@ BOOST_AUTO_TEST_CASE(test_trigger_functions) { string expectedRootType = p.second.first; bool expectedEvaluationResult = p.second.second; - Ast* top = theExprParser.getAst(); + Ast* top = theExprParser.getAst(); if (!top) ast_failure++; BOOST_CHECK_MESSAGE(top, "No abstract syntax tree " + p.first); @@ -578,15 +578,15 @@ BOOST_AUTO_TEST_CASE(test_trigger_functions_with_boost_date) { long julian_day = startDate.julian_day(); std::string str_julian_day = ecf::convert_to(julian_day); std::string eight_digit_iso_string = to_iso_string(startDate); - string expr = str_julian_day + " == cal::date_to_julian(" + eight_digit_iso_string + ")"; - exprMap[expr] = std::make_pair(AstEqual::stype(), true); + string expr = str_julian_day + " == cal::date_to_julian(" + eight_digit_iso_string + ")"; + exprMap[expr] = std::make_pair(AstEqual::stype(), true); std::string ten_digit_string = eight_digit_iso_string + "12"; expr = str_julian_day + " == cal::date_to_julian(" + ten_digit_string + ")"; exprMap[expr] = std::make_pair(AstEqual::stype(), true); - string expr2 = to_iso_string(startDate) + " == cal::julian_to_date(" + str_julian_day + ")"; - exprMap[expr2] = std::make_pair(AstEqual::stype(), true); + string expr2 = to_iso_string(startDate) + " == cal::julian_to_date(" + str_julian_day + ")"; + exprMap[expr2] = std::make_pair(AstEqual::stype(), true); startDate += days(1); } @@ -606,7 +606,7 @@ BOOST_AUTO_TEST_CASE(test_trigger_functions_with_boost_date) { string expectedRootType = p.second.first; bool expectedEvaluationResult = p.second.second; - Ast* top = theExprParser.getAst(); + Ast* top = theExprParser.getAst(); if (!top) ast_failure++; BOOST_CHECK_MESSAGE(top, "No abstract syntax tree " + p.first); @@ -659,7 +659,7 @@ BOOST_AUTO_TEST_CASE(test_trigger_expression_divide_by_zero) { string expectedRootType = p.second.first; bool expectedEvaluationResult = p.second.second; - Ast* top = theExprParser.getAst(); + Ast* top = theExprParser.getAst(); BOOST_REQUIRE_MESSAGE(top, "No abstract syntax tree"); BOOST_CHECK_MESSAGE(top->left(), "No root created"); BOOST_CHECK_MESSAGE(top->left()->isRoot(), "First child of top should be a root"); diff --git a/ANode/test/TestNodeState.cpp b/ANode/test/TestNodeState.cpp index df4c91698..74068bf9e 100644 --- a/ANode/test/TestNodeState.cpp +++ b/ANode/test/TestNodeState.cpp @@ -36,12 +36,12 @@ BOOST_AUTO_TEST_CASE(test_state_hierarchy) { // endfamily // endsuite Defs theDefs; - suite_ptr s1 = theDefs.add_suite("suite1"); - family_ptr f1 = s1->add_family("family"); - task_ptr t1 = f1->add_task("t1"); - task_ptr t2 = f1->add_task("t2"); - task_ptr t3 = f1->add_task("t3"); - task_ptr t4 = f1->add_task("t4"); + suite_ptr s1 = theDefs.add_suite("suite1"); + family_ptr f1 = s1->add_family("family"); + task_ptr t1 = f1->add_task("t1"); + task_ptr t2 = f1->add_task("t2"); + task_ptr t3 = f1->add_task("t3"); + task_ptr t4 = f1->add_task("t4"); NState::State result = s1->computedState(Node::IMMEDIATE_CHILDREN); BOOST_REQUIRE_MESSAGE(result == NState::UNKNOWN, diff --git a/ANode/test/TestSingleExprParse.cpp b/ANode/test/TestSingleExprParse.cpp index fcaaa4b86..adb3293c6 100644 --- a/ANode/test/TestSingleExprParse.cpp +++ b/ANode/test/TestSingleExprParse.cpp @@ -54,7 +54,7 @@ BOOST_AUTO_TEST_CASE(test_single_expression) { string expectedRootType = p.second.first; bool expectedEvaluationResult = p.second.second; - Ast* top = theExprParser.getAst(); + Ast* top = theExprParser.getAst(); BOOST_REQUIRE_MESSAGE(top, "No abstract syntax tree"); BOOST_REQUIRE_MESSAGE(top->left(), "No root created"); BOOST_REQUIRE_MESSAGE(top->left()->isRoot() || top->left()->is_attribute(), diff --git a/ANode/test/TestTaskScriptGenerator.cpp b/ANode/test/TestTaskScriptGenerator.cpp index 5a149ac54..8b44dc0be 100644 --- a/ANode/test/TestTaskScriptGenerator.cpp +++ b/ANode/test/TestTaskScriptGenerator.cpp @@ -73,8 +73,8 @@ BOOST_AUTO_TEST_CASE(test_task_script_generator) { // SET ECF_HOME std::string ecf_home = File::test_data("ANode/test/data/TaskScriptGenerator", "ANode"); - std::string head = ecf_home + "/head.h"; - std::string tail = ecf_home + "/tail.h"; + std::string head = ecf_home + "/head.h"; + std::string tail = ecf_home + "/tail.h"; fs::remove_all(ecf_home); BOOST_REQUIRE_MESSAGE(!fs::exists(head), "Remove of head file failed"); BOOST_REQUIRE_MESSAGE(!fs::exists(tail), "Remove of tail file failed"); @@ -159,8 +159,8 @@ BOOST_AUTO_TEST_CASE(test_task_script_generator_with_dummy_tasks) { // SET ECF_HOME std::string ecf_home = File::test_data("ANode/test/data/TaskScriptGenerator", "ANode"); - std::string head = ecf_home + "/head.h"; - std::string tail = ecf_home + "/tail.h"; + std::string head = ecf_home + "/head.h"; + std::string tail = ecf_home + "/tail.h"; fs::remove_all(ecf_home); BOOST_REQUIRE_MESSAGE(!fs::exists(head), "Remove of head file failed"); BOOST_REQUIRE_MESSAGE(!fs::exists(tail), "Remove of tail file failed"); diff --git a/ANode/test/TestVariableInheritance.cpp b/ANode/test/TestVariableInheritance.cpp index 529061182..92a0ce845 100644 --- a/ANode/test/TestVariableInheritance.cpp +++ b/ANode/test/TestVariableInheritance.cpp @@ -49,7 +49,7 @@ BOOST_AUTO_TEST_CASE(test_variable_inheritance) { fam->addVariable(Variable("MIDDLE", "20")); t = fam->add_task("t"); t->addVariable(Variable("LOWER", "abc")); - t2 = fam->add_task("t2"); + t2 = fam->add_task("t2"); family_ptr fam2 = suite->add_family("f2"); fam2->addVariable(Variable("TOPLEVEL", "40")); diff --git a/ANode/test/TestVariableSubstitution.cpp b/ANode/test/TestVariableSubstitution.cpp index da0951756..3d01e3f22 100644 --- a/ANode/test/TestVariableSubstitution.cpp +++ b/ANode/test/TestVariableSubstitution.cpp @@ -163,7 +163,7 @@ BOOST_AUTO_TEST_CASE(test_variable_substitution_double_micro) { std::cout << "ANode:: ...test_variable_substitution_double_micro\n"; Defs defs; - suite_ptr s = defs.add_suite("suite"); + suite_ptr s = defs.add_suite("suite"); std::string cmd = "%%"; std::string expected = "%"; @@ -409,7 +409,7 @@ BOOST_AUTO_TEST_CASE(test_server_variable_substitution) { std::cout << "ANode:: ...test_server_variable_substitution\n"; Defs defs; - suite_ptr s = defs.add_suite("suite"); + suite_ptr s = defs.add_suite("suite"); std::vector vec = required_server_variables(); for (const auto& i : vec) { diff --git a/ANode/test/parser/TestAutoAddExterns.cpp b/ANode/test/parser/TestAutoAddExterns.cpp index c380c96d7..2723d46b8 100644 --- a/ANode/test/parser/TestAutoAddExterns.cpp +++ b/ANode/test/parser/TestAutoAddExterns.cpp @@ -25,7 +25,7 @@ BOOST_AUTO_TEST_SUITE(ParserTestSuite) // Test that automatic add of externs BOOST_AUTO_TEST_CASE(test_auto_add_externs) { - std::string path = File::test_data("ANode/test/parser/data/single_defs/test_auto_add_extern.def", "parser"); + std::string path = File::test_data("ANode/test/parser/data/single_defs/test_auto_add_extern.def", "parser"); size_t mega_file_size = fs::file_size(path); cout << "AParser:: ...test_auto_add_externs " << path << " file_size(" << mega_file_size << ")\n"; diff --git a/ANode/test/parser/TestMementoPersistAndReload.cpp b/ANode/test/parser/TestMementoPersistAndReload.cpp index 518a54e7d..7ca74eade 100644 --- a/ANode/test/parser/TestMementoPersistAndReload.cpp +++ b/ANode/test/parser/TestMementoPersistAndReload.cpp @@ -449,8 +449,8 @@ BOOST_AUTO_TEST_CASE(test_memento_persist_and_reload) { { Defs defs; - suite_ptr suite = defs.add_suite("s1"); - node_ptr t = suite->add_task("t1"); + suite_ptr suite = defs.add_suite("s1"); + node_ptr t = suite->add_task("t1"); std::vector child_cmds = ecf::Child::list(); diff --git a/Base/src/ecflow/base/AbstractClientEnv.hpp b/Base/src/ecflow/base/AbstractClientEnv.hpp index 7de98546c..1c869c16b 100644 --- a/Base/src/ecflow/base/AbstractClientEnv.hpp +++ b/Base/src/ecflow/base/AbstractClientEnv.hpp @@ -34,10 +34,10 @@ class AbstractClientEnv { AbstractClientEnv(const AbstractClientEnv&) = delete; const AbstractClientEnv& operator=(const AbstractClientEnv&) = delete; - virtual ~AbstractClientEnv() = default; + virtual ~AbstractClientEnv() = default; - virtual void set_cli(bool f) = 0; - virtual bool get_cli() const = 0; + virtual void set_cli(bool f) = 0; + virtual bool get_cli() const = 0; /// For all tasks/child based commands we require taskPath and password and optional Remote ID /// When the jobs use a queueing system the remote id (ECF_RID) is used to diff --git a/Base/src/ecflow/base/AbstractServer.hpp b/Base/src/ecflow/base/AbstractServer.hpp index 9d2fe577a..3857b72a4 100644 --- a/Base/src/ecflow/base/AbstractServer.hpp +++ b/Base/src/ecflow/base/AbstractServer.hpp @@ -120,7 +120,7 @@ class AbstractServer { /// b/ File is empty /// c/ Errors in parsing file /// If errors arise the exist user still stay in affect - virtual bool reloadWhiteListFile(std::string& errorMsg) = 0; + virtual bool reloadWhiteListFile(std::string& errorMsg) = 0; virtual bool reloadPasswdFile(std::string& errorMsg) = 0; virtual bool reloadCustomPasswdFile(std::string& errorMsg) = 0; diff --git a/Base/src/ecflow/base/Openssl.cpp b/Base/src/ecflow/base/Openssl.cpp index 7ca64e846..fa9180d20 100644 --- a/Base/src/ecflow/base/Openssl.cpp +++ b/Base/src/ecflow/base/Openssl.cpp @@ -135,7 +135,7 @@ void Openssl::init_for_client() { if (!init_for_client_ && enabled()) { init_for_client_ = true; - ssl_context_ = std::make_unique(boost::asio::ssl::context::sslv23); + ssl_context_ = std::make_unique(boost::asio::ssl::context::sslv23); ssl_context_->load_verify_file(crt()); } } diff --git a/Base/src/ecflow/base/Stats.cpp b/Base/src/ecflow/base/Stats.cpp index ba516234c..16fe3a648 100644 --- a/Base/src/ecflow/base/Stats.cpp +++ b/Base/src/ecflow/base/Stats.cpp @@ -84,78 +84,78 @@ void Stats::reset() { checkpt_ = 0; restore_defs_from_checkpt_ = 0; - server_version_ = 0; - restart_server_ = 0; - shutdown_server_ = 0; - halt_server_ = 0; - reload_white_list_file_ = 0; - reload_passwd_file_ = 0; - ping_ = 0; - debug_server_on_ = 0; - debug_server_off_ = 0; - get_defs_ = 0; - sync_ = 0; - sync_full_ = 0; - sync_clock_ = 0; - news_ = 0; + server_version_ = 0; + restart_server_ = 0; + shutdown_server_ = 0; + halt_server_ = 0; + reload_white_list_file_ = 0; + reload_passwd_file_ = 0; + ping_ = 0; + debug_server_on_ = 0; + debug_server_off_ = 0; + get_defs_ = 0; + sync_ = 0; + sync_full_ = 0; + sync_clock_ = 0; + news_ = 0; - node_job_gen_ = 0; - node_check_job_gen_only_ = 0; - node_delete_ = 0; - node_suspend_ = 0; - node_resume_ = 0; - node_kill_ = 0; - node_status_ = 0; - node_edit_history_ = 0; - node_archive_ = 0; - node_restore_ = 0; + node_job_gen_ = 0; + node_check_job_gen_only_ = 0; + node_delete_ = 0; + node_suspend_ = 0; + node_resume_ = 0; + node_kill_ = 0; + node_status_ = 0; + node_edit_history_ = 0; + node_archive_ = 0; + node_restore_ = 0; - log_cmd_ = 0; - log_msg_cmd_ = 0; - begin_cmd_ = 0; + log_cmd_ = 0; + log_msg_cmd_ = 0; + begin_cmd_ = 0; - task_init_ = 0; - task_complete_ = 0; - task_wait_ = 0; - task_abort_ = 0; - task_event_ = 0; - task_meter_ = 0; - task_label_ = 0; - task_queue_ = 0; + task_init_ = 0; + task_complete_ = 0; + task_wait_ = 0; + task_abort_ = 0; + task_event_ = 0; + task_meter_ = 0; + task_label_ = 0; + task_queue_ = 0; - zombie_fob_ = 0; - zombie_fail_ = 0; - zombie_adopt_ = 0; - zombie_remove_ = 0; - zombie_get_ = 0; - zombie_block_ = 0; - zombie_kill_ = 0; + zombie_fob_ = 0; + zombie_fail_ = 0; + zombie_adopt_ = 0; + zombie_remove_ = 0; + zombie_get_ = 0; + zombie_block_ = 0; + zombie_kill_ = 0; - requeue_node_ = 0; - order_node_ = 0; - run_node_ = 0; - load_defs_ = 0; - replace_ = 0; - force_ = 0; - free_dep_ = 0; - suites_ = 0; - edit_script_ = 0; + requeue_node_ = 0; + order_node_ = 0; + run_node_ = 0; + load_defs_ = 0; + replace_ = 0; + force_ = 0; + free_dep_ = 0; + suites_ = 0; + edit_script_ = 0; - alter_cmd_ = 0; - ch_cmd_ = 0; - file_ecf_ = 0; - file_job_ = 0; - file_jobout_ = 0; - file_cmdout_ = 0; - file_manual_ = 0; + alter_cmd_ = 0; + ch_cmd_ = 0; + file_ecf_ = 0; + file_job_ = 0; + file_jobout_ = 0; + file_cmdout_ = 0; + file_manual_ = 0; - plug_ = 0; - move_ = 0; - group_cmd_ = 0; - server_load_cmd_ = 0; - stats_ = 0; - check_ = 0; - query_ = 0; + plug_ = 0; + move_ = 0; + group_cmd_ = 0; + server_load_cmd_ = 0; + stats_ = 0; + check_ = 0; + query_ = 0; } static string show_checkpt_mode(ecf::CheckPt::Mode m) { diff --git a/Base/src/ecflow/base/ZombieCtrl.cpp b/Base/src/ecflow/base/ZombieCtrl.cpp index 115a6d4ae..55b9db987 100644 --- a/Base/src/ecflow/base/ZombieCtrl.cpp +++ b/Base/src/ecflow/base/ZombieCtrl.cpp @@ -448,7 +448,7 @@ void ZombieCtrl::get(std::vector& ret) { boost::posix_time::ptime time_now = Calendar::second_clock_time(); - size_t zombieVecSize = zombies_.size(); + size_t zombieVecSize = zombies_.size(); ret.reserve(zombieVecSize); for (size_t i = 0; i < zombieVecSize; i++) { diff --git a/Base/src/ecflow/base/cts/CFileCmd.cpp b/Base/src/ecflow/base/cts/CFileCmd.cpp index 1e96ae557..c29ae0d8c 100644 --- a/Base/src/ecflow/base/cts/CFileCmd.cpp +++ b/Base/src/ecflow/base/cts/CFileCmd.cpp @@ -362,7 +362,7 @@ void CFileCmd::create(Cmd_ptr& cmd, boost::program_options::variables_map& vm, A std::string pathToNode = args[0]; - std::string file_type = "script"; + std::string file_type = "script"; if (args.size() >= 2) { file_type = args[1]; } diff --git a/Base/src/ecflow/base/cts/CheckPtCmd.cpp b/Base/src/ecflow/base/cts/CheckPtCmd.cpp index 1c3ef1660..97a5e6d7c 100644 --- a/Base/src/ecflow/base/cts/CheckPtCmd.cpp +++ b/Base/src/ecflow/base/cts/CheckPtCmd.cpp @@ -138,7 +138,7 @@ static int parse_check_pt_interval(const std::string& the_arg) { } static int parse_check_pt_alarm_time(const std::string& the_arg, int colon_pos) { - std::string alarm_time = the_arg.substr(colon_pos + 1); + std::string alarm_time = the_arg.substr(colon_pos + 1); int check_pt_alarm_time = 0; try { diff --git a/Base/src/ecflow/base/cts/CtsNodeCmd.cpp b/Base/src/ecflow/base/cts/CtsNodeCmd.cpp index 8d0c14753..4be1a140d 100644 --- a/Base/src/ecflow/base/cts/CtsNodeCmd.cpp +++ b/Base/src/ecflow/base/cts/CtsNodeCmd.cpp @@ -371,7 +371,7 @@ void CtsNodeCmd::create(Cmd_ptr& cmd, boost::program_options::variables_map& vm, std::string absNodePath = vm[theArg()].as(); - cmd = std::make_shared(api_, absNodePath); + cmd = std::make_shared(api_, absNodePath); } std::ostream& operator<<(std::ostream& os, const CtsNodeCmd& c) { diff --git a/Base/src/ecflow/base/cts/GroupCTSCmd.cpp b/Base/src/ecflow/base/cts/GroupCTSCmd.cpp index 803ded9b9..a45ce86b1 100644 --- a/Base/src/ecflow/base/cts/GroupCTSCmd.cpp +++ b/Base/src/ecflow/base/cts/GroupCTSCmd.cpp @@ -392,7 +392,7 @@ void GroupCTSCmd::create(Cmd_ptr& cmd, boost::program_options::variables_map& vm // Parse and split commands and then parse individually. Assumes commands are separated by ';' std::string cmdSeries = vm[GroupCTSCmd::arg()].as(); - cmd = std::make_shared(cmdSeries, clientEnv); + cmd = std::make_shared(cmdSeries, clientEnv); } std::ostream& operator<<(std::ostream& os, const GroupCTSCmd& c) { diff --git a/Base/src/ecflow/base/cts/OrderNodeCmd.cpp b/Base/src/ecflow/base/cts/OrderNodeCmd.cpp index 9a6db9eb5..2c67e5029 100644 --- a/Base/src/ecflow/base/cts/OrderNodeCmd.cpp +++ b/Base/src/ecflow/base/cts/OrderNodeCmd.cpp @@ -48,7 +48,7 @@ STC_Cmd_ptr OrderNodeCmd::doHandleRequest(AbstractServer* as) const { Defs* defs = as->defs().get(); node_ptr theNode = find_node_for_edit(defs, absNodepath_); - Node* theParent = theNode->parent(); + Node* theParent = theNode->parent(); if (theParent) theParent->order(theNode.get(), option_); else diff --git a/Base/src/ecflow/base/cts/PlugCmd.cpp b/Base/src/ecflow/base/cts/PlugCmd.cpp index 387fe00fc..6d1dac2df 100644 --- a/Base/src/ecflow/base/cts/PlugCmd.cpp +++ b/Base/src/ecflow/base/cts/PlugCmd.cpp @@ -129,7 +129,7 @@ STC_Cmd_ptr PlugCmd::doHandleRequest(AbstractServer* as) const { } // Remove the host:port from the path - destPath = NodePath::removeHostPortFromPath(dest_); + destPath = NodePath::removeHostPortFromPath(dest_); std::pair hostPortPair = as->hostPort(); if ((hostPortPair.first == host || host == "localhost") && hostPortPair.second == port) { @@ -289,7 +289,7 @@ void PlugCmd::create(Cmd_ptr& cmd, boost::program_options::variables_map& vm, Ab std::string sourceNode = args[0]; std::string destNode = args[1]; - cmd = std::make_shared(sourceNode, destNode); + cmd = std::make_shared(sourceNode, destNode); } // =================================================================================== diff --git a/Base/src/ecflow/base/stc/SClientHandleSuitesCmd.cpp b/Base/src/ecflow/base/stc/SClientHandleSuitesCmd.cpp index 795a6b873..290535744 100644 --- a/Base/src/ecflow/base/stc/SClientHandleSuitesCmd.cpp +++ b/Base/src/ecflow/base/stc/SClientHandleSuitesCmd.cpp @@ -33,7 +33,7 @@ void SClientHandleSuitesCmd::init(AbstractServer* as) { ClientSuiteMgr& client_suite_mgr = as->defs()->client_suite_mgr(); const std::vector& clientSuites = client_suite_mgr.clientSuites(); - size_t client_suites_size = clientSuites.size(); + size_t client_suites_size = clientSuites.size(); client_handles_.reserve(client_suites_size); for (size_t c = 0; c < client_suites_size; c++) { diff --git a/Base/test/TestInLimitAndLimit.cpp b/Base/test/TestInLimitAndLimit.cpp index 2915f594e..dbc762a40 100644 --- a/Base/test/TestInLimitAndLimit.cpp +++ b/Base/test/TestInLimitAndLimit.cpp @@ -358,7 +358,7 @@ BOOST_AUTO_TEST_CASE(test_limit_references_after_delete) { { suite_ptr suite = Suite::create("suite"); - family_ptr fam = Family::create("f"); + family_ptr fam = Family::create("f"); fam->addTask(Task::create("t1")); fam->addInLimit(in_limit1); suite->addFamily(fam); diff --git a/Base/test/TestQueueCmd.cpp b/Base/test/TestQueueCmd.cpp index c7213162a..cc4b30e36 100644 --- a/Base/test/TestQueueCmd.cpp +++ b/Base/test/TestQueueCmd.cpp @@ -42,7 +42,7 @@ BOOST_AUTO_TEST_CASE(test_queue_cmd) { Defs defs; string suite_f_t = "/suite/f/t"; - suite_ptr s = defs.add_suite("suite"); + suite_ptr s = defs.add_suite("suite"); QueueAttr q1("q1", {"s1", "s2", "s3"}); s->add_queue(q1); QueueAttr& q1_ref = s->findQueue("q1"); diff --git a/Base/test/TestRequeueNodeCmd.cpp b/Base/test/TestRequeueNodeCmd.cpp index 6f2eb5c72..6fc974363 100644 --- a/Base/test/TestRequeueNodeCmd.cpp +++ b/Base/test/TestRequeueNodeCmd.cpp @@ -285,7 +285,7 @@ BOOST_AUTO_TEST_CASE(test_repeat_based_requeue_resets_relative_duration) { f->addRepeat(RepeatInteger("rep", 1993, 2017)); f->addTime(TimeAttr("+00:01")); - task_ptr t1 = f->add_task("uk2fsb"); + task_ptr t1 = f->add_task("uk2fsb"); auto& theTime = const_cast(f->timeVec().back().time_series()); diff --git a/Base/test/TestResolveDependencies.cpp b/Base/test/TestResolveDependencies.cpp index f7875b6c0..720d347de 100644 --- a/Base/test/TestResolveDependencies.cpp +++ b/Base/test/TestResolveDependencies.cpp @@ -51,7 +51,7 @@ BOOST_AUTO_TEST_CASE(test_resolve_dependencies) { suite_ptr suite = defs.add_suite(suitename); family_ptr fam = suite->add_family(familyname); - task_ptr task = fam->add_task("t"); + task_ptr task = fam->add_task("t"); task->addMeter(Meter(metername, 0, 240, 120)); task_ptr task_tt = fam->add_task("tt"); diff --git a/CSim/test/TestAnalysis.cpp b/CSim/test/TestAnalysis.cpp index 88810f066..d0af42b13 100644 --- a/CSim/test/TestAnalysis.cpp +++ b/CSim/test/TestAnalysis.cpp @@ -49,7 +49,7 @@ BOOST_AUTO_TEST_CASE(test_analysys) { suite_ptr suite = theDefs.add_suite("test_analysys"); family_ptr fam = suite->add_family("family"); - task_ptr task1 = fam->add_task("t1"); + task_ptr task1 = fam->add_task("t1"); task1->add_trigger("t2 == complete"); task_ptr task2 = fam->add_task("t2"); diff --git a/CSim/test/TestTime.cpp b/CSim/test/TestTime.cpp index 010b13f2e..8f94922d6 100644 --- a/CSim/test/TestTime.cpp +++ b/CSim/test/TestTime.cpp @@ -286,7 +286,7 @@ BOOST_AUTO_TEST_CASE(test_multiple_times_and_dates_hybrid) { boost::posix_time::time_duration td_plus_minute = theLocalTime.time_of_day() + minutes(1); boost::posix_time::time_duration td_plus_10_minute = theLocalTime.time_of_day() + minutes(10); - suite_ptr suite = theDefs.add_suite("test_multiple_times_and_dates_hybrid"); + suite_ptr suite = theDefs.add_suite("test_multiple_times_and_dates_hybrid"); suite->addClock(ClockAttr(theLocalTime, true)); // true means use hybrid clock family_ptr fam = suite->add_family("family"); diff --git a/CSim/test/TestToday.cpp b/CSim/test/TestToday.cpp index 047e8297d..65b77a383 100644 --- a/CSim/test/TestToday.cpp +++ b/CSim/test/TestToday.cpp @@ -54,7 +54,7 @@ BOOST_AUTO_TEST_CASE(test_today) { boost::posix_time::ptime time_plus_minute = theLocalTime + minutes(1); boost::posix_time::ptime time_plus_10_minute = theLocalTime + minutes(10); - suite_ptr suite = theDefs.add_suite("test_today"); + suite_ptr suite = theDefs.add_suite("test_today"); ClockAttr clockAttr(theLocalTime, false /*false means use real clock*/); suite->addClock(clockAttr); @@ -136,7 +136,7 @@ BOOST_AUTO_TEST_CASE(test_today_time_and_date) { boost::gregorian::date todaysDate = theLocalTime.date(); boost::posix_time::ptime time_plus_hour = theLocalTime + hours(1); - suite_ptr suite = theDefs.add_suite("test_today_time_and_date"); + suite_ptr suite = theDefs.add_suite("test_today_time_and_date"); ClockAttr clockAttr(theLocalTime, false /*false means use real clock*/); suite->addClock(clockAttr); diff --git a/Client/src/ecflow/client/Rtt.cpp b/Client/src/ecflow/client/Rtt.cpp index 9385c203e..1f0116a2e 100644 --- a/Client/src/ecflow/client/Rtt.cpp +++ b/Client/src/ecflow/client/Rtt.cpp @@ -93,7 +93,7 @@ std::string Rtt::analyis(const std::string& filename) { string cmd = line.substr(0, cmd_length); max_cmd_size = std::max(max_cmd_size, cmd.size()); - string time = line.substr(rtt_pos + 4); + string time = line.substr(rtt_pos + 4); time_duration td(duration_from_string(time)); // cout << " cmd:(" << cmd << ") time(" << to_simple_string(td) << ")\n"; diff --git a/Client/test/TestClientOptions.cpp b/Client/test/TestClientOptions.cpp index 06f20ae72..1b60d7ca7 100644 --- a/Client/test/TestClientOptions.cpp +++ b/Client/test/TestClientOptions.cpp @@ -440,7 +440,7 @@ BOOST_AUTO_TEST_CASE(test_is_able_handle_alter_add) { for (const auto& paths : paths_set) { - using Expected = AlterCmd::Add_attr_type; + using Expected = AlterCmd::Add_attr_type; std::vector variable_values = {"", "--dashes at beginning of value", diff --git a/Client/test/TestLifeCycle.cpp b/Client/test/TestLifeCycle.cpp index 206b4e265..fd9a7a1d0 100644 --- a/Client/test/TestLifeCycle.cpp +++ b/Client/test/TestLifeCycle.cpp @@ -100,7 +100,7 @@ BOOST_AUTO_TEST_CASE(test_node_tree_lifecycle) { 1, eventname))); TestHelper::invokeRequest(&defs, Cmd_ptr(new CtsCmd(CtsCmd::FORCE_DEP_EVAL))); - node_ptr node = defs.findAbsNode(suite1_family1_a); + node_ptr node = defs.findAbsNode(suite1_family1_a); const Event& theEvent = node->findEventByNameOrNumber(eventname); BOOST_CHECK_MESSAGE(!theEvent.empty(), "Could not find the event myEvent"); diff --git a/Client/test/TestUrlCmd.cpp b/Client/test/TestUrlCmd.cpp index 864222638..c22a60d15 100644 --- a/Client/test/TestUrlCmd.cpp +++ b/Client/test/TestUrlCmd.cpp @@ -30,7 +30,7 @@ BOOST_AUTO_TEST_CASE(test_url_cmd) { std::string path = File::test_data("Client/test/data/lifecycle.txt", "Client"); - defs_ptr defs = Defs::create(); + defs_ptr defs = Defs::create(); std::string errorMsg, warningMsg; bool parse = defs->restore(path, errorMsg, warningMsg); diff --git a/Http/src/ecflow/http/ApiV1.cpp b/Http/src/ecflow/http/ApiV1.cpp index d440a1fbe..54545526f 100644 --- a/Http/src/ecflow/http/ApiV1.cpp +++ b/Http/src/ecflow/http/ApiV1.cpp @@ -59,7 +59,7 @@ void handle_exception(const std::exception& e, const httplib::Request& request, HttpStatusCode status_code = HttpStatusCode::client_error_bad_request; - const std::string err = trimr(std::string(e.what())); + const std::string err = trimr(std::string(e.what())); if (err.find("authentication failed") != std::string::npos) { status_code = HttpStatusCode::client_error_unauthorized; @@ -205,7 +205,7 @@ void create(httplib::Server& http_server) { http_server.Get("/v1/suites", [](const httplib::Request& request, httplib::Response& response) { trycatch(request, response, [&]() { num_cached_requests++; - ecf::ojson j = filter_json(get_suites(), request); + ecf::ojson j = filter_json(get_suites(), request); response.status = HttpStatusCode::success_ok; response.set_content(j.dump(), "application/json"); @@ -290,7 +290,7 @@ void create(httplib::Server& http_server) { http_server.Put(R"(/v1/suites([A-Za-z0-9_\/\.]+)/definition$)", [](const httplib::Request& request, httplib::Response& response) { trycatch(request, response, [&]() { - ecf::ojson j = update_node_definition(request); + ecf::ojson j = update_node_definition(request); response.status = HttpStatusCode::success_ok; response.set_content(j.dump(), "application/ecf::ojson"); @@ -305,7 +305,7 @@ void create(httplib::Server& http_server) { const std::string path = request.matches[1]; ecf::ojson j = filter_json(get_node_definition(path), request); - response.status = HttpStatusCode::success_ok; + response.status = HttpStatusCode::success_ok; response.set_content(j.dump(), "application/json"); set_cors(response); }); @@ -326,7 +326,7 @@ void create(httplib::Server& http_server) { [](const httplib::Request& request, httplib::Response& response) { trycatch(request, response, [&]() { num_cached_requests++; - ecf::ojson j = filter_json(get_node_status(request), request); + ecf::ojson j = filter_json(get_node_status(request), request); response.status = HttpStatusCode::success_ok; response.set_content(j.dump(), "application/json"); @@ -362,7 +362,7 @@ void create(httplib::Server& http_server) { const std::string path = request.matches[1]; ecf::ojson j = filter_json(get_node_attributes(path), request); - response.status = HttpStatusCode::success_ok; + response.status = HttpStatusCode::success_ok; response.set_content(j.dump(), "application/json"); set_cors(response); }); @@ -482,7 +482,7 @@ void create(httplib::Server& http_server) { j["round_trip_time"] = to_simple_string(client->round_trip_time()); j = filter_json(j, request); - response.status = HttpStatusCode::success_ok; + response.status = HttpStatusCode::success_ok; response.set_content(j.dump(), "application/json"); set_cors(response); }); @@ -501,8 +501,8 @@ void create(httplib::Server& http_server) { auto client = get_client(request); client->stats_server(); - ecf::ojson j = client->server_reply().stats(); - j = filter_json(j, request); + ecf::ojson j = client->server_reply().stats(); + j = filter_json(j, request); response.status = HttpStatusCode::success_ok; response.set_content(j.dump(), "application/json"); @@ -515,7 +515,7 @@ void create(httplib::Server& http_server) { const ecf::ojson payload = ecf::ojson::parse(request.body); const std::string name = payload.at("action"); - auto client = get_client(request); + auto client = get_client(request); if (name == "reload_whitelist_file") { client->reloadwsfile(); @@ -531,7 +531,7 @@ void create(httplib::Server& http_server) { } ecf::ojson j; - j["message"] = "Server updated successfully"; + j["message"] = "Server updated successfully"; response.status = HttpStatusCode::success_ok; response.set_content(j.dump(), "application/json"); @@ -550,7 +550,7 @@ void create(httplib::Server& http_server) { http_server.Get("/v1/server/attributes", [](const httplib::Request& request, httplib::Response& response) { trycatch(request, response, [&]() { num_cached_requests++; - ecf::ojson j = filter_json(get_server_attributes(), request); + ecf::ojson j = filter_json(get_server_attributes(), request); response.status = HttpStatusCode::success_ok; response.set_content(j.dump(), "application/json"); @@ -560,7 +560,7 @@ void create(httplib::Server& http_server) { http_server.Post("/v1/server/attributes", [](const httplib::Request& request, httplib::Response& response) { trycatch(request, response, [&]() { - ecf::ojson j = add_server_attribute(request); + ecf::ojson j = add_server_attribute(request); response.status = HttpStatusCode::success_created; response.set_content(j.dump(), "application/json"); @@ -571,7 +571,7 @@ void create(httplib::Server& http_server) { http_server.Put("/v1/server/attributes", [](const httplib::Request& request, httplib::Response& response) { trycatch(request, response, [&]() { - ecf::ojson j = update_server_attribute(request); + ecf::ojson j = update_server_attribute(request); response.status = HttpStatusCode::success_ok; response.set_content(j.dump(), "application/json"); @@ -581,7 +581,7 @@ void create(httplib::Server& http_server) { http_server.Delete("/v1/server/attributes", [](const httplib::Request& request, httplib::Response& response) { trycatch(request, response, [&]() { - ecf::ojson j = delete_server_attribute(request); + ecf::ojson j = delete_server_attribute(request); response.status = HttpStatusCode::success_no_content; response.set_content(j.dump(), "application/json"); @@ -610,7 +610,7 @@ void create(httplib::Server& http_server) { {"num_cached_requests", num_cached_requests.load()}, {"since", std::string(date)}}; - j = filter_json(j, request); + j = filter_json(j, request); response.set_content(j.dump(), "application/json"); set_cors(response); }); diff --git a/Http/src/ecflow/http/ApiV1Impl.cpp b/Http/src/ecflow/http/ApiV1Impl.cpp index 52fbc5b79..049133b38 100644 --- a/Http/src/ecflow/http/ApiV1Impl.cpp +++ b/Http/src/ecflow/http/ApiV1Impl.cpp @@ -124,7 +124,7 @@ void print_sparser_node(ecf::ojson& j, const std::vector& nodes) { for (const auto& node : nodes) { const std::string type = tolower(node->debugType()); - j[node->name()] = ecf::ojson::object({}); + j[node->name()] = ecf::ojson::object({}); if (type == "family") { print_sparser_node(j[node->name()], std::dynamic_pointer_cast(node)->nodeVec()); } @@ -251,12 +251,12 @@ node_ptr get_node(const std::string& path) { ecf::ojson get_node_status(const httplib::Request& request) { const std::string path = request.matches[1]; - auto client = get_client(request); + auto client = get_client(request); client->query("dstate", path, ""); ecf::ojson j; - j["status"] = client->server_reply().get_string(); - j["path"] = path; + j["status"] = client->server_reply().get_string(); + j["path"] = path; node_ptr node = get_node(path); @@ -335,7 +335,7 @@ ecf::ojson get_node_tree(const std::string& path, bool add_id = false) { if (node == nullptr) throw HttpServerException(HttpStatusCode::client_error_not_found, "Node " + path + " not found"); - j = make_node_json(node); + j = make_node_json(node); const std::string type = tolower(node->debugType()); @@ -351,7 +351,7 @@ ecf::ojson get_node_tree(const std::string& path, bool add_id = false) { } ecf::ojson get_suites() { - auto suites = get_defs()->suiteVec(); + auto suites = get_defs()->suiteVec(); ecf::ojson j = ecf::ojson::array(); for (const auto& s : suites) { @@ -377,7 +377,7 @@ ecf::ojson get_server_attributes() { ecf::ojson get_node_attributes(const std::string& path) { ecf::ojson j; - node_ptr node = get_node(path); + node_ptr node = get_node(path); j["meters"] = node->meters(); j["limits"] = node->limits(); @@ -434,7 +434,7 @@ ecf::ojson get_node_attributes(const std::string& path) { ecf::ojson get_node_definition(const std::string& path) { ecf::ojson j; - node_ptr node = get_node(path); + node_ptr node = get_node(path); j["definition"] = node->print(); j["path"] = path; @@ -445,7 +445,7 @@ ecf::ojson get_node_definition(const std::string& path) { ecf::ojson get_node_output(const httplib::Request& request) { const std::string path = request.matches[1]; - auto client = get_client(request); + auto client = get_client(request); ecf::ojson j; @@ -475,7 +475,7 @@ void add_suite(const httplib::Request& request, httplib::Response& response) { const std::string path = request.matches[1]; const ecf::ojson payload = ecf::ojson::parse(request.body); - const std::string defs = payload.at("definition"); + const std::string defs = payload.at("definition"); DefsStructureParser parser(defs); @@ -488,7 +488,7 @@ void add_suite(const httplib::Request& request, httplib::Response& response) { node_ptr node = parser.the_node_ptr(); - auto defsptr = Defs::create(); + auto defsptr = Defs::create(); errorMsg = "", warningMsg = ""; defsptr->restore_from_string(defs, errorMsg, warningMsg); @@ -541,7 +541,7 @@ ecf::ojson update_node_definition(const httplib::Request& request) { node_ptr node = parser.the_node_ptr(); - size_t pos = 0; + size_t pos = 0; // If a child with the same name exists already, it needs to be removed // before adding it with this new definition @@ -608,8 +608,8 @@ template void add_attribute_to_path(const T& attr, const httplib::Request& request) { const std::string path = request.matches[1]; - auto defs = std::make_shared(*get_defs()); - auto parent = defs->findAbsNode(path); + auto defs = std::make_shared(*get_defs()); + auto parent = defs->findAbsNode(path); if (parent.get() == nullptr) { throw HttpServerException(HttpStatusCode::client_error_not_found, "Path " + path + " not found"); @@ -623,8 +623,8 @@ void add_attribute_to_path(const T& attr, const httplib::Request& request) { void remove_attribute_from_path(const std::string& type, const httplib::Request& request) { const std::string path = request.matches[1]; - auto defs = std::make_shared(*get_defs()); - auto parent = defs->findAbsNode(path); + auto defs = std::make_shared(*get_defs()); + auto parent = defs->findAbsNode(path); if (parent.get() == nullptr) { throw HttpServerException(HttpStatusCode::client_error_not_found, "Path " + path + " not found"); @@ -645,8 +645,8 @@ template void update_attribute_in_path(const T& attr, const std::string& type, const httplib::Request& request) { const std::string path = request.matches[1]; - auto defs = std::make_shared(*get_defs()); - auto parent = defs->findAbsNode(path); + auto defs = std::make_shared(*get_defs()); + auto parent = defs->findAbsNode(path); if (parent.get() == nullptr) { throw HttpServerException(HttpStatusCode::client_error_not_found, "Path " + path + " not found"); @@ -716,10 +716,10 @@ ecf::ojson add_node_attribute(const httplib::Request& request) { const std::string path = request.matches[1]; const ecf::ojson payload = ecf::ojson::parse(request.body); - const std::string type = payload.at("type"); - const std::string value = json_type_to_string(payload.at("value")); + const std::string type = payload.at("type"); + const std::string value = json_type_to_string(payload.at("value")); - auto client = get_client(request); + auto client = get_client(request); if (type == "meter") { const std::string name = payload.at("name"); @@ -775,7 +775,7 @@ ecf::ojson update_node_attribute(const httplib::Request& request) { const std::string path = request.matches[1]; const ecf::ojson payload = ecf::ojson::parse(request.body); - std::string type = payload.at("type"); + std::string type = payload.at("type"); // Updating node attributes is not a straightforward matter. // Firstly, it can be done either as a child command or a user @@ -799,7 +799,7 @@ ecf::ojson update_node_attribute(const httplib::Request& request) { "Invalid action for child command: " + name); } - auto client = get_client_for_tasks(request, payload); + auto client = get_client_for_tasks(request, payload); const std::string value = payload.at("value"); @@ -907,8 +907,8 @@ ecf::ojson delete_node_attribute(const httplib::Request& request) { const std::string path = request.matches[1]; const ecf::ojson payload = ecf::ojson::parse(request.body); - const std::string type = payload.at("type"); - auto client = get_client(request); + const std::string type = payload.at("type"); + auto client = get_client(request); if (type == "time" || type == "today" || type == "day" || type == "date" || type == "cron" || type == "late" || type == "complete") { @@ -941,7 +941,7 @@ ecf::ojson add_server_attribute(const httplib::Request& request) { const std::string name = payload.at("name"); const std::string value = json_type_to_string(payload.at("value")); - auto client = get_client(request); + auto client = get_client(request); client->alter("/", "add", type, name, value); ecf::ojson j; @@ -978,8 +978,8 @@ ecf::ojson delete_server_attribute(const httplib::Request& request) { const ecf::ojson payload = ecf::ojson::parse(request.body); - const std::string type = payload.at("type"); - const std::string name = payload.at("name"); + const std::string type = payload.at("type"); + const std::string name = payload.at("name"); std::string x; if (get_defs()->server().find_user_variable(name, x) == false) { @@ -1003,7 +1003,7 @@ ecf::ojson update_node_status(const httplib::Request& request) { const std::string path = request.matches[1]; const ecf::ojson payload = ecf::ojson::parse(request.body); - const std::string name = payload.at("action"); + const std::string name = payload.at("action"); if (payload.contains("ECF_NAME")) { // this is a child command call @@ -1032,7 +1032,7 @@ ecf::ojson update_node_status(const httplib::Request& request) { } } else { - auto client = get_client(request); + auto client = get_client(request); bool recursive = payload.value("recursive", false); bool force = payload.value("force", false); @@ -1182,7 +1182,7 @@ void update_defs_loop(int interval) { const double last_request_age = static_cast(get_current_time() - last_request_time.load()); const auto drift = std::chrono::seconds(static_cast(floor(last_request_age / 60.))); - sleeptime = min(max_sleeptime, base_sleeptime + drift); + sleeptime = min(max_sleeptime, base_sleeptime + drift); if (opts.verbose && sleeptime != previous_sleeptime) { print_polling_interval_notification( sleeptime.count(), base_sleeptime.count(), drift.count(), max_sleeptime.count()); diff --git a/Http/src/ecflow/http/Base64.hpp b/Http/src/ecflow/http/Base64.hpp index abe047b02..1b2e8eab5 100644 --- a/Http/src/ecflow/http/Base64.hpp +++ b/Http/src/ecflow/http/Base64.hpp @@ -69,7 +69,7 @@ inline unsigned char* base64_decode(const unsigned char* src, size_t len, size_t int assignment = '='; dtable[assignment] = 0; - size_t count = 0; + size_t count = 0; for (size_t i = 0; i < len; i++) { if (dtable[src[i]] != 0x80) count++; diff --git a/Http/test/TestApiV1.cpp b/Http/test/TestApiV1.cpp index c24abad7a..61c5a4b5f 100644 --- a/Http/test/TestApiV1.cpp +++ b/Http/test/TestApiV1.cpp @@ -61,7 +61,7 @@ std::unique_ptr create_token_file() { fs::path cwd(fs::current_path()); string tokens_file = cwd.string() + "/api-tokens.json"; - auto tokenfile = std::make_unique(tokens_file); + auto tokenfile = std::make_unique(tokens_file); BOOST_TEST_MESSAGE("Token file " << tokens_file); return tokenfile; } @@ -327,7 +327,7 @@ BOOST_AUTO_TEST_CASE(test_suite) { HttpStatusCode::success_created); wait_until([] { return check_for_path("/v1/suites/test/definition"); }); - auto result = handle_response(request("get", "/v1/suites")); + auto result = handle_response(request("get", "/v1/suites")); json content = json::parse(result.body); bool found = false; @@ -368,7 +368,7 @@ BOOST_AUTO_TEST_CASE(test_suite) { handle_response(request("put", "/v1/suites/test/status", R"({"action":"begin"})", API_KEY)); - auto response = json::parse(handle_response(request("get", "/v1/suites/test/definition")).body); + auto response = json::parse(handle_response(request("get", "/v1/suites/test/definition")).body); const std::string& correct = "suite test\n family a\n task a\n endfamily\nendsuite\n"; diff --git a/Server/test/TestServerEnvironment.cpp b/Server/test/TestServerEnvironment.cpp index acd3a827e..e419ca57d 100644 --- a/Server/test/TestServerEnvironment.cpp +++ b/Server/test/TestServerEnvironment.cpp @@ -40,8 +40,8 @@ BOOST_AUTO_TEST_CASE(test_server_environment_ecfinterval) { string errorMsg; string argument = "--ecfinterval=" + ecf::convert_to(i); - int argc = 2; - char* argv[] = {const_cast("ServerEnvironment"), const_cast(argument.c_str())}; + int argc = 2; + char* argv[] = {const_cast("ServerEnvironment"), const_cast(argument.c_str())}; ServerEnvironment serverEnv(argc, argv); bool valid = serverEnv.valid(errorMsg); if (i > 0 && i < 61) { diff --git a/Test/TestCron.cpp b/Test/TestCron.cpp index 50a95af24..be410efb5 100644 --- a/Test/TestCron.cpp +++ b/Test/TestCron.cpp @@ -107,7 +107,7 @@ BOOST_AUTO_TEST_CASE(test_cron_time_series) { boost::posix_time::ptime time1 = theLocalTime + minutes(1); boost::posix_time::ptime time2 = theLocalTime + minutes(5); - suite_ptr suite = theDefs.add_suite("test_cron_time_series"); + suite_ptr suite = theDefs.add_suite("test_cron_time_series"); ClockAttr clockAttr(theLocalTime, false); suite->addClock(clockAttr); diff --git a/Test/TestLimit.cpp b/Test/TestLimit.cpp index d629e757e..d14e54845 100644 --- a/Test/TestLimit.cpp +++ b/Test/TestLimit.cpp @@ -79,7 +79,7 @@ BOOST_AUTO_TEST_CASE(test_limit) { std::string suiteName = "test_limit"; std::string pathToLimit = "/" + suiteName; - suite_ptr suite = theDefs.add_suite(suiteName); + suite_ptr suite = theDefs.add_suite(suiteName); suite->addLimit(Limit("fast", 1)); suite->addLimit(Limit("disk", 50)); diff --git a/Test/TestRepeat.cpp b/Test/TestRepeat.cpp index 80c7b1764..d1d035407 100644 --- a/Test/TestRepeat.cpp +++ b/Test/TestRepeat.cpp @@ -282,7 +282,7 @@ BOOST_AUTO_TEST_CASE(test_repeat_clears_user_edit) { boost::posix_time::ptime theLocalTime = boost::posix_time::ptime(date(2010, 6, 21), time_duration(10, 0, 0)); boost::posix_time::ptime time1 = theLocalTime + minutes(3); - suite_ptr suite = theDefs.add_suite("test_repeat_clears_user_edit"); + suite_ptr suite = theDefs.add_suite("test_repeat_clears_user_edit"); ClockAttr clockAttr(theLocalTime, false); suite->addClock(clockAttr); diff --git a/Test/TestSuspend.cpp b/Test/TestSuspend.cpp index 2ad2ffb3c..1565bafad 100644 --- a/Test/TestSuspend.cpp +++ b/Test/TestSuspend.cpp @@ -109,7 +109,7 @@ BOOST_AUTO_TEST_CASE(test_shutdown) { family_ptr fam = suite->add_family("family"); int taskSize = 2; // on linux 1024 tasks take ~4 seconds for job submission for (int i = 0; i < taskSize; i++) { - task_ptr task = fam->add_task("t" + ecf::convert_to(i)); + task_ptr task = fam->add_task("t" + ecf::convert_to(i)); boost::posix_time::ptime time1 = theLocalTime + minutes(1 + i); task->addTime(ecf::TimeAttr(ecf::TimeSlot(time1.time_of_day()))); @@ -176,7 +176,7 @@ BOOST_AUTO_TEST_CASE(test_suspend_node) { // The minute will be 62, which is illegal and will not parse boost::posix_time::ptime theLocalTime = Calendar::second_clock_time(); - suite_ptr suite = theDefs.add_suite("test_suspend_node"); + suite_ptr suite = theDefs.add_suite("test_suspend_node"); ClockAttr clockAttr(theLocalTime); suite->addClock(clockAttr); diff --git a/Test/TestToday.cpp b/Test/TestToday.cpp index 69a5986da..1abfafccd 100644 --- a/Test/TestToday.cpp +++ b/Test/TestToday.cpp @@ -72,7 +72,7 @@ BOOST_AUTO_TEST_CASE(test_today_single_slot) { boost::posix_time::ptime theLocalTime = boost::posix_time::ptime(date(2010, 6, 21), time_duration(10, 0, 0)); boost::posix_time::ptime time_minus_hour = theLocalTime - hours(1); - suite_ptr suite = theDefs.add_suite("test_today_single_slot"); + suite_ptr suite = theDefs.add_suite("test_today_single_slot"); ClockAttr clockAttr(theLocalTime, false, true /*positive gain*/); suite->addClock(clockAttr); @@ -163,7 +163,7 @@ BOOST_AUTO_TEST_CASE(test_today_real_time_series) { boost::posix_time::ptime time1 = theLocalTime + minutes(1); boost::posix_time::ptime time2 = theLocalTime + minutes(7); - suite_ptr suite = theDefs.add_suite("test_today_real_time_series"); + suite_ptr suite = theDefs.add_suite("test_today_real_time_series"); ClockAttr clockAttr(theLocalTime, false); suite->addClock(clockAttr); suite->add_variable("SLEEPTIME", ecf::convert_to(TestFixture::job_submission_interval() - 1)); diff --git a/Test/TestWhyCmd.cpp b/Test/TestWhyCmd.cpp index d03d04b42..99ab99c9a 100644 --- a/Test/TestWhyCmd.cpp +++ b/Test/TestWhyCmd.cpp @@ -157,9 +157,9 @@ BOOST_AUTO_TEST_CASE(test_why_time) { boost::posix_time::ptime theLocalTime = Calendar::second_clock_time(); boost::posix_time::ptime time1 = theLocalTime - hours(1); - suite_ptr suite = Suite::create("test_why_time"); - family_ptr fam = Family::create("family"); - task_ptr task = Task::create("t1"); + suite_ptr suite = Suite::create("test_why_time"); + family_ptr fam = Family::create("family"); + task_ptr task = Task::create("t1"); ClockAttr clockAttr(theLocalTime); suite->addClock(clockAttr); @@ -205,7 +205,7 @@ BOOST_AUTO_TEST_CASE(test_why_today) { boost::posix_time::ptime theLocalTime(date(2010, 2, 10), hours(1)); boost::posix_time::ptime time1 = theLocalTime + hours(1); - suite_ptr suite = theDefs.add_suite("test_why_today"); + suite_ptr suite = theDefs.add_suite("test_why_today"); ClockAttr clockAttr(theLocalTime); suite->addClock(clockAttr); @@ -238,9 +238,9 @@ BOOST_AUTO_TEST_CASE(test_why_cron) { boost::posix_time::ptime time2 = theLocalTime - hours(1); boost::gregorian::date todaysDate = theLocalTime.date(); - suite_ptr suite = Suite::create("test_why_cron"); - family_ptr fam = Family::create("family"); - task_ptr task = Task::create("t1"); + suite_ptr suite = Suite::create("test_why_cron"); + family_ptr fam = Family::create("family"); + task_ptr task = Task::create("t1"); ClockAttr clockAttr(theLocalTime, false /*real*/); suite->addClock(clockAttr); diff --git a/Test/TestZombies.cpp b/Test/TestZombies.cpp index 1a6bbe2cb..eb987ac5b 100644 --- a/Test/TestZombies.cpp +++ b/Test/TestZombies.cpp @@ -312,7 +312,7 @@ static void check_expected_no_of_zombies_range(size_t min_expected, size_t max_e TestFixture::client().zombieGet(); std::vector zombies = TestFixture::client().server_reply().zombies(); - bool in_range = (zombies.size() >= min_expected && zombies.size() <= max_expected); + bool in_range = (zombies.size() >= min_expected && zombies.size() <= max_expected); BOOST_CHECK_MESSAGE(in_range, "*error* Expected range(" << min_expected << "-" << max_expected << ") zombies but got " << zombies.size()); diff --git a/Test/Test_Time.cpp b/Test/Test_Time.cpp index e4feb889e..a0495b386 100644 --- a/Test/Test_Time.cpp +++ b/Test/Test_Time.cpp @@ -184,7 +184,7 @@ BOOST_AUTO_TEST_CASE(test_time_multiple_single_slot) { boost::posix_time::ptime time2 = time1 + minutes(TestFixture::job_submission_interval()); boost::posix_time::ptime time3 = time2 + minutes(TestFixture::job_submission_interval()); - suite_ptr suite = theDefs.add_suite("test_time_multiple_single_slot"); + suite_ptr suite = theDefs.add_suite("test_time_multiple_single_slot"); ClockAttr clockAttr(theLocalTime, false); suite->addClock(clockAttr); suite->add_variable("SLEEPTIME", "1"); @@ -280,7 +280,7 @@ BOOST_AUTO_TEST_CASE(test_time_real_series) { boost::posix_time::ptime time1 = theLocalTime + minutes(1); boost::posix_time::ptime time2 = time1 + minutes(TestFixture::job_submission_interval() * 2); - suite_ptr suite = theDefs.add_suite("test_time_real_series"); + suite_ptr suite = theDefs.add_suite("test_time_real_series"); suite->add_variable("SLEEPTIME", "1"); ClockAttr clockAttr(theLocalTime, false); @@ -332,7 +332,7 @@ BOOST_AUTO_TEST_CASE(test_single_real_time_near_midnight) { boost::posix_time::ptime time_start = boost::posix_time::ptime(date(2010, 6, 21), time_duration(23, 59, 0)); boost::posix_time::ptime clock_start = time_start - minutes(1); - suite_ptr suite = theDefs.add_suite("test_single_real_time_near_midnight"); + suite_ptr suite = theDefs.add_suite("test_single_real_time_near_midnight"); ClockAttr clockAttr(clock_start, false); suite->addClock(clockAttr); suite->add_variable("SLEEPTIME", ecf::convert_to(TestFixture::job_submission_interval() * 2)); @@ -396,7 +396,7 @@ BOOST_AUTO_TEST_CASE(test_time_real_series_near_midnight) { boost::posix_time::ptime first_time = last_time - minutes(TestFixture::job_submission_interval() * 2); boost::posix_time::ptime clock_start = first_time - minutes(1); - suite_ptr suite = theDefs.add_suite("test_time_real_series_near_midnight"); + suite_ptr suite = theDefs.add_suite("test_time_real_series_near_midnight"); suite->add_variable("SLEEPTIME", ecf::convert_to(TestFixture::job_submission_interval() * 2)); ClockAttr clockAttr(clock_start, false); diff --git a/Test/src/ServerTestHarness.cpp b/Test/src/ServerTestHarness.cpp index 0b1725f04..980c31c1d 100644 --- a/Test/src/ServerTestHarness.cpp +++ b/Test/src/ServerTestHarness.cpp @@ -578,7 +578,7 @@ std::string ServerTestHarness::testDataLocation(const std::string& defsFile) { size_t dot_pos = base_name.rfind('.', base_name.length()); assert(dot_pos != std::string::npos); // missing '.' - base_name = base_name.substr(0, dot_pos); + base_name = base_name.substr(0, dot_pos); std::string testData = TestFixture::smshome() + "/" + base_name; return testData; diff --git a/Udp/src/ecflow/udp/RequestHandler.cpp b/Udp/src/ecflow/udp/RequestHandler.cpp index 29cd65b05..0fba84268 100644 --- a/Udp/src/ecflow/udp/RequestHandler.cpp +++ b/Udp/src/ecflow/udp/RequestHandler.cpp @@ -205,7 +205,7 @@ class CommandUserAlterMeterBuilder : public CommandBuilder { std::string path = obj.at("path"); std::string value = obj.at("value"); - auto meter_value = ecf::convert_to(value); + auto meter_value = ecf::convert_to(value); return Command::make_command(path, name, meter_value); } @@ -265,7 +265,7 @@ class CommandChildUpdateMeterBuilder : public CommandBuilder { std::string path = obj.at("path"); std::string value = obj.at("value"); - auto meter_value = ecf::convert_to(value); + auto meter_value = ecf::convert_to(value); TRACE_NFO("CommandChildUpdateLabelBuilder", "update to meter ", path, ":", name, " to value: ", meter_value); @@ -345,7 +345,7 @@ class JSONRequestHandler { // process "data" if (method_type == "put") { - auto payload = request.at("payload"); + auto payload = request.at("payload"); Command command = command_factory_.make_command_from(payload); command.execute(client_); diff --git a/Viewer/ecflowUI/src/AbstractNodeModel.hpp b/Viewer/ecflowUI/src/AbstractNodeModel.hpp index 167c3da33..95ff8fea7 100644 --- a/Viewer/ecflowUI/src/AbstractNodeModel.hpp +++ b/Viewer/ecflowUI/src/AbstractNodeModel.hpp @@ -76,10 +76,10 @@ public Q_SLOTS: void slotFilterDeleteBegin(); void slotFilterDeleteEnd(); - virtual void slotServerAddBegin(int row) = 0; - virtual void slotServerAddEnd() = 0; - virtual void slotServerRemoveBegin(VModelServer*, int) = 0; - virtual void slotServerRemoveEnd(int) = 0; + virtual void slotServerAddBegin(int row) = 0; + virtual void slotServerAddEnd() = 0; + virtual void slotServerRemoveBegin(VModelServer*, int) = 0; + virtual void slotServerRemoveEnd(int) = 0; virtual void slotDataChanged(VModelServer*) = 0; virtual void slotBeginServerScan(VModelServer* server, int) = 0; diff --git a/Viewer/ecflowUI/src/AbstractNodeView.cpp b/Viewer/ecflowUI/src/AbstractNodeView.cpp index 533418194..b5f231005 100644 --- a/Viewer/ecflowUI/src/AbstractNodeView.cpp +++ b/Viewer/ecflowUI/src/AbstractNodeView.cpp @@ -156,12 +156,12 @@ void AbstractNodeView::mousePressEvent(QMouseEvent* event) { QPoint pos = event->pos(); QPersistentModelIndex index = indexAt(pos); - pressedIndex_ = index; + pressedIndex_ = index; // Get the selection flags QItemSelectionModel::SelectionFlags command = selectionCommand(index, event); - noSelectionOnMousePress_ = (command == QItemSelectionModel::NoUpdate || !index.isValid()); + noSelectionOnMousePress_ = (command == QItemSelectionModel::NoUpdate || !index.isValid()); #ifdef _UI_QABSTRACTNODEVIEW_DEBUG UiLog().dbg() << "TreeNodeViewBase::mousePressEvent --> current=" << currentIndex().data().toString() @@ -388,9 +388,9 @@ void AbstractNodeView::doItemsLayout(bool hasRemovedItems) { } viewItems_.clear(); // prepare for new layout - rowCount_ = 0; - maxRowWidth_ = 0; - pressedRefIndex_ = QPersistentModelIndex(QModelIndex()); + rowCount_ = 0; + maxRowWidth_ = 0; + pressedRefIndex_ = QPersistentModelIndex(QModelIndex()); QModelIndex parent = root_; if (model_->hasChildren(parent)) { @@ -488,7 +488,7 @@ void AbstractNodeView::scrollTo(const QModelIndex& index) { return; if (verticalScrollMode_ == ScrollPerItem) { - int row = itemRow(item); + int row = itemRow(item); int top = verticalScrollBar()->value(); int bottom = top + verticalScrollBar()->pageStep(); diff --git a/Viewer/ecflowUI/src/AbstractNodeView.hpp b/Viewer/ecflowUI/src/AbstractNodeView.hpp index eb4571d88..1d7fcd43c 100644 --- a/Viewer/ecflowUI/src/AbstractNodeView.hpp +++ b/Viewer/ecflowUI/src/AbstractNodeView.hpp @@ -149,7 +149,7 @@ protected Q_SLOTS: QRegion visualRegionForSelection(const QItemSelection& selection) const; - virtual void updateViewport(const QRect rect) = 0; + virtual void updateViewport(const QRect rect) = 0; virtual int firstVisibleItem(int& offset) const = 0; virtual void updateRowCount() = 0; diff --git a/Viewer/ecflowUI/src/AbstractTextEditSearchInterface.hpp b/Viewer/ecflowUI/src/AbstractTextEditSearchInterface.hpp index a8a1a84a7..c801b7a63 100644 --- a/Viewer/ecflowUI/src/AbstractTextEditSearchInterface.hpp +++ b/Viewer/ecflowUI/src/AbstractTextEditSearchInterface.hpp @@ -21,7 +21,7 @@ class AbstractTextEditSearchInterface { public: AbstractTextEditSearchInterface(); - virtual ~AbstractTextEditSearchInterface() = default; + virtual ~AbstractTextEditSearchInterface() = default; virtual bool findString(QString str, bool highlightAll, diff --git a/Viewer/ecflowUI/src/ActionHandler.cpp b/Viewer/ecflowUI/src/ActionHandler.cpp index 36f8bccb7..1a5094e8c 100644 --- a/Viewer/ecflowUI/src/ActionHandler.cpp +++ b/Viewer/ecflowUI/src/ActionHandler.cpp @@ -349,7 +349,7 @@ bool ActionHandler::confirmCommand(const std::vector& filteredNodes, ecf::Str::replace_all(question, placeholder, "" + QString::number(taskNum).toStdString() + ""); } - QString msg = QString::fromStdString(question); + QString msg = QString::fromStdString(question); QString warningStr = QString::fromStdString(warning); if (!warningStr.isEmpty()) { diff --git a/Viewer/ecflowUI/src/AttributeEditor.cpp b/Viewer/ecflowUI/src/AttributeEditor.cpp index d83ef788a..834e32e89 100644 --- a/Viewer/ecflowUI/src/AttributeEditor.cpp +++ b/Viewer/ecflowUI/src/AttributeEditor.cpp @@ -45,7 +45,7 @@ AttributeEditor::AttributeEditor(VInfo_ptr info, QString type, QWidget* parent) Q_ASSERT(attr); messageLabel_->hide(); - attrData_ = attr->data(); + attrData_ = attr->data(); QString wt = "Edit " + type; wt += " - " + QString::fromStdString(VConfig::instance()->appLongName()); diff --git a/Viewer/ecflowUI/src/ChangeNotifyDialog.cpp b/Viewer/ecflowUI/src/ChangeNotifyDialog.cpp index a188a5a7a..7dd79d47c 100644 --- a/Viewer/ecflowUI/src/ChangeNotifyDialog.cpp +++ b/Viewer/ecflowUI/src/ChangeNotifyDialog.cpp @@ -159,7 +159,7 @@ void ChangeNotifyDialogWidget::updateSettings() { QColor textCol = notifier_->textColour(); QColor bgLight = bgCol.lighter(105); - QString st = "QLabel { \ + QString st = "QLabel { \ background: qlineargradient(x1 :0, y1: 0, x2: 0, y2: 1, \ stop: 0 " + bgLight.name() + ", stop: 1 " + bgCol.name() + "); color: " + textCol.name() + diff --git a/Viewer/ecflowUI/src/CommandDesignerWidget.cpp b/Viewer/ecflowUI/src/CommandDesignerWidget.cpp index e64806eb5..b237abc56 100644 --- a/Viewer/ecflowUI/src/CommandDesignerWidget.cpp +++ b/Viewer/ecflowUI/src/CommandDesignerWidget.cpp @@ -183,7 +183,7 @@ void CommandDesignerWidget::addClientCommandsToComponentList() { // sort the commands into alphabetical order std::vector> options = clientOptionsDescriptions_->options(); - using opt_desc = boost::shared_ptr; + using opt_desc = boost::shared_ptr; std::sort(options.begin(), options.end(), [](const opt_desc& a, const opt_desc& b) { return a->long_name() < b->long_name(); }); @@ -445,7 +445,7 @@ void CommandDesignerWidget::on_editCommandButton__clicked() { QTableWidgetItem* contextItem = savedCommandsTable_->item(row, 1); QTableWidgetItem* commandItem = savedCommandsTable_->item(row, 2); - inCommandEditMode_ = true; + inCommandEditMode_ = true; // insert the details into the edit boxes commandLineEdit_->setText(commandItem->text()); diff --git a/Viewer/ecflowUI/src/CommandOutputWidget.cpp b/Viewer/ecflowUI/src/CommandOutputWidget.cpp index d290ea360..5bf2aebc5 100644 --- a/Viewer/ecflowUI/src/CommandOutputWidget.cpp +++ b/Viewer/ecflowUI/src/CommandOutputWidget.cpp @@ -67,7 +67,7 @@ QVariant CommandOutputModel::data(const QModelIndex& index, int role) const { if (pos < 0 || pos >= CommandOutputHandler::instance()->itemCount()) return {}; - QString id = columns_->id(index.column()); + QString id = columns_->id(index.column()); CommandOutput_ptr item = CommandOutputHandler::instance()->items()[pos]; if (!item) diff --git a/Viewer/ecflowUI/src/CompactView.cpp b/Viewer/ecflowUI/src/CompactView.cpp index 0dfa36125..00f40ed9b 100644 --- a/Viewer/ecflowUI/src/CompactView.cpp +++ b/Viewer/ecflowUI/src/CompactView.cpp @@ -132,22 +132,22 @@ void CompactView::layout(int parentId, bool recursiveExpanding, bool afterIsUnin for (int i = first; i < first + count; i++) { QModelIndex currentIndex = model_->index(i - first, 0, parentIndex); - last = i + children; - item = &viewItems_[last]; - item->parentItem = parentId; - item->index = currentIndex; - item->hasMoreSiblings = (i < first + count - 1); - item->level = level; - item->expanded = false; - item->total = 0; - item->widestInSiblings = widest; + last = i + children; + item = &viewItems_[last]; + item->parentItem = parentId; + item->index = currentIndex; + item->hasMoreSiblings = (i < first + count - 1); + item->level = level; + item->expanded = false; + item->total = 0; + item->widestInSiblings = widest; // We compute the size of the item. For attributes we delay the width computation until we // actually paint them and we set their width to 300. item->width = itemWidthVec[i - first]; item->height = itemHeightVec[i - first]; - int xp = leftMargin_; + int xp = leftMargin_; if (parentId >= 0) { item->widestInSiblings = widest; xp = viewItems_[parentId].alignedRight() + itemGap_; @@ -351,7 +351,7 @@ void CompactView::drawRow(QPainter* painter, int rh = rowHeight(start, 1, iir); // See if there are no multiline items in this row - bool singleRow = delegate_->isSingleHeight(rh); + bool singleRow = delegate_->isSingleHeight(rh); int firstLevel = 0; const int viewportWidth = viewport()->width(); @@ -794,7 +794,7 @@ void CompactView::updateScrollBars() { // doItemsLayout(); } - int itemsInViewport = 0; + int itemsInViewport = 0; const int itemsCount = viewItems_.size(); if (itemsCount == 0) diff --git a/Viewer/ecflowUI/src/ConfigListDelegate.cpp b/Viewer/ecflowUI/src/ConfigListDelegate.cpp index 24a79e1be..0e409d0fe 100644 --- a/Viewer/ecflowUI/src/ConfigListDelegate.cpp +++ b/Viewer/ecflowUI/src/ConfigListDelegate.cpp @@ -68,7 +68,7 @@ void ConfigListDelegate::paint(QPainter* painter, const QStyleOptionViewItem& op QSize ConfigListDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const { QSize size = QStyledItemDelegate::sizeHint(option, index); - int w = (maxTextWidth_ > iconSize_) ? maxTextWidth_ : iconSize_; + int w = (maxTextWidth_ > iconSize_) ? maxTextWidth_ : iconSize_; w += 4; QFont f; diff --git a/Viewer/ecflowUI/src/ConnectState.cpp b/Viewer/ecflowUI/src/ConnectState.cpp index 9e328e4f0..ccda558d3 100644 --- a/Viewer/ecflowUI/src/ConnectState.cpp +++ b/Viewer/ecflowUI/src/ConnectState.cpp @@ -30,7 +30,7 @@ void ConnectState::init() { const std::string& ConnectState::describe() const { static std::string empty = ""; - auto it = descMap.find(state_); + auto it = descMap.find(state_); if (it != descMap.end()) { return it->second; } @@ -67,7 +67,7 @@ void ConnectState::logDisconnect() { } void ConnectState::errorMessage(const std::string& str) { - errMsg_ = str; + errMsg_ = str; std::size_t pos = str.find("Client environment:"); if (pos != std::string::npos) { diff --git a/Viewer/ecflowUI/src/CustomCommandHandler.cpp b/Viewer/ecflowUI/src/CustomCommandHandler.cpp index 74a444a9e..67acfdded 100644 --- a/Viewer/ecflowUI/src/CustomCommandHandler.cpp +++ b/Viewer/ecflowUI/src/CustomCommandHandler.cpp @@ -121,8 +121,8 @@ int CustomCommandHandler::findIndexFromName(const std::string& name) const { void CustomCommandHandler::writeSettings() { std::vector vsItems; - std::string dummyFileName = "dummy"; - std::string key = "commands"; + std::string dummyFileName = "dummy"; + std::string key = "commands"; std::string settingsFilePath = settingsFile(); VSettings vs(settingsFilePath); diff --git a/Viewer/ecflowUI/src/DashboardTitle.cpp b/Viewer/ecflowUI/src/DashboardTitle.cpp index 0330afa75..892ff4ea5 100644 --- a/Viewer/ecflowUI/src/DashboardTitle.cpp +++ b/Viewer/ecflowUI/src/DashboardTitle.cpp @@ -179,8 +179,8 @@ void DashboardTitle::updateTitle() { const int marginX = 0; const int gap = 1; - int maxBandH = 2; - int bandH = (current_) ? maxBandH : 2; + int maxBandH = 2; + int bandH = (current_) ? maxBandH : 2; QFont f; QFontMetrics fm(f); @@ -191,8 +191,8 @@ void DashboardTitle::updateTitle() { // Compute the pixmap size int h = fm.height() + bandH + 1; // int w=fm.width("ABCD...")+(num-1); - int w = maxPixWidth_ - 10; - int dw = w / num; + int w = maxPixWidth_ - 10; + int dw = w / num; int xp = 0; int yp = 0; @@ -304,8 +304,8 @@ void DashboardTitle::updateTitle() { QFontMetrics fm(f); // Compute the pixmap size int h = fm.height() + 2; // int w=fm.width("ABCD...")+(num-1); - int w = h * 5 / 4; - int dw = w / num; + int w = h * 5 / 4; + int dw = w / num; descPix_ = QPixmap(w + 1, h + 1); descPix_.fill(Qt::transparent); diff --git a/Viewer/ecflowUI/src/DashboardWidget.hpp b/Viewer/ecflowUI/src/DashboardWidget.hpp index 679c523b1..da104607b 100644 --- a/Viewer/ecflowUI/src/DashboardWidget.hpp +++ b/Viewer/ecflowUI/src/DashboardWidget.hpp @@ -30,7 +30,7 @@ class DashboardWidget : public QWidget { public: DashboardWidget(const std::string& type, QWidget* parent = nullptr); - ~DashboardWidget() override = default; + ~DashboardWidget() override = default; virtual void populateDockTitleBar(DashboardDockTitleWidget*) = 0; virtual void populateDialog() = 0; diff --git a/Viewer/ecflowUI/src/EditProvider.cpp b/Viewer/ecflowUI/src/EditProvider.cpp index 827b11df3..2d7beb948 100644 --- a/Viewer/ecflowUI/src/EditProvider.cpp +++ b/Viewer/ecflowUI/src/EditProvider.cpp @@ -55,7 +55,7 @@ void EditProvider::submit(const std::vector& txt, bool alias) { VNode* node = info_->node(); ServerHandler* server = info_->server(); - bool run = true; + bool run = true; //--------------------------- // Extract user variables @@ -75,7 +75,7 @@ void EditProvider::submit(const std::vector& txt, bool alias) { std::string comStart = micro + comStartText; std::string comEnd = micro + comEndText; - bool inVars = false; + bool inVars = false; for (const auto& it : txt) { const std::string& line = it; diff --git a/Viewer/ecflowUI/src/EventEditor.cpp b/Viewer/ecflowUI/src/EventEditor.cpp index 9959b29c5..87a9118f1 100644 --- a/Viewer/ecflowUI/src/EventEditor.cpp +++ b/Viewer/ecflowUI/src/EventEditor.cpp @@ -224,7 +224,7 @@ void EventEditor::lookup(const QModelIndex& idx) { std::string nodePath = model_->data(idx, Qt::DisplayRole).toString().toStdString(); - VInfo_ptr ni = VInfo::createFromPath(info_->server(), nodePath); + VInfo_ptr ni = VInfo::createFromPath(info_->server(), nodePath); if (ni) { MainWindow::lookUpInTree(ni); } diff --git a/Viewer/ecflowUI/src/ExpandState.cpp b/Viewer/ecflowUI/src/ExpandState.cpp index e2a4d8e00..1452e6fd5 100644 --- a/Viewer/ecflowUI/src/ExpandState.cpp +++ b/Viewer/ecflowUI/src/ExpandState.cpp @@ -37,7 +37,7 @@ void ExpandState::init(const VNode* vnode) { QModelIndex idx = model_->serverToIndex(server); bool expanded = view_->isExpanded(idx); - root_ = new ExpandStateNode(server->vRoot(), expanded); + root_ = new ExpandStateNode(server->vRoot(), expanded); save(server->vRoot()); } @@ -204,7 +204,7 @@ void ExpandState::collectExpanded(ExpandStateNode* expand, #endif // The contents of expand node and the vnode might differ. We try to // adjust the expand node to the vnode with this call. - bool adjusted = expand->adjustContents(node); + bool adjusted = expand->adjustContents(node); std::size_t numExpand = expand->children_.size(); std::size_t numNode = node->numOfChildren(); diff --git a/Viewer/ecflowUI/src/FetchTask.hpp b/Viewer/ecflowUI/src/FetchTask.hpp index ffca07e88..fd15539e0 100644 --- a/Viewer/ecflowUI/src/FetchTask.hpp +++ b/Viewer/ecflowUI/src/FetchTask.hpp @@ -29,7 +29,7 @@ class VReply; class FetchTaskFactory { public: explicit FetchTaskFactory(const std::string&); - virtual ~FetchTaskFactory() = default; + virtual ~FetchTaskFactory() = default; virtual AbstractFetchTask* make(FetchQueueOwner* owner) = 0; static AbstractFetchTask* create(const std::string& name, FetchQueueOwner* owner); diff --git a/Viewer/ecflowUI/src/GenFileProvider.hpp b/Viewer/ecflowUI/src/GenFileProvider.hpp index c6af8b2ff..70f67e45d 100644 --- a/Viewer/ecflowUI/src/GenFileProvider.hpp +++ b/Viewer/ecflowUI/src/GenFileProvider.hpp @@ -48,8 +48,8 @@ class GenFileReceiver { GenFileReceiver(const GenFileReceiver&) = delete; GenFileReceiver& operator=(const GenFileReceiver&) = delete; - virtual void fileFetchFinished(VReply*) = 0; - virtual void fileFetchFailed(VReply*) = 0; + virtual void fileFetchFinished(VReply*) = 0; + virtual void fileFetchFailed(VReply*) = 0; protected: GenFileProvider* fetchManager_{nullptr}; diff --git a/Viewer/ecflowUI/src/Highlighter.cpp b/Viewer/ecflowUI/src/Highlighter.cpp index 640c2bb7e..720d76cf1 100644 --- a/Viewer/ecflowUI/src/Highlighter.cpp +++ b/Viewer/ecflowUI/src/Highlighter.cpp @@ -134,9 +134,9 @@ void Highlighter::toHtml(QString& html) { // tmpCursor.setCharFormat(textfmt); // Apply the additional formats set by the syntax highlighter - QTextBlock start = document()->findBlock(cursor.selectionStart()); - QTextBlock end = document()->findBlock(cursor.selectionEnd()); - end = end.next(); + QTextBlock start = document()->findBlock(cursor.selectionStart()); + QTextBlock end = document()->findBlock(cursor.selectionEnd()); + end = end.next(); const int selectionStart = cursor.selectionStart(); const int endOfDocument = tmpDoc->characterCount() - 1; diff --git a/Viewer/ecflowUI/src/InfoPanel.cpp b/Viewer/ecflowUI/src/InfoPanel.cpp index 436f31879..e1b098338 100644 --- a/Viewer/ecflowUI/src/InfoPanel.cpp +++ b/Viewer/ecflowUI/src/InfoPanel.cpp @@ -129,7 +129,7 @@ void InfoPanel::populateDialog() { bcWidget_->useTransparentBg(false); verticalLayout_->insertWidget(0, bcWidget_); - QMenu* menu = buildOptionsMenu(); + QMenu* menu = buildOptionsMenu(); QWidget* cornerW = new QWidget(this); auto* hb = new QHBoxLayout(cornerW); @@ -238,7 +238,7 @@ bool InfoPanel::reset(VInfo_ptr info) { } bool InfoPanel::reloadCore(VInfo_ptr info) { - bool retVal = false; // no real reset/reload happened!! + bool retVal = false; // no real reset/reload happened!! lastBroadcastInfo_ = info; @@ -286,7 +286,7 @@ void InfoPanel::adjustInfo(VInfo_ptr info) { if (info) { ServerHandler* server = info->server(); - bool sameServer = (info_) ? (info_->server() == server) : false; + bool sameServer = (info_) ? (info_->server() == server) : false; // Handle observers if (!sameServer) { diff --git a/Viewer/ecflowUI/src/InfoPanelHandler.cpp b/Viewer/ecflowUI/src/InfoPanelHandler.cpp index e149551a4..bcadfbcdb 100644 --- a/Viewer/ecflowUI/src/InfoPanelHandler.cpp +++ b/Viewer/ecflowUI/src/InfoPanelHandler.cpp @@ -62,7 +62,7 @@ void InfoPanelHandler::init(const std::string& configFile) { for (ptree::const_iterator itPanel = panelsPt.begin(); itPanel != panelsPt.end(); ++itPanel) { ptree const& panelPt = itPanel->second; - std::string cname = panelPt.get("name", ""); + std::string cname = panelPt.get("name", ""); UiLog().dbg() << " " << cname; diff --git a/Viewer/ecflowUI/src/InfoPanelItem.cpp b/Viewer/ecflowUI/src/InfoPanelItem.cpp index b7cc00d2b..ee7ac216e 100644 --- a/Viewer/ecflowUI/src/InfoPanelItem.cpp +++ b/Viewer/ecflowUI/src/InfoPanelItem.cpp @@ -59,7 +59,7 @@ void InfoPanelItem::adjust(VInfo_ptr info) { if (info) { ServerHandler* server = info->server(); - bool sameServer = (info_) ? (info_->server() == server) : false; + bool sameServer = (info_) ? (info_->server() == server) : false; // Handle observers if (!sameServer) { diff --git a/Viewer/ecflowUI/src/InfoPanelItem.hpp b/Viewer/ecflowUI/src/InfoPanelItem.hpp index ce061b565..f80c87981 100644 --- a/Viewer/ecflowUI/src/InfoPanelItem.hpp +++ b/Viewer/ecflowUI/src/InfoPanelItem.hpp @@ -118,7 +118,7 @@ class InfoPanelItemFactory { explicit InfoPanelItemFactory(const std::string&); virtual ~InfoPanelItemFactory() = default; - virtual InfoPanelItem* make() = 0; + virtual InfoPanelItem* make() = 0; static InfoPanelItem* create(const std::string& name); private: diff --git a/Viewer/ecflowUI/src/InfoProvider.cpp b/Viewer/ecflowUI/src/InfoProvider.cpp index 8be3bd776..901fb7144 100644 --- a/Viewer/ecflowUI/src/InfoProvider.cpp +++ b/Viewer/ecflowUI/src/InfoProvider.cpp @@ -202,11 +202,11 @@ void InfoProvider::taskChanged(VTask_ptr task) { } JobProvider::JobProvider(InfoPresenter* owner) : InfoProvider(owner, VTask::JobTask) { - fileVarName_ = "ECF_JOB"; + fileVarName_ = "ECF_JOB"; fileNotDefinedText_ = "Job is not defined"; - fileMissingText_ = "Job not found!
Check ECF_HOME directory \ + fileMissingText_ = "Job not found!
Check ECF_HOME directory \ for read/write access. Check for file presence and read access below. \ The file may have been deleted or this may be a 'dummy' task"; } diff --git a/Viewer/ecflowUI/src/InputEventLog.cpp b/Viewer/ecflowUI/src/InputEventLog.cpp index 3867e6ee8..6349b0f21 100644 --- a/Viewer/ecflowUI/src/InputEventLog.cpp +++ b/Viewer/ecflowUI/src/InputEventLog.cpp @@ -49,7 +49,7 @@ InputEventLog::InputEventLog(QObject* parent) : QObject(parent) { QString path = QString::fromStdString(DirectoryHandler::uiEventLogFileName()); outFile_ = new QFile(path); - truncator_ = new LogTruncator(path, 86400 * 1000, 5 * 1024 * 1024, 2000, this); + truncator_ = new LogTruncator(path, 86400 * 1000, 5 * 1024 * 1024, 2000, this); connect(truncator_, SIGNAL(truncateBegin()), this, SLOT(truncateLogBegin())); connect(truncator_, SIGNAL(truncateEnd()), this, SLOT(truncateLogEnd())); } diff --git a/Viewer/ecflowUI/src/LimitEditor.cpp b/Viewer/ecflowUI/src/LimitEditor.cpp index 69c2ea13d..5b349f4e8 100644 --- a/Viewer/ecflowUI/src/LimitEditor.cpp +++ b/Viewer/ecflowUI/src/LimitEditor.cpp @@ -311,7 +311,7 @@ void LimitEditor::lookup(const QModelIndex& idx) { std::string nodePath = model_->data(idx, Qt::DisplayRole).toString().toStdString(); - VInfo_ptr ni = VInfo::createFromPath(info_->server(), nodePath); + VInfo_ptr ni = VInfo::createFromPath(info_->server(), nodePath); if (ni) { MainWindow::lookUpInTree(ni); } diff --git a/Viewer/ecflowUI/src/LineEdit.cpp b/Viewer/ecflowUI/src/LineEdit.cpp index 2262818f3..ea79d5cbc 100644 --- a/Viewer/ecflowUI/src/LineEdit.cpp +++ b/Viewer/ecflowUI/src/LineEdit.cpp @@ -76,7 +76,7 @@ void LineEdit::adjustSize() { } void LineEdit::resizeEvent(QResizeEvent*) { - int frame = style()->pixelMetric(QStyle::PM_DefaultFrameWidth); + int frame = style()->pixelMetric(QStyle::PM_DefaultFrameWidth); QSize tbSize = clearTb_->sizeHint(); clearTb_->move(rect().right() - frame - tbSize.width(), (rect().bottom() + 1 - tbSize.height()) / 2); diff --git a/Viewer/ecflowUI/src/LogLoadView.cpp b/Viewer/ecflowUI/src/LogLoadView.cpp index f5d796a7a..7f0198731 100644 --- a/Viewer/ecflowUI/src/LogLoadView.cpp +++ b/Viewer/ecflowUI/src/LogLoadView.cpp @@ -68,8 +68,8 @@ bool LogLoadRequestSortModel::lessThan(const QModelIndex& left, const QModelInde QModelIndex leftIdx = sourceModel()->index(left.row(), 0); QModelIndex rightIdx = sourceModel()->index(right.row(), 0); - QString leftString = sourceModel()->data(leftIdx).toString(); - QString rightString = sourceModel()->data(rightIdx).toString(); + QString leftString = sourceModel()->data(leftIdx).toString(); + QString rightString = sourceModel()->data(rightIdx).toString(); return QString::localeAwareCompare(leftString, rightString) < 0; } @@ -405,10 +405,10 @@ void ChartCallout::paint(QPainter* painter, const QStyleOptionGraphicsItem* opti if (!rect_.contains(anchor)) { QPointF point1, point2; - bool above = anchor.y() <= rect_.top(); - bool aboveCenter = anchor.y() > rect_.top() && anchor.y() <= rect_.center().y(); - bool belowCenter = anchor.y() > rect_.center().y() && anchor.y() <= rect_.bottom(); - bool below = anchor.y() > rect_.bottom(); + bool above = anchor.y() <= rect_.top(); + bool aboveCenter = anchor.y() > rect_.top() && anchor.y() <= rect_.center().y(); + bool belowCenter = anchor.y() > rect_.center().y() && anchor.y() <= rect_.bottom(); + bool below = anchor.y() > rect_.bottom(); bool onLeft = anchor.x() <= rect_.left(); bool leftOfCenter = anchor.x() > rect_.left() && anchor.x() <= rect_.center().x(); @@ -675,7 +675,7 @@ void ChartView::removeCallout() { LogRequestViewHandler::LogRequestViewHandler(QWidget* parent) : data_(nullptr), lastScanIndex_(0) { // The data object - to read and store processed log data - data_ = new LogLoadData(); + data_ = new LogLoadData(); LogRequestView* view = nullptr; @@ -726,7 +726,7 @@ void LogRequestViewHandler::buildOtherTab(QWidget* parent) { vb->setContentsMargins(0, 3, 0, 0); vb->setSpacing(1); - auto* hb = new QHBoxLayout(); + auto* hb = new QHBoxLayout(); auto* label = new QLabel("Mode: ", w); hb->addWidget(label); @@ -774,7 +774,7 @@ void LogRequestViewHandler::buildTableTab(QWidget* parent) { vb->setContentsMargins(0, 3, 0, 0); vb->setSpacing(1); - auto* hb = new QHBoxLayout(); + auto* hb = new QHBoxLayout(); auto* label = new QLabel("Mode: ", w); hb->addWidget(label); @@ -934,7 +934,7 @@ LogRequestView::LogRequestView(LogRequestViewHandler* handler, QWidget* parent) auto* holder = new QWidget(this); - mainLayout_ = new QHBoxLayout(holder); + mainLayout_ = new QHBoxLayout(holder); mainLayout_->setContentsMargins(0, 0, 0, 0); mainLayout_->setSizeConstraint(QLayout::SetMinAndMaxSize); @@ -1376,7 +1376,7 @@ void LogRequestView::scanPositionClicked(qreal pos) { // Try to find the nearest data point around the click position int idx = 0; if (seriesIndex(t1, 0, tw, idx)) { - QChart* chart = views_[0]->chart(); + QChart* chart = views_[0]->chart(); QList lst = chart->series(); if (!lst.empty()) { @@ -1412,7 +1412,7 @@ bool LogRequestView::seriesPeriodIndex(qint64 startTime, qint64 endTime, size_t& } bool LogRequestView::seriesIndex(qint64 t, int startIdx, qint64 tolerance, int& idx) { - QChart* chart = views_[0]->chart(); + QChart* chart = views_[0]->chart(); QList lst = chart->series(); if (lst.empty()) @@ -1480,7 +1480,7 @@ bool LogRequestView::seriesIndex(qint64 t, int startIdx, qint64 tolerance, int& } qint64 LogRequestView::seriesTime(int idx) { - QChart* chart = views_[0]->chart(); + QChart* chart = views_[0]->chart(); QList lst = chart->series(); if (lst.empty()) @@ -1520,8 +1520,8 @@ void LogRequestView::scanPositionChanged(qreal pos) { return; } - qint64 tw = views_[0]->widthToTimeRange(50.); - bool hasData = seriesIndex(t, lastScanIndex_, tw, idx); + qint64 tw = views_[0]->widthToTimeRange(50.); + bool hasData = seriesIndex(t, lastScanIndex_, tw, idx); lastScanIndex_ = idx; // UiLog().dbg() << "idx=" << idx; @@ -1668,7 +1668,7 @@ void LogTotalRequestView::addRemoveSuite(int suiteIdx, bool st) { void LogTotalRequestView::addSuite(int idx) { QChart* chart = nullptr; - auto* series = new QLineSeries(); + auto* series = new QLineSeries(); series->setName(suiteSeriesId(idx)); data_->getSuiteTotalReq(idx, *series); chart = getChart(TotalChartType); @@ -1760,9 +1760,9 @@ void LogTotalRequestView::buildScanTable(QString& txt, int idx) { QColor col = seriesColour(tChart, "all"); QString name = "all"; - tot = seriesValue(tChart, "all", idx); - ch = seriesValue(cChart, "all", idx); - us = seriesValue(uChart, "all", idx); + tot = seriesValue(tChart, "all", idx); + ch = seriesValue(cChart, "all", idx); + us = seriesValue(uChart, "all", idx); buildScanRow(txt, name, tot, ch, us, col); for (int i = 0; i < suiteCtl_.plotState_.size(); i++) { @@ -1859,7 +1859,7 @@ void LogCmdSuiteRequestView::addSuite(int suiteIdx) { void LogCmdSuiteRequestView::addTotal() { int prevMaxVal = maxVal_; - QString id = "total"; + QString id = "total"; addChartById(id); ChartView* view = viewIds_.value(id, NULL); Q_ASSERT(view); @@ -1916,7 +1916,7 @@ void LogCmdSuiteRequestView::addCmd(int reqIdx) { if (chartId(views_[i]) == "total") { QString title = "All suites"; - auto* series = new QLineSeries(); + auto* series = new QLineSeries(); series->setName(cmdSeriesId(reqIdx)); int maxVal = 0; @@ -1932,7 +1932,7 @@ void LogCmdSuiteRequestView::addCmd(int reqIdx) { QString title = "suite: " + QString::fromStdString(data_->suites()[suiteIdx].name()); - auto* series = new QLineSeries(); + auto* series = new QLineSeries(); series->setName(cmdSeriesId(reqIdx)); data_->getSuiteSubReq(suiteIdx, reqIdx, *series); @@ -2084,7 +2084,7 @@ void LogSuiteCmdRequestView::addCmd(int reqIdx) { void LogSuiteCmdRequestView::addTotal() { int prevMaxVal = maxVal_; - QString id = "total"; + QString id = "total"; addChartById(id); ChartView* view = viewIds_.value(id, NULL); Q_ASSERT(view); @@ -2138,7 +2138,7 @@ void LogSuiteCmdRequestView::addSuite(int suiteIdx) { if (chartId(views_[i]) == "total") { QString title = "All commands"; - auto* series = new QLineSeries(); + auto* series = new QLineSeries(); series->setName(suiteSeriesId(suiteIdx)); int maxVal = 0; @@ -2154,7 +2154,7 @@ void LogSuiteCmdRequestView::addSuite(int suiteIdx) { QString title = "cmd: " + data_->subReqName(cmdIdx); - auto* series = new QLineSeries(); + auto* series = new QLineSeries(); series->setName(suiteSeriesId(suiteIdx)); data_->getSuiteSubReq(suiteIdx, cmdIdx, *series); build(views_[i], series, title, maxVal_); @@ -2293,7 +2293,7 @@ void LogUidCmdRequestView::addUid(int uidIdx) { if (chartId(views_[i]) == "total") { QString title = "All commands"; - auto* series = new QLineSeries(); + auto* series = new QLineSeries(); series->setName(uidSeriesId(uidIdx)); int maxVal = 0; @@ -2307,9 +2307,9 @@ void LogUidCmdRequestView::addUid(int uidIdx) { QString id = chartId(views_[i]); int idx = id.toInt(); Q_ASSERT(idx >= 0); - QString title = "command: " + data_->subReqName(idx); + QString title = "command: " + data_->subReqName(idx); - auto* series = new QLineSeries(); + auto* series = new QLineSeries(); int userReqIdx = idx; series->setName(uidSeriesId(uidIdx)); @@ -2369,7 +2369,7 @@ void LogUidCmdRequestView::addCmd(int reqIdx) { void LogUidCmdRequestView::addTotal() { int prevMaxVal = maxVal_; - QString id = "total"; + QString id = "total"; addChartById(id); ChartView* view = viewIds_.value(id, NULL); Q_ASSERT(view); @@ -2515,7 +2515,7 @@ void LogCmdUidRequestView::addCmd(int reqIdx) { if (chartId(views_[i]) == "total") { QString title = "All uids"; - auto* series = new QLineSeries(); + auto* series = new QLineSeries(); series->setName(cmdSeriesId(reqIdx)); int maxVal = 0; @@ -2531,9 +2531,9 @@ void LogCmdUidRequestView::addCmd(int reqIdx) { Q_ASSERT(idx >= 0); QString title = "uid: " + data_->uidName(idx); - auto* series = new QLineSeries(); + auto* series = new QLineSeries(); - int uidIdx = idx; + int uidIdx = idx; series->setName(cmdSeriesId(reqIdx)); data_->getUidSubReq(uidIdx, reqIdx, *series); build(views_[i], series, title, data_->subReqMax()); @@ -2590,7 +2590,7 @@ void LogCmdUidRequestView::addUid(int uidIdx) { void LogCmdUidRequestView::addTotal() { int prevMaxVal = maxVal_; - QString id = "total"; + QString id = "total"; addChartById(id); ChartView* view = viewIds_.value(id, NULL); Q_ASSERT(view); diff --git a/Viewer/ecflowUI/src/MenuHandler.cpp b/Viewer/ecflowUI/src/MenuHandler.cpp index 2ee1f0005..1444af69c 100644 --- a/Viewer/ecflowUI/src/MenuHandler.cpp +++ b/Viewer/ecflowUI/src/MenuHandler.cpp @@ -89,7 +89,7 @@ bool MenuHandler::readMenuConfigFile(const std::string& configFile) { for (ptree::const_iterator itMenus = menusDef.begin(); itMenus != menusDef.end(); ++itMenus) { ptree const& menuDef = itMenus->second; - std::string cname = menuDef.get("name", "NoName"); + std::string cname = menuDef.get("name", "NoName"); UiLog().dbg() << " " << cname; auto* menu = new Menu(cname); @@ -119,7 +119,7 @@ bool MenuHandler::readMenuConfigFile(const std::string& configFile) { // iterate through all the items for (ptree::const_iterator itItems = itemsDef.begin(); itItems != itemsDef.end(); ++itItems) { - ptree const& ItemDef = itItems->second; + ptree const& ItemDef = itItems->second; std::string name = ItemDef.get("name", "NoName"); std::string menuName = ItemDef.get("menu", "NoMenu"); @@ -253,7 +253,7 @@ void MenuHandler::refreshCustomMenuCommands() { CustomCommandHistoryHandler* customRecentCmds = CustomCommandHistoryHandler::instance(); CustomSavedCommandHandler* customSavedCmds = CustomSavedCommandHandler::instance(); - Menu* menu = findMenu("User defined"); + Menu* menu = findMenu("User defined"); if (menu) { menu->clearFixedList(); @@ -307,7 +307,7 @@ void MenuHandler::refreshCustomMenuCommands() { for (int i = 0; i < numRecentCommands; i++) { CustomCommand* cmd = customRecentCmds->commandFromIndex(i); - auto* item = new MenuItem(cmd->name()); + auto* item = new MenuItem(cmd->name()); item->setCommand(cmd->command()); item->setEnabledCondition(&trueCond_); item->setVisibleCondition(&trueCond_); diff --git a/Viewer/ecflowUI/src/MessageItemWidget.cpp b/Viewer/ecflowUI/src/MessageItemWidget.cpp index dba24b1a6..6d6e04b93 100644 --- a/Viewer/ecflowUI/src/MessageItemWidget.cpp +++ b/Viewer/ecflowUI/src/MessageItemWidget.cpp @@ -32,7 +32,7 @@ MessageItemWidget::MessageItemWidget(QWidget* parent) : QWidget(parent) { infoProvider_ = new MessageProvider(this); - model_ = new LogModel(this); + model_ = new LogModel(this); treeView_->setProperty("log", "1"); treeView_->setModel(model_); diff --git a/Viewer/ecflowUI/src/NodeExpression.cpp b/Viewer/ecflowUI/src/NodeExpression.cpp index 5aeb4ec83..8c630ccfd 100644 --- a/Viewer/ecflowUI/src/NodeExpression.cpp +++ b/Viewer/ecflowUI/src/NodeExpression.cpp @@ -772,7 +772,7 @@ bool StringMatchCondition::execute(VItem* item) { auto* searchForOperand = static_cast(operands_[0]); auto* searchInOperand = static_cast(operands_[1]); - std::string searchIn = searchInOperand->what(); + std::string searchIn = searchInOperand->what(); if (item->isNode()) { auto* n = static_cast(item); diff --git a/Viewer/ecflowUI/src/NodeExpression.hpp b/Viewer/ecflowUI/src/NodeExpression.hpp index 53493dc8a..05f8057f6 100644 --- a/Viewer/ecflowUI/src/NodeExpression.hpp +++ b/Viewer/ecflowUI/src/NodeExpression.hpp @@ -176,7 +176,7 @@ class NotNodeCondition : public BaseNodeCondition { class StringMatchBase { public: StringMatchBase(bool caseSensitive) { caseSensitive_ = caseSensitive; } - virtual ~StringMatchBase() = default; + virtual ~StringMatchBase() = default; virtual bool match(std::string searchFor, std::string searchIn) = 0; diff --git a/Viewer/ecflowUI/src/NodePathWidget.cpp b/Viewer/ecflowUI/src/NodePathWidget.cpp index 9b0592194..2ccdf8fb4 100644 --- a/Viewer/ecflowUI/src/NodePathWidget.cpp +++ b/Viewer/ecflowUI/src/NodePathWidget.cpp @@ -560,7 +560,7 @@ void NodePathItem::makeShape(int xp, int yp, int len) { vec << QPoint(0, height_); vec << QPoint(triLen_, height_ / 2); - shape_ = QPolygon(vec).translated(xp, yp); + shape_ = QPolygon(vec).translated(xp, yp); textRect_ = QRect(xp + triLen_ + hPadding_, yp, len, height_); } @@ -683,7 +683,7 @@ void NodePathServerItem::makeShape(int xp, int yp, int len) { vec << QPoint(len, height_); vec << QPoint(0, height_); - shape_ = QPolygon(vec).translated(xp, yp); + shape_ = QPolygon(vec).translated(xp, yp); textRect_ = QRect(xp + hPadding_, yp, len, height_); } @@ -794,7 +794,7 @@ void NodePathWidget::adjust(VInfo_ptr info, ServerHandler** serverOut, bool& sam // Check if there is data in info if (info) { - server = info->server(); + server = info->server(); sameServer = (info_) ? (info_->server() == server) : false; @@ -865,7 +865,7 @@ void NodePathWidget::setPath(VInfo_ptr info) { ServerHandler* server = nullptr; bool sameServer = false; - VInfo_ptr info_ori = info_; + VInfo_ptr info_ori = info_; adjust(info, &server, sameServer); @@ -916,8 +916,8 @@ void NodePathWidget::setPath(VInfo_ptr info) { QString name; NodePathItem* nodeItem = nullptr; - VNode* n = lst.at(i); - col = n->stateColour(); + VNode* n = lst.at(i); + col = n->stateColour(); #ifdef _UI_NODEPATHWIDGET_DEBUG UiLog().dbg() << " state=" << n->stateName(); #endif diff --git a/Viewer/ecflowUI/src/NodeQuery.cpp b/Viewer/ecflowUI/src/NodeQuery.cpp index 8f871335c..337474a3e 100644 --- a/Viewer/ecflowUI/src/NodeQuery.cpp +++ b/Viewer/ecflowUI/src/NodeQuery.cpp @@ -419,7 +419,7 @@ void NodeQuery::load(VSettings* vs) { advanced_ = vs->getAsBool("advanced", advanced_); caseSensitive_ = vs->getAsBool("case", caseSensitive_); - auto maxNum = vs->get("maxNum", maxNum_); + auto maxNum = vs->get("maxNum", maxNum_); if (maxNum_ > 1 && maxNum < 5000000) maxNum_ = maxNum; diff --git a/Viewer/ecflowUI/src/NodeQueryEditor.cpp b/Viewer/ecflowUI/src/NodeQueryEditor.cpp index 2b42e5a5e..486cdb10c 100644 --- a/Viewer/ecflowUI/src/NodeQueryEditor.cpp +++ b/Viewer/ecflowUI/src/NodeQueryEditor.cpp @@ -153,11 +153,11 @@ NodeQueryEditor::NodeQueryEditor(QWidget* parent) : QWidget(parent) { //------------------------- // Node type - typeEdit_ = new NodeQueryListOptionEdit(query_->option("type"), typeList_, typeResetTb_, this); - stateEdit_ = new NodeQueryListOptionEdit(query_->option("state"), stateList_, stateResetTb_, this); - flagEdit_ = new NodeQueryListOptionEdit(query_->option("flag"), flagList_, flagResetTb_, this); + typeEdit_ = new NodeQueryListOptionEdit(query_->option("type"), typeList_, typeResetTb_, this); + stateEdit_ = new NodeQueryListOptionEdit(query_->option("state"), stateList_, stateResetTb_, this); + flagEdit_ = new NodeQueryListOptionEdit(query_->option("flag"), flagList_, flagResetTb_, this); - attrEdit_ = new NodeQueryListOptionEdit(query_->option("attribute"), attrList_, attrResetTb_, this); + attrEdit_ = new NodeQueryListOptionEdit(query_->option("attribute"), attrList_, attrResetTb_, this); int listHeight = (fm.height() + 2) * 6 + 6; typeList_->setFixedHeight(listHeight); @@ -392,7 +392,7 @@ void NodeQueryEditor::slotAttrPanelChanged() { void NodeQueryEditor::checkGuiState() { serverResetTb_->setEnabled(serverCb_->hasSelection()); - bool oneServer = (serverCb_->count() == 1 || serverCb_->selection().count() == 1); + bool oneServer = (serverCb_->count() == 1 || serverCb_->selection().count() == 1); bool oriRootLeStatus = rootLe_->isEnabled(); rootLabel_->setEnabled(oneServer); diff --git a/Viewer/ecflowUI/src/NodeQueryOption.cpp b/Viewer/ecflowUI/src/NodeQueryOption.cpp index e80aecdde..bee9f7278 100644 --- a/Viewer/ecflowUI/src/NodeQueryOption.cpp +++ b/Viewer/ecflowUI/src/NodeQueryOption.cpp @@ -41,7 +41,7 @@ class NodeQueryOptionFactory { explicit NodeQueryOptionFactory(const NodeQueryOptionFactory&) = delete; NodeQueryOptionFactory& operator=(const NodeQueryOptionFactory&) = delete; - virtual NodeQueryOption* make(VProperty* p) = 0; + virtual NodeQueryOption* make(VProperty* p) = 0; static NodeQueryOption* create(VProperty* p); }; @@ -480,7 +480,7 @@ void NodeQueryPeriodOption::load(VSettings* vs) { QString from = QString::fromStdString(vs->get("from", fromDate_.toString(Qt::ISODate).toStdString())); QString to = QString::fromStdString(vs->get("to", fromDate_.toString(Qt::ISODate).toStdString())); - fromDate_ = QDateTime::fromString(from, Qt::ISODate); + fromDate_ = QDateTime::fromString(from, Qt::ISODate); fromDate_.setTimeSpec(Qt::UTC); toDate_ = QDateTime::fromString(to, Qt::ISODate); toDate_.setTimeSpec(Qt::UTC); diff --git a/Viewer/ecflowUI/src/NodeQueryOption.hpp b/Viewer/ecflowUI/src/NodeQueryOption.hpp index ad49b8194..9272faa5b 100644 --- a/Viewer/ecflowUI/src/NodeQueryOption.hpp +++ b/Viewer/ecflowUI/src/NodeQueryOption.hpp @@ -33,7 +33,7 @@ class NodeQueryOption { QString type() const { return type_; } QString name() const { return name_; } QString label() const { return label_; } - virtual QString valueAsString() const = 0; + virtual QString valueAsString() const = 0; virtual void swap(const NodeQueryOption*) = 0; virtual QString query() const { return QString(); } diff --git a/Viewer/ecflowUI/src/NodeQueryOptionEdit.cpp b/Viewer/ecflowUI/src/NodeQueryOptionEdit.cpp index 45871cb82..81df10faa 100644 --- a/Viewer/ecflowUI/src/NodeQueryOptionEdit.cpp +++ b/Viewer/ecflowUI/src/NodeQueryOptionEdit.cpp @@ -185,8 +185,8 @@ NodeQueryComboOptionEdit::NodeQueryComboOptionEdit(NodeQueryOption* option, QGri option_ = static_cast(option); Q_ASSERT(option_); - label_ = new QLabel(option->label() + ":", parent_); - cb_ = new QComboBox(parent_); + label_ = new QLabel(option->label() + ":", parent_); + cb_ = new QComboBox(parent_); int row = grid_->rowCount(); grid_->addWidget(label_, row, 0); @@ -243,7 +243,7 @@ NodeQueryPeriodOptionEdit::NodeQueryPeriodOptionEdit(NodeQueryOption* option, QG : NodeQueryOptionEdit(option->name(), grid, parent) { int row = grid_->rowCount(); - label_ = new QLabel(option->label() + ": ", parent_); + label_ = new QLabel(option->label() + ": ", parent_); modeCb_ = new QComboBox(parent); modeCb_->addItem("any time", "any"); @@ -314,7 +314,7 @@ NodeQueryPeriodOptionEdit::NodeQueryPeriodOptionEdit(NodeQueryOption* option, QG void NodeQueryPeriodOptionEdit::initInternal(NodeQueryOption* option) { initIsOn_ = true; - option_ = static_cast(option); + option_ = static_cast(option); Q_ASSERT(option_); Q_ASSERT(optionId_ == option_->name()); if (option_->mode() == NodeQueryPeriodOption::LastPeriodMode) { diff --git a/Viewer/ecflowUI/src/NodeQueryResultView.cpp b/Viewer/ecflowUI/src/NodeQueryResultView.cpp index 9619509f5..a2969b171 100644 --- a/Viewer/ecflowUI/src/NodeQueryResultView.cpp +++ b/Viewer/ecflowUI/src/NodeQueryResultView.cpp @@ -30,7 +30,7 @@ NodeQueryResultView::NodeQueryResultView(QWidget* parent) : QTreeView(parent) { actionHandler_ = new ActionHandler(this, this); - sortModel_ = new QSortFilterProxyModel(this); + sortModel_ = new QSortFilterProxyModel(this); // sortModel_->setDynamicSortFilter(true); setModel(sortModel_); diff --git a/Viewer/ecflowUI/src/NodeQueryViewDelegate.cpp b/Viewer/ecflowUI/src/NodeQueryViewDelegate.cpp index 4ccbf32d9..908cc0f6f 100644 --- a/Viewer/ecflowUI/src/NodeQueryViewDelegate.cpp +++ b/Viewer/ecflowUI/src/NodeQueryViewDelegate.cpp @@ -65,7 +65,7 @@ NodeQueryViewDelegate::NodeQueryViewDelegate(QWidget* /*parent*/) { borderPen_ = QPen(QColor(230, 230, 230)); - columns_ = ModelColumn::def("query_columns"); + columns_ = ModelColumn::def("query_columns"); // Property if (propVec.empty()) { @@ -184,7 +184,7 @@ void NodeQueryViewDelegate::renderNode(QPainter* painter, // The text rectangle QRect textRect = itemRect; - int textWidth = ViewerUtil::textWidth(fm, text); + int textWidth = ViewerUtil::textWidth(fm, text); textRect.setWidth(textWidth + nodeBox_->leftPadding + nodeBox_->rightPadding); int currentRight = textRect.x() + textRect.width(); diff --git a/Viewer/ecflowUI/src/NodeViewBase.hpp b/Viewer/ecflowUI/src/NodeViewBase.hpp index 9f5bcd868..df5a5aa62 100644 --- a/Viewer/ecflowUI/src/NodeViewBase.hpp +++ b/Viewer/ecflowUI/src/NodeViewBase.hpp @@ -25,7 +25,7 @@ class QModelIndex; class NodeViewBase { public: explicit NodeViewBase(NodeFilterDef*); - virtual ~NodeViewBase() = default; + virtual ~NodeViewBase() = default; virtual void reload() = 0; virtual void rerender() = 0; @@ -35,8 +35,8 @@ class NodeViewBase { virtual void selectFirstServer() = 0; virtual void setCurrentSelection(VInfo_ptr n) = 0; - virtual void readSettings(VSettings* vs) = 0; - virtual void writeSettings(VSettings* vs) = 0; + virtual void readSettings(VSettings* vs) = 0; + virtual void writeSettings(VSettings* vs) = 0; protected: NodeFilterDef* filterDef_; diff --git a/Viewer/ecflowUI/src/NodeViewDelegate.cpp b/Viewer/ecflowUI/src/NodeViewDelegate.cpp index 0efac388c..03baff8cb 100644 --- a/Viewer/ecflowUI/src/NodeViewDelegate.cpp +++ b/Viewer/ecflowUI/src/NodeViewDelegate.cpp @@ -61,18 +61,18 @@ void LabelStyle::update() { } NodeViewDelegate::NodeViewDelegate(QWidget* parent) : QStyledItemDelegate(parent) { - hoverPen_ = QPen(QColor(201, 201, 201)); - hoverBrush_ = QBrush(QColor(250, 250, 250, 210)); - selectPen_ = QPen(QColor(125, 162, 206)); - selectBrush_ = QBrush(QColor(193, 220, 252, 110)); - nodePen_ = QPen(QColor(180, 180, 180)); - nodeSelectPen_ = QPen(QColor(0, 0, 0), 2); + hoverPen_ = QPen(QColor(201, 201, 201)); + hoverBrush_ = QBrush(QColor(250, 250, 250, 210)); + selectPen_ = QPen(QColor(125, 162, 206)); + selectBrush_ = QBrush(QColor(193, 220, 252, 110)); + nodePen_ = QPen(QColor(180, 180, 180)); + nodeSelectPen_ = QPen(QColor(0, 0, 0), 2); lostConnectBgBrush_ = QBrush(QColor(150, 150, 150, 150), Qt::Dense7Pattern); lostConnectBandBrush_ = QBrush(QColor(255, 166, 0, 150)); - noConnectBgBrush_ = QBrush(QColor(186, 16, 16, 150), Qt::Dense7Pattern); - noConnectBandBrush_ = QBrush(QColor(186, 16, 16, 240)); + noConnectBgBrush_ = QBrush(QColor(186, 16, 16, 150), Qt::Dense7Pattern); + noConnectBandBrush_ = QBrush(QColor(186, 16, 16, 240)); QImageReader imgR(":/viewer/warning.svg"); if (imgR.canRead()) { @@ -88,35 +88,35 @@ NodeViewDelegate::NodeViewDelegate(QWidget* parent) : QStyledItemDelegate(parent grad_.setStart(0, 0); grad_.setFinalStop(0, 1); - eventFillBrush_ = QBrush(QColor(0, 0, 255)); - eventFillBrush_ = QBrush(QColor(240, 240, 240)); - meterFillBrush_ = QBrush(QColor(0, 0, 255)); - meterThresholdBrush_ = QBrush(QColor(0, 0, 255)); - limitFillBrush_ = QBrush(QColor(0, 255, 0)); - limitExtraFillBrush_ = QBrush(QColor(0, 0, 255)); - repeatDayPen_ = QPen(QColor(0, 0, 0)); - repeatDatePen_ = QPen(QColor(0, 0, 0)); - repeatEnumPen_ = QPen(QColor(37, 118, 38)); - repeatIntPen_ = QPen(QColor(0, 0, 240)); - repeatStringPen_ = QPen(QColor(0, 0, 0)); - - triggerBgBrush_ = QBrush(QColor(230, 230, 230)); - triggerBorderPen_ = QPen(QColor(150, 150, 150)); - triggerFontPen_ = QPen(QColor(0, 0, 0)); - completeBgBrush_ = QBrush(QColor(230, 230, 230)); - completeBorderPen_ = QPen(QColor(150, 150, 150)); - completeFontPen_ = QPen(QColor(0, 0, 255)); - - labelStyle_[DefaultLabel] = new LabelStyle("view.label.default", true); - labelStyle_[ErrorLabel] = new LabelStyle("view.label.error"); - labelStyle_[WarningLabel] = new LabelStyle("view.label.warning"); - labelStyle_[InfoLabel] = new LabelStyle("view.label.info"); - - holdingTimeFontPen_ = QPen(QColor(255, 0, 0)); - holdingDateFontPen_ = QPen(QColor(255, 0, 0)); - - holdingTimePixId_ = IconProvider::add(":/viewer/icon_clock.svg", "icon_clock"); - holdingDatePixId_ = IconProvider::add(":/viewer/icon_calendar.svg", "icon_calendar"); + eventFillBrush_ = QBrush(QColor(0, 0, 255)); + eventFillBrush_ = QBrush(QColor(240, 240, 240)); + meterFillBrush_ = QBrush(QColor(0, 0, 255)); + meterThresholdBrush_ = QBrush(QColor(0, 0, 255)); + limitFillBrush_ = QBrush(QColor(0, 255, 0)); + limitExtraFillBrush_ = QBrush(QColor(0, 0, 255)); + repeatDayPen_ = QPen(QColor(0, 0, 0)); + repeatDatePen_ = QPen(QColor(0, 0, 0)); + repeatEnumPen_ = QPen(QColor(37, 118, 38)); + repeatIntPen_ = QPen(QColor(0, 0, 240)); + repeatStringPen_ = QPen(QColor(0, 0, 0)); + + triggerBgBrush_ = QBrush(QColor(230, 230, 230)); + triggerBorderPen_ = QPen(QColor(150, 150, 150)); + triggerFontPen_ = QPen(QColor(0, 0, 0)); + completeBgBrush_ = QBrush(QColor(230, 230, 230)); + completeBorderPen_ = QPen(QColor(150, 150, 150)); + completeFontPen_ = QPen(QColor(0, 0, 255)); + + labelStyle_[DefaultLabel] = new LabelStyle("view.label.default", true); + labelStyle_[ErrorLabel] = new LabelStyle("view.label.error"); + labelStyle_[WarningLabel] = new LabelStyle("view.label.warning"); + labelStyle_[InfoLabel] = new LabelStyle("view.label.info"); + + holdingTimeFontPen_ = QPen(QColor(255, 0, 0)); + holdingDateFontPen_ = QPen(QColor(255, 0, 0)); + + holdingTimePixId_ = IconProvider::add(":/viewer/icon_clock.svg", "icon_clock"); + holdingDatePixId_ = IconProvider::add(":/viewer/icon_calendar.svg", "icon_calendar"); attrRenderers_["meter"] = &NodeViewDelegate::renderMeter; attrRenderers_["label"] = &NodeViewDelegate::renderLabel; @@ -385,7 +385,7 @@ void NodeViewDelegate::renderMeter(QPainter* painter, QSize& size) const { int totalWidth = 0; - size = QSize(totalWidth, attrBox_->fullHeight); + size = QSize(totalWidth, attrBox_->fullHeight); if (data.count() < 6) { return; @@ -399,7 +399,7 @@ void NodeViewDelegate::renderMeter(QPainter* painter, bool selected = option.state & QStyle::State_Selected; - QString name = data.at(1) + ":"; + QString name = data.at(1) + ":"; if (data.count() == 7) name.prepend(data[6] + ":"); @@ -417,7 +417,7 @@ void NodeViewDelegate::renderMeter(QPainter* painter, auto stHeight = static_cast(static_cast(fm.ascent()) * 0.8); int stHeightDiff = (contRect.height() - stHeight) / 2; - QRect stRect = contRect.adjusted(attrBox_->leftPadding, stHeightDiff, 0, -stHeightDiff); + QRect stRect = contRect.adjusted(attrBox_->leftPadding, stHeightDiff, 0, -stHeightDiff); stRect.setWidth(50); // The text rectangle @@ -451,7 +451,7 @@ void NodeViewDelegate::renderMeter(QPainter* painter, // Draw progress if (max > min) { - QRect progRect = stRect; + QRect progRect = stRect; float valPercent = static_cast(val - min) / static_cast(max - min); if (threshold > min && threshold < max && val > threshold) { @@ -531,7 +531,7 @@ void NodeViewDelegate::renderLabel(QPainter* painter, bool selected = option.state & QStyle::State_Selected; // The border rect (we will adjust its width) - QRect contRect = option.rect.adjusted(attrBox_->leftMargin, + QRect contRect = option.rect.adjusted(attrBox_->leftMargin, attrBox_->topMargin + attrBox_->topPadding, 0, -attrBox_->bottomMargin - attrBox_->bottomPadding); @@ -581,7 +581,7 @@ void NodeViewDelegate::renderLabel(QPainter* painter, Q_ASSERT(valLst.count() > 0); valFirst = valLst[0]; - valRect = nameRect; + valRect = nameRect; valRect.setX(nameRect.x() + nameRect.width() + attrBox_->spacing); valRect.setWidth(ViewerUtil::textWidth(fm, valFirst)); @@ -590,11 +590,11 @@ void NodeViewDelegate::renderLabel(QPainter* painter, valRest = valLst.join("\n"); QSize valSize = fm.size(0, valRest); - valRestRect = QRect(nameRect.x(), nameRect.y() + nameRect.height() + 2, valSize.width(), valSize.height()); + valRestRect = QRect(nameRect.x(), nameRect.y() + nameRect.height() + 2, valSize.width(), valSize.height()); - currentRight = qMax(valRect.x() + valRect.width(), valRestRect.x() + valRestRect.width()); + currentRight = qMax(valRect.x() + valRect.width(), valRestRect.x() + valRestRect.width()); - val = valFirst + " " + valRest; + val = valFirst + " " + valRest; } // Define clipping @@ -673,8 +673,8 @@ void NodeViewDelegate::labelSize(QStringList data, int& totalWidth, int& totalHe int currentRight = attrBox_->leftMargin; int currentBottom = attrBox_->topMargin + attrBox_->topPadding; - int multiCnt = val.count('\n'); - QFont nameFont = attrFont_; + int multiCnt = val.count('\n'); + QFont nameFont = attrFont_; nameFont.setBold(true); QFont valFont = attrFont_; @@ -713,7 +713,7 @@ void NodeViewDelegate::labelSize(QStringList data, int& totalWidth, int& totalHe QString valRest = valLst.join("\n"); QSize valSize = fm.size(0, valRest); - currentRight = qMax(currentRight, startX + valSize.width()); + currentRight = qMax(currentRight, startX + valSize.width()); currentBottom += 2 + valSize.height(); } @@ -753,7 +753,7 @@ void NodeViewDelegate::renderEvent(QPainter* painter, QSize& size) const { int totalWidth = 0; - size = QSize(totalWidth, attrBox_->fullHeight); + size = QSize(totalWidth, attrBox_->fullHeight); if (data.count() < 2) return; @@ -779,7 +779,7 @@ void NodeViewDelegate::renderEvent(QPainter* painter, auto ctHeight = static_cast(static_cast(fm.ascent()) * 0.8); int ctHeightDiff = qMax((contRect.height() - ctHeight) / 2, 2); - QRect ctRect = contRect.adjusted(attrBox_->leftPadding, ctHeightDiff, 0, -ctHeightDiff); + QRect ctRect = contRect.adjusted(attrBox_->leftPadding, ctHeightDiff, 0, -ctHeightDiff); ctRect.setWidth(ctRect.height()); // The text rectangle @@ -895,7 +895,7 @@ void NodeViewDelegate::renderLimit(QPainter* painter, QSize& size) const { int totalWidth = 0; - size = QSize(totalWidth, attrBox_->fullHeight); + size = QSize(totalWidth, attrBox_->fullHeight); if (data.count() < 4) { return; @@ -948,14 +948,14 @@ void NodeViewDelegate::renderLimit(QPainter* painter, valRect.setX(nameRect.x() + nameRect.width() + attrBox_->spacing); valRect.setWidth(valWidth); - int xItem = valRect.x() + valRect.width() + attrBox_->spacing; + int xItem = valRect.x() + valRect.width() + attrBox_->spacing; int itemNum = totalVal; if (maxLimitItems_ > 0) { itemNum = std::min(itemNum, maxLimitItems_); } - int rightPos = xItem + itemNum * (itemWidth + itemOffset) + itemOffset; + int rightPos = xItem + itemNum * (itemWidth + itemOffset) + itemOffset; QRect trailRect = valRect; QString trailTxt("..."); @@ -1066,7 +1066,7 @@ void NodeViewDelegate::renderLimiter(QPainter* painter, QSize& size) const { int totalWidth = 0; - size = QSize(totalWidth, attrBox_->fullHeight); + size = QSize(totalWidth, attrBox_->fullHeight); if (data.count() < 4) return; @@ -1124,7 +1124,7 @@ void NodeViewDelegate::renderTrigger(QPainter* painter, QSize& size) const { int totalWidth = 0; - size = QSize(totalWidth, attrBox_->fullHeight); + size = QSize(totalWidth, attrBox_->fullHeight); if (data.count() != 3) return; @@ -1196,7 +1196,7 @@ void NodeViewDelegate::renderTime(QPainter* painter, QSize& size) const { int totalWidth = 0; - size = QSize(totalWidth, attrBox_->fullHeight); + size = QSize(totalWidth, attrBox_->fullHeight); if (data.count() < 3) return; @@ -1276,7 +1276,7 @@ void NodeViewDelegate::renderDate(QPainter* painter, QSize& size) const { int totalWidth = 0; - size = QSize(totalWidth, attrBox_->fullHeight); + size = QSize(totalWidth, attrBox_->fullHeight); if (data.count() < 3) return; @@ -1361,7 +1361,7 @@ void NodeViewDelegate::renderRepeat(QPainter* painter, QSize& size) const { int totalWidth = 0; - size = QSize(totalWidth, attrBox_->fullHeight); + size = QSize(totalWidth, attrBox_->fullHeight); if (data.count() < 9) return; @@ -1383,7 +1383,7 @@ void NodeViewDelegate::renderRepeat(QPainter* painter, QRect contRect = option.rect.adjusted(attrBox_->leftMargin, attrBox_->topMargin, 0, -attrBox_->bottomMargin); if (type == "day") { - rPen = repeatDayPen_; + rPen = repeatDayPen_; QFont nameFont = attrFont_; QFontMetrics fm(nameFont); @@ -1527,7 +1527,7 @@ void NodeViewDelegate::renderLate(QPainter* painter, QSize& size) const { int totalWidth = 0; - size = QSize(totalWidth, attrBox_->fullHeight); + size = QSize(totalWidth, attrBox_->fullHeight); if (data.count() < 2) return; @@ -1582,7 +1582,7 @@ void NodeViewDelegate::renderAutoArchive(QPainter* painter, QSize& size) const { int totalWidth = 0; - size = QSize(totalWidth, attrBox_->fullHeight); + size = QSize(totalWidth, attrBox_->fullHeight); if (data.count() < 2) return; @@ -1637,7 +1637,7 @@ void NodeViewDelegate::renderAutoCancel(QPainter* painter, QSize& size) const { int totalWidth = 0; - size = QSize(totalWidth, attrBox_->fullHeight); + size = QSize(totalWidth, attrBox_->fullHeight); if (data.count() < 2) return; @@ -1692,7 +1692,7 @@ void NodeViewDelegate::renderAutoRestore(QPainter* painter, QSize& size) const { int totalWidth = 0; - size = QSize(totalWidth, attrBox_->fullHeight); + size = QSize(totalWidth, attrBox_->fullHeight); if (data.count() < 2) return; @@ -1747,7 +1747,7 @@ void NodeViewDelegate::renderQueue(QPainter* painter, QSize& size) const { int totalWidth = 0; - size = QSize(totalWidth, attrBox_->fullHeight); + size = QSize(totalWidth, attrBox_->fullHeight); if (data.count() < 5) return; diff --git a/Viewer/ecflowUI/src/NodeViewDelegate.hpp b/Viewer/ecflowUI/src/NodeViewDelegate.hpp index 7de9eb573..4becc230e 100644 --- a/Viewer/ecflowUI/src/NodeViewDelegate.hpp +++ b/Viewer/ecflowUI/src/NodeViewDelegate.hpp @@ -32,7 +32,7 @@ struct BaseNodeDelegateBox { BaseNodeDelegateBox() : sizeHintCache(QSize(10, 10)), selectRm(2) {} - virtual ~BaseNodeDelegateBox() = default; + virtual ~BaseNodeDelegateBox() = default; virtual void adjust(const QFont& f) = 0; virtual QRect adjustTextRect(const QRect& rIn) const { @@ -87,8 +87,8 @@ struct NodeDelegateBox : public BaseNodeDelegateBox sizeHintCache = QSize(100, fullHeight); spacing = ViewerUtil::textWidth(fm, 'A') * 3 / 4; - auto h = static_cast(static_cast(fm.height()) * 0.7); - iconSize = h; + auto h = static_cast(static_cast(fm.height()) * 0.7); + iconSize = h; if (iconSize % 2 == 1) iconSize += 1; @@ -117,8 +117,8 @@ struct AttrDelegateBox : public BaseNodeDelegateBox sizeHintCache = QSize(100, fullHeight); spacing = ViewerUtil::textWidth(fm, 'A') * 3 / 4; - int h = static_cast(static_cast(fm.height()) * 0.7); - iconSize = h; + int h = static_cast(static_cast(fm.height()) * 0.7); + iconSize = h; if (iconSize % 2 == 1) iconSize += 1; diff --git a/Viewer/ecflowUI/src/OutputBrowser.cpp b/Viewer/ecflowUI/src/OutputBrowser.cpp index 18164567a..cc9852aaa 100644 --- a/Viewer/ecflowUI/src/OutputBrowser.cpp +++ b/Viewer/ecflowUI/src/OutputBrowser.cpp @@ -239,7 +239,7 @@ void OutputBrowser::loadIt(VFile_ptr file) { contentsChangedOnLastLoad_ = true; lastLoadedSizeFromDisk_ = 0; - file_ = file; + file_ = file; if (!file_) { return; } @@ -281,7 +281,7 @@ void OutputBrowser::reloadIt(VFile_ptr file) { contentsFile_ = filterIt(); bool contentsSame = contentsFile_.get() == file_.get(); - bool deltaAdded = false; + bool deltaAdded = false; if (delta && contentsFile_.get() == file_.get()) { deltaAdded = addDeltaContents(delta); } diff --git a/Viewer/ecflowUI/src/OutputCache.cpp b/Viewer/ecflowUI/src/OutputCache.cpp index 4ba07465a..43d006358 100644 --- a/Viewer/ecflowUI/src/OutputCache.cpp +++ b/Viewer/ecflowUI/src/OutputCache.cpp @@ -117,8 +117,8 @@ OutputCacheItem* OutputCache::add(VInfo_ptr info, const std::string& sourcePath, OutputCacheItem* OutputCache::attachOne(VInfo_ptr info, const std::string& fileName) { OutputCacheItem* attachedItem = nullptr; if (info && info->isNode() && info->server()) { - QString inPath = QString::fromStdString(info->path() + ":"); - QString inFileName = QString::fromStdString(fileName); + QString inPath = QString::fromStdString(info->path() + ":"); + QString inFileName = QString::fromStdString(fileName); QMap::iterator it = items_.begin(); while (it != items_.end()) { diff --git a/Viewer/ecflowUI/src/OutputDirClient.cpp b/Viewer/ecflowUI/src/OutputDirClient.cpp index 31039daa6..c931e27d6 100644 --- a/Viewer/ecflowUI/src/OutputDirClient.cpp +++ b/Viewer/ecflowUI/src/OutputDirClient.cpp @@ -102,7 +102,7 @@ void OutputDirClient::getDir(const std::string& name) { boost::filesystem::path fp(name); std::string dirName = fp.parent_path().string(); - remoteFile_ = name; + remoteFile_ = name; dir_.reset(); dir_ = std::make_shared(dirName); data_.clear(); diff --git a/Viewer/ecflowUI/src/OutputFileClient.cpp b/Viewer/ecflowUI/src/OutputFileClient.cpp index d32d9d19b..72e38539c 100644 --- a/Viewer/ecflowUI/src/OutputFileClient.cpp +++ b/Viewer/ecflowUI/src/OutputFileClient.cpp @@ -179,7 +179,7 @@ void OutputFileClient::slotRead() { if (total_ / progressChunk_ > lastProgress_) { lastProgress_ = total_ / progressChunk_; - int prog = 0; + int prog = 0; if (expected_ > 0) { prog = static_cast(100. * static_cast(total_) / static_cast(expected_)); if (prog > 100) diff --git a/Viewer/ecflowUI/src/OutputFileProvider.cpp b/Viewer/ecflowUI/src/OutputFileProvider.cpp index 1e53b9956..e0f14cd98 100644 --- a/Viewer/ecflowUI/src/OutputFileProvider.cpp +++ b/Viewer/ecflowUI/src/OutputFileProvider.cpp @@ -236,7 +236,7 @@ VDir_ptr OutputFileFetchQueueManager::dirToFile(const std::string& fileName) con OutputFileProvider::OutputFileProvider(InfoPresenter* owner) : InfoProvider(owner, VTask::OutputTask) { // outCache will be clean up automatically (QObject) - outCache_ = new OutputCache(this); + outCache_ = new OutputCache(this); fetchManager_ = new OutputFileFetchQueueManager(this); } diff --git a/Viewer/ecflowUI/src/OutputModel.cpp b/Viewer/ecflowUI/src/OutputModel.cpp index 8ae4c3b28..8d761b019 100644 --- a/Viewer/ecflowUI/src/OutputModel.cpp +++ b/Viewer/ecflowUI/src/OutputModel.cpp @@ -299,11 +299,11 @@ QString OutputModel::formatDate(QDateTime dt) const { } QString OutputModel::formatAgo(QDateTime dt) const { - QString str = tr("Right now"); + QString str = tr("Right now"); QDateTime now = QDateTime::currentDateTime(); - int delta = dt.secsTo(now); + int delta = dt.secsTo(now); if (delta < 0) delta = 0; @@ -335,7 +335,7 @@ QString OutputModel::formatAgo(QDateTime dt) const { qint64 OutputModel::secsToNow(QDateTime dt) const { QDateTime now = QDateTime::currentDateTime(); - qint64 delta = dt.secsTo(now); + qint64 delta = dt.secsTo(now); return (delta < 0) ? 0 : delta; } diff --git a/Viewer/ecflowUI/src/OverviewProvider.cpp b/Viewer/ecflowUI/src/OverviewProvider.cpp index 819456c87..f4dde69c2 100644 --- a/Viewer/ecflowUI/src/OverviewProvider.cpp +++ b/Viewer/ecflowUI/src/OverviewProvider.cpp @@ -91,10 +91,10 @@ void OverviewProvider::taskChanged(VTask_ptr task) { void OverviewProvider::serverInfo(VInfoServer* info, std::stringstream& f) { static const std::string inc = " "; - ServerHandler* server = info->server(); + ServerHandler* server = info->server(); if (!server) return; - VServer* snode = server->vRoot(); + VServer* snode = server->vRoot(); ConnectState* cst = server->connectState(); @@ -232,7 +232,7 @@ void OverviewProvider::nodeInfo(VInfoNode* info, std::stringstream& f) { f << "flags : " << flags << "\n"; } - node_ptr nn = node->node(); + node_ptr nn = node->node(); boost::posix_time::ptime state_change_time = nn->state_change_time(); if (!state_change_time.is_special()) { diff --git a/Viewer/ecflowUI/src/PlainTextSearchInterface.cpp b/Viewer/ecflowUI/src/PlainTextSearchInterface.cpp index a0b121dec..c0889ef4b 100644 --- a/Viewer/ecflowUI/src/PlainTextSearchInterface.cpp +++ b/Viewer/ecflowUI/src/PlainTextSearchInterface.cpp @@ -43,8 +43,8 @@ bool PlainTextSearchInterface::findString(QString str, cursor.movePosition(move); QList extraSelections; - bool found = false; - bool keepGoing = true; + bool found = false; + bool keepGoing = true; Qt::CaseSensitivity cs = (flags & QTextDocument::FindCaseSensitively) ? Qt::CaseSensitive : Qt::CaseInsensitive; diff --git a/Viewer/ecflowUI/src/PropertyEditor.cpp b/Viewer/ecflowUI/src/PropertyEditor.cpp index 256ae5159..a61c884b1 100644 --- a/Viewer/ecflowUI/src/PropertyEditor.cpp +++ b/Viewer/ecflowUI/src/PropertyEditor.cpp @@ -42,7 +42,7 @@ PropertyEditor::~PropertyEditor() = default; void PropertyEditor::edit(VProperty* vGroup, QPixmap pix) { clear(); - group_ = vGroup; + group_ = vGroup; QString txt = group_->param("desc"); headerWidget_->show(); @@ -170,7 +170,7 @@ PropertyLine* PropertyEditor::addLine(VProperty* vProp, QGridLayout* gridLayout, item->init(); // item->reset(vProp->link()->value()); - int row = gridLayout->rowCount(); + int row = gridLayout->rowCount(); QLabel* lw = item->label(); QLabel* slw = item->suffixLabel(); @@ -348,7 +348,7 @@ void PropertyEditor::addNotification(VProperty* vProp, QVBoxLayout* layout, QWid // ChangeNotifyEditor* ne=new ChangeNotifyEditor(parent); - auto* tab = new QTabWidget(parent); + auto* tab = new QTabWidget(parent); bool useGroup = (vProp->param("group") == "true"); diff --git a/Viewer/ecflowUI/src/PropertyLine.cpp b/Viewer/ecflowUI/src/PropertyLine.cpp index ece30b774..777e5b39c 100644 --- a/Viewer/ecflowUI/src/PropertyLine.cpp +++ b/Viewer/ecflowUI/src/PropertyLine.cpp @@ -413,7 +413,7 @@ ColourPropertyLine::ColourPropertyLine(VProperty* guiProp, bool addLabel, QWidge int height = fm.height(); int width = ViewerUtil::textWidth(fm, "AAAAAAA"); - cb_ = new QToolButton(parent); + cb_ = new QToolButton(parent); cb_->setObjectName(prop_->name()); cb_->setFixedWidth(width); cb_->setFixedHeight(height + 2); @@ -433,7 +433,7 @@ QWidget* ColourPropertyLine::button() { } void ColourPropertyLine::slotReset(QVariant v) { - auto c = v.value(); + auto c = v.value(); QString st = styleSheet_; st.replace("BG", @@ -638,7 +638,7 @@ IntPropertyLine::IntPropertyLine(VProperty* guiProp, bool addLabel, QWidget* par auto* validator = new QIntValidator(le_); - QString s = guiProp->param("max"); + QString s = guiProp->param("max"); if (!s.isEmpty()) { validator->setTop(s.toInt()); } diff --git a/Viewer/ecflowUI/src/RepeatEditor.cpp b/Viewer/ecflowUI/src/RepeatEditor.cpp index 13912097e..8ec32d55c 100644 --- a/Viewer/ecflowUI/src/RepeatEditor.cpp +++ b/Viewer/ecflowUI/src/RepeatEditor.cpp @@ -199,7 +199,7 @@ void RepeatIntEditor::initSpinner() { Q_ASSERT(a->type()); Q_ASSERT(a->type()->name() == "repeat"); - auto* rep = static_cast(a); + auto* rep = static_cast(a); int startIndex = rep->startIndex(); int endIndex = rep->endIndex(); diff --git a/Viewer/ecflowUI/src/RichTextSearchInterface.cpp b/Viewer/ecflowUI/src/RichTextSearchInterface.cpp index 0f8c0b4d1..5f35d05ef 100644 --- a/Viewer/ecflowUI/src/RichTextSearchInterface.cpp +++ b/Viewer/ecflowUI/src/RichTextSearchInterface.cpp @@ -42,8 +42,8 @@ bool RichTextSearchInterface::findString(QString str, cursor.movePosition(move); QList extraSelections; - bool found = false; - bool keepGoing = true; + bool found = false; + bool keepGoing = true; Qt::CaseSensitivity cs = (flags & QTextDocument::FindCaseSensitively) ? Qt::CaseSensitive : Qt::CaseInsensitive; diff --git a/Viewer/ecflowUI/src/ServerComInfoWidget.cpp b/Viewer/ecflowUI/src/ServerComInfoWidget.cpp index 94522b9e0..3bd7518af 100644 --- a/Viewer/ecflowUI/src/ServerComInfoWidget.cpp +++ b/Viewer/ecflowUI/src/ServerComInfoWidget.cpp @@ -121,13 +121,13 @@ ServerRefreshInfoWidget::ServerRefreshInfoWidget(QAction* refreshAction, QWidget fmServer_ = QFontMetrics(fontServer_); fmServerReal_ = FontMetrics(fontServer_); - fontPeriod_ = QFont(); + fontPeriod_ = QFont(); fontPeriod_.setPointSize(fontPeriod_.pointSize() - 2); fmPeriod_ = QFontMetrics(fontPeriod_); fontLast_ = QFont(); fontLast_.setPointSize(fontLast_.pointSize() - 2); - fmLast_ = QFontMetrics(fontLast_); + fmLast_ = QFontMetrics(fontLast_); int w = 200; serverRectHeight_ = fmServerReal_.realHeight() + 2 * serverYPadding_; @@ -457,8 +457,8 @@ void ServerRefreshInfoWidget::fetchInfo() { QDateTime currentTime = QDateTime::currentDateTime(); bool v = server_->updateInfo(period_, total_, drift_, toNext_); - bool geoUpdateNeeded = (v != hasInfo_); - hasInfo_ = v; + bool geoUpdateNeeded = (v != hasInfo_); + hasInfo_ = v; #ifdef _UI_SERVERCOMINFOWIDGET_DEBUG UiLog().dbg() << " period=" << period_ << " total=" << total_ << " toNext=" << toNext_; @@ -470,7 +470,7 @@ void ServerRefreshInfoWidget::fetchInfo() { server_->lastRefresh().time().toString(); // currentTime.addSecs(-total_+toNext_).time().toString(); nextRefresh_ = currentTime.addSecs(toNext_).time().toString(); - mode_ = NormalMode; + mode_ = NormalMode; if (!inRefresh_) refreshAction_->setEnabled(true); } @@ -696,7 +696,7 @@ bool ServerRefreshInfoWidget::periodTextWidthAboutToChange() const { UI_FUNCTION_LOG #endif - int mval = determinePeriodTextWidthMin(); + int mval = determinePeriodTextWidthMin(); QString pt = fullPeriodText(); #ifdef _UI_SERVERCOMINFOWIDGET_DEBUG @@ -734,11 +734,11 @@ void ServerRefreshInfoWidget::adjustGeometry(bool doFetchInfo) { int h = serverRectHeight_; // fmServer_.height()+progRectHeight_; //;2*yPadding; int currentRight = 0; - serverRect_ = QRect(buttonRect_.center().x() + 4, + serverRect_ = QRect(buttonRect_.center().x() + 4, (height() - h) / 2, buttonRect_.width() / 2 - 4 + 4 + ViewerUtil::textWidth(fmServer_, serverText_), h); - currentRight = serverRect_.x() + serverRect_.width(); + currentRight = serverRect_.x() + serverRect_.width(); if (doFetchInfo) fetchInfo(); @@ -784,7 +784,7 @@ void ServerRefreshInfoWidget::adjustGeometry(bool doFetchInfo) { // Compute physical width of the last refresh text lastTextWidth_ = ViewerUtil::textWidth(fmLast_, " last: 22:22:22 "); - lastRect_ = QRect(currentRight, serverRect_.y(), lastTextWidth_, h); + lastRect_ = QRect(currentRight, serverRect_.y(), lastTextWidth_, h); currentRight += lastRect_.width() + 6; } else @@ -1066,12 +1066,12 @@ void ServerRefreshInfoWidget::printStatus() const { ServerComActivityLine::ServerComActivityLine(QWidget* parent) : QWidget(parent), font_(QFont()), fm_(font_) { font_.setPointSize(font_.pointSize() - 1); - fm_ = QFontMetrics(font_); + fm_ = QFontMetrics(font_); int width_ = 200; int height_ = fm_.height() + 4 + 6; - timer_ = new QTimer(this); + timer_ = new QTimer(this); connect(timer_, SIGNAL(timeout()), this, SLOT(update())); diff --git a/Viewer/ecflowUI/src/ServerComQueue.cpp b/Viewer/ecflowUI/src/ServerComQueue.cpp index 9fe6c857e..cad4d3425 100644 --- a/Viewer/ecflowUI/src/ServerComQueue.cpp +++ b/Viewer/ecflowUI/src/ServerComQueue.cpp @@ -141,7 +141,7 @@ bool ServerComQueue::prepareReset() { taskStarted_ = false; - state_ = ResetState; + state_ = ResetState; // If the comthread is running we need to wait // until it finishes its task. diff --git a/Viewer/ecflowUI/src/ServerHandler.cpp b/Viewer/ecflowUI/src/ServerHandler.cpp index 210adfb08..373c65e28 100644 --- a/Viewer/ecflowUI/src/ServerHandler.cpp +++ b/Viewer/ecflowUI/src/ServerHandler.cpp @@ -81,7 +81,7 @@ ServerHandler::ServerHandler(const std::string& name, longName_ = host_ + "@" + port_; fullLongName_ = name_ + "[" + longName_ + "]"; - conf_ = new VServerSettings(this); + conf_ = new VServerSettings(this); // Connect up the timer for refreshing the server info. The timer has not // started yet. @@ -578,7 +578,7 @@ NState::State ServerHandler::state(bool& suspended) { if (connectState_->state() != ConnectState::Normal || activity() == LoadActivity) return NState::UNKNOWN; - suspended = false; + suspended = false; defs_ptr d = safelyAccessSimpleDefsMembers(); if (d && d.get()) { diff --git a/Viewer/ecflowUI/src/ServerList.cpp b/Viewer/ecflowUI/src/ServerList.cpp index 24125f934..017d5b70e 100644 --- a/Viewer/ecflowUI/src/ServerList.cpp +++ b/Viewer/ecflowUI/src/ServerList.cpp @@ -455,7 +455,7 @@ std::string ServerList::uniqueName(const std::string& name) { c << i; std::string currentName = name + "_" + c.str(); - hasIt = false; + hasIt = false; for (auto it = items_.begin(); it != items_.end(); ++it) { if ((*it)->name() == currentName) { hasIt = true; diff --git a/Viewer/ecflowUI/src/ServerListDialog.cpp b/Viewer/ecflowUI/src/ServerListDialog.cpp index f77d88779..707e661c2 100644 --- a/Viewer/ecflowUI/src/ServerListDialog.cpp +++ b/Viewer/ecflowUI/src/ServerListDialog.cpp @@ -749,14 +749,14 @@ void ServerListDialog::readSettings() { //====================================== ServerListModel::ServerListModel(ServerFilter* filter, QObject* parent) : QAbstractItemModel(parent), filter_(filter) { - int id = IconProvider::add(":/viewer/favourite.svg", "favourite"); - favPix_ = IconProvider::pixmap(id, 12); + int id = IconProvider::add(":/viewer/favourite.svg", "favourite"); + favPix_ = IconProvider::pixmap(id, 12); id = IconProvider::add(":/viewer/favourite_empty.svg", "favourite_empty"); favEmptyPix_ = IconProvider::pixmap(id, 12); - id = IconProvider::add(":/viewer/system.svg", "system"); - sysPix_ = IconProvider::pixmap(id, 12); + id = IconProvider::add(":/viewer/system.svg", "system"); + sysPix_ = IconProvider::pixmap(id, 12); loadFont_.setBold(true); } diff --git a/Viewer/ecflowUI/src/ShellCommand.cpp b/Viewer/ecflowUI/src/ShellCommand.cpp index eae51d42c..2635c8c1f 100644 --- a/Viewer/ecflowUI/src/ShellCommand.cpp +++ b/Viewer/ecflowUI/src/ShellCommand.cpp @@ -43,7 +43,7 @@ ShellCommand::ShellCommand(const std::string& cmdStr, const std::string& cmdDefS command_ = cmdIn.mid(3); - proc_ = new QProcess(this); + proc_ = new QProcess(this); // Some commands/script are located in bin, while some other is share/ecflow/etc diff --git a/Viewer/ecflowUI/src/Spline.cpp b/Viewer/ecflowUI/src/Spline.cpp index 2dc74754e..e64b61b14 100644 --- a/Viewer/ecflowUI/src/Spline.cpp +++ b/Viewer/ecflowUI/src/Spline.cpp @@ -111,7 +111,7 @@ bool Spline::tdma(const std::vector& a, std::vector& X) { const double SMALL = 1.0E-30; // used to stop divide-by-zero - int n = d.size(); + int n = d.size(); std::vector P(n, 0); std::vector Q(n, 0); X = P; diff --git a/Viewer/ecflowUI/src/StandardView.cpp b/Viewer/ecflowUI/src/StandardView.cpp index ae9368797..07cd7cf7d 100644 --- a/Viewer/ecflowUI/src/StandardView.cpp +++ b/Viewer/ecflowUI/src/StandardView.cpp @@ -121,14 +121,14 @@ void StandardView::layout(int parentId, bool recursiveExpanding, bool afterIsUni for (int i = first; i < first + count; i++) { QModelIndex currentIndex = model_->index(i - first, 0, parentIndex); - last = i + children; - item = &viewItems_[last]; - item->parentItem = parentId; - item->index = currentIndex; - item->hasMoreSiblings = (i < first + count - 1); - item->level = level; - item->expanded = false; - item->total = 0; + last = i + children; + item = &viewItems_[last]; + item->parentItem = parentId; + item->index = currentIndex; + item->hasMoreSiblings = (i < first + count - 1); + item->level = level; + item->expanded = false; + item->total = 0; // We compute the size of the item. For attributes we delay the width computation until we // actually paint them and we set their width to 300. @@ -137,7 +137,7 @@ void StandardView::layout(int parentId, bool recursiveExpanding, bool afterIsUni item->width = w; item->height = h; - int xp = leftMargin_ + expandIndicatorBoxWidth_; // no indentation for the root + int xp = leftMargin_ + expandIndicatorBoxWidth_; // no indentation for the root if (parentId >= 0) { // item->widestInSiblings=widest; @@ -582,7 +582,7 @@ void StandardView::updateScrollBars() { // doItemsLayout(); } - int itemsInViewport = 0; + int itemsInViewport = 0; const int itemsCount = viewItems_.size(); if (itemsCount == 0) diff --git a/Viewer/ecflowUI/src/SuiteFilter.cpp b/Viewer/ecflowUI/src/SuiteFilter.cpp index 5a6f7b4ba..909a603dd 100644 --- a/Viewer/ecflowUI/src/SuiteFilter.cpp +++ b/Viewer/ecflowUI/src/SuiteFilter.cpp @@ -258,7 +258,7 @@ bool SuiteFilter::merge(const SuiteFilter* sf) { std::vector oriItems = items_; - items_ = sf->items_; + items_ = sf->items_; for (auto& oriItem : oriItems) { for (auto& item : items_) { if (item.name_ == oriItem.name_) { diff --git a/Viewer/ecflowUI/src/SuiteFilterObserver.hpp b/Viewer/ecflowUI/src/SuiteFilterObserver.hpp index 54b2ae6cd..818326518 100644 --- a/Viewer/ecflowUI/src/SuiteFilterObserver.hpp +++ b/Viewer/ecflowUI/src/SuiteFilterObserver.hpp @@ -15,8 +15,8 @@ class SuiteFilter; class SuiteFilterObserver { public: - SuiteFilterObserver() = default; - virtual ~SuiteFilterObserver() = default; + SuiteFilterObserver() = default; + virtual ~SuiteFilterObserver() = default; virtual void notifyChange(SuiteFilter*) = 0; virtual void notifyDelete(SuiteFilter*) = 0; diff --git a/Viewer/ecflowUI/src/SuiteItemWidget.cpp b/Viewer/ecflowUI/src/SuiteItemWidget.cpp index 846b387fa..8a60f39aa 100644 --- a/Viewer/ecflowUI/src/SuiteItemWidget.cpp +++ b/Viewer/ecflowUI/src/SuiteItemWidget.cpp @@ -40,7 +40,7 @@ SuiteItemWidget::SuiteItemWidget(QWidget* parent) : QWidget(parent) { setupUi(this); - infoProvider_ = new SuiteProvider(this); + infoProvider_ = new SuiteProvider(this); model_ = new SuiteModel(this); auto* sortModel = new QSortFilterProxyModel(this); diff --git a/Viewer/ecflowUI/src/TableNodeView.cpp b/Viewer/ecflowUI/src/TableNodeView.cpp index e504a0b99..b28447afc 100644 --- a/Viewer/ecflowUI/src/TableNodeView.cpp +++ b/Viewer/ecflowUI/src/TableNodeView.cpp @@ -416,7 +416,7 @@ void TableNodeView::slotHeaderContextMenu(const QPoint& position) { if (varColumn) { varName = header_->model()->headerData(section, Qt::Horizontal).toString(); - ac = new QAction(menu); + ac = new QAction(menu); ac->setText(tr("Change column \'") + varName + "\'"); ac->setData("change"); menu->addAction(ac); @@ -555,7 +555,7 @@ TableNodeHeader::TableNodeHeader(QWidget* parent) : QHeaderView(Qt::Horizontal, connect(this, SIGNAL(sectionResized(int, int, int)), this, SLOT(slotSectionResized(int))); - int pixId = IconProvider::add(":viewer/filter_decor.svg", "filter_decor"); + int pixId = IconProvider::add(":viewer/filter_decor.svg", "filter_decor"); customPix_ = IconProvider::pixmap(pixId, 10); diff --git a/Viewer/ecflowUI/src/TableNodeViewDelegate.cpp b/Viewer/ecflowUI/src/TableNodeViewDelegate.cpp index 552b29d68..158aac762 100644 --- a/Viewer/ecflowUI/src/TableNodeViewDelegate.cpp +++ b/Viewer/ecflowUI/src/TableNodeViewDelegate.cpp @@ -184,7 +184,7 @@ void TableNodeViewDelegate::renderNode(QPainter* painter, // The text rectangle QRect textRect = itemRect; - int textWidth = ViewerUtil::textWidth(fm, text); + int textWidth = ViewerUtil::textWidth(fm, text); textRect.setWidth(textWidth + nodeBox_->leftPadding + nodeBox_->rightPadding); // Adjust the filled rect width diff --git a/Viewer/ecflowUI/src/TextFilterWidget.cpp b/Viewer/ecflowUI/src/TextFilterWidget.cpp index e1bcec488..9c7721e57 100644 --- a/Viewer/ecflowUI/src/TextFilterWidget.cpp +++ b/Viewer/ecflowUI/src/TextFilterWidget.cpp @@ -51,7 +51,7 @@ TextFilterWidget::TextFilterWidget(QWidget* parent) : QWidget(parent) { redBrush_ = ViewerUtil::lineEditRedBg(); greenBrush_ = ViewerUtil::lineEditGreenBg(); - completer_ = new QCompleter(this); + completer_ = new QCompleter(this); le_->setCompleter(completer_); QIcon icon; @@ -132,7 +132,7 @@ void TextFilterWidget::slotFilterEditor() { } void TextFilterWidget::buildMenu(QToolButton* tb) { - auto* menu = new QMenu(tb); + auto* menu = new QMenu(tb); auto* manageAc = new QAction(menu); manageAc->setText(tr("Manage filters ...")); @@ -189,7 +189,7 @@ void TextFilterWidget::buildMenu(QToolButton* tb) { bool matchMode = isMatched(); bool caseSensitive = isCaseSensitive(); - int pos = TextFilterHandler::Instance()->indexOf(filter, matchMode, caseSensitive); + int pos = TextFilterHandler::Instance()->indexOf(filter, matchMode, caseSensitive); if (pos != -1) { TextFilterItem it = TextFilterHandler::Instance()->items()[pos]; @@ -262,7 +262,7 @@ void TextFilterWidget::addMenuSection(QMenu* menu, for (std::size_t i = 0; i < items.size(); i++) { if (data != "s" || items[i].contextMenu()) { - auto* ac = new QAction(this); + auto* ac = new QAction(this); QString txt = QString::fromStdString(items[i].filter()); // Replace whitespace with Open Box U+2423 just for better interpretation diff --git a/Viewer/ecflowUI/src/TextPager/TextPagerCursor.cpp b/Viewer/ecflowUI/src/TextPager/TextPagerCursor.cpp index 2848a6989..131596e02 100644 --- a/Viewer/ecflowUI/src/TextPager/TextPagerCursor.cpp +++ b/Viewer/ecflowUI/src/TextPager/TextPagerCursor.cpp @@ -700,7 +700,7 @@ QString TextPagerCursor::cursorLine() const { int layoutIndex = -1; TextPagerLayout* textLayout = TextLayoutCacheManager::requestLayout(*this, 2); // should I use 1? - QTextLine line = textLayout->lineForPosition(position(), nullptr, &layoutIndex); + QTextLine line = textLayout->lineForPosition(position(), nullptr, &layoutIndex); Q_ASSERT(line.isValid()); // ### could this be legitimate? Q_ASSERT(textLayout); return textLayout->textLayouts.at(layoutIndex)->text().mid(line.textStart(), line.textLength()); diff --git a/Viewer/ecflowUI/src/TextPager/TextPagerEdit.cpp b/Viewer/ecflowUI/src/TextPager/TextPagerEdit.cpp index a8b629520..01ae727c5 100644 --- a/Viewer/ecflowUI/src/TextPager/TextPagerEdit.cpp +++ b/Viewer/ecflowUI/src/TextPager/TextPagerEdit.cpp @@ -214,7 +214,7 @@ void TextPagerEdit::setDocument(TextPagerDocument* doc) { d->textLayouts.clear(); viewport()->setCursor(Qt::IBeamCursor); viewport()->setMouseTracking(true); - d->sectionCount = 0; + d->sectionCount = 0; d->textCursor = TextPagerCursor(doc); d->textCursor.textEdit = this; @@ -361,7 +361,7 @@ void TextPagerEdit::paintEvent(QPaintEvent* e) { p.setFont(font()); QVector selections; selections.reserve(d->extraSelections.size() + 1); - int textLayoutOffset = d->viewportPosition; + int textLayoutOffset = d->viewportPosition; const QTextLayout* cursorLayout = d->cursorVisible ? d->layoutForPosition(d->textCursor.position()) : nullptr; int extraSelectionIndex = 0; @@ -890,7 +890,7 @@ void TextEditPrivate::onDocumentSizeChanged(int /*size*/) { } void TextEditPrivate::adjustVerticalScrollBar() { - int s = findLastPageSize(); + int s = findLastPageSize(); int size = (document != nullptr) ? (document->documentSize()) : 0; @@ -1222,7 +1222,7 @@ void TextEditPrivate::updateScrollBarPosition() { const int req = requestedScrollBarPosition; requestedScrollBarPosition = -1; - Direction direction = Forward; + Direction direction = Forward; if (lastRequestedScrollBarPosition != -1 && lastRequestedScrollBarPosition != req) { if (lastRequestedScrollBarPosition > req) { direction = Backward; @@ -1419,7 +1419,7 @@ void TextEditPrivate::relayout() { int widestOri = widest; - widest = -1; + widest = -1; relayoutByGeometry(s.height()); if (widest == -1) widest = widestOri; @@ -1716,8 +1716,8 @@ void TextPagerEdit::zoomIn() { void TextPagerEdit::zoomOut() { int oriSize = font().pointSize(); - QFont f = font(); - int fps = f.pointSize(); + QFont f = font(); + int fps = f.pointSize(); if (fps > 1) { f.setPointSize(fps - 1); setFont(f); @@ -1781,7 +1781,7 @@ void TextPagerEdit::lineNumberAreaPaintEvent(QPaintEvent* e) { selections.reserve(d->extraSelections.size() + 1); int textLayoutOffset = d->viewportPosition; - QRect numRect = er; + QRect numRect = er; // Background and border painter.fillRect(numRect, lineNumArea_->bgColour()); diff --git a/Viewer/ecflowUI/src/TextPager/TextPagerLayout_p.cpp b/Viewer/ecflowUI/src/TextPager/TextPagerLayout_p.cpp index 7b475bb84..dbac6b504 100644 --- a/Viewer/ecflowUI/src/TextPager/TextPagerLayout_p.cpp +++ b/Viewer/ecflowUI/src/TextPager/TextPagerLayout_p.cpp @@ -92,10 +92,10 @@ int TextPagerLayout::doLayout(int index, QList* sections) // } QList formats = formatMap.values(); - int leftMargin = LeftMargin; - int rightMargin = 0; - int topMargin = 0; - int bottomMargin = 0; + int leftMargin = LeftMargin; + int rightMargin = 0; + int topMargin = 0; + int bottomMargin = 0; Q_FOREACH (SyntaxHighlighter* syntaxHighlighter, syntaxHighlighters) { syntaxHighlighter->d->currentBlockPosition = lineStart; syntaxHighlighter->d->formatRanges.clear(); @@ -125,7 +125,7 @@ int TextPagerLayout::doLayout(int index, QList* sections) // textLayout->beginLayout(); const int lineWidth = viewportWidth() - (leftMargin + rightMargin); - int localWidest = -1; + int localWidest = -1; Q_FOREVER { QTextLine line = textLayout->createLine(); if (!line.isValid()) { @@ -237,7 +237,7 @@ void TextPagerLayout::relayoutByGeometry(int height) { QList l = relayoutCommon(); - const int max = viewportPosition + buffer.size() - bufferOffset(); // in document coordinates + const int max = viewportPosition + buffer.size() - bufferOffset(); // in document coordinates ASSUME(viewportPosition == 0 || bufferReadCharacter(viewportPosition - 1) == '\n'); static const int extraLines = qMax(2, qgetenv("LAZYTEXTEDIT_EXTRA_LINES").toInt()); @@ -276,7 +276,7 @@ void TextPagerLayout::relayoutByPosition(int size) { QList l = relayoutCommon(); - const int max = viewportPosition + qMin(size, buffer.size() - bufferOffset()); + const int max = viewportPosition + qMin(size, buffer.size() - bufferOffset()); Q_ASSERT(viewportPosition == 0 || bufferReadCharacter(viewportPosition - 1) == '\n'); int index = viewportPosition; while (index < max) { diff --git a/Viewer/ecflowUI/src/TextPager/TextPagerSearchInterface.cpp b/Viewer/ecflowUI/src/TextPager/TextPagerSearchInterface.cpp index 3a0cf413d..eefc24c91 100644 --- a/Viewer/ecflowUI/src/TextPager/TextPagerSearchInterface.cpp +++ b/Viewer/ecflowUI/src/TextPager/TextPagerSearchInterface.cpp @@ -77,7 +77,7 @@ bool TextPagerSearchInterface::findString(QString str, if (flags & QTextDocument::FindWholeWords) mode |= TextPagerDocument::FindWholeWords; - bool found = false; + bool found = false; Qt::CaseSensitivity cs = (flags & QTextDocument::FindCaseSensitively) ? Qt::CaseSensitive : Qt::CaseInsensitive; diff --git a/Viewer/ecflowUI/src/TimelineFileList.cpp b/Viewer/ecflowUI/src/TimelineFileList.cpp index dc0d6d5c1..0448c1c8f 100644 --- a/Viewer/ecflowUI/src/TimelineFileList.cpp +++ b/Viewer/ecflowUI/src/TimelineFileList.cpp @@ -78,7 +78,7 @@ void TimelineFileList::add(QString logFileIn) { // get the last time QFileInfo fInfo(logFile); - size_t fSize = fInfo.size(); + size_t fSize = fInfo.size(); unsigned int startTime = 0; unsigned int endTime = 0; diff --git a/Viewer/ecflowUI/src/TimelineHeaderView.cpp b/Viewer/ecflowUI/src/TimelineHeaderView.cpp index df5e6584f..31f4b6782 100644 --- a/Viewer/ecflowUI/src/TimelineHeaderView.cpp +++ b/Viewer/ecflowUI/src/TimelineHeaderView.cpp @@ -75,9 +75,9 @@ TimelineHeader::TimelineHeader(QTreeView* view) gr.setColorAt(1, bg1); timelineBrush_ = QBrush(gr); - font_ = QFont(); + font_ = QFont(); font_.setPointSize(font_.pointSize() - 2); - fm_ = QFontMetrics(font_); + fm_ = QFontMetrics(font_); zoomCursor_ = QCursor(QPixmap(":/viewer/cursor_zoom.svg")); } @@ -479,15 +479,15 @@ void MainTimelineHeader::renderTimeline(const QRect& rect, QPainter* painter, in int w = sectionSize(logicalIndex); // period in secs - qint64 startSec = startDate_.toMSecsSinceEpoch() / 1000; - qint64 endSec = endDate_.toMSecsSinceEpoch() / 1000; - qint64 period = endSec - startSec; + qint64 startSec = startDate_.toMSecsSinceEpoch() / 1000; + qint64 endSec = endDate_.toMSecsSinceEpoch() / 1000; + qint64 period = endSec - startSec; int minorTick = 1; // in secs (it is a delta) int majorTick = 1; // in secs (it is a delta) qint64 firstTick = 1; // in secs since epoch - int hLineY = pRect.center().y() - majorTickSize_ / 2 - 1; + int hLineY = pRect.center().y() - majorTickSize_ / 2 - 1; // int timeTextGap=3; //the gap between the top of the time text and the bottom of the major tick in pixels int majorTickTop = hLineY; int majorTickBottom = hLineY + majorTickSize_; // pRect.bottom()-fm_.height()-timeTextGap; @@ -496,8 +496,8 @@ void MainTimelineHeader::renderTimeline(const QRect& rect, QPainter* painter, in int dateTextY = hLineY - (hLineY - pRect.y() - fm_.height()) / 2 - fm_.height() + 1; int timeTextY = majorTickBottom + (pRect.bottom() - majorTickBottom - fm_.height()) / 2 - 1; - int timeItemW = ViewerUtil::textWidth(fm_, "223:442"); - int dateItemW = ViewerUtil::textWidth(fm_, "2229 May22"); + int timeItemW = ViewerUtil::textWidth(fm_, "223:442"); + int dateItemW = ViewerUtil::textWidth(fm_, "2229 May22"); QList majorTickSec; @@ -833,13 +833,13 @@ void NodeTimelineHeader::renderTimeline(const QRect& rect, QPainter* painter, in int w = sectionSize(logicalIndex); // period in secs - qint64 startSec = startTime_.msecsSinceStartOfDay() / 1000; - qint64 endSec = endTime_.msecsSinceStartOfDay() / 1000; - qint64 period = endSec - startSec; + qint64 startSec = startTime_.msecsSinceStartOfDay() / 1000; + qint64 endSec = endTime_.msecsSinceStartOfDay() / 1000; + qint64 period = endSec - startSec; - int minorTick = 1; // in secs (it is a delta) - int majorTick = 1; // in secs (it is a delta) - qint64 firstTick = 1; // in secs since epoch + int minorTick = 1; // in secs (it is a delta) + int majorTick = 1; // in secs (it is a delta) + qint64 firstTick = 1; // in secs since epoch int hLineY = pRect.center().y() - majorTickSize_ / 2 - 1; int majorTickTop = hLineY; @@ -848,7 +848,7 @@ void NodeTimelineHeader::renderTimeline(const QRect& rect, QPainter* painter, in int minorTickBottom = majorTickBottom - 3; int timeTextY = majorTickBottom + (pRect.bottom() - majorTickBottom - fm_.height()) / 2 - 1; - int timeItemW = ViewerUtil::textWidth(fm_, "223:442"); + int timeItemW = ViewerUtil::textWidth(fm_, "223:442"); QList majorTickSec; diff --git a/Viewer/ecflowUI/src/TimelineInfoDailyView.cpp b/Viewer/ecflowUI/src/TimelineInfoDailyView.cpp index 9c43f47ba..f97131f6f 100644 --- a/Viewer/ecflowUI/src/TimelineInfoDailyView.cpp +++ b/Viewer/ecflowUI/src/TimelineInfoDailyView.cpp @@ -285,9 +285,9 @@ void TimelineInfoDailyDelegate::renderTimeline(QPainter* painter, // bool selected=option.state & QStyle::State_Selected; - int leftEdge = option.rect.x(); - int rightEdge = option.rect.x() + option.rect.width(); - int extendedRight = -1; + int leftEdge = option.rect.x(); + int rightEdge = option.rect.x() + option.rect.width(); + int extendedRight = -1; unsigned int day = index.data().toUInt(); unsigned int sDate = day + startTime_.msecsSinceStartOfDay() / 1000; @@ -458,7 +458,7 @@ int TimelineInfoDailyDelegate::timeToPos(QRect r, unsigned int time) const { unsigned int start = startTime_.msecsSinceStartOfDay() / 1000; unsigned int end = endTime_.msecsSinceStartOfDay() / 1000; - time = time % 86400; + time = time % 86400; if (time < start) return r.x() - 2; diff --git a/Viewer/ecflowUI/src/TimelineView.cpp b/Viewer/ecflowUI/src/TimelineView.cpp index 9823625eb..6fb651724 100644 --- a/Viewer/ecflowUI/src/TimelineView.cpp +++ b/Viewer/ecflowUI/src/TimelineView.cpp @@ -174,10 +174,10 @@ void TimelineDelegate::renderTimeline(QPainter* painter, const QStyleOptionViewI if (!data) return; - int leftEdge = option.rect.x(); - int rightEdge = option.rect.x() + option.rect.width(); - int xpPrev = leftEdge - 2; - int xpNext = rightEdge + 2; + int leftEdge = option.rect.x(); + int rightEdge = option.rect.x() + option.rect.width(); + int xpPrev = leftEdge - 2; + int xpNext = rightEdge + 2; const TimelineItem& item = data->items()[row]; int extendedRight = -1; @@ -550,8 +550,8 @@ void TimelineDelegate::setPeriod(QDateTime t1, QDateTime t2) { } void TimelineDelegate::setMaxDurations(int submittedDuration, int activeDuration) { - submittedMaxDuration_ = submittedDuration; - activeMaxDuration_ = activeDuration; + submittedMaxDuration_ = submittedDuration; + activeMaxDuration_ = activeDuration; submittedMaxTextWidth_ = getDurationMaxTextWidth(submittedMaxDuration_); activeMaxTextWidth_ = getDurationMaxTextWidth(activeMaxDuration_); @@ -775,7 +775,7 @@ void TimelineView::handleContextMenu(QModelIndex indexClicked, auto* menu = new QMenu(this); - auto* ac = new QAction(this); + auto* ac = new QAction(this); ac->setText(tr("Show details")); QFont fBold; fBold.setBold(true); diff --git a/Viewer/ecflowUI/src/TreeNodeModel.cpp b/Viewer/ecflowUI/src/TreeNodeModel.cpp index 1e9eaee33..60f1065a6 100644 --- a/Viewer/ecflowUI/src/TreeNodeModel.cpp +++ b/Viewer/ecflowUI/src/TreeNodeModel.cpp @@ -413,7 +413,7 @@ QModelIndex TreeNodeModel::parent(const QModelIndex& child) const { Q_ASSERT(root); row = root->indexOfChild(parentNode); Q_ASSERT(row >= 0); - VTreeServer* ts = root->server(); + VTreeServer* ts = root->server(); int serverAttrNum = root->attrNum(atts_); return createIndex(serverAttrNum + row, 0, ts); @@ -858,7 +858,7 @@ void TreeNodeModel::selectionChanged(QModelIndexList lst) { if (lst.count() > 0) { QModelIndex idx = lst.back(); - VInfo_ptr info = nodeInfo(idx); + VInfo_ptr info = nodeInfo(idx); setForceShow(info); } diff --git a/Viewer/ecflowUI/src/TreeNodeView.cpp b/Viewer/ecflowUI/src/TreeNodeView.cpp index e1942c07f..c6b0b9376 100644 --- a/Viewer/ecflowUI/src/TreeNodeView.cpp +++ b/Viewer/ecflowUI/src/TreeNodeView.cpp @@ -88,7 +88,7 @@ TreeNodeView::TreeNodeView(AbstractNodeView* view, TreeNodeModel* model, NodeFil propVec.emplace_back("view.tree.nodeToolTip"); propVec.emplace_back("view.tree.attributeToolTip"); - prop_ = new PropertyMapper(propVec, this); + prop_ = new PropertyMapper(propVec, this); VProperty* prop = nullptr; std::string propName; diff --git a/Viewer/ecflowUI/src/TreeNodeViewDelegate.cpp b/Viewer/ecflowUI/src/TreeNodeViewDelegate.cpp index 65edc4ece..43a74d561 100644 --- a/Viewer/ecflowUI/src/TreeNodeViewDelegate.cpp +++ b/Viewer/ecflowUI/src/TreeNodeViewDelegate.cpp @@ -93,8 +93,8 @@ class TreeNodeDelegateBox : public NodeDelegateBox { sizeHintCache = QSize(100, fullHeight); spacing = ViewerUtil::textWidth(fm, 'A') * 3 / 4; - auto h = static_cast(static_cast(fm.height()) * 0.7); - iconSize = h; + auto h = static_cast(static_cast(fm.height()) * 0.7); + iconSize = h; if (iconSize % 2 == 1) iconSize += 1; @@ -143,13 +143,13 @@ class TreeAttrDelegateBox : public AttrDelegateBox { textBottomCorrection = fm.bottomPaddingForCentre(); fontHeight = fm.height(); - height = realFontHeight + topPadding + bottomPadding; - fullHeight = height + topMargin + bottomMargin; - sizeHintCache = QSize(100, fullHeight); - spacing = ViewerUtil::textWidth(fm, 'A') * 3 / 4; + height = realFontHeight + topPadding + bottomPadding; + fullHeight = height + topMargin + bottomMargin; + sizeHintCache = QSize(100, fullHeight); + spacing = ViewerUtil::textWidth(fm, 'A') * 3 / 4; - int h = static_cast(static_cast(fm.height()) * 0.7); - iconSize = h; + int h = static_cast(static_cast(fm.height()) * 0.7); + iconSize = h; if (iconSize % 2 == 1) iconSize += 1; @@ -181,12 +181,12 @@ class TreeAttrDelegateBox : public AttrDelegateBox { }; TreeNodeViewDelegate::TreeNodeViewDelegate(TreeNodeModel* model, QWidget* parent) : model_(model) { - nodeBox_ = new TreeNodeDelegateBox; - attrBox_ = new TreeAttrDelegateBox; + nodeBox_ = new TreeNodeDelegateBox; + attrBox_ = new TreeAttrDelegateBox; drawAttrSelectionRect_ = true; - attrFont_ = font_; + attrFont_ = font_; attrFont_.setPointSize(8); serverInfoFont_ = font_; suiteNumFont_ = font_; @@ -308,7 +308,7 @@ QSize TreeNodeViewDelegate::sizeHint(const QStyleOptionViewItem&, const QModelIn void TreeNodeViewDelegate::sizeHintCompute(const QModelIndex& index, int& w, int& h, bool compAttrWidth) const { QVariant tVar = index.data(Qt::DisplayRole); - h = nodeBox_->fullHeight; + h = nodeBox_->fullHeight; // For nodes we compute the exact size of visual rect #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) @@ -540,7 +540,7 @@ int TreeNodeViewDelegate::renderServer(QPainter* painter, if (hasInfo) { // infoFont.setBold(true); - fm = QFontMetrics(serverInfoFont_); + fm = QFontMetrics(serverInfoFont_); int infoWidth = ViewerUtil::textWidth(fm, infoTxt); infoRect = nodeText.br_; @@ -556,9 +556,9 @@ int TreeNodeViewDelegate::renderServer(QPainter* painter, // Update load animation if (hasLoad) { - an = animation_->find(Animation::ServerLoadType, true); + an = animation_->find(Animation::ServerLoadType, true); - loadRect = QRect(currentRight + ViewerUtil::textWidth(fm, 'A'), + loadRect = QRect(currentRight + ViewerUtil::textWidth(fm, 'A'), itemRect.top() + (itemRect.height() - an->scaledSize().height()) / 2, an->scaledSize().width(), an->scaledSize().height()); @@ -804,8 +804,8 @@ int TreeNodeViewDelegate::renderNode(QPainter* painter, stateShape.shape_ = QPolygon(r1); currentRight = r1.x() + r1.width(); - nodeText.br_ = QRect(r1.left() + nodeBox_->leftPadding, r1.top(), textWidth, r1.height()); - nodeText.fgCol_ = index.data(Qt::ForegroundRole).value(); + nodeText.br_ = QRect(r1.left() + nodeBox_->leftPadding, r1.top(), textWidth, r1.height()); + nodeText.fgCol_ = index.data(Qt::ForegroundRole).value(); if (hasRealBg) { int realW = 6; @@ -1134,7 +1134,7 @@ void TreeNodeViewDelegate::renderServerUpdate(QPainter* painter, const ServerUpd QColor minCol = QColor(198, 215, 253); QColor maxCol = QColor(43, 97, 158); - QRect r1 = data.br_; + QRect r1 = data.br_; r1.setWidth(ViewerUtil::textWidth(fm, data.prevText_)); painter->setPen(minCol); // painter->setPen(Qt::red); @@ -1147,8 +1147,8 @@ void TreeNodeViewDelegate::renderServerUpdate(QPainter* painter, const ServerUpd painter->setPen(maxCol); painter->drawText(r2, Qt::AlignRight | Qt::AlignVCenter, data.nextText_); - int dh = (data.br_.height() - fm.height() + 1) / 2; - QRect r = data.br_.adjusted(r1.width() + 4, 2 * dh, -r2.width() - 4, -2 * dh); + int dh = (data.br_.height() - fm.height() + 1) / 2; + QRect r = data.br_.adjusted(r1.width() + 4, 2 * dh, -r2.width() - 4, -2 * dh); auto pos = static_cast(data.prog_ * r.width()); QRect rPrev = r.adjusted(0, 0, -(r.width() - pos), 0); @@ -1255,7 +1255,7 @@ int TreeNodeViewDelegate::nodeWidth(const QModelIndex& index, int height, QStrin QRect itemRect(offset, 0, 10, height - (nodeBox_->topMargin + nodeBox_->bottomMargin)); int currentRight = itemRect.left(); - bool hasRealBg = node->isSuspended(); + bool hasRealBg = node->isSuspended(); // Node type QFontMetrics fmType(typeFont_); diff --git a/Viewer/ecflowUI/src/TreeNodeWidget.cpp b/Viewer/ecflowUI/src/TreeNodeWidget.cpp index bc5d85a05..8fbdb2553 100644 --- a/Viewer/ecflowUI/src/TreeNodeWidget.cpp +++ b/Viewer/ecflowUI/src/TreeNodeWidget.cpp @@ -106,7 +106,7 @@ void TreeNodeWidget::setViewLayoutMode(TreeNodeWidget::ViewLayoutMode mode) { if (viewLayoutMode_ == CompactLayoutMode) { auto* realModel = static_cast(model_); - auto* gv = new TreeNodeView(new CompactView(realModel, this), realModel, filterDef_, this); + auto* gv = new TreeNodeView(new CompactView(realModel, this), realModel, filterDef_, this); viewHolder_->layout()->addWidget(gv->realWidget()); // Store the pointer to the (non-QObject) base class of the view!!! view_ = gv; @@ -114,7 +114,7 @@ void TreeNodeWidget::setViewLayoutMode(TreeNodeWidget::ViewLayoutMode mode) { else { auto* realModel = static_cast(model_); - auto* tv = new TreeNodeView(new StandardView(realModel, this), realModel, filterDef_, this); + auto* tv = new TreeNodeView(new StandardView(realModel, this), realModel, filterDef_, this); viewHolder_->layout()->addWidget(tv->realWidget()); // Store the pointer to the (non-QObject) base class of the view!!! view_ = tv; diff --git a/Viewer/ecflowUI/src/TriggerEditor.cpp b/Viewer/ecflowUI/src/TriggerEditor.cpp index 7c93efcdb..81427f11b 100644 --- a/Viewer/ecflowUI/src/TriggerEditor.cpp +++ b/Viewer/ecflowUI/src/TriggerEditor.cpp @@ -52,7 +52,7 @@ TriggerEditor::TriggerEditor(VInfo_ptr info, QWidget* parent) : AttributeEditor( QString txt = data[2]; - oriText_ = txt; + oriText_ = txt; w_->te_->setPlainText(txt); QString typeInHeader; diff --git a/Viewer/ecflowUI/src/TriggerGraphLayoutBuilder.cpp b/Viewer/ecflowUI/src/TriggerGraphLayoutBuilder.cpp index d3962fc42..a8e3ee6e3 100644 --- a/Viewer/ecflowUI/src/TriggerGraphLayoutBuilder.cpp +++ b/Viewer/ecflowUI/src/TriggerGraphLayoutBuilder.cpp @@ -104,7 +104,7 @@ int SimpleGraphLayoutBuilder::compute_level(SimpleGraphLayoutNode* item) { item->visited_ = true; - int lvl = 0; + int lvl = 0; for (auto i : item->parents_) { auto p = nodes_[i]; if (p->managed_) { @@ -265,11 +265,11 @@ void SimpleGraphLayoutBuilder::printState(const std::vector& nodes) { } void SimpleGraphLayoutBuilder::buildIt(bool dummy) { - int H_DIST = 10; - int V_DIST = 10; - int max_in_a_level = 0; - int max_level = 0; - int levelNum = 0; + int H_DIST = 10; + int V_DIST = 10; + int max_in_a_level = 0; + int max_level = 0; + int levelNum = 0; SimpleGraphLayoutNode* focus = nullptr; @@ -340,7 +340,7 @@ void SimpleGraphLayoutBuilder::buildIt(bool dummy) { max_level = item->level_; } - levelNum = std::max(levelNum, item->level_); + levelNum = std::max(levelNum, item->level_); widths[item->level_] = std::max(widths[item->level_], item->width_); heights[item->level_] = std::max(heights[item->level_], item->height_); @@ -446,7 +446,7 @@ void SimpleGraphLayoutBuilder::buildIt(bool dummy) { return nodes_[idx1]->y_ < nodes_[idx2]->y_; }); - move_it = !move_it; + move_it = !move_it; bool chg = true; int a = 10000; diff --git a/Viewer/ecflowUI/src/TriggerGraphView.cpp b/Viewer/ecflowUI/src/TriggerGraphView.cpp index bbbcdc72f..a5a6b84fb 100644 --- a/Viewer/ecflowUI/src/TriggerGraphView.cpp +++ b/Viewer/ecflowUI/src/TriggerGraphView.cpp @@ -113,7 +113,7 @@ QRectF TriggerGraphNodeItem::boundingRect() const { void TriggerGraphNodeItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* /*option*/, QWidget* /*widget*/) { // Init style option QStyleOptionViewItem opt; - opt.rect = bRect_.toRect(); + opt.rect = bRect_.toRect(); QModelIndex idx = view_->model()->index(index_, 0); view_->delegate()->paint(painter, opt, idx); @@ -444,7 +444,7 @@ void TriggerGraphEdgeInfoDialog::setInfo(TriggerGraphEdgeItem* e) { QString TriggerGraphEdgeInfoDialog::makeHtml(TriggerGraphEdgeItem* e) const { QString s = ""; - VItem* t = e->from_->item(); + VItem* t = e->from_->item(); makeRow("from", t, s); t = e->to_->item(); diff --git a/Viewer/ecflowUI/src/VConfig.cpp b/Viewer/ecflowUI/src/VConfig.cpp index 103014f39..1c024139c 100644 --- a/Viewer/ecflowUI/src/VConfig.cpp +++ b/Viewer/ecflowUI/src/VConfig.cpp @@ -149,7 +149,7 @@ void VConfig::loadProperty(const boost::property_tree::ptree& pt, VProperty* pro else if (name == "line" && ptProp.empty()) { auto* chProp = new VProperty(name); prop->addChild(chProp); - auto val = ptProp.get_value(); + auto val = ptProp.get_value(); QString prefix = prop->param("prefix"); if (!prefix.isEmpty()) @@ -249,8 +249,8 @@ VProperty* VConfig::cloneServerGui(VProperty* linkTarget) { // Saves the global settings that can be edited through the gui void VConfig::saveSettings() { - SessionItem* cs = SessionHandler::instance()->current(); - std::string fName = cs->settingsFile(); + SessionItem* cs = SessionHandler::instance()->current(); + std::string fName = cs->settingsFile(); VProperty* guiProp = group("gui"); @@ -296,7 +296,7 @@ void VConfig::loadSettings() { SessionItem* cs = SessionHandler::instance()->current(); std::string parFile = cs->settingsFile(); - VProperty* guiProp = group("gui"); + VProperty* guiProp = group("gui"); loadSettings(parFile, guiProp, true); } diff --git a/Viewer/ecflowUI/src/VConfigLoader.cpp b/Viewer/ecflowUI/src/VConfigLoader.cpp index 1f5ef6aa8..b34710464 100644 --- a/Viewer/ecflowUI/src/VConfigLoader.cpp +++ b/Viewer/ecflowUI/src/VConfigLoader.cpp @@ -12,7 +12,7 @@ #include -using Map = std::multimap; +using Map = std::multimap; static Map* makers = nullptr; @@ -31,7 +31,7 @@ bool VConfigLoader::process(const std::string& name, VProperty* prop) { Map::size_type entries = makers->count(name); auto it = makers->find(name); - bool retVal = false; + bool retVal = false; for (Map::size_type cnt = 0; cnt != entries; ++cnt, ++it) { (*it).second->load(prop); retVal = true; diff --git a/Viewer/ecflowUI/src/VDateAttr.cpp b/Viewer/ecflowUI/src/VDateAttr.cpp index c0a6a848c..d119d2d84 100644 --- a/Viewer/ecflowUI/src/VDateAttr.cpp +++ b/Viewer/ecflowUI/src/VDateAttr.cpp @@ -111,7 +111,7 @@ void VDateAttr::scan(VNode* vnode, std::vector& vec) { const std::vector& dateV = vnode->node_->dates(); const std::vector& dayV = vnode->node_->days(); - auto n = static_cast(dateV.size()); + auto n = static_cast(dateV.size()); for (int i = 0; i < n; i++) { vec.push_back(new VDateAttr(vnode, dateV[i], i)); } diff --git a/Viewer/ecflowUI/src/VDir.cpp b/Viewer/ecflowUI/src/VDir.cpp index b01812bc4..83f7f6d2b 100644 --- a/Viewer/ecflowUI/src/VDir.cpp +++ b/Viewer/ecflowUI/src/VDir.cpp @@ -50,8 +50,8 @@ void VDir::addItem(const std::string& name, unsigned int size, unsigned int mtim // std::string dirName=p.parent_path().string(); std::string fileName = p.leaf().string(); - item->name_ = fileName; - item->size_ = size; + item->name_ = fileName; + item->size_ = size; #if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) item->mtime_ = QDateTime::fromSecsSinceEpoch(mtime); #else @@ -71,7 +71,7 @@ void VDir::reload() { BOOST_FOREACH (boost::filesystem::path const& p, std::make_pair(it, eod)) { if (is_regular_file(p) && ecf::algorithm::starts_with(p.filename().string(), pattern_)) { - auto* item = new VDirItem; + auto* item = new VDirItem; item->name_ = p.filename().string(); item->size_ = boost::filesystem::file_size(p); diff --git a/Viewer/ecflowUI/src/VFileInfo.cpp b/Viewer/ecflowUI/src/VFileInfo.cpp index eecd3ff5d..f2d7a30e3 100644 --- a/Viewer/ecflowUI/src/VFileInfo.cpp +++ b/Viewer/ecflowUI/src/VFileInfo.cpp @@ -62,9 +62,9 @@ QString VFileInfo::formatDate(const std::time_t& t) { QString VFileInfo::formatDateAgo(const std::time_t& t) { QString str = QObject::tr("Right now"); - time_t now = time(nullptr); + time_t now = time(nullptr); - int delta = now - t; + int delta = now - t; if (delta < 0) delta = 0; diff --git a/Viewer/ecflowUI/src/VFileTransfer.cpp b/Viewer/ecflowUI/src/VFileTransfer.cpp index 4aa81313e..f48ea8d13 100644 --- a/Viewer/ecflowUI/src/VFileTransfer.cpp +++ b/Viewer/ecflowUI/src/VFileTransfer.cpp @@ -367,7 +367,7 @@ QString VFileTransfer::buildCommand() { QString proxyJump = buildSocksProxyJump(); - QString command = scriptName_; + QString command = scriptName_; if (useMetaData_) { command += " -m file_md "; @@ -556,9 +556,9 @@ void VDirTransfer::transferLocalViaSocks(QString sourceFile) { QString VDirTransfer::buildCommand() { QString proxyJump = buildSocksProxyJump(); - auto targetFile = QString::fromStdString(fResult_->path()); + auto targetFile = QString::fromStdString(fResult_->path()); - QString command = scriptName_ + " -m dir -s \'" + sourceFile_ + "\' -t " + " \'" + targetFile + "\' "; + QString command = scriptName_ + " -m dir -s \'" + sourceFile_ + "\' -t " + " \'" + targetFile + "\' "; if (proxyJump != "__NOJUMP__" && !proxyJump.isEmpty()) { command += " -j " + proxyJump; diff --git a/Viewer/ecflowUI/src/VFilter.cpp b/Viewer/ecflowUI/src/VFilter.cpp index 5c9444da4..3a7ed8cb8 100644 --- a/Viewer/ecflowUI/src/VFilter.cpp +++ b/Viewer/ecflowUI/src/VFilter.cpp @@ -42,7 +42,7 @@ VParamSet::VParamSet() = default; void VParamSet::init(const std::vector& items) { - all_ = items; + all_ = items; int maxId = 0; for (std::vector::const_iterator it = all_.begin(); it != all_.end(); ++it) { diff --git a/Viewer/ecflowUI/src/VInfo.hpp b/Viewer/ecflowUI/src/VInfo.hpp index abe95a9e7..c5e7ab727 100644 --- a/Viewer/ecflowUI/src/VInfo.hpp +++ b/Viewer/ecflowUI/src/VInfo.hpp @@ -55,8 +55,8 @@ class VInfo : public ServerObserver { VAttribute* attribute() const { return attr_; } virtual VItem* item() const = 0; - virtual std::string name() = 0; - virtual std::string path() = 0; + virtual std::string name() = 0; + virtual std::string path() = 0; virtual std::string serverAlias() { return ""; } virtual std::string relativePath() { return ""; } virtual std::string nodePath() = 0; @@ -164,8 +164,8 @@ typedef std::shared_ptr VInfoAttribute_ptr; class VInfoVisitor { public: - VInfoVisitor() = default; - virtual ~VInfoVisitor() = default; + VInfoVisitor() = default; + virtual ~VInfoVisitor() = default; virtual void visit(VInfoServer*) = 0; virtual void visit(VInfoNode*) = 0; @@ -174,8 +174,8 @@ class VInfoVisitor { class VInfoObserver { public: - VInfoObserver() = default; - virtual ~VInfoObserver() = default; + VInfoObserver() = default; + virtual ~VInfoObserver() = default; virtual void notifyDataLost(VInfo*) = 0; virtual void notifyDelete(VInfo*) = 0; diff --git a/Viewer/ecflowUI/src/VModelData.cpp b/Viewer/ecflowUI/src/VModelData.cpp index 218a48cc2..75b1c17b7 100644 --- a/Viewer/ecflowUI/src/VModelData.cpp +++ b/Viewer/ecflowUI/src/VModelData.cpp @@ -224,8 +224,8 @@ void VTreeServer::notifyBeginNodeChange(const VNode* vnode, VTreeNode* node = tree_->find(vnode); - bool attrNumCh = (std::find(aspect.begin(), aspect.end(), ecf::Aspect::ADD_REMOVE_ATTR) != aspect.end()); - bool nodeNumCh = (std::find(aspect.begin(), aspect.end(), ecf::Aspect::ADD_REMOVE_NODE) != aspect.end()); + bool attrNumCh = (std::find(aspect.begin(), aspect.end(), ecf::Aspect::ADD_REMOVE_ATTR) != aspect.end()); + bool nodeNumCh = (std::find(aspect.begin(), aspect.end(), ecf::Aspect::ADD_REMOVE_NODE) != aspect.end()); #ifdef _UI_VMODELDATA_DEBUG UiLogS(server_).dbg() << " node=" << vnode->strName(); @@ -1351,7 +1351,7 @@ void VTreeModelData::add(ServerHandler* server) { VModelServer* d = nullptr; - d = new VTreeServer(server, filterDef_, attrFilter_); + d = new VTreeServer(server, filterDef_, attrFilter_); connectToModel(d); @@ -1401,7 +1401,7 @@ void VTableModelData::add(ServerHandler* server) { VModelServer* d = nullptr; - d = new VTableServer(server, filterDef_); + d = new VTableServer(server, filterDef_); connectToModel(d); diff --git a/Viewer/ecflowUI/src/VNState.cpp b/Viewer/ecflowUI/src/VNState.cpp index 971052d68..2f4577e8d 100644 --- a/Viewer/ecflowUI/src/VNState.cpp +++ b/Viewer/ecflowUI/src/VNState.cpp @@ -89,7 +89,7 @@ VNState* VNState::toRealState(const VNode* n) { node_ptr node = n->node(); - auto it = stateMap_.find(node->state()); + auto it = stateMap_.find(node->state()); if (it != stateMap_.end()) return it->second; @@ -100,7 +100,7 @@ VNState* VNState::toDefaultState(const VNode* n) { if (!n || !n->node()) return nullptr; - node_ptr node = n->node(); + node_ptr node = n->node(); const char* dStateName = DState::toString(node->defStatus()); assert(dStateName); diff --git a/Viewer/ecflowUI/src/VNode.cpp b/Viewer/ecflowUI/src/VNode.cpp index 8767004fb..c33bac281 100644 --- a/Viewer/ecflowUI/src/VNode.cpp +++ b/Viewer/ecflowUI/src/VNode.cpp @@ -1160,7 +1160,7 @@ void VServer::clear() { assert(totalNum_ == 0); // Deallocate the nodes vector - nodes_ = std::vector(); + nodes_ = std::vector(); triggeredScanned_ = false; } diff --git a/Viewer/ecflowUI/src/VParam.cpp b/Viewer/ecflowUI/src/VParam.cpp index 7ef0dfa21..4612c98e4 100644 --- a/Viewer/ecflowUI/src/VParam.cpp +++ b/Viewer/ecflowUI/src/VParam.cpp @@ -30,7 +30,7 @@ VParam::~VParam() { } void VParam::setProperty(VProperty* prop) { - prop_ = prop; + prop_ = prop; label_ = prop->param("label"); diff --git a/Viewer/ecflowUI/src/VProperty.cpp b/Viewer/ecflowUI/src/VProperty.cpp index e93920599..2068d6ed7 100644 --- a/Viewer/ecflowUI/src/VProperty.cpp +++ b/Viewer/ecflowUI/src/VProperty.cpp @@ -160,7 +160,7 @@ void VProperty::setValue(QVariant val) { bool changed = (value_ != val); - value_ = val; + value_ = val; if (changed) dispatchChange(); @@ -408,7 +408,7 @@ void VProperty::setUseMaster(bool b) { } VProperty* VProperty::clone(bool addLink, bool setMaster, bool useMaster) { - auto* cp = new VProperty(strName_); + auto* cp = new VProperty(strName_); cp->value_ = value_; cp->defaultValue_ = defaultValue_; diff --git a/Viewer/ecflowUI/src/VProperty.hpp b/Viewer/ecflowUI/src/VProperty.hpp index af387c0a2..271787aa7 100644 --- a/Viewer/ecflowUI/src/VProperty.hpp +++ b/Viewer/ecflowUI/src/VProperty.hpp @@ -22,8 +22,8 @@ class VProperty; class VPropertyObserver { public: - VPropertyObserver() = default; - virtual ~VPropertyObserver() = default; + VPropertyObserver() = default; + virtual ~VPropertyObserver() = default; virtual void notifyChange(VProperty*) = 0; }; diff --git a/Viewer/ecflowUI/src/VRepeatAttr.cpp b/Viewer/ecflowUI/src/VRepeatAttr.cpp index 1acc15fc3..08105e7e0 100644 --- a/Viewer/ecflowUI/src/VRepeatAttr.cpp +++ b/Viewer/ecflowUI/src/VRepeatAttr.cpp @@ -247,8 +247,8 @@ int VRepeatDateAttr::endIndex() const { long jStart = ecf_repeat_date_to_julian(r.start()); long jEnd = ecf_repeat_date_to_julian(r.end()); - int index = (jEnd - jStart) / r.step(); - long val = jStart + index * r.step(); + int index = (jEnd - jStart) / r.step(); + long val = jStart + index * r.step(); while (val > jEnd && index >= 1) { index--; val = jStart + index * r.step(); @@ -357,8 +357,8 @@ QString VRepeatDateListAttr::allValues() const { if (node_ptr node = parent_->node()) { const Repeat& r = node->repeat(); - int start = 0; - int end = endIndex(); + int start = 0; + int end = endIndex(); if (end <= start) { return {}; diff --git a/Viewer/ecflowUI/src/VServerSettings.cpp b/Viewer/ecflowUI/src/VServerSettings.cpp index ef72a5494..c00e39f83 100644 --- a/Viewer/ecflowUI/src/VServerSettings.cpp +++ b/Viewer/ecflowUI/src/VServerSettings.cpp @@ -33,48 +33,48 @@ VProperty* VServerSettings::globalProp_ = nullptr; VServerSettings::VServerSettings(ServerHandler* server) : server_(server), prop_(nullptr), guiProp_(nullptr) { if (parNames_.empty()) { - parNames_[AutoUpdate] = "server.update.autoUpdate"; - parNames_[UpdateRate] = "server.update.updateRateInSec"; - parNames_[AdaptiveUpdate] = "server.update.adaptiveUpdate"; - parNames_[AdaptiveUpdateIncrement] = "server.update.adaptiveUpdateIncrementInSec"; - parNames_[MaxAdaptiveUpdateRate] = "server.update.maxAdaptiveUpdateRateInMin"; - parNames_[AdaptiveUpdateMode] = "server.update.adaptiveUpdateMode"; - - parNames_[MaxOutputFileLines] = "server.files.maxOutputFileLines"; - parNames_[ReadFromDisk] = "server.files.readFilesFromDisk"; - parNames_[UserLogServerHost] = "server.files.logServerHost"; - parNames_[UserLogServerPort] = "server.files.logServerPort"; + parNames_[AutoUpdate] = "server.update.autoUpdate"; + parNames_[UpdateRate] = "server.update.updateRateInSec"; + parNames_[AdaptiveUpdate] = "server.update.adaptiveUpdate"; + parNames_[AdaptiveUpdateIncrement] = "server.update.adaptiveUpdateIncrementInSec"; + parNames_[MaxAdaptiveUpdateRate] = "server.update.maxAdaptiveUpdateRateInMin"; + parNames_[AdaptiveUpdateMode] = "server.update.adaptiveUpdateMode"; + + parNames_[MaxOutputFileLines] = "server.files.maxOutputFileLines"; + parNames_[ReadFromDisk] = "server.files.readFilesFromDisk"; + parNames_[UserLogServerHost] = "server.files.logServerHost"; + parNames_[UserLogServerPort] = "server.files.logServerPort"; parNames_[NodeMenuMode] = "server.menu.nodeMenuMode"; parNames_[NodeMenuModeForDefStatus] = "server.menu.defStatusMenuModeControl"; parNames_[UidForServerLogTransfer] = "server.files.uidForServerLogTransfer"; parNames_[MaxSizeForTimelineData] = "server.files.maxSizeForTimelineData"; - parNames_[NotifyAbortedEnabled] = "server.notification.aborted.enabled"; - parNames_[NotifyAbortedPopup] = "server.notification.aborted.popup"; - parNames_[NotifyAbortedSound] = "server.notification.aborted.sound"; + parNames_[NotifyAbortedEnabled] = "server.notification.aborted.enabled"; + parNames_[NotifyAbortedPopup] = "server.notification.aborted.popup"; + parNames_[NotifyAbortedSound] = "server.notification.aborted.sound"; - parNames_[NotifyRestartedEnabled] = "server.notification.restarted.enabled"; - parNames_[NotifyRestartedPopup] = "server.notification.restarted.popup"; - parNames_[NotifyRestartedSound] = "server.notification.restarted.sound"; + parNames_[NotifyRestartedEnabled] = "server.notification.restarted.enabled"; + parNames_[NotifyRestartedPopup] = "server.notification.restarted.popup"; + parNames_[NotifyRestartedSound] = "server.notification.restarted.sound"; - parNames_[NotifyLateEnabled] = "server.notification.late.enabled"; - parNames_[NotifyLatePopup] = "server.notification.late.popup"; - parNames_[NotifyLateSound] = "server.notification.late.sound"; + parNames_[NotifyLateEnabled] = "server.notification.late.enabled"; + parNames_[NotifyLatePopup] = "server.notification.late.popup"; + parNames_[NotifyLateSound] = "server.notification.late.sound"; - parNames_[NotifyZombieEnabled] = "server.notification.zombie.enabled"; - parNames_[NotifyZombiePopup] = "server.notification.zombie.popup"; - parNames_[NotifyZombieSound] = "server.notification.zombie.sound"; + parNames_[NotifyZombieEnabled] = "server.notification.zombie.enabled"; + parNames_[NotifyZombiePopup] = "server.notification.zombie.popup"; + parNames_[NotifyZombieSound] = "server.notification.zombie.sound"; - parNames_[NotifyAliasEnabled] = "server.notification.alias.enabled"; - parNames_[NotifyAliasPopup] = "server.notification.alias.popup"; - parNames_[NotifyAliasSound] = "server.notification.alias.sound"; + parNames_[NotifyAliasEnabled] = "server.notification.alias.enabled"; + parNames_[NotifyAliasPopup] = "server.notification.alias.popup"; + parNames_[NotifyAliasSound] = "server.notification.alias.sound"; - notifyIds_[NotifyAbortedEnabled] = "aborted"; - notifyIds_[NotifyRestartedEnabled] = "restarted"; - notifyIds_[NotifyLateEnabled] = "late"; - notifyIds_[NotifyZombieEnabled] = "zombie"; - notifyIds_[NotifyAliasEnabled] = "alias"; + notifyIds_[NotifyAbortedEnabled] = "aborted"; + notifyIds_[NotifyRestartedEnabled] = "restarted"; + notifyIds_[NotifyLateEnabled] = "late"; + notifyIds_[NotifyZombieEnabled] = "zombie"; + notifyIds_[NotifyAliasEnabled] = "alias"; } assert(globalProp_); diff --git a/Viewer/ecflowUI/src/VSettingsLoader.cpp b/Viewer/ecflowUI/src/VSettingsLoader.cpp index f77867566..0b88efb9b 100644 --- a/Viewer/ecflowUI/src/VSettingsLoader.cpp +++ b/Viewer/ecflowUI/src/VSettingsLoader.cpp @@ -12,7 +12,7 @@ #include -using Vec = std::vector; +using Vec = std::vector; static Vec* makers = nullptr; diff --git a/Viewer/ecflowUI/src/VSettingsLoader.hpp b/Viewer/ecflowUI/src/VSettingsLoader.hpp index 83971dc40..5bf2a81ed 100644 --- a/Viewer/ecflowUI/src/VSettingsLoader.hpp +++ b/Viewer/ecflowUI/src/VSettingsLoader.hpp @@ -19,7 +19,7 @@ class VSettingsLoader { public: explicit VSettingsLoader(); - virtual ~VSettingsLoader() = default; + virtual ~VSettingsLoader() = default; virtual void loadSettings() = 0; static void process(); diff --git a/Viewer/ecflowUI/src/VTaskNode.cpp b/Viewer/ecflowUI/src/VTaskNode.cpp index e5e45c9da..7e4865916 100644 --- a/Viewer/ecflowUI/src/VTaskNode.cpp +++ b/Viewer/ecflowUI/src/VTaskNode.cpp @@ -19,9 +19,9 @@ VTaskNode::VTaskNode(VNode* parent, node_ptr node) : VNode(parent, node), prevTr unsigned int tn = tryNo(); NState::State new_status = node_->state(); - bool aborted = (new_status == NState::ABORTED); - bool zombie = node_->flag().is_set(ecf::Flag::ZOMBIE); - bool late = node_->flag().is_set(ecf::Flag::LATE); + bool aborted = (new_status == NState::ABORTED); + bool zombie = node_->flag().is_set(ecf::Flag::ZOMBIE); + bool late = node_->flag().is_set(ecf::Flag::LATE); updatePrev(tn, aborted, zombie, late); } @@ -89,10 +89,10 @@ void VTaskNode::check(VServerSettings* conf, const VNodeInternalState& st) { void VTaskNode::check(VServerSettings* conf, bool stateChange) { NState::State new_status = node_->state(); - bool new_aborted = (new_status == NState::ABORTED); - unsigned int new_tryNo = tryNo(); - bool new_zombie = isZombie(); - bool new_late = isLate(); + bool new_aborted = (new_status == NState::ABORTED); + unsigned int new_tryNo = tryNo(); + bool new_zombie = isZombie(); + bool new_late = isLate(); // Aborted if (stateChange) { diff --git a/Viewer/ecflowUI/src/VTimeAttr.cpp b/Viewer/ecflowUI/src/VTimeAttr.cpp index b1eae8423..1520d7936 100644 --- a/Viewer/ecflowUI/src/VTimeAttr.cpp +++ b/Viewer/ecflowUI/src/VTimeAttr.cpp @@ -135,7 +135,7 @@ void VTimeAttr::scan(VNode* vnode, std::vector& vec) { const std::vector& tdV = vnode->node_->todayVec(); const std::vector& cV = vnode->node_->crons(); - auto n = static_cast(tV.size()); + auto n = static_cast(tV.size()); for (int i = 0; i < n; i++) { vec.push_back(new VTimeAttr(vnode, tV[i], i)); } diff --git a/Viewer/ecflowUI/src/VariableItemWidget.cpp b/Viewer/ecflowUI/src/VariableItemWidget.cpp index 4eb8cfbf3..bc5355d11 100644 --- a/Viewer/ecflowUI/src/VariableItemWidget.cpp +++ b/Viewer/ecflowUI/src/VariableItemWidget.cpp @@ -77,7 +77,7 @@ VariablePropDialog::VariablePropDialog(VariableModelDataHandler* data, data_->addObserver(this); - genVar_ = data_->data(defineIndex)->isGenVar(name.toStdString()); + genVar_ = data_->data(defineIndex)->isGenVar(name.toStdString()); QString path = QString::fromStdString(data_->data(0)->fullPath()); QString h = EditorInfoLabel::formatKeyLabel("Node to modify: ") + "" + @@ -89,7 +89,7 @@ VariablePropDialog::VariablePropDialog(VariableModelDataHandler* data, defineNodeName_ = QString::fromStdString(defineData->name()); defineNodeType_ = QString::fromStdString(defineData->type()); - genVar_ = defineData->isGenVar(name.toStdString()); + genVar_ = defineData->isGenVar(name.toStdString()); h += EditorInfoLabel::formatKeyLabel("Variable type: "); h += (genVar_) ? tr("generated variable") : tr("user variable"); @@ -231,8 +231,8 @@ void VariablePropDialog::notifyUpdated(VariableModelDataHandler*) { QString name = nameEdit_->text(); QString value = valueEdit_->toPlainText(); - bool st = false; - QString v = QString::fromStdString(data_->value(defineNodeName_.toStdString(), name.toStdString(), st)); + bool st = false; + QString v = QString::fromStdString(data_->value(defineNodeName_.toStdString(), name.toStdString(), st)); if (!st) { messageLabel_->showWarning("Variable " + name + " is not defined any more in " + defineNodeType_ + " " + defineNodeName_ + "!"); @@ -842,7 +842,7 @@ void VariableItemWidget::editItem(const QModelIndex& index) { QString name; QString value; - bool genVar = false; + bool genVar = false; QModelIndex vIndex = sortModel_->mapToSource(index); #ifdef _UI_VARIABLEITEMWIDGET_DEBUG @@ -915,9 +915,9 @@ void VariableItemWidget::removeItem(const QModelIndex& index) { QString name; QString value; - bool genVar = false; + bool genVar = false; - QModelIndex vIndex = sortModel_->mapToSource(index); + QModelIndex vIndex = sortModel_->mapToSource(index); VariableModelData* data = model_->indexToData(vIndex); diff --git a/Viewer/ecflowUI/src/VariableModel.cpp b/Viewer/ecflowUI/src/VariableModel.cpp index a6533e12f..cc2abb57b 100644 --- a/Viewer/ecflowUI/src/VariableModel.cpp +++ b/Viewer/ecflowUI/src/VariableModel.cpp @@ -573,8 +573,8 @@ bool VariableSortModel::filterAcceptsRow(int sourceRow, const QModelIndex& sourc QModelIndex idx2 = varModel_->index(sourceRow, 1, sourceParent); - QString s = varModel_->data(idx, Qt::DisplayRole).toString(); - QString s2 = varModel_->data(idx2, Qt::DisplayRole).toString(); + QString s = varModel_->data(idx, Qt::DisplayRole).toString(); + QString s2 = varModel_->data(idx2, Qt::DisplayRole).toString(); if (s.contains(matchText_, Qt::CaseInsensitive) || s2.contains(matchText_, Qt::CaseInsensitive)) { return true; diff --git a/Viewer/ecflowUI/src/VariableModelData.cpp b/Viewer/ecflowUI/src/VariableModelData.cpp index 36ce795ee..e6d285b8b 100644 --- a/Viewer/ecflowUI/src/VariableModelData.cpp +++ b/Viewer/ecflowUI/src/VariableModelData.cpp @@ -481,7 +481,7 @@ void VariableModelDataHandler::reload(VInfo_ptr info) { clear(false); if (info && info->node()) { - server_ = info->server(); + server_ = info->server(); std::vector nodes = info->node()->ancestors(VNode::ChildToParentSort); @@ -668,7 +668,7 @@ bool VariableModelDataHandler::updateVariables(int dataIndex) { // Get the current set of variables and check if the total number of variables // has changed. At this point v and vg do not contain any duplicates (within the // same block the user variables take precedence over the generated variables) - int cntDiff = data_[dataIndex]->checkUpdateDiff(v, vg); + int cntDiff = data_[dataIndex]->checkUpdateDiff(v, vg); const int numOld = data_[dataIndex]->varNum(); // the current num in the model const int numNew = v.size() + vg.size(); // the new num diff --git a/Viewer/ecflowUI/src/VariableView.cpp b/Viewer/ecflowUI/src/VariableView.cpp index a84b85df3..9dff926f7 100644 --- a/Viewer/ecflowUI/src/VariableView.cpp +++ b/Viewer/ecflowUI/src/VariableView.cpp @@ -136,8 +136,8 @@ void VariableDelegate::paint(QPainter* painter, const QStyleOptionViewItem& opti textRect.setLeft(option.rect.x() - 17); bool locked = index.data(VariableModel::ReadOnlyRole).toBool(); if (locked) { - hasLock = true; - lockPix = IconProvider::lockPixmap(textRect.height() - 6); + hasLock = true; + lockPix = IconProvider::lockPixmap(textRect.height() - 6); lockRect = QRect(textRect.left() - 4 - lockPix.width(), textRect.top() + (textRect.height() - lockPix.height()) / 2, @@ -152,7 +152,7 @@ void VariableDelegate::paint(QPainter* painter, const QStyleOptionViewItem& opti pixId = shadowGenVarPixId_; } if (pixId >= 0) { - hasGen = true; + hasGen = true; genPix = IconProvider::pixmap(pixId, textRect.height() - 4); genRect = QRect(textRect.left(), diff --git a/Viewer/ecflowUI/src/WhyItemWidget.cpp b/Viewer/ecflowUI/src/WhyItemWidget.cpp index e47947fcb..14971e0b0 100644 --- a/Viewer/ecflowUI/src/WhyItemWidget.cpp +++ b/Viewer/ecflowUI/src/WhyItemWidget.cpp @@ -130,7 +130,7 @@ void WhyItemWidget::infoReady(VReply* reply) { } void WhyItemWidget::infoFailed(VReply* reply) { - QString s = "Failed to refresh server before building the Why? output.\ + QString s = "Failed to refresh server before building the Why? output.\ Time-related attributes might show out-of-date values."; QString err = QString::fromStdString(reply->errorText()); diff --git a/Viewer/ecflowUI/src/ZombieItemWidget.cpp b/Viewer/ecflowUI/src/ZombieItemWidget.cpp index 3abc8039a..5e3c37650 100644 --- a/Viewer/ecflowUI/src/ZombieItemWidget.cpp +++ b/Viewer/ecflowUI/src/ZombieItemWidget.cpp @@ -32,9 +32,9 @@ ZombieItemWidget::ZombieItemWidget(QWidget* parent) : QWidget(parent) { infoProvider_ = new ZombieProvider(this); - model_ = new ZombieModel(this); + model_ = new ZombieModel(this); - sortModel_ = new QSortFilterProxyModel(this); + sortModel_ = new QSortFilterProxyModel(this); sortModel_->setSourceModel(model_); sortModel_->setSortRole(Qt::UserRole); @@ -238,7 +238,7 @@ void ZombieItemWidget::checkActionState() { QModelIndex vIndex = zombieView->currentIndex(); QModelIndex index = sortModel_->mapToSource(vIndex); - bool acState = (index.isValid()) ? true : false; + bool acState = (index.isValid()) ? true : false; actionRescue->setEnabled(acState); actionFoboff->setEnabled(acState); diff --git a/Viewer/libViewer/src/DirectoryHandler.cpp b/Viewer/libViewer/src/DirectoryHandler.cpp index 34e3282b8..2f640102e 100644 --- a/Viewer/libViewer/src/DirectoryHandler.cpp +++ b/Viewer/libViewer/src/DirectoryHandler.cpp @@ -32,7 +32,7 @@ std::string DirectoryHandler::uiLogFile_; std::string DirectoryHandler::uiEventLogFile_; std::string DirectoryHandler::socketDir_; -static bool firstStartUp = false; +static bool firstStartUp = false; DirectoryHandler::DirectoryHandler() = default; @@ -236,7 +236,7 @@ void DirectoryHandler::findDirContents(const std::string& dirPath, std::smatch what; std::string fileName = p.filename().string(); - bool rightType = (type == File) ? is_regular_file(p) : is_directory(p); // file or directory? + bool rightType = (type == File) ? is_regular_file(p) : is_directory(p); // file or directory? if (rightType && std::regex_match(fileName, what, expr)) { res.push_back(fileName); diff --git a/Viewer/libViewer/src/LogData.cpp b/Viewer/libViewer/src/LogData.cpp index 8b1eb7c2e..0cff68f58 100644 --- a/Viewer/libViewer/src/LogData.cpp +++ b/Viewer/libViewer/src/LogData.cpp @@ -151,8 +151,8 @@ bool LogData::indexOfPeriod(qint64 start, qint64 end, size_t& idxStart, size_t& unsigned int startTime = (start - refTimeInMs_) / 1000; unsigned int endTime = (end - refTimeInMs_) / 1000; - bool hasStart = false; - qint64 tolerance = toleranceInMs / 1000; + bool hasStart = false; + qint64 tolerance = toleranceInMs / 1000; if (tolerance == 0) { for (size_t i = 0; i < data_.size(); i++) { diff --git a/Viewer/libViewer/src/LogLoadData.cpp b/Viewer/libViewer/src/LogLoadData.cpp index 6182e0806..7bc45353f 100644 --- a/Viewer/libViewer/src/LogLoadData.cpp +++ b/Viewer/libViewer/src/LogLoadData.cpp @@ -793,7 +793,7 @@ void LogLoadData::add(std::vector time_stamp, if (time_stamp.size() < 2) return; - QString s = QString::fromStdString(time_stamp[0]) + " " + QString::fromStdString(time_stamp[1]); + QString s = QString::fromStdString(time_stamp[0]) + " " + QString::fromStdString(time_stamp[1]); QDateTime dt = QDateTime::fromString(s, "HH:mm:ss d.M.yyyy"); dt.setTimeSpec(Qt::UTC); @@ -930,9 +930,9 @@ void LogLoadData::loadLogFile(const std::string& logFile, maxReadSize_ = maxReadSize; - fullRead_ = false; - loadStatus_ = LoadNotTried; - loadedAt_ = QDateTime::currentDateTime(); + fullRead_ = false; + loadStatus_ = LoadNotTried; + loadedAt_ = QDateTime::currentDateTime(); loadLogFileCore(logFile, maxReadSize, suites, false, logConsumer); diff --git a/Viewer/libViewer/src/MessageLabel.cpp b/Viewer/libViewer/src/MessageLabel.cpp index 4510a626b..fe62e535a 100644 --- a/Viewer/libViewer/src/MessageLabel.cpp +++ b/Viewer/libViewer/src/MessageLabel.cpp @@ -35,7 +35,7 @@ //=================================================== MessageLabelLoadWidget::MessageLabelLoadWidget(QWidget* parent) : QWidget(parent) { - auto* layout = new QHBoxLayout(this); + auto* layout = new QHBoxLayout(this); loadTextLabel_ = new QLabel("In progress ...", this); loadIconLabel_ = new QLabel(this); @@ -198,21 +198,21 @@ MessageLabel::MessageLabel(QWidget* parent) : QWidget(parent) { setProperty("base", "1"); if (typeData.empty()) { - auto bg = QColor(232, 237, 238); - auto border = QColor(180, 194, 230); - typeData[InfoType] = MessageLabelDefData(":/viewer/info.svg", "Info", bg, border); + auto bg = QColor(232, 237, 238); + auto border = QColor(180, 194, 230); + typeData[InfoType] = MessageLabelDefData(":/viewer/info.svg", "Info", bg, border); bg = {234, 215, 150}; border = {226, 195, 110}; typeData[WarningType] = MessageLabelDefData(":/viewer/warning.svg", "Warning", bg, border); - bg = {254, 242, 241}; - border = {223, 152, 152}; - typeData[ErrorType] = MessageLabelDefData(":/viewer/error.svg", "Error", bg, border); + bg = {254, 242, 241}; + border = {223, 152, 152}; + typeData[ErrorType] = MessageLabelDefData(":/viewer/error.svg", "Error", bg, border); - bg = {232, 249, 236}; - border = {90, 220, 190}; - typeData[TipType] = MessageLabelDefData(":/viewer/tip.svg", "Tip", bg, border); + bg = {232, 249, 236}; + border = {90, 220, 190}; + typeData[TipType] = MessageLabelDefData(":/viewer/tip.svg", "Tip", bg, border); } pixLabel_ = new QLabel(this); @@ -229,7 +229,7 @@ MessageLabel::MessageLabel(QWidget* parent) : QWidget(parent) { // progress widget progWidget_ = new MessageLabelProgWidget(this); - layout_ = new QHBoxLayout(this); + layout_ = new QHBoxLayout(this); layout_->setContentsMargins(2, 2, 2, 2); auto* pixLayout = new QVBoxLayout(); @@ -323,7 +323,7 @@ void MessageLabel::showMessage(const Type& type, QString msg) { message_.clear(); } - message_ = msg; + message_ = msg; QString s = message_; s.replace("\n", "
"); diff --git a/Viewer/libViewer/src/Palette.cpp b/Viewer/libViewer/src/Palette.cpp index 2f25061da..ba7531247 100644 --- a/Viewer/libViewer/src/Palette.cpp +++ b/Viewer/libViewer/src/Palette.cpp @@ -72,8 +72,8 @@ void Palette::load(const std::string& parFile) { QPalette palette = qApp->palette(); for (ptree::const_iterator it = pt.begin(); it != pt.end(); ++it) { - std::string name = it->first; - ptree ptItem = it->second; + std::string name = it->first; + ptree ptItem = it->second; QPalette::ColorGroup group = QPalette::Active; if (name == "active") @@ -89,8 +89,8 @@ void Palette::load(const std::string& parFile) { } for (ptree::const_iterator itItem = ptItem.begin(); itItem != ptItem.end(); ++itItem) { - std::string role = itItem->first; - auto val = itItem->second.get_value(); + std::string role = itItem->first; + auto val = itItem->second.get_value(); QMap::const_iterator itP = paletteId.find(role); if (itP != paletteId.end()) { diff --git a/Viewer/libViewer/src/UserMessage.cpp b/Viewer/libViewer/src/UserMessage.cpp index 02c220936..1bcca8290 100644 --- a/Viewer/libViewer/src/UserMessage.cpp +++ b/Viewer/libViewer/src/UserMessage.cpp @@ -18,7 +18,7 @@ bool UserMessage::echoToCout_ = true; // XXX should be false to start with -UserMessage::UserMessage() = default; +UserMessage::UserMessage() = default; void UserMessage::message(MessageType type, bool popup, const std::string& message) { if (echoToCout_) {