Remove calls to setlocale in QtOpenGL cube example.
This is causing compilation errors on some Windows CE configurations: mainwidget.cpp(130) : error C3861: 'setlocale': identifier not found mainwidget.cpp(149) : error C3861: 'setlocale': identifier not found Change-Id: Ie863cd7c9c53cfef4074dabffe157d9068654a1c Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
This commit is contained in:
parent
fbaa6d3ca6
commit
23a79b9119
@ -43,7 +43,6 @@
|
|||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <locale.h>
|
|
||||||
|
|
||||||
MainWidget::MainWidget(QWidget *parent) :
|
MainWidget::MainWidget(QWidget *parent) :
|
||||||
QGLWidget(parent),
|
QGLWidget(parent),
|
||||||
@ -126,9 +125,6 @@ void MainWidget::initializeGL()
|
|||||||
//! [3]
|
//! [3]
|
||||||
void MainWidget::initShaders()
|
void MainWidget::initShaders()
|
||||||
{
|
{
|
||||||
// Override system locale until shaders are compiled
|
|
||||||
setlocale(LC_NUMERIC, "C");
|
|
||||||
|
|
||||||
// Compile vertex shader
|
// Compile vertex shader
|
||||||
if (!program.addShaderFromSourceFile(QGLShader::Vertex, ":/vshader.glsl"))
|
if (!program.addShaderFromSourceFile(QGLShader::Vertex, ":/vshader.glsl"))
|
||||||
close();
|
close();
|
||||||
@ -144,9 +140,6 @@ void MainWidget::initShaders()
|
|||||||
// Bind shader pipeline for use
|
// Bind shader pipeline for use
|
||||||
if (!program.bind())
|
if (!program.bind())
|
||||||
close();
|
close();
|
||||||
|
|
||||||
// Restore system locale
|
|
||||||
setlocale(LC_ALL, "");
|
|
||||||
}
|
}
|
||||||
//! [3]
|
//! [3]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user