Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cppcheck warnings #20

Merged
merged 2 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:
cppcheck --quiet --language=c++ --force --inline-suppr
--enable=warning,performance,portability,information
--disable=missingInclude --check-level=exhaustive
--suppress="ctuOneDefinitionRuleViolation:tests/*"
-i build --library=std.cfg --error-exitcode=42 .

if($LASTEXITCODE -eq 42) {
Expand Down
1 change: 0 additions & 1 deletion src/KDGui/platform/android/android_platform_event_loop.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ class KDGUI_API AndroidPlatformEventLoop : public KDFoundation::AbstractPlatform
static int32_t androidHandleInputEvent(struct android_app *app, AInputEvent *event);

private:
int m_events;
std::unordered_map<int, NotifierSet> m_notifiers;
AndroidPlatformIntegration *m_androidPlatformInitegration;
};
Expand Down
3 changes: 1 addition & 2 deletions src/KDGui/platform/linux/xcb/linux_xkb_keyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ using namespace KDGui;

LinuxXkbKeyboard::LinuxXkbKeyboard(LinuxXcbPlatformIntegration *platformIntegration)
: m_platformIntegration{ platformIntegration }
, m_logger{ KDUtils::Logger::logger("xkeyboard", spdlog::level::trace) }
{
m_logger = KDUtils::Logger::logger("xkeyboard", spdlog::level::trace);

// Query the core keyboard device id
m_deviceId = xkb_x11_get_core_keyboard_device_id(m_platformIntegration->connection());
if (m_deviceId == -1) {
Expand Down
2 changes: 1 addition & 1 deletion src/KDGui/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ using namespace KDGui;

Window::Window()
: Object()
, m_logger{ KDUtils::Logger::logger("window", spdlog::level::info) }
{
m_logger = KDUtils::Logger::logger("window", spdlog::level::info);

visible.valueChanged().connect(&Window::onVisibleChanged, this);
m_resizeConnectionIds = {
Expand Down