diff options
author | Robert Tari <robert@tari.in> | 2024-05-17 16:10:34 +0200 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2024-05-17 16:10:34 +0200 |
commit | 4b25c3a134abb60fbd1b3b360d5d877d3b075aa5 (patch) | |
tree | 3f6230564568451c0e4c5357c37f4cc47cdab195 | |
parent | 9a605aa2479f99a088fa079ba12a9e86da165166 (diff) | |
parent | bfb74193db0e172bb1db5fc837a4b1ee4688259f (diff) | |
download | ayatana-indicator-display-4b25c3a134abb60fbd1b3b360d5d877d3b075aa5.tar.gz ayatana-indicator-display-4b25c3a134abb60fbd1b3b360d5d877d3b075aa5.tar.bz2 ayatana-indicator-display-4b25c3a134abb60fbd1b3b360d5d877d3b075aa5.zip |
Merge branch 'sunweaver-pr/cppcheck-2.14'
Attributes GH PR #96: https://github.com/AyatanaIndicators/ayatana-indicator-display/pull/96
-rw-r--r-- | src/indicator.h | 2 | ||||
-rw-r--r-- | src/service.cpp | 8 | ||||
-rw-r--r-- | src/service.h | 2 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/utils/glib-fixture.h | 2 | ||||
-rw-r--r-- | tests/utils/test-dbus-fixture.h | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/src/indicator.h b/src/indicator.h index c9ccb1e..db8c5ac 100644 --- a/src/indicator.h +++ b/src/indicator.h @@ -65,7 +65,7 @@ class SimpleProfile: public Profile { public: SimpleProfile(const char* name, const std::shared_ptr<GMenuModel>& menu): m_name(name), m_menu(menu) {} - virtual ~SimpleProfile(); + virtual ~SimpleProfile() override; std::string name() const override {return m_name;} core::Property<Header>& header() override {return m_header;} diff --git a/src/service.cpp b/src/service.cpp index 26faec9..b26664a 100644 --- a/src/service.cpp +++ b/src/service.cpp @@ -334,7 +334,7 @@ private: #ifdef COLOR_TEMP_ENABLED static void onUserChanged (GDBusConnection *pConnection, const gchar *sSender, const gchar *sPath, const gchar *sInterface, const gchar *sSignal, GVariant *pParameters, gpointer pUserData) { - DisplayIndicator::Impl *pImpl = (DisplayIndicator::Impl*) pUserData; + DisplayIndicator::Impl *pImpl = static_cast<DisplayIndicator::Impl*>(pUserData); g_variant_get (pParameters, "(s)", &pImpl->sUser); loadManager (pImpl); } @@ -449,7 +449,7 @@ private: static gboolean updateColor (gpointer pData) { - DisplayIndicator::Impl *pImpl = (DisplayIndicator::Impl*) pData; + DisplayIndicator::Impl *pImpl = static_cast<DisplayIndicator::Impl*>(pData); if (pImpl->bReadingAccountsService) { @@ -760,7 +760,7 @@ private: static void onGeoClueLoaded (GObject *pObject, GAsyncResult *pResult, gpointer pData) { - DisplayIndicator::Impl *pImpl = (DisplayIndicator::Impl*) pData; + DisplayIndicator::Impl *pImpl = static_cast<DisplayIndicator::Impl*>(pData); GError *pError = NULL; GClueSimple *pSimple = gclue_simple_new_finish (pResult, &pError); @@ -816,7 +816,7 @@ private: { g_simple_action_set_state (pAction, pVariant); - DisplayIndicator::Impl *pImpl = (DisplayIndicator::Impl*) pData; + DisplayIndicator::Impl *pImpl = static_cast<DisplayIndicator::Impl*>(pData); if (pImpl->bAutoSliderUpdate) { diff --git a/src/service.h b/src/service.h index da8d8ba..f134853 100644 --- a/src/service.h +++ b/src/service.h @@ -30,7 +30,7 @@ class DisplayIndicator: public Indicator { public: DisplayIndicator(); - ~DisplayIndicator(); + ~DisplayIndicator() override; const char* name() const override; GSimpleActionGroup* action_group() const override; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 81e083c..bdc074f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -28,7 +28,7 @@ endif() add_compile_options(${CXX_WARNING_ARGS}) -add_test(cppcheck cppcheck --enable=all -USCHEMA_DIR --error-exitcode=2 --inline-suppr --library=qt -I${CMAKE_SOURCE_DIR} -i${CMAKE_SOURCE_DIR}/tests/utils/qmain.cpp -i${CMAKE_SOURCE_DIR}/tests/gmock ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/tests --suppress=missingIncludeSystem --suppress=uninitDerivedMemberVar --suppress=unmatchedSuppression --suppress=constParameter --suppress=unusedFunction --suppress=uselessOverride) +add_test(cppcheck cppcheck --enable=all -USCHEMA_DIR --check-level=exhaustive --error-exitcode=2 --inline-suppr --library=qt -I${CMAKE_SOURCE_DIR} -i${CMAKE_SOURCE_DIR}/tests/utils/qmain.cpp -i${CMAKE_SOURCE_DIR}/tests/gmock ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/tests --suppress=missingIncludeSystem --suppress=uninitDerivedMemberVar --suppress=unmatchedSuppression --suppress=constParameter --suppress=constParameterCallback --suppress=unusedFunction --suppress=uselessOverride) add_subdirectory (unit) diff --git a/tests/utils/glib-fixture.h b/tests/utils/glib-fixture.h index ccdeccd..b56654b 100644 --- a/tests/utils/glib-fixture.h +++ b/tests/utils/glib-fixture.h @@ -35,7 +35,7 @@ class GlibFixture : public ::testing::Test { public: - virtual ~GlibFixture() =default; + virtual ~GlibFixture() override =default; protected: diff --git a/tests/utils/test-dbus-fixture.h b/tests/utils/test-dbus-fixture.h index b01405a..e98a002 100644 --- a/tests/utils/test-dbus-fixture.h +++ b/tests/utils/test-dbus-fixture.h @@ -30,7 +30,7 @@ class TestDBusFixture: public GlibFixture public: explicit TestDBusFixture() {}; - virtual ~TestDBusFixture() =default; + virtual ~TestDBusFixture() override =default; explicit TestDBusFixture(const std::vector<std::string>& service_dirs_in): service_dirs(service_dirs_in) {} |