1. 04 Jul, 2019 1 commit
  2. 05 Aug, 2018 1 commit
  3. 05 Jun, 2018 1 commit
  4. 18 Feb, 2017 1 commit
  5. 09 Feb, 2017 1 commit
  6. 29 Nov, 2016 1 commit
  7. 25 Jul, 2016 1 commit
    • Dmitry Kazakov's avatar
      A HUGE refactoring of KisPaintOpBox · 65fa65a9
      Dmitry Kazakov authored
      This patch introduces a lot of things:
      
      1) Implements a proper model-view-controller design for all the paintop
         preset-based properties, such as opacity, flow and size:
      
            Model --- KisPaintOpSettings
            Controller --- KoResourceManager (also tracks dependencies among
                           the preset and its derived properties, such as
                           opacity, size, flow, composite op)
            View --- KisPaintOpBox.
      
         Basically, it means that KisPaintOpBox doesn't write to the settings
         directly anymore. Instead, it uses KoResourceManager for that.
      
      2) Well, there are still a couple of flaws in the MVC design. E.g. the
         settings widgets still write directly into the settings bypassing the
         resource managers. To overcome this issue see the next bullet about
         KisResourceUpdateMediator. There is also a bigger problem, the size
         of the brush is still fetched through the access to the GUI elements,
         or, more precisely m_optionsWidget. I don't think it can be solved atm :(
      
      3) Adds KisResourceUpdateMediator. This is a special class that allows
         the resource manager to track the changes in complex resources, such as
         KisPaintOpPreset. When such resource changes internaly, all the derived
         resources get notification, and if they are also changed, a corresponding
         signal is emitted.
      
      
      There are still two regressions present:
      1) Locked Settings functionality doesn't work
      2) Resizing of the brush using Shift+Gesture is slow again :(
      65fa65a9
  8. 07 Jul, 2016 1 commit
  9. 13 May, 2016 1 commit
    • Dmitry Kazakov's avatar
      Fix some crashes/inconsistencies while saving the document · 1082ada7
      Dmitry Kazakov authored
      1) Deny double entry into the saving process
      2) Don't try to save if the user has closed the waiting
         progress dialog. Otherwise it may cause a crash.
      3) Make the saving progress bar modal. Otherwise it hides behind
         Krita window and the user sees a locked-up canvas.
      
      Fixes T2430
      BUG:362675
      1082ada7
  10. 06 May, 2016 2 commits
  11. 05 May, 2016 1 commit
  12. 22 Apr, 2016 1 commit
  13. 15 Feb, 2016 1 commit
  14. 25 Jan, 2016 1 commit
  15. 02 Aug, 2015 1 commit
    • Wolthera van Hövell's avatar
      Merge in krita-testing-wolthera (squashed)(GSoC 2015) · 4cce8ca1
      Wolthera van Hövell authored
      This implements the Tangent Normal Brush Engine, a normalize filter, a tilt-cursor
      and modifications to the phongbumpmap filter.
      Squashed commit of the following:
      
      commit 3527bbf5acd3f49047a0c07547e9b5d515d100d8
      Author: Wolthera van Hövell <griffinvalley@gmail.com>
      Date:   Sun Aug 2 18:30:53 2015 +0200
      
          Add some Tangent Normal factory presets.
      
          Otherwise it won't revert to default right.
      
      commit cbd37351e63c86c6201f60ac6410ad72c3fb9c2a
      Merge: 7477061 8c8b58c
      Author: Wolthera van Hövell <griffinvalley@gmail.com>
      Date:   Sun Aug 2 17:32:40 2015 +0200
      
          Merge branch 'calligra/2.9' into krita-testing-wolthera
      
          Conflicts:
          	krita/plugins/paintops/libpaintop/kis_current_outline_fetcher.cpp
      
      commit 74770618d639ac0da6e51f432e17f2c84da56e21
      Author: Wolthera van Hövell <griffinvalley@gmail.com>
      Date:   Sun Aug 2 17:20:04 2015 +0200
      
          Turn the Swizzle Preview into a Widget extending QLabel
      
          This allows for it to update instantly when the comboboxes update.
      
      commit 38d0415bed146c879a3a4cc09219fc3023b644f3
      Author: Wolthera van Hövell <griffinvalley@gmail.com>
      Date:   Sun Aug 2 16:38:52 2015 +0200
      
          Make drawing angle to be influenced by the canvas angle.
      
          I did this because it was akward to use otherwise.
          This doesn't apply to the tilt/direction mix. So if people want the original behaviour
          they can use this one.
      
      commit 24ad0a1b60089a338a4b36c3975bf27ffbbba7c0
      Author: Wolthera van Hövell <griffinvalley@gmail.com>
      Date:   Wed Jul 29 15:27:56 2015 +0200
      
          Fix normalise to work with floating point.
      
          It still doesn't output to 0-1 like you'd expect, but at the least it works a bit better.
      
      commit b8dbceed68545bc8f51de35c9c77de329fd5050e
      Author: Wolthera van Hövell <griffinvalley@gmail.com>
      Date:   Tue Jul 28 23:00:55 2015 +0200
      
          Add Normalize Filter
      
          This filter takes the values of the channel and assigns them to a Qvector3d
          This is then normalizes, and those values are fed back into a color.
          This asures that the values are proper normal values.
      
          Doesn't work with float spaces yet, for some inexplicable reason
      
      commit abf94976c34c2e7873c554b6123dd672d739e0d8
      Author: Wolthera van Hövell <griffinvalley@gmail.com>
      Date:   Tue Jul 28 18:03:43 2015 +0200
      
          cleanup
      
          Can't figure out how to deal with preview updating...
      
      commit 017ba62f4d1bbb5b3d32501d63bbbaa73fa16243
      Author: Wolthera van Hövell <griffinvalley@gmail.com>
      Date:   Tue Jul 28 17:11:55 2015 +0200
      
          BUG 338011: Fix sharpness-mirror mode option
      
          Turns out that to render a mirrored mask, you need to actually render it.
      
      commit ffb42bcf8f55efd67442fec9fa8e0d507e3f72ca
      Author: Wolthera van Hövell <griffinvalley@gmail.com>
      Date:   Tue Jul 28 16:48:50 2015 +0200
      
          Make sharpness work for tangent tilt option
      
      commit 66e001802aaf2cc990349cac971e06a22bcbf96f
      Author: Wolthera van Hövell <griffinvalley@gmail.com>
      Date:   Tue Jul 28 16:22:35 2015 +0200
      
          Cleanup.
      
          Removed variables that weren't used, and noted variables that were used
          but not recognised by the compiler as Q_UNUSED
      
      commit 3becd0e6be39e8d19c90bf8a4495bbf4bb2bb2c5
      Author: Wolthera van Hövell <griffinvalley@gmail.com>
      Date:   Tue Jul 28 16:02:53 2015 +0200
      
          Make it use the 8bit variety of the image colour space if the image colour space is RGBA
      
          So a CMYKA space will get sRGB, but a linear sRGB space will use the right profile.
      
      commit 4b6ec179ef9b43195089bcf3ab413e4cf0933680
      Author: Wolthera van Hövell <griffinvalley@gmail.com>
      Date:   Tue Jul 28 15:21:42 2015 +0200
      
          Convert radian formula to use kis_global
      
          Remove todos in comments associated.
      
      commit ce7bc9d848bb0f0f9b37ed81932543f0aa224bd0
      Author: Wolthera van Hövell <griffinvalley@gmail.com>
      Date:   Tue Jul 28 14:49:12 2015 +0200
      
          Change elevation to 1 slider and add tilt/direction mix
      
          Elevation is now not a range of two items, but rather a slider that
          is full range at 100% and only purple at 0%.
      
          Direction/Tilt mix will mix the drawing angle and tilt sensors.
      
      commit 1876187dd7ddc6eaa1d6977d43bb951ac2edba1b
      Author: Wolthera van Hövell <griffinvalley@gmail.com>
      Date:   Tue Jul 28 12:41:23 2015 +0200
      
          Fix bug with direction taking 90 for the elevation
      
          This made it not work with the geometric tools.
      
          Ref T87
      
      commit ec867a1449dc511bd69e917618a2ec4008b89c01
      Author: Wolthera van Hövell <griffinvalley@gmail.com>
      Date:   Sun Jul 26 11:01:59 2015 +0200
      
          Adding a preview to the tangent tilt options
      
      commit d4807cca6b29496bfa24f1982271e03e7cf90e9c
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Mon Jul 20 20:57:03 2015 +0200
      
          make tilt cursor also work for chalk.
      
          Fixes T88
      
      commit d582e731c3736be676d9d5604eba9ef8fafa06da
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Mon Jul 20 20:46:44 2015 +0200
      
          Add more options to the tangent normal map brush.
      
      commit 5956a9e6c55f815f19e68556582e67908e6f1201
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Mon Jul 20 15:17:19 2015 +0200
      
          Adding tilt-cursor to other brushengines, removing colour cursor entry
      
      commit d6f9bbec74bc977441e3863a17d4e45e74a490e0
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Sun Jul 19 21:13:06 2015 +0200
      
          Make rotation work with symettry multibrush
      
          Doesn't work with the snowflake and mirror options, but that's not as
          important as the symettry brush.
      
          fixes T130
      
      commit 39727914ef052e164e88ec54794c3ff8049ea8b6
      Merge: fb20900 e797d28
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Sun Jul 19 16:12:04 2015 +0200
      
          Merge branch 'calligra/2.9' into krita-testing-wolthera
      
      commit fb2090038f234b4769c58786d09a26241fef0895
      Merge: 5dccb19 32ef906
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Sun Jun 28 14:20:15 2015 +0200
      
          Merge branch 'calligra/2.9' into krita-testing-wolthera
      
          Conflicts:
          	krita/image/brushengine/kis_paint_information.cc
          	krita/image/brushengine/kis_paint_information.h
      
      commit 5dccb19e7b01627a72af5687fa154ce150c41a72
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Sun Jun 21 12:58:01 2015 +0200
      
          Fix the lights of the phongbumpmap filter for normalmaps
      
          I still don't like pentalis' way of handling the angle, but
          at the least this works fully now!
      
      commit f0c4531618ff3c5517cc1e7fba31c2fdab1376be
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Sun Jun 21 00:16:59 2015 +0200
      
          make some minor changes to the pixel processor
      
          still not right though
      
      commit a67f8a146d5bddd2d217b4c35a074f32b29777ca
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Sat Jun 20 21:13:15 2015 +0200
      
          Initial attempt to make the phong-bump-map filter accept normal maps
      
          This allow it to preview normal maps of course, and the result is a little smoother
          it still has issues with the lighting though
      
      commit 0a660ad7f5900cf0adeab4f46f0870fdef816eb5
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Sat Jun 20 15:07:25 2015 +0200
      
          removing unused functionality from the phong bumpmap filter
      
          otherwise I can't tell what's up or down anymore
      
      commit 6e0a1fc3cd8a2aeba2e2aaad30140d9b45b23ca9
      Author: Boudewijn Rempt <boud@valdyas.org>
      Date:   Sat Jun 20 12:05:53 2015 +0200
      
          whitespace
      
      commit b5c14decc028d18f3c3f1eec7c5d42e7f20affd1
      Merge: bfbc94f 003f921
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Sat Jun 20 10:39:13 2015 +0200
      
          Merge branch 'calligra/2.9' into krita-testing-wolthera
      
      commit bfbc94f687d7cade4400b20fd12de20e8cac9df0
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Tue Jun 16 18:54:25 2015 +0200
      
          Refactor the tangent tilt and canvas rotation involvement
      
          Now, the tangent tilt option understands how to mirror itself, and can be used
          in the mirror mode, as well, the multi-brush now can pass correctly rotated
          values to the tangent tilt, but it doesn't understand how to mirror for
          various reasons.
      
          Ref T130
          Ref T87
      
      commit 31ee7e8a761fa9bfae6e85ef4cfaf236bc80fdd9
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Tue Jun 16 01:14:08 2015 +0200
      
          Initial Implementation Tilt Cursor
      
          It's a little ugly, but it works for all brush-based paintops. I need to go
          back and modify tilt_option more to work with the mirror mode now. Also
          implemented strings for the color cursor, let's see where that is going to
          lead us...
      
          Ref T88
          Ref T87
      
      commit 6de9aa089ac2ec9b708869df974cb41e2dbe7b8f
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Wed Jun 10 15:22:20 2015 +0200
      
          delete log files
      
      commit 3f74928a8313462ce0574dbefd02cc246ec7df7b
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Wed Jun 10 15:17:23 2015 +0200
      
          Revive Tangent Normal Brush Engine with 2.9.5 optimisations included
      
          fixes T335
      
      commit 6edac51708995d180a4bff387d57ff3fb263e0c0
      Merge: 93cbe39 dfb4ad6
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Wed Jun 10 13:57:51 2015 +0200
      
          Merge branch 'calligra/2.9' into krita-testing-wolthera
      
      commit 93cbe392da36c3b11437f3b7ca895379656fda9c
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Sat May 16 21:23:00 2015 +0200
      
          Implement elevation limiter.
      
          I tried implementing the direction limiter, but it doesn't work.
          Also figured out the defaults issue: It doesn't retreive from a kpp though.
          Maybe that is broken? Anyway, got nice defaults in place now.
      
          Ref T129
          Fixes T165
      
      commit 523b67164ee27485ae81cff6323abd4992ce0372
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Sat May 16 17:00:59 2015 +0200
      
          Let the tangent tilt be affect by the angle of the canvas
      
          Doesn't work for the multi-hand and figure drawing tools yet.
      
          ref T130
      
      commit 527bbdd33f8b0ab1f3076000476ddad99eeee982
      Merge: a9142e0 162244f
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Sat May 16 14:15:41 2015 +0200
      
          Merge branch 'calligra/2.9' into krita-testing-wolthera
      
      commit a9142e09f7129392bbff0b7113e8e0794fe42330
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Sun Apr 26 19:50:53 2015 +0200
      
          Added tangent swizzle functionality.
      
          Several things are added in this commit:
          1. A UI for tangent normal map options.
          2. The option to switch tangent encoding.
          3. The ability to use tilt-direction, drawing angle or rotation for the
          direction parameter.
          4. A default brush for the tangent normal brush engine, but no clue how
          this is supossed to work...
      
      commit 9cb2eb673184a07f2f4f5dbdc66878514e8bd7f9
      Merge: c1f9702 a76adc6
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Sun Apr 26 14:38:40 2015 +0200
      
          Merge branch 'calligra/2.9' into krita-testing-wolthera
      
      commit c1f9702af512d7f253e930c18202ec6a0c3c1856
      Merge: 5642267 697f455
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Sun Apr 26 14:25:51 2015 +0200
      
          Merge branch 'calligra/2.9' into krita-testing-wolthera
      
      commit 56422672c5cb245b58d0c300753a957230cbd4a9
      Author: Wolthera van Hovell <griffinvalley@gmail.com>
      Date:   Fri Apr 24 14:57:29 2015 +0200
      
          First commit tangent normal brush.
      
          It... paints, takes tilt as input, and paints the right colour...
          There's still a lot to be done though.
      4cce8ca1
  16. 10 May, 2015 2 commits
  17. 27 Jan, 2015 2 commits
  18. 26 Jan, 2015 1 commit
    • Boudewijn Rempt's avatar
      Fix build error: · 24f1bda7
      Boudewijn Rempt authored
      [ 40%] Building CXX object kis_brush_mask_applicator_factories_AVX2.cpp.o
      In file included from /home/boud/kde/src/2.9/krita/image/kis_fixed_paint_device.h:23:0,
                       from /home/boud/kde/src/2.9/krita/image/kis_brush_mask_applicator_base.h:23,
                       from /home/boud/kde/src/2.9/krita/image/kis_brush_mask_applicator_factories.h:24,
                       from /home/boud/kde/src/2.9/krita/image/kis_brush_mask_applicator_factories.cpp:19:
      /home/boud/kde/src/2.9/krita/image/kis_global.h:209:44: error: redeclaration ‘constexpr T qAbs(const T&) [with T = QPoint]’ differs in ‘constexpr’
       inline QPoint qAbs<QPoint>(const QPoint &pt)
                                                  ^
      In file included from /usr/include/QtCore/qiterator.h:45:0,
                       from /usr/include/QtCore/qvector.h:45,
                       from /usr/include/QtCore/QVector:1,
                       from /home/boud/kde/src/2.9/krita/image/kis_types.h:21,
                       from /home/boud/kde/src/2.9/krita/image/kis_brush_mask_applicator_base.h:22,
                       from /home/boud/kde/src/2.9/krita/image/kis_brush_mask_applicator_factories.h:24,
                       from /home/boud/kde/src/2.9/krita/image/kis_brush_mask_applicator_factories.cpp:19:
      /usr/include/QtCore/qglobal.h:1201:27: error: from previous declaration ‘constexpr T qAbs(const T&) [with T = QPoint]’
       Q_DECL_CONSTEXPR inline T qAbs(const T &t) { return t >= 0 ? t : -t; }
                                 ^
      In file included from /home/boud/kde/src/2.9/krita/image/kis_fixed_paint_device.h:23:0,
                       from /home/boud/kde/src/2.9/krita/image/kis_brush_mask_applicator_base.h:23,
                       from /home/boud/kde/src/2.9/krita/image/kis_brush_mask_applicator_factories.h:24,
                       from /home/boud/kde/src/2.9/krita/image/kis_brush_mask_applicator_factories.cpp:19:
      /home/boud/kde/src/2.9/krita/image/kis_global.h: In function ‘constexpr T qAbs(const T&) [with T = QPoint]’:
      /home/boud/kde/src/2.9/krita/image/kis_global.h:211:24: error: ‘pt’ was not declared in this scope
           return QPoint(qAbs(pt.x()), qAbs(pt.y()));
                              ^
      /home/boud/kde/src/2.9/krita/image/kis_global.h: At global scope:
      /home/boud/kde/src/2.9/krita/image/kis_global.h:215:47: error: redeclaration ‘constexpr T qAbs(const T&) [with T = QPointF]’ differs in ‘constexpr’
       inline QPointF qAbs<QPointF>(const QPointF &pt)
                                                     ^
      In file included from /usr/include/QtCore/qiterator.h:45:0,
                       from /usr/include/QtCore/qvector.h:45,
                       from /usr/include/QtCore/QVector:1,
                       from /home/boud/kde/src/2.9/krita/image/kis_types.h:21,
                       from /home/boud/kde/src/2.9/krita/image/kis_brush_mask_applicator_base.h:22,
                       from /home/boud/kde/src/2.9/krita/image/kis_brush_mask_applicator_factories.h:24,
                       from /home/boud/kde/src/2.9/krita/image/kis_brush_mask_applicator_factories.cpp:19:
      /usr/include/QtCore/qglobal.h:1201:27: error: from previous declaration ‘constexpr T qAbs(const T&) [with T = QPointF]’
       Q_DECL_CONSTEXPR inline T qAbs(const T &t) { return t >= 0 ? t : -t; }
                                 ^
      In file included from /home/boud/kde/src/2.9/krita/image/kis_fixed_paint_device.h:23:0,
                       from /home/boud/kde/src/2.9/krita/image/kis_brush_mask_applicator_base.h:23,
                       from /home/boud/kde/src/2.9/krita/image/kis_brush_mask_applicator_factories.h:24,
                       from /home/boud/kde/src/2.9/krita/image/kis_brush_mask_applicator_factories.cpp:19:
      /home/boud/kde/src/2.9/krita/image/kis_global.h: In function ‘constexpr T qAbs(const T&) [with T = QPointF]’:
      /home/boud/kde/src/2.9/krita/image/kis_global.h:217:25: error: ‘pt’ was not declared in this scope
           return QPointF(qAbs(pt.x()), qAbs(pt.y()));
                               ^
      krita/image/CMakeFiles/kritaimage.dir/build.make:84: recipe for target 'krita/image/kis_brush_mask_applicator_factories_AVX2.cpp.o' failed
      gmake[2]: *** [krita/image/kis_brush_mask_applicator_factories_AVX2.cpp.o] Error 1
      CMakeFiles/Makefile2:16837: recipe for target 'krita/image/CMakeFiles/kritaimage.dir/all' failed
      gmake[1]: *** [krita/image/CMakeFiles/kritaimage.dir/all] Error 2
      Makefile:127: recipe for target 'all' failed
      24f1bda7
  19. 24 Jan, 2015 1 commit
  20. 23 Nov, 2014 1 commit
    • Dmitry Kazakov's avatar
      Optimized the speed of the Polygonal Gradient (ready for testing!) · 2212073d
      Dmitry Kazakov authored
      Now it is calculated in two stages: first a bspline grid, then
      the real gradient is interpolated using the grid.
      
      einspline library yet doesn't compile on Windows, but speaking truly
      the whole branch doesn't compile on Windows :) This issue will be fixed
      later by porting einspline into c++.
      2212073d
  21. 13 Nov, 2014 1 commit
  22. 03 Oct, 2014 1 commit
  23. 26 Sep, 2014 1 commit
  24. 19 Sep, 2014 1 commit
    • Dmitry Kazakov's avatar
      Implemented preview of the Cage Transform · 65b309d7
      Dmitry Kazakov authored
      Still in TODO list:
      1) Fix resetting edit points mode when switching between warp and cage
         transforms
      2) Add extrapolation at the borders of the cage
      3) Fix a random assert in the cage adjusting algorithm
      65b309d7
  25. 08 Sep, 2014 1 commit
    • Stuart Dickson's avatar
      Fix for windows · 3893946c
      Stuart Dickson authored
      Formal parameter of type __declspec(align('32'))
      cannot be passed by value, hence pass by reference.
      3893946c
  26. 18 Aug, 2014 1 commit
  27. 31 Jul, 2014 1 commit
  28. 29 Jul, 2014 1 commit
    • Dmitry Kazakov's avatar
      Finish the perspective transformations feature · 067ed2e0
      Dmitry Kazakov authored
      This patch does two things:
      
      1) Fixes painting of the size of the line for handles
      2) Prevents the user from creation of an impossible point
         configuration. If the user creates some weird configuration,
         he will see a warning label in the docker *and* his last stroke
         will be canceled.
      067ed2e0
  29. 23 Jul, 2014 1 commit
    • Dmitry Kazakov's avatar
      Split the transform tool into several classes · 9c919cde
      Dmitry Kazakov authored
      Now the tool is split into three classes:
      
      o KisToolTransform
      o KisWarpTransformStrategy
      o KisFreeTransformStrategy
      
      They handle the transformation modes separately.
      
      This patch also ports the handwritten gradient descent methods into
      GNU Scientific Library.
      9c919cde
  30. 01 Jul, 2014 1 commit
    • Dmitry Kazakov's avatar
      [FEATURE] Pressure sensitive line tool · e6ce7e36
      Dmitry Kazakov authored
      Now when you draw the line tool, the preview is updated automatically,
      more than that, you can control pressure and other sensors on the fly!
      
      What's more, now you can use all the complicated sensors and mirroring
      with the line tool!
      
      BUG:333873
      CCMAIL:kimageshop@kde.org
      e6ce7e36
  31. 30 May, 2014 1 commit
  32. 09 Jan, 2014 1 commit
  33. 28 Dec, 2013 1 commit
  34. 07 Nov, 2013 1 commit
    • Dmitry Kazakov's avatar
      Added a small KisAssert framework · 6c9a6c79
      Dmitry Kazakov authored
      Now if the error is not too much critical one can use KIS_ASSERT or
      KIS_ASSERT_RECOVER macros. These macros check the condition and ask
      the user what to do: try to continue or abort the program and see the
      backtrace.
      
      These macros can be use in the following way:
      
      KIS_ASSERT(condition);
      
      or
      
      KIS_ASSERT_RECOVER(condition) {
          // the code that recovers your program after a falure
      }
      
      There are three shortcuts available:
      
      KIS_ASSERT_RECOVER_BREAK(cond); --- calls 'break;'
      KIS_ASSERT_RECOVER_RETURN(cond); --- returns from current function
      KIS_ASSERT_RECOVER_RETURN_VALUE(cond, retval) --- returns from the function with some result
      
      WARNING: These asserts are supposed to be present even in NDEBUG mode!
      TODO: Implement automatic saving of the document. See the note
            in kis_assert.cpp
      6c9a6c79
  35. 20 Oct, 2013 1 commit
  36. 24 Sep, 2013 2 commits