From 3f72121ac41741d53e4916f1275cbd4f93259c4d Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Sat, 25 May 2019 22:40:15 +0800 Subject: Massive code refactor en cours! Less complain from compilers: - use nullptr instead of NULL - use types for event fields - explicit type casting added Stop saving parameters of meta events in p1/p2 fields of SEvent. callback_t now uses std::function, deprecating ICallback. Not recommended for daily usage, or even testing: the code refactor is still a work in progress. --- qmidiplayer-desktop/qdialskulpturestyle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qmidiplayer-desktop/qdialskulpturestyle.cpp') diff --git a/qmidiplayer-desktop/qdialskulpturestyle.cpp b/qmidiplayer-desktop/qdialskulpturestyle.cpp index ba9e03f..33c80de 100644 --- a/qmidiplayer-desktop/qdialskulpturestyle.cpp +++ b/qmidiplayer-desktop/qdialskulpturestyle.cpp @@ -386,12 +386,12 @@ QDialSkulptureStyle::drawComplexControl( ComplexControl cc, } const QStyleOptionSlider *option = qstyleoption_cast(optc); - if (option == NULL) + if (option == nullptr) return; int d = qMin(option->rect.width() & ~1, option->rect.height() & ~1); QStyleOptionSlider opt = *option; - const QAbstractSlider *slider = NULL; + const QAbstractSlider *slider = nullptr; // always highlight knob if pressed (even if mouse is not over knob) if ((option->state & QStyle::State_HasFocus) && (slider = qobject_cast(widget))) { if (slider->isSliderDown()) { -- cgit v1.2.3