diff --git a/Alpha_shapes_2/demo/Alpha_shapes_2/alpha_shapes_2.cpp b/Alpha_shapes_2/demo/Alpha_shapes_2/alpha_shapes_2.cpp index 9bf8f1179c0..79718018a2f 100644 --- a/Alpha_shapes_2/demo/Alpha_shapes_2/alpha_shapes_2.cpp +++ b/Alpha_shapes_2/demo/Alpha_shapes_2/alpha_shapes_2.cpp @@ -403,7 +403,7 @@ private slots: QFileDialog::getSaveFileName( "triangulation.cgal", "Cgal files (*.cgal)", this ); if ( !fileName.isNull() ) { // got a file name - std::ofstream out(fileName); + std::ofstream out(fileName.ascii()); CGAL::set_ascii_mode(out); out << tr1 << std::endl; } @@ -418,7 +418,7 @@ private slots: tr1.clear(); A.clear(); L.clear(); - std::ifstream in(s); + std::ifstream in(s.ascii()); CGAL::set_ascii_mode(in); in >> tr1; Vertex_iterator it = tr1.vertices_begin(); diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/MyWindow_files.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/MyWindow_files.cpp index fd6b1917f29..1bb45c3b4ea 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/MyWindow_files.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/MyWindow_files.cpp @@ -192,7 +192,7 @@ void MyWindow::fileOpenPm() statusBar()->message( "File Open abandoned", 2000 ); return; } - std::ifstream inputFile(filename); + std::ifstream inputFile(filename.ascii()); // Creates an ifstream object named inputFile if (! inputFile.is_open()) // Always test file open { @@ -253,7 +253,7 @@ void MyWindow::fileOpenPm() */ void MyWindow::load( const QString& filename , bool clear_flag ) { - std::ifstream inputFile(filename); + std::ifstream inputFile(filename.ascii()); // Creates an ofstream object named inputFile if (! inputFile.is_open()) // Always test file open { @@ -603,7 +603,7 @@ void MyWindow::fileSave() return; } - std::ofstream outFile(m_filename); + std::ofstream outFile(m_filename.ascii()); // Creates an ofstream object named outFile if (! outFile.is_open()) // Always test file open { diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/demo_tab.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/demo_tab.h index c493ac94839..54c0e746ba3 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/demo_tab.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/demo_tab.h @@ -27,6 +27,7 @@ * the differences is in the traits classes. */ +#include #include #include diff --git a/Boolean_set_operations_2/demo/Boolean_set_operations_2/boolean_operations_2.cpp b/Boolean_set_operations_2/demo/Boolean_set_operations_2/boolean_operations_2.cpp index 7ef014b5b72..5768296165d 100644 --- a/Boolean_set_operations_2/demo/Boolean_set_operations_2/boolean_operations_2.cpp +++ b/Boolean_set_operations_2/demo/Boolean_set_operations_2/boolean_operations_2.cpp @@ -512,7 +512,7 @@ void MyWindow::open_dxf_file() return; file_name=s; - std::ifstream in_file(s); + std::ifstream in_file(s.ascii()); if (!in_file.is_open()) { QMessageBox::warning( widget,"Open","Can't open file"); @@ -606,7 +606,7 @@ void MyWindow::open_linear_polygon_file() return; file_name=s; - std::ifstream in_file(s); + std::ifstream in_file(s.ascii()); if (!in_file.is_open()) { QMessageBox::warning( widget,"Open","Can't open file"); diff --git a/Nef_2/demo/Nef_2/nef_2.cpp b/Nef_2/demo/Nef_2/nef_2.cpp index 07adef4f837..8faf5efd573 100644 --- a/Nef_2/demo/Nef_2/nef_2.cpp +++ b/Nef_2/demo/Nef_2/nef_2.cpp @@ -307,7 +307,7 @@ public slots: "CGAL files (*.cgal)", this ) ); if ( s.isEmpty() ) return; - std::ifstream in(s); + std::ifstream in(s.ascii()); CGAL::set_ascii_mode(in); Nef_polyhedron N_temp(Nef_polyhedron::EMPTY); Nef_visible2 = N_temp; @@ -327,7 +327,7 @@ public slots: "Cgal files (*.cgal)", this ); if ( !fileName.isNull() ) { // got a file name - std::ofstream out(fileName); + std::ofstream out(fileName.ascii()); CGAL::set_ascii_mode(out); out << Nef_visible << std::endl; } @@ -338,7 +338,7 @@ public slots: "CGAL files (*.cgal)", this ) ); if ( s.isEmpty() ) return; - std::ifstream in(s); + std::ifstream in(s.ascii()); CGAL::set_ascii_mode(in); Polygon_2_double poly; diff --git a/Snap_rounding_2/demo/Snap_rounding_2/snap_rounding_2.cpp b/Snap_rounding_2/demo/Snap_rounding_2/snap_rounding_2.cpp index 4656de8e857..22b62f7b3df 100644 --- a/Snap_rounding_2/demo/Snap_rounding_2/snap_rounding_2.cpp +++ b/Snap_rounding_2/demo/Snap_rounding_2/snap_rounding_2.cpp @@ -238,7 +238,7 @@ public slots: if ( s.isEmpty() ) return; seg_list.clear(); - std::ifstream in(s); + std::ifstream in(s.ascii()); CGAL::set_ascii_mode(in); int number_of_segments = 0,i; CGAL::Segment_data seg; @@ -286,7 +286,7 @@ public slots: "Cgal files (*.cgal)", this ); if ( !fileName.isNull() ) { // got a file name - std::ofstream out(fileName); + std::ofstream out(fileName.ascii()); CGAL::set_ascii_mode(out); out << seg_list.size() << std::endl << prec << std::endl; std::list::const_iterator it = seg_list.begin(); diff --git a/Straight_skeleton_2/demo/Straight_skeleton_2/straight_skeleton_2.cpp b/Straight_skeleton_2/demo/Straight_skeleton_2/straight_skeleton_2.cpp index c24d54cd851..4f6e5b3ffe3 100644 --- a/Straight_skeleton_2/demo/Straight_skeleton_2/straight_skeleton_2.cpp +++ b/Straight_skeleton_2/demo/Straight_skeleton_2/straight_skeleton_2.cpp @@ -383,7 +383,7 @@ private slots: if ( !fileName.isNull() ) { - std::ofstream out(fileName); + std::ofstream out(fileName.ascii()); CGAL::set_ascii_mode(out); @@ -410,7 +410,8 @@ private slots: bool auto_create_offsets = true ; offsets.clear() ; - std::ifstream offsets_file(s + QString(".oft") ); + QString soft = s + QString(".oft"); + std::ifstream offsets_file(soft.ascii()); if ( offsets_file ) { CGAL::set_ascii_mode(offsets_file); @@ -424,7 +425,7 @@ private slots: auto_create_offsets = false ; } - std::ifstream in(s); + std::ifstream in(s.ascii()); if ( in ) { CGAL::set_ascii_mode(in); diff --git a/Stream_lines_2/demo/Stream_lines_2/streamlines.cpp b/Stream_lines_2/demo/Stream_lines_2/streamlines.cpp index a24800e8688..98632f43355 100644 --- a/Stream_lines_2/demo/Stream_lines_2/streamlines.cpp +++ b/Stream_lines_2/demo/Stream_lines_2/streamlines.cpp @@ -134,7 +134,7 @@ class Placement : public QObject void load( const QString & s ) { runge_kutta_integrator = new Runge_kutta_integrator(integrating_); - std::ifstream infile(s, std::ios::in); + std::ifstream infile(s.ascii(), std::ios::in); double iXSize, iYSize; iXSize = iYSize = 512; unsigned int x_samples, y_samples; @@ -352,14 +352,14 @@ class MyWidget : public QGLWidget QString savedepsfile(){ QString s = QFileDialog::getSaveFileName( ".", "Encapsulated PostScript files (*.eps)", this, "save file dialog", "Save file to" ); - std::ofstream fw(s,std::ios::out); + std::ofstream fw(s.ascii(),std::ios::out); p.Stream_lines->print_stream_lines_eps(fw); return s; } QString savedstlfile(){ QString s = QFileDialog::getSaveFileName( ".", "STreamLine files (*.stl)", this, "save file dialog", "Save file to" ); - std::ofstream fw(s,std::ios::out); + std::ofstream fw(s.ascii(),std::ios::out); p.Stream_lines->print_stream_lines(fw); return s; }