Ported Q_ASSERT to KIS_ASSERT in Selection Tools
Needs RevisionPublic

Authored by sourabhboss on Feb 28 2019, 12:20 PM.

Details

Reviewers
rempt
dkazakov
Group Reviewers
Krita
Maniphest Tasks
T7503: Port all Q_ASSERTS to KIS_SAFE_ASSERT

Diff Detail

Repository
R37 Krita
Lint
Lint Skipped
Unit
Unit Tests Skipped
sourabhboss created this revision.Feb 28 2019, 12:20 PM
Restricted Application added a reviewer: Krita. · View Herald TranscriptFeb 28 2019, 12:20 PM
Restricted Application added a project: Krita. · View Herald Transcript
sourabhboss requested review of this revision.Feb 28 2019, 12:20 PM

Hi, @sourabhboss!

It would be preferable to use KIS_ASSERT_RECOVER and KIS_ASSERT_RECOVER_RETURN (and their _SAFE counterparts) here :)

Changes done

dkazakov added inline comments.Feb 28 2019, 1:48 PM
plugins/tools/selectiontools/kis_tool_select_elliptical.cc
55

recover-version of the assert is expected to have a recover-branch, like

KIS_SAFE_ASSERT_RECOVER(kisCanvas) {
    // do something to recover
}

I guess in this case you wanted to use KIS_SAFE_ASSERT_RECOVER_RETURN(kisCanvas);

plugins/tools/selectiontools/kis_tool_select_similar.cc
167

Same here

Updated diff

dkazakov requested changes to this revision.Feb 28 2019, 3:03 PM

Sorry, but not all the changes are fixed yet

This revision now requires changes to proceed.Feb 28 2019, 3:03 PM
sourabhboss marked 2 inline comments as done.Feb 28 2019, 3:12 PM

Which one is remaining in Selection Tools or I have to make for every tools at once.

plugins/tools/selectiontools/kis_tool_select_elliptical.cc
55

Done

plugins/tools/selectiontools/kis_tool_select_similar.cc
167

Done

sourabhboss updated this revision to Diff 53371.Mar 7 2019, 3:50 PM
sourabhboss marked 3 inline comments as done.

All Changes done

dkazakov accepted this revision.Mar 10 2019, 1:28 PM
This revision is now accepted and ready to land.Mar 10 2019, 1:28 PM
dkazakov requested changes to this revision.Mar 10 2019, 7:18 PM

Hi, @sourabhboss!

Did you try to compile your patch before uploading for review? It looks like it doesn't compile.

This revision now requires changes to proceed.Mar 10 2019, 7:18 PM