(cherry picked from commit df92768617243f78c08c681e0bb08c66db9de1f8)
(cherry picked from commit 3037e8d4a5fa76cec32400f67ba19f403d9112d3)
commit c4a9acd24f1db7186548bab168b0abdc20d125b5
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Thu Apr 26 20:22:57 2018 +0300
Fix PVS-Studio warning: misprint in KisPressureSizeOption::lodLimitations()
CCBUG:393431
(cherry picked from commit 9790c311ed0da5af6077ead5b4fb1165011aee2d)
(cherry picked from commit 634b2f9da8b4e6eae69a84708392f5cba8a3a508)
commit 41a1b4b9670450bc404512861508eb38b158f8ce
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Thu Apr 26 20:13:12 2018 +0300
Fix PVS-Studio warning: the loop iterates only once
I don't know why it happened so, but it seems it is just a result
of the fork of KDE's code
CCBUG:393431
(cherry picked from commit 2102af05a2c1b05b6ca9e67f9209c7e21502c600)
(cherry picked from commit 26eef9065fa82ef2be34fb9c0a95062508aedf41)
commit 4ba5ca4eeaab9c44856790ae257b923a9ff70cfd
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Thu Apr 26 20:11:21 2018 +0300
Fix PVS-Studio warning: loop is actually infinite
Well, it seems like the loop should be infinite by design,
though I'm not very sure :)
Since this code is abandoned and not used in Krita atm,
I just added a todo.
CCBUG:393431
(cherry picked from commit f912a10eda97ef6a6564db4db1991a3efbf879f4)
(cherry picked from commit c2d5a2a0ed4a5302205635dd6eca15fde4f3c2db)
commit 9c16ca110fc9ee6abcd45dbed004ec3a24aba8dd
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Thu Apr 26 20:06:35 2018 +0300
Fix PVS-Studio warning: uninitialized variables in KisMinHeap
Calling c-tors from other c-tors appeared in C++ much later than
this code has been written :)
CCBUG:393431
(cherry picked from commit 368bd56bfd9341627197180ad277758d2d4ba257)
(cherry picked from commit 7b77cbad1c1e0ed8d47fb81c8b5449837e9877a1)
commit 90b42ce4bd465c67b7c13d65f6a3dd44b8c3ed6a
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Thu Apr 26 20:04:03 2018 +0300
Fix PVS-Studio warning: html correctness in about dialog
CCBUG:393431
(cherry picked from commit 2993d536bce0e0dffe7aaaa865f21c923e6a6fdb)
(cherry picked from commit d85c28fe7be833f7bf9d2f332a51e5f31862cc31)
commit d8f702a102f9acb1690bed6f908b7d1cf637063d
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Thu Apr 26 20:03:42 2018 +0300
Fix PVS-Studio warning: parseTagName() should actually return some value
CCBUG:393431
(cherry picked from commit 7bc329344257c71716f95c4dbd85077566a408c0)
(cherry picked from commit fa1b241513542375444539eefb5647dc886f7abe)
commit 60d253b834694eb585421200c867cc80f895b190
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Thu Apr 26 20:02:54 2018 +0300
Fix PVS-Studio warning: for-each loop should accept a reference to actually do something
CCBUG:393431
(cherry picked from commit 03d026c9179f24acc7c3f3f669bf75480051b3ad)
(cherry picked from commit 18834a3ba524b8526a63e0b98877976c47840e7a)
commit e537b5f6a8aeb4bb9c6014a74c3388b0e9722a7b
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Thu Apr 26 19:59:29 2018 +0300
Fix PVS-Studio warning: uninitialized variables used in the loop
CCBUG:393431
(cherry picked from commit 9f76caa714c34891b77a277520c78188be10c56d)
(cherry picked from commit 266785dfe95c103cc0ba1cceb3d9dc00d3afdb3d)
commit 860b1e6b22b0efc41cb319246b95e3b25a805fe2
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Thu Apr 26 19:58:49 2018 +0300
Fix PVS-Studio warning: recover lost 'else' tag in if-else :)
CCBUG:393431
(cherry picked from commit 7ca71b6ec258d05e9a39aa0178d1a503d340164d)
(cherry picked from commit db63da632138fc3eb33611d6ac66ac6fd7f33d61)
commit e59b94ac787e3b303d26bfd88a4d92e2b0199740
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Thu Apr 26 19:58:10 2018 +0300
Fix PVS-Studio warning: initializing non-POD struct with memset
QVector is not a POD, so we shouldn't try to initialize it with
bruteforce memset.
CCBUG:393431
(cherry picked from commit 1e67dff0b6b14abbbdbf417fb69f914c8d5bd213)
(cherry picked from commit 0188944135a4b982b51902c818469b088c9b0c7f)
commit 4a5c56c34899cc98cdf4fd8a86266d7816bce3fe
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Thu Apr 26 19:56:41 2018 +0300
Fix PVS-Studio warning: brush spacing should be saved as double, not bool
CCBUG:393431
(cherry picked from commit 45cd5e436c54b1558856509f0c626d652fef9756)
(cherry picked from commit 2b8f9f6daf2f125b98477c93e2ecbff925a6e6e7)
commit efba89b8abbc938178df2eee4a83ccba899a3586
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Thu Apr 26 19:55:33 2018 +0300
Fix PVS-Studio warning: reword correct but weird code
The patch shouldn't change any behavior, just make the code more logical :)
CCBUG:393431
(cherry picked from commit c68f1701eb341dff0e2db8334ca912ac7c0542ea)
(cherry picked from commit b9431cf492e9692766bb9634b1e023c09fe50f32)
commit 614bd97b93c9fe8602f63ebe9ae53a353ff27a4f
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Thu Apr 26 19:50:55 2018 +0300
Fix PVS-Studio warning: one more leak in a unittest
CCBUG:393431
(cherry picked from commit 88a77342d300a341f57e2a4a78c877f231c1ba63)
(cherry picked from commit ece3e4439f9052f1d756a57aef62d8a0330d7678)
commit 3c97d1633c8f0578d6df105d7b8df71378826d0f
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Thu Apr 26 19:45:41 2018 +0300
Fix PVS-Studio warning: reordered function arguments
Just a misprint or copy-paste
CCBUG:393431
(cherry picked from commit 6ed8fb329f8326444d983f5bb79c08bc982ab428)
(cherry picked from commit 42b6c6b50a87d9ff586bdaf5c82d44a97d266805)
commit efbcd85cc932ee5f8bd7af141cf265e343583d7e
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Thu Apr 26 19:43:34 2018 +0300
Fix PVS-Studio warning: possible memory leaks in production code
Most of the leaks are hardly reproducible in normal circumstances. But
the one in PNG converter is huge. PNG converter also had an invalid null
pointer access, which didn't crash Krita only by a happy coincidence.
CCBUG:393431
(cherry picked from commit 6960317945ed3d44cc5d5ad5c6299d206c52aac6)
(cherry picked from commit 2496b1264b1dd3fe5d2bf3a6e4129053e3672367)
commit a4a0eef07f3256a9f9c347a3d21426da257c9975
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Thu Apr 26 19:36:07 2018 +0300
Fix PVS-Studio warning: implicit int->qreal conversions cause precision loss
V601: The bool type is implicitly cast to the integer type
V636: Expression was implicitly cast from 'int' type to 'double' type
CCBUG:393431
(cherry picked from commit ed51df9bc022a95250e3d2a084d88589b18e0d35)
commit ea406629fcbfddadf560bc5ae1f5b51825d929be
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Thu Apr 26 19:25:04 2018 +0300
Fix PVS-Studio warning: memory leaks in unittests
V773 The function was exited without releasing the pointer.
A memory leak is possible.
CCBUG:393431
(cherry picked from commit 3ec75b535e65a286ef8f09369121c4cecfb3e607)
commit 1dba3bba6960524e1c84677636f8eef459819814
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Wed Apr 25 16:13:32 2018 +0300
Fix PVS Studio warning: avoid non-used return value warning in benchmarks
V530 The return value of function 'atan2' is required to be utilized.
V530 The return value of function 'drand48' is required to be utilized.
CCBUG:393431
(cherry picked from commit 6585c96eff6169884d07f3ef36de0d20480a57df)
commit d74b8947c0a25d0e79e7b1906af5ac90ebb425c8
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Wed Apr 25 15:34:42 2018 +0300
Change if's in KisNode::add() to asserts to avoid silent failures
(cherry picked from commit dbc52e0fc10dd3406dada1812d5904151fb194a8)
commit 6a98d072fbef812c54655dfbb1d8ffd31923307f
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Wed Apr 25 15:32:09 2018 +0300
Fix a crash when duplicating active global selection masks
The problem was in the fact that KisGroupLayer::allowAsChild()
forbade adding the second active mask to the same layer, letting
the code silently continue without knowing that the mask was not
created. In this patch we manually deactivate all the active masks
before duplication process.
BUG:382315
(cherry picked from commit 3ef241fbe5eaec159300dc28ce6e5b89fb7bffa6)
commit 3992e4c4c241d65f7558107b8fff25c8f6b892d2
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Tue Apr 24 17:20:50 2018 +0300
Fix "Break at segment" to work correctly with closed paths
(cherry picked from commit e740cd96f5d834e6fe3f9ae0ab340bd7251f3bae)
commit ba377491cdd4bc825de07035f7ed2e0a05545c84
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Tue Apr 24 16:10:37 2018 +0300
Fix crashes on undo/redo of vector path points operations
1) KoPathToolSelection keeps pointers to the shapes and its path points,
therefore it should subscribe to the updates on the shapes and their
points (using ShapeChangeListener framework).
2) The patch also fixes a lot of bugs in "Join by segment" and
"Merge points", which should behave correctly now.
3) The patch also partially implements "keep path point selection"
idea, which selects newly created point after each operation. The
stuff is achieved using KoPathShape::PointSelectionChangeListener
listener.
BUG:393209
BUG:393087
(cherry picked from commit f919e7f2dbed028e8fdae89b58ed6f5af26760db)
commit f8556aa89078a5e20840eaab0fdf91b350d37e53
Author: Scott Petrovic <scottpetrovic@gmail.com>
Date: Fri Apr 20 21:11:42 2018 -0500
BUG:393353 Fix crash when deleting palette
(cherry picked from commit e06636540f9fdd79a80b5a9bc24e7752b29e19e4)
commit 29df640252a5efb1329694379980fad39d5872fd
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Wed Apr 18 23:24:59 2018 +0300
Fix crash when resizing the Tool Options for the shape selection tool
KoFillConfigWidget should update visibility of the widgets
explicitly in KoFillConfigWidget::activate() to ensure the widgets
are really hidden (since recently shapeChanged() can skip the
update if the mode hasn't changed)
BUG:393217
(cherry picked from commit 1ce1fc9276ca9dd95eedf6c6fe4a4888d6f63a4c)
commit 93e1e39386eae6b23b390ab7c3034c83f864a7ec
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Wed Apr 18 17:27:10 2018 +0300
Disable right-clicking on popup palette
With this patch it is not possible to select a palette item
using the right-click of the stylus. All the distinct actions
should be confirmed with the left button. Right-click on any part
of the canvas just closes the entire palette.
BUG:391696,378484
(cherry picked from commit 20c9efffb70cf2757595fee8d7c56a5fe59d5664)
commit d1b5ba69b21282b7e7ab8063f98d4dc1b7df28f7
Author: Dmitry Kazakov <dimula73@gmail.com>
Date: Wed Apr 18 14:17:44 2018 +0300
Don't let color label widget to mess up labels when right button is pressed
BUG:392815
(cherry picked from commit 813b2c19ec855066222bebad623e048baaa1cdf7)
commit b993d939bcc7e2550275f021936ad03c346640b3
Author: Emmet O'Neill <emmetoneill.pdx@gmail.com>
Date: Wed Apr 18 11:50:54 2018 +0300
Futher Fixed Bug 391921 - Canvas position popping after pop-up palette rotation reset.
Summary:
A couple weeks ago Dmitry fixed a bug to do with the canvas "popping/jumping" when panning just after using the pop-up palette to rotate.
https://bugs.kde.org/show_bug.cgi?id=391921
Someone (Piotr) mentioned that the bug was still present when the canvas rotation was reset, so I quickly piggy-backed off Dmitry's prior fix and fixed the rotation the same way (by using the canvas controller's rotation function there too).
While in that code I spent a few minutes cleaning up some unused #includes (there are probably some others in the header that could be swapped for forward declarations), whitespace inconsistencies, and other boring code style stuff. (Also, please let me know if doing this type of cleanup is more annoying than helpful!)
Test Plan: Try panning the canvas immediately after rotating and/or resetting the canvas rotation using the cool little slider in the pop-up palette. It should be relatively smooth!