File Remove-deprecated_invalid-throw-declarations.patch of Package calligra4

From 1b154911f693306d663e3d9cffc06571bf627c5a Mon Sep 17 00:00:00 2001
From: Boudewijn Rempt <boud@valdyas.org>
Date: Wed, 4 Apr 2018 11:07:02 +0200
Subject: [PATCH] Remove deprecated/invalid throw declarations

Scanning dependencies of target kis_properties_configuration_test
[ 49%] Building CXX object libs/image/tests/CMakeFiles/kis_properties_configuration_test.dir/kis_properties_configuration_test.cpp.o
In file included from /home/boud/dev/krita/libs/image/tests/kis_math_toolbox_test.cpp:22:0:
/home/boud/dev/krita/libs/image/kis_math_toolbox.h:53:9: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
         throw(std::bad_alloc)
         ^~~~~
/home/boud/dev/krita/libs/image/kis_math_toolbox.h:78:72: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
     inline KisWavelet* initWavelet(KisPaintDeviceSP lay, const QRect&) throw(std::bad_alloc);
                                                                        ^~~~~
/home/boud/dev/krita/libs/image/kis_math_toolbox.h:129:1: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 throw(std::bad_alloc)
---
 libs/image/kis_math_toolbox.h | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/libs/image/kis_math_toolbox.h b/libs/image/kis_math_toolbox.h
index 1477441e44..69fb436244 100644
--- a/krita/image/kis_math_toolbox.h
+++ b/krita/image/kis_math_toolbox.h
@@ -50,10 +50,9 @@ public:
     struct KisFloatRepresentation {
 
         KisFloatRepresentation(uint nsize, uint ndepth)
-        throw(std::bad_alloc)
-                : coeffs(new float[nsize*nsize*ndepth])
-                , size(nsize)
-                , depth(ndepth) {
+            : coeffs(new float[nsize*nsize*ndepth])
+            , size(nsize)
+            , depth(ndepth) {
             // XXX: Valgrind shows that these are being used without being initialised.
             for (quint32 i = 0; i < nsize * nsize * ndepth; ++i) {
                 coeffs[i] = 0;
@@ -91,7 +91,7 @@ public:
      * This function initialize a wavelet structure
      * @param lay the layer that will be used for the transformation
      */
-    inline KisWavelet* initWavelet(KisPaintDeviceSP lay, const QRect&) throw(std::bad_alloc);
+    inline KisWavelet* initWavelet(KisPaintDeviceSP lay, const QRect&);
 
     inline uint fastWaveletTotalSteps(const QRect&);
 
@@ -164,7 +164,6 @@ private:
 
 
 inline KisMathToolbox::KisWavelet* KisMathToolbox::initWavelet(KisPaintDeviceSP src, const QRect& rect)
-throw(std::bad_alloc)
 {
     int size;
     int maxrectsize = (rect.height() < rect.width()) ? rect.width() : rect.height();
-- 
GitLab

openSUSE Build Service is sponsored by