From 0bcb30ff9c650a39074d4208f09a59bef9127674 Mon Sep 17 00:00:00 2001 From: asl Date: Mon, 22 Jun 2015 16:41:44 +0300 Subject: [PATCH] patch for correct compilation on Linux --- src/HYDROData/HYDROData_CalculationCase.cxx | 3 ++- src/HYDROData/HYDROData_SinusX.cxx | 4 ++-- src/HYDROData/HYDROData_SinusX.h | 4 ++-- src/HYDROGUI/HYDROGUI_ExportSinusXDlg.cxx | 2 +- src/HYDROGUI/HYDROGUI_Tool.cxx | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/HYDROData/HYDROData_CalculationCase.cxx b/src/HYDROData/HYDROData_CalculationCase.cxx index 1bd1057d..00474d50 100644 --- a/src/HYDROData/HYDROData_CalculationCase.cxx +++ b/src/HYDROData/HYDROData_CalculationCase.cxx @@ -690,7 +690,8 @@ void HYDROData_CalculationCase::UpdateRegionsOrder() return; HYDROData_SequenceOfObjects aRegions = GetRegions( false ); - aRegions.Append( GetRegions( true ) ); + HYDROData_SequenceOfObjects aRegionsLC = GetRegions( true ); + aRegions.Append( aRegionsLC ); HYDROData_SequenceOfObjects::Iterator anIter( aRegions ); for ( ; anIter.More(); anIter.Next() ) diff --git a/src/HYDROData/HYDROData_SinusX.cxx b/src/HYDROData/HYDROData_SinusX.cxx index c24905b1..86a5b151 100644 --- a/src/HYDROData/HYDROData_SinusX.cxx +++ b/src/HYDROData/HYDROData_SinusX.cxx @@ -304,7 +304,7 @@ bool HYDROData_SinusX::Parse(QFile& theFile) } -bool HYDROData_SinusX::Export(const QString& theFilePath, NCollection_Sequence& theEntities) +bool HYDROData_SinusX::Export(const QString& theFilePath, const NCollection_Sequence& theEntities) { if ( theFilePath.isEmpty() ) { @@ -330,7 +330,7 @@ bool HYDROData_SinusX::Export(const QString& theFilePath, NCollection_Sequence& theEntities) +void HYDROData_SinusX::HydroToSX(QFile& theFile, const NCollection_Sequence& theEntities) { QTextStream aTextStream(&theFile); aTextStream << "C Generated by HYDRO Module\n"; diff --git a/src/HYDROData/HYDROData_SinusX.h b/src/HYDROData/HYDROData_SinusX.h index 3da6ff89..08c77b20 100644 --- a/src/HYDROData/HYDROData_SinusX.h +++ b/src/HYDROData/HYDROData_SinusX.h @@ -56,14 +56,14 @@ public: HYDROData_SinusX( ); virtual ~HYDROData_SinusX(); bool Import (const QString& theFilePath, Handle(HYDROData_Document) theDocument, NCollection_Sequence& theEntities); - bool Export(const QString& theFilePath, NCollection_Sequence& theEntities); + bool Export(const QString& theFilePath, const NCollection_Sequence& theEntities); private: void SXToHydro(Handle(HYDROData_Document) theDocument, NCollection_Sequence& theEntities); bool Parse( QFile& theFile ); void CollectExistingNames(Handle_HYDROData_Document theDocument); QString GetName(const QString& theName); - void HydroToSX(QFile& theFile, NCollection_Sequence& theEntities); + void HydroToSX( QFile& theFile, const NCollection_Sequence& theEntities); private: diff --git a/src/HYDROGUI/HYDROGUI_ExportSinusXDlg.cxx b/src/HYDROGUI/HYDROGUI_ExportSinusXDlg.cxx index f7fb6084..f277b754 100644 --- a/src/HYDROGUI/HYDROGUI_ExportSinusXDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_ExportSinusXDlg.cxx @@ -26,7 +26,7 @@ #include "HYDROGUI_Module.h" #include #include -#include +#include #include diff --git a/src/HYDROGUI/HYDROGUI_Tool.cxx b/src/HYDROGUI/HYDROGUI_Tool.cxx index c4e6b90b..41458254 100644 --- a/src/HYDROGUI/HYDROGUI_Tool.cxx +++ b/src/HYDROGUI/HYDROGUI_Tool.cxx @@ -185,7 +185,7 @@ QString HYDROGUI_Tool::GetTempDir( const bool theToCreate ) #ifdef WNT tmpdir = "C:\\"; #else - tmpdir = "/tmp"; + tmpdir = strdup( "/tmp" ); #endif } aRes = tmpdir; -- 2.39.2