[arch-commits] Commit in freecad/trunk (3 files)

Alexander Rødseth arodseth at archlinux.org
Sun Mar 28 13:37:41 UTC 2021


    Date: Sunday, March 28, 2021 @ 13:37:41
  Author: arodseth
Revision: 906844

upgpkg: freecad 0.19.1-1

Modified:
  freecad/trunk/PKGBUILD
Deleted:
  freecad/trunk/c378eb81e7c2e7ad3744cf25873b2d98077106f6.patch
  freecad/trunk/fd9cdb9de9d06ebd8dc1ce26c99e4e4eb005ca43.patch

------------------------------------------------+
 PKGBUILD                                       |   57 ---
 c378eb81e7c2e7ad3744cf25873b2d98077106f6.patch |   66 ---
 fd9cdb9de9d06ebd8dc1ce26c99e4e4eb005ca43.patch |  404 -----------------------
 3 files changed, 15 insertions(+), 512 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-03-28 13:37:38 UTC (rev 906843)
+++ PKGBUILD	2021-03-28 13:37:41 UTC (rev 906844)
@@ -10,63 +10,37 @@
 # Contributor: gborzi
 
 pkgname=freecad
-pkgver=0.18.5
-_commit=734202bc810bf61bd6f66bdc060e6951bd0d134d  # tag: 0.18.5
-pkgrel=6
+pkgver=0.19.1
+pkgrel=1
+_commit=a88db11e0a908f6e38f92bfc5187b13ebe470438 # tag: 0.19.1
 pkgdesc='General purpose 3D CAD modeler'
 arch=(x86_64)
 url='https://freecadweb.org/'
 license=(LGPL)
 depends=(boost-libs glew jsoncpp libspnav med netcdf opencascade openmpi
-         pyside2-tools python-matplotlib python-pivy python-pyside2 qt5-svg
-         qt5-tools qt5-webkit qt5-x11extras shared-mime-info xerces-c)
+         pyside2-tools python-matplotlib python-pivy python-ply python-pyside2
+         qt5-svg qt5-tools qt5-webkit qt5-x11extras qt5-xmlpatterns
+         shared-mime-info xerces-c)
 makedepends=(boost cmake coin eigen gcc-fortran gendesk git ninja pyside2
              python-shiboken2 shiboken2 swig)
 source=("git+https://github.com/FreeCAD/FreeCAD#commit=$_commit"
-        "$pkgname-qt-5.14.patch::https://github.com/FreeCAD/FreeCAD/commit/17ed2b196a58.patch"
-        "$pkgname-qt-5.14-version.patch::https://github.com/FreeCAD/FreeCAD/commit/1666b28836ba.patch"
-        "$pkgname-qt-5.15.patch::https://github.com/FreeCAD/FreeCAD/commit/b2882c699b14.patch"
-        "$pkgname-py38.patch::https://github.com/FreeCAD/FreeCAD/commit/6eacb17b3e03.patch"
-        "$pkgname-py39.patch::https://github.com/FreeCAD/FreeCAD/commit/ae641dc5278e.patch"
-        "$pkgname-boost-1.73.patch::https://github.com/FreeCAD/FreeCAD/commit/200c7c7e00d5.patch"
-        fd9cdb9de9d06ebd8dc1ce26c99e4e4eb005ca43.patch
-        c378eb81e7c2e7ad3744cf25873b2d98077106f6.patch
         freecad.xml)
 sha256sums=('SKIP'
-            '9af1f0b85a58acad3035fd5abfaf60f57f6a5424101cb328f16468a9e4aebfa5'
-            'a74b2f0a48056f73d4b5adaf37bb71750b140bb05a4e417b8c7ed35f294facde'
-            '820d863794a0dbf0ca1dbe5a419d1823202b2459fee1cc8751a61af67a735bb6'
-            '3d2570c143825acd01b8eeb645fc450566e9ac20d6333de9e17cbc10fb5a13e0'
-            'de1d61c18d329e0903d5c1bc27b9c4e28c4911380bdd4b6c49da5b63740862f1'
-            '99a55f06e9d3be3385cb41d747b1a6c9515b010d867bdeeda000a45c0014a89e'
-            '2080a54526598bc433465c459518d9dbad1a374150d8347938739f5f6f65b2df'
-            '8dd7d59d0d8bb96605495d862ce4dfd0be700425c737f626f4c9ccdc90b856c8'
             '4ee1daf47c8371a3e17173d85a0dd4a106dacd7899d783ccd97a6f3e0dd1a21f')
 
 prepare() {
-  cd FreeCAD
+  cd FreeCAD/src
 
-  patch -Np1 -i ../$pkgname-qt-5.14.patch
-  patch -Np1 -i ../$pkgname-qt-5.14-version.patch
-  patch -Np1 -i ../$pkgname-qt-5.15.patch
-  patch -Np1 -i ../$pkgname-py38.patch
-  patch -Np1 -i ../$pkgname-py39.patch
-  patch -Np1 -i ../$pkgname-boost-1.73.patch
-  patch -Np1 -i ../fd9cdb9de9d06ebd8dc1ce26c99e4e4eb005ca43.patch
-  patch -Np1 -i ../c378eb81e7c2e7ad3744cf25873b2d98077106f6.patch
+#  # Fix missing "std::" qualifiers, sledge hammer style
+#  find . \
+#    ! -wholename "*/Mod/Sketcher/*" \
+#    ! -wholename "*/Mod/PartDesign/*" \
+#    -name "*.cpp" -type f \
+#    -exec sed -i '1i using namespace std;' {} \;
 
-  cd src
-
-  # Fix missing "std::" qualifiers, sledge hammer style
-  find . \
-    ! -wholename "*/Mod/Sketcher/*" \
-    ! -wholename "*/Mod/PartDesign/*" \
-    -name "*.cpp" -type f \
-    -exec sed -i '1i using namespace std;' {} \;
-
   # Add missing include
-  sed -i '1i \#include <Inventor\/SbByteBuffer.h>' \
-    Gui/Quarter/QuarterWidget.cpp
+#  sed -i '1i \#include <Inventor\/SbByteBuffer.h>' \
+#    Gui/Quarter/QuarterWidget.cpp
 
   # Create desktop shortcut
   gendesk -f -n --pkgname "$pkgname" --pkgdesc "$pkgdesc" --name FreeCAD \
@@ -118,7 +92,6 @@
   install -Dm644 freecad.svg \
     "$pkgdir/usr/share/icons/hicolor/scalable/apps/freecad.svg"
 
-
   # Package symlinks in /usr/bin
   install -d "$pkgdir/usr/bin"
   ln -sf /usr/lib/freecad/bin/FreeCAD "$pkgdir/usr/bin/freecad"

Deleted: c378eb81e7c2e7ad3744cf25873b2d98077106f6.patch
===================================================================
--- c378eb81e7c2e7ad3744cf25873b2d98077106f6.patch	2021-03-28 13:37:38 UTC (rev 906843)
+++ c378eb81e7c2e7ad3744cf25873b2d98077106f6.patch	2021-03-28 13:37:41 UTC (rev 906844)
@@ -1,66 +0,0 @@
-commit c378eb81e7c2e7ad3744cf25873b2d98077106f6
-Author: Gabriel Wicke <gswicke at gmail.com>
-Date:   Sun May 17 21:09:19 2020 -0700
-
-    [import] Hotfix for build failure from bad debug code
-    
-    Quick fix for a build failure with latest opencascade. Directly use
-    std::cout instead of custom streams.
-    
-    (cherry picked from commit 063515f65007c116c4c0e05c1fcf82637b8bf152)
-
-diff --git a/src/Mod/Import/App/StepShape.cpp b/src/Mod/Import/App/StepShape.cpp
-index c05435a3e..11befbdc2 100644
---- a/src/Mod/Import/App/StepShape.cpp
-+++ b/src/Mod/Import/App/StepShape.cpp
-@@ -65,38 +65,33 @@ int StepShape::read(const char* fileName)
-         throw Base::FileException("Cannot open STEP file");
-     }
- 
--    //Standard_Integer ic = Interface_Static::IVal("read.precision.mode"); 
--    //Standard_Real rp = Interface_Static::RVal("read.maxprecision.val"); 
--    //Standard_Integer ic = Interface_Static::IVal("read.maxprecision.mode"); 
--    //Standard_Integer mv = Interface_Static::IVal("read.stdsameparameter.mode"); 
--    //Standard_Integer rp = Interface_Static::IVal("read.surfacecurve.mode"); 
--    //Standard_Real era = Interface_Static::RVal("read.encoderegularity.angle"); 
--    //Standard_Integer ic = Interface_Static::IVal("read.step.product.mode"); 
-+    //Standard_Integer ic = Interface_Static::IVal("read.precision.mode");
-+    //Standard_Real rp = Interface_Static::RVal("read.maxprecision.val");
-+    //Standard_Integer ic = Interface_Static::IVal("read.maxprecision.mode");
-+    //Standard_Integer mv = Interface_Static::IVal("read.stdsameparameter.mode");
-+    //Standard_Integer rp = Interface_Static::IVal("read.surfacecurve.mode");
-+    //Standard_Real era = Interface_Static::RVal("read.encoderegularity.angle");
-+    //Standard_Integer ic = Interface_Static::IVal("read.step.product.mode");
-     //Standard_Integer ic = Interface_Static::IVal("read.step.product.context");
--    //Standard_Integer ic = Interface_Static::IVal("read.step.shape.repr"); 
-+    //Standard_Integer ic = Interface_Static::IVal("read.step.shape.repr");
-     //Standard_Integer ic = Interface_Static::IVal("read.step.assembly.level");
-     //Standard_Integer ic = Interface_Static::IVal("read.step.shape.relationship");
--    //Standard_Integer ic = Interface_Static::IVal("read.step.shape.aspect"); 
-+    //Standard_Integer ic = Interface_Static::IVal("read.step.shape.aspect");
- 
--    Handle(TColStd_HSequenceOfTransient) list = aReader.GiveList(); 
-+    Handle(TColStd_HSequenceOfTransient) list = aReader.GiveList();
- 
-     //Use method StepData_StepModel::NextNumberForLabel to find its rank with the following:
-     //Standard_CString label = "#...";
-     Handle(StepData_StepModel) model = aReader.StepModel();
-     //rank = model->NextNumberForLabe(label, 0, Standard_False);
- 
--    Handle(Message_PrinterOStream) mstr = new Message_PrinterOStream();
--    Handle(Message_Messenger) msg = new Message_Messenger(mstr);
--
-     std::cout << "dump of step header:" << std::endl;
--
--    model->DumpHeader(msg);
-+    model->DumpHeader(std::cout);
- 
-     for(int nent=1;nent<=model->NbEntities();nent++) {
-       Handle(Standard_Transient) entity=model->Entity(nent);
--      
-       std::cout << "label entity " << nent << ":" ;
--      model->PrintLabel(entity,msg);
-+      model->PrintLabel(entity, std::cout);
-       std::cout << ";"<< entity->DynamicType()->Name() << std::endl;
-     }
- 

Deleted: fd9cdb9de9d06ebd8dc1ce26c99e4e4eb005ca43.patch
===================================================================
--- fd9cdb9de9d06ebd8dc1ce26c99e4e4eb005ca43.patch	2021-03-28 13:37:38 UTC (rev 906843)
+++ fd9cdb9de9d06ebd8dc1ce26c99e4e4eb005ca43.patch	2021-03-28 13:37:41 UTC (rev 906844)
@@ -1,404 +0,0 @@
-commit 318d8c4eed77df0ce590bfdce3bfc349c0063fa8
-Author: wmayer <wmayer at users.sourceforge.net>
-Date:   Thu Oct 8 14:48:35 2020 +0200
-
-    Part/Import: [skip ci] disable use of Message_ProgressIndicator for OCC >= 7.5 due to major API changes
-    
-    (cherry picked from commit fd9cdb9de9d06ebd8dc1ce26c99e4e4eb005ca43)
-
-diff --git a/src/Mod/Import/App/AppImportPy.cpp b/src/Mod/Import/App/AppImportPy.cpp
-index dfb6234e5..8c11ee207 100644
---- a/src/Mod/Import/App/AppImportPy.cpp
-+++ b/src/Mod/Import/App/AppImportPy.cpp
-@@ -146,12 +146,16 @@ private:
-                         throw Py::Exception(PyExc_IOError, "cannot read STEP file");
-                     }
- 
-+#if OCC_VERSION_HEX < 0x070500
-                     Handle(Message_ProgressIndicator) pi = new Part::ProgressIndicator(100);
-                     aReader.Reader().WS()->MapReader()->SetProgress(pi);
-                     pi->NewScope(100, "Reading STEP file...");
-                     pi->Show();
-+#endif
-                     aReader.Transfer(hDoc);
-+#if OCC_VERSION_HEX < 0x070500
-                     pi->EndScope();
-+#endif
-                 }
-                 catch (OSD_Exception& e) {
-                     Base::Console().Error("%s\n", e.GetMessageString());
-@@ -178,12 +182,16 @@ private:
-                         throw Py::Exception(PyExc_IOError, "cannot read IGES file");
-                     }
- 
-+#if OCC_VERSION_HEX < 0x070500
-                     Handle(Message_ProgressIndicator) pi = new Part::ProgressIndicator(100);
-                     aReader.WS()->MapReader()->SetProgress(pi);
-                     pi->NewScope(100, "Reading IGES file...");
-                     pi->Show();
-+#endif
-                     aReader.Transfer(hDoc);
-+#if OCC_VERSION_HEX < 0x070500
-                     pi->EndScope();
-+#endif
-                     // http://opencascade.blogspot.de/2009/03/unnoticeable-memory-leaks-part-2.html
-                     Handle(IGESToBRep_Actor)::DownCast(aReader.WS()->TransferReader()->Actor())
-                             ->SetModel(new IGESData_IGESModel);
-diff --git a/src/Mod/Import/Gui/AppImportGuiPy.cpp b/src/Mod/Import/Gui/AppImportGuiPy.cpp
-index 8f9ace29c..9414e622a 100644
---- a/src/Mod/Import/Gui/AppImportGuiPy.cpp
-+++ b/src/Mod/Import/Gui/AppImportGuiPy.cpp
-@@ -391,12 +391,16 @@ private:
-                         throw Py::Exception(PyExc_IOError, "cannot read STEP file");
-                     }
- 
-+#if OCC_VERSION_HEX < 0x070500
-                     Handle(Message_ProgressIndicator) pi = new Part::ProgressIndicator(100);
-                     aReader.Reader().WS()->MapReader()->SetProgress(pi);
-                     pi->NewScope(100, "Reading STEP file...");
-                     pi->Show();
-+#endif
-                     aReader.Transfer(hDoc);
-+#if OCC_VERSION_HEX < 0x070500
-                     pi->EndScope();
-+#endif
-                 }
-                 catch (OSD_Exception& e) {
-                     Base::Console().Error("%s\n", e.GetMessageString());
-@@ -423,12 +427,16 @@ private:
-                         throw Py::Exception(Base::BaseExceptionFreeCADError, "cannot read IGES file");
-                     }
- 
-+#if OCC_VERSION_HEX < 0x070500
-                     Handle(Message_ProgressIndicator) pi = new Part::ProgressIndicator(100);
-                     aReader.WS()->MapReader()->SetProgress(pi);
-                     pi->NewScope(100, "Reading IGES file...");
-                     pi->Show();
-+#endif
-                     aReader.Transfer(hDoc);
-+#if OCC_VERSION_HEX < 0x070500
-                     pi->EndScope();
-+#endif
-                     // http://opencascade.blogspot.de/2009/03/unnoticeable-memory-leaks-part-2.html
-                     Handle(IGESToBRep_Actor)::DownCast(aReader.WS()->TransferReader()->Actor())
-                             ->SetModel(new IGESData_IGESModel);
-@@ -601,12 +609,16 @@ private:
-                     throw Py::Exception(PyExc_IOError, "cannot read STEP file");
-                 }
- 
-+#if OCC_VERSION_HEX < 0x070500
-                 Handle(Message_ProgressIndicator) pi = new Part::ProgressIndicator(100);
-                 aReader.Reader().WS()->MapReader()->SetProgress(pi);
-                 pi->NewScope(100, "Reading STEP file...");
-                 pi->Show();
-+#endif
-                 aReader.Transfer(hDoc);
-+#if OCC_VERSION_HEX < 0x070500
-                 pi->EndScope();
-+#endif
-             }
-             else if (file.hasExtension("igs") || file.hasExtension("iges")) {
-                 Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
-@@ -623,12 +635,16 @@ private:
-                     throw Py::Exception(PyExc_IOError, "cannot read IGES file");
-                 }
- 
-+#if OCC_VERSION_HEX < 0x070500
-                 Handle(Message_ProgressIndicator) pi = new Part::ProgressIndicator(100);
-                 aReader.WS()->MapReader()->SetProgress(pi);
-                 pi->NewScope(100, "Reading IGES file...");
-                 pi->Show();
-+#endif
-                 aReader.Transfer(hDoc);
-+#if OCC_VERSION_HEX < 0x070500
-                 pi->EndScope();
-+#endif
-                 // http://opencascade.blogspot.de/2009/03/unnoticeable-memory-leaks-part-2.html
-                 Handle(IGESToBRep_Actor)::DownCast(aReader.WS()->TransferReader()->Actor())
-                         ->SetModel(new IGESData_IGESModel);
-diff --git a/src/Mod/Part/App/ImportIges.cpp b/src/Mod/Part/App/ImportIges.cpp
-index abc0faeb5..3df5212f9 100644
---- a/src/Mod/Part/App/ImportIges.cpp
-+++ b/src/Mod/Part/App/ImportIges.cpp
-@@ -90,16 +90,20 @@ int Part::ImportIgesParts(App::Document *pcDoc, const char* FileName)
- 
- #if 1
-         std::string aName = fi.fileNamePure();
-+#if OCC_VERSION_HEX < 0x070500
-         Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
-         pi->NewScope(100, "Reading IGES file...");
-         pi->Show();
-         aReader.WS()->MapReader()->SetProgress(pi);
-+#endif
- 
-         // make model
-         aReader.ClearShapes();
-         //Standard_Integer nbRootsForTransfer = aReader.NbRootsForTransfer();
-         aReader.TransferRoots();
-+#if OCC_VERSION_HEX < 0x070500
-         pi->EndScope();
-+#endif
- 
-         // put all other free-flying shapes into a single compound
-         Standard_Boolean emptyComp = Standard_True;
-diff --git a/src/Mod/Part/App/ImportStep.cpp b/src/Mod/Part/App/ImportStep.cpp
-index 828c27040..9db9e397d 100644
---- a/src/Mod/Part/App/ImportStep.cpp
-+++ b/src/Mod/Part/App/ImportStep.cpp
-@@ -105,10 +105,12 @@ int Part::ImportStepParts(App::Document *pcDoc, const char* Name)
-         throw Base::FileException("Cannot open STEP file");
-     }
- 
-+#if OCC_VERSION_HEX < 0x070500
-     Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
-     aReader.WS()->MapReader()->SetProgress(pi);
-     pi->NewScope(100, "Reading STEP file...");
-     pi->Show();
-+#endif
- 
-     // Root transfers
-     Standard_Integer nbr = aReader.NbRootsForTransfer();
-@@ -117,7 +119,9 @@ int Part::ImportStepParts(App::Document *pcDoc, const char* Name)
-         Base::Console().Log("STEP: Transferring Root %d\n",n);
-         aReader.TransferRoot(n);
-     }
-+#if OCC_VERSION_HEX < 0x070500
-     pi->EndScope();
-+#endif
- 
-     // Collecting resulting entities
-     Standard_Integer nbs = aReader.NbShapes();
-diff --git a/src/Mod/Part/App/ProgressIndicator.cpp b/src/Mod/Part/App/ProgressIndicator.cpp
-index c5f9d6426..8eb0fcadd 100644
---- a/src/Mod/Part/App/ProgressIndicator.cpp
-+++ b/src/Mod/Part/App/ProgressIndicator.cpp
-@@ -54,6 +54,7 @@ using namespace Part;
-   \endcode
-  */
- 
-+#if OCC_VERSION_HEX < 0x070500
- ProgressIndicator::ProgressIndicator (int theMaxVal)
-   : myProgress(new Base::SequencerLauncher("", theMaxVal))
- {
-@@ -83,3 +84,4 @@ Standard_Boolean ProgressIndicator::UserBreak()
- {
-     return myProgress->wasCanceled();
- }
-+#endif
-diff --git a/src/Mod/Part/App/ProgressIndicator.h b/src/Mod/Part/App/ProgressIndicator.h
-index 73214c071..ad34d2ee5 100644
---- a/src/Mod/Part/App/ProgressIndicator.h
-+++ b/src/Mod/Part/App/ProgressIndicator.h
-@@ -25,11 +25,13 @@
- #define PART_PROGRESSINDICATOR_H
- 
- #include <Message_ProgressIndicator.hxx>
-+#include <Standard_Version.hxx>
- #include <Base/Sequencer.h>
- #include <memory>
- 
- namespace Part {
- 
-+#if OCC_VERSION_HEX < 0x070500
- class PartExport ProgressIndicator : public Message_ProgressIndicator
- {
- public:
-@@ -42,6 +44,7 @@ public:
- private:
-     std::unique_ptr<Base::SequencerLauncher> myProgress;
- };
-+#endif
- 
- }
- 
-diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp
-index cc8772e6e..5615f217a 100644
---- a/src/Mod/Part/App/TopoShape.cpp
-+++ b/src/Mod/Part/App/TopoShape.cpp
-@@ -584,17 +584,21 @@ void TopoShape::importIges(const char *FileName)
-         if (aReader.ReadFile(encodeFilename(FileName).c_str()) != IFSelect_RetDone)
-             throw Base::FileException("Error in reading IGES");
- 
-+#if OCC_VERSION_HEX < 0x070500
-         Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
-         pi->NewScope(100, "Reading IGES file...");
-         pi->Show();
-         aReader.WS()->MapReader()->SetProgress(pi);
-+#endif
- 
-         // make brep
-         aReader.ClearShapes();
-         aReader.TransferRoots();
-         // one shape that contains all subshapes
-         this->_Shape = aReader.OneShape();
-+#if OCC_VERSION_HEX < 0x070500
-         pi->EndScope();
-+#endif
-     }
-     catch (Standard_Failure& e) {
-         throw Base::CADKernelError(e.GetMessageString());
-@@ -608,16 +612,20 @@ void TopoShape::importStep(const char *FileName)
-         if (aReader.ReadFile(encodeFilename(FileName).c_str()) != IFSelect_RetDone)
-             throw Base::FileException("Error in reading STEP");
- 
-+#if OCC_VERSION_HEX < 0x070500
-         Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
-         aReader.WS()->MapReader()->SetProgress(pi);
-         pi->NewScope(100, "Reading STEP file...");
-         pi->Show();
-+#endif
- 
-         // Root transfers
-         aReader.TransferRoots();
-         // one shape that contains all subshapes
-         this->_Shape = aReader.OneShape();
-+#if OCC_VERSION_HEX < 0x070500
-         pi->EndScope();
-+#endif
-     }
-     catch (Standard_Failure& e) {
-         throw Base::CADKernelError(e.GetMessageString());
-@@ -630,7 +638,7 @@ void TopoShape::importBrep(const char *FileName)
-         // read brep-file
-         BRep_Builder aBuilder;
-         TopoDS_Shape aShape;
--#if OCC_VERSION_HEX >= 0x060300
-+#if OCC_VERSION_HEX >= 0x060300 && OCC_VERSION_HEX < 0x070500
-         Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
-         pi->NewScope(100, "Reading BREP file...");
-         pi->Show();
-@@ -652,16 +660,19 @@ void TopoShape::importBrep(std::istream& str, int indicator)
-         // read brep-file
-         BRep_Builder aBuilder;
-         TopoDS_Shape aShape;
--#if OCC_VERSION_HEX >= 0x060300
-+#if OCC_VERSION_HEX >= 0x060300 && OCC_VERSION_HEX < 0x070500
-         if (indicator) {
-             Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
-             pi->NewScope(100, "Reading BREP file...");
-             pi->Show();
-             BRepTools::Read(aShape,str,aBuilder,pi);
-             pi->EndScope();
--        } else
-+        }
-+        else {
-             BRepTools::Read(aShape,str,aBuilder);
-+        }
- #else
-+        (void)indicator;
-         BRepTools::Read(aShape,str,aBuilder);
- #endif
-         this->_Shape = aShape;
-@@ -750,10 +761,13 @@ void TopoShape::exportStep(const char *filename) const
- 
-         const Handle(XSControl_TransferWriter)& hTransferWriter = aWriter.WS()->TransferWriter();
-         Handle(Transfer_FinderProcess) hFinder = hTransferWriter->FinderProcess();
-+
-+#if OCC_VERSION_HEX < 0x070500
-         Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
-         hFinder->SetProgress(pi);
-         pi->NewScope(100, "Writing STEP file...");
-         pi->Show();
-+#endif
- 
-         if (aWriter.Transfer(this->_Shape, STEPControl_AsIs) != IFSelect_RetDone)
-             throw Base::FileException("Error in transferring STEP");
-@@ -767,7 +781,9 @@ void TopoShape::exportStep(const char *filename) const
- 
-         if (aWriter.Write(encodeFilename(filename).c_str()) != IFSelect_RetDone)
-             throw Base::FileException("Writing of STEP failed");
-+#if OCC_VERSION_HEX < 0x070500
-         pi->EndScope();
-+#endif
-     }
-     catch (Standard_Failure& e) {
-         throw Base::CADKernelError(e.GetMessageString());
-diff --git a/src/Mod/Part/Gui/TaskCheckGeometry.cpp b/src/Mod/Part/Gui/TaskCheckGeometry.cpp
-index 0b74eec02..b5d6d11eb 100644
---- a/src/Mod/Part/Gui/TaskCheckGeometry.cpp
-+++ b/src/Mod/Part/Gui/TaskCheckGeometry.cpp
-@@ -418,10 +418,12 @@ void TaskCheckGeometryResults::goCheck()
-     std::vector<Gui::SelectionSingleton::SelObj>::iterator it;
-     ResultEntry *theRoot = new ResultEntry();
- 
-+#if OCC_VERSION_HEX < 0x070500
-     Handle(Message_ProgressIndicator) theProgress = new BOPProgressIndicator(tr("Check geometry"), Gui::getMainWindow());
-     theProgress->NewScope("BOP check...");
- #if OCC_VERSION_HEX >= 0x060900
-     theProgress->Show();
-+#endif
- #endif
- 
-     selectedCount = static_cast<int>(selection.size());
-@@ -484,11 +486,18 @@ void TaskCheckGeometryResults::goCheck()
-             std::string label = "Checking ";
-             label += feature->Label.getStrValue();
-             label += "...";
-+#if OCC_VERSION_HEX < 0x070500
-             theProgress->NewScope(label.c_str());
-             invalidShapes += goBOPSingleCheck(shape, theRoot, baseName, theProgress);
-+#else
-+            invalidShapes += goBOPSingleCheck(shape, theRoot, baseName, nullptr);
-+#endif
-+
-+#if OCC_VERSION_HEX < 0x070500
-             theProgress->EndScope();
-             if (theProgress->UserBreak())
-               break;
-+#endif
-           }
-         }
-     }
-@@ -613,7 +622,7 @@ int TaskCheckGeometryResults::goBOPSingleCheck(const TopoDS_Shape& shapeIn, Resu
-   //this is left for another time.
-   TopoDS_Shape BOPCopy = BRepBuilderAPI_Copy(shapeIn).Shape();
-   BOPAlgo_ArgumentAnalyzer BOPCheck;
--#if OCC_VERSION_HEX >= 0x060900
-+#if OCC_VERSION_HEX >= 0x060900 && OCC_VERSION_HEX < 0x070500
-   BOPCheck.SetProgressIndicator(theProgress);
- #else
-   Q_UNUSED(theProgress);
-@@ -961,6 +970,7 @@ TaskCheckGeometryDialog::~TaskCheckGeometryDialog()
- 
- ////////////////////////////////////////////////////////////////////////////////////////////////
- 
-+#if OCC_VERSION_HEX < 0x070500
- BOPProgressIndicator::BOPProgressIndicator (const QString& title, QWidget* parent)
- {
-     steps = 0;
-@@ -1023,5 +1033,6 @@ Standard_Boolean BOPProgressIndicator::UserBreak()
- 
-     return Standard_False;
- }
-+#endif
- 
- #include "moc_TaskCheckGeometry.cpp"
-diff --git a/src/Mod/Part/Gui/TaskCheckGeometry.h b/src/Mod/Part/Gui/TaskCheckGeometry.h
-index e7d7d3127..1cf595bf8 100644
---- a/src/Mod/Part/Gui/TaskCheckGeometry.h
-+++ b/src/Mod/Part/Gui/TaskCheckGeometry.h
-@@ -27,6 +27,7 @@
- #include <BRepCheck_Analyzer.hxx>
- #include <BRepCheck_Status.hxx>
- #include <Message_ProgressIndicator.hxx>
-+#include <Standard_Version.hxx>
- #include <TopTools_MapOfShape.hxx>
- #include <Gui/TaskView/TaskDialog.h>
- #include <Gui/TaskView/TaskView.h>
-@@ -147,6 +148,7 @@ private:
-     QTextEdit *contentLabel;
- };
- 
-+#if OCC_VERSION_HEX < 0x070500
- class BOPProgressIndicator : public Message_ProgressIndicator
- {
- public:
-@@ -162,7 +164,7 @@ private:
-     QTime time;
-     QProgressDialog* myProgress;
- };
--
-+#endif
- }
- 
- #endif // TASKCHECKGEOMETRY_H



More information about the arch-commits mailing list