https://bugs.kde.org/show_bug.cgi?id=399130
Bug ID: 399130 Summary: Krita 4.1.2/4.1.3 fail to build with Qt 5.6 Product: krita Version: 4.1.3 Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: General Assignee: krita-bugs-n...@kde.org Reporter: wba...@tmo.at Target Milestone: --- Trying to build Krita 4.1.2 and 4.1.3 with Qt 5.6.2 failed with this compiler error: /home/abuild/rpmbuild/BUILD/krita-4.1.2/libs/ui/tool/KisToolChangesTracker.cpp: In member function 'KisToolChangesTrackerDataSP KisToolChangesTracker::lastState() const': /home/abuild/rpmbuild/BUILD/krita-4.1.2/libs/ui/tool/KisToolChangesTracker.cpp:55:38: error: operands to ?: have different types 'QSharedPointer<KisToolChangesTrackerData>' and 'int' return !m_d->undoStack.isEmpty() ? m_d->undoStack.last() : 0; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ (that's with gcc7, 4.8 gave a more cryptic error "no match for ternary 'operator?:'") I succeeded to build it with this change: --- a/libs/ui/tool/KisToolChangesTracker.cpp +++ b/libs/ui/tool/KisToolChangesTracker.cpp @@ -52,7 +52,7 @@ KisToolChangesTrackerDataSP KisToolChangesTracker::lastState() const { - return !m_d->undoStack.isEmpty() ? m_d->undoStack.last() : 0; + return !m_d->undoStack.isEmpty() ? m_d->undoStack.last() : static_cast<QSharedPointer<KisToolChangesTrackerData>>(0); } void KisToolChangesTracker::reset() -- You are receiving this mail because: You are watching all bug changes.