mirror of https://github.com/CGAL/cgal
Don't rely on the implicit conversion QString -> const char*.
Don't do it on temporaries. stddef.h missing in qt3 headers.
This commit is contained in:
parent
fc1d114c3e
commit
e54d65ec06
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
* the differences is in the traits classes.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <math.h>
|
||||
#include <limits>
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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<Rep> 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<Segment_2>::const_iterator it = seg_list.begin();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue