Skip to content

Commit

Permalink
Merge pull request #844 from MediaArea/locale
Browse files Browse the repository at this point in the history
Force LC_NUMERIC to C
  • Loading branch information
JeromeMartinez authored Dec 17, 2024
2 parents e2832ad + f2a0ec0 commit 0e4dbdd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Source/Cli/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "Core/FileInformation.h"
#include <QDir>
#include <Core/logging.h>
#include <clocale>

Cli::Cli() : indexOfStreamWithKnownFrameCount(0), statsFileBytesWritten(0), statsFileBytesTotal(0), statsFileBytesUploaded(0), statsFileBytesToUpload(0)
{
Expand Down Expand Up @@ -37,6 +38,7 @@ int Cli::exec(QCoreApplication &a)
bool forceUploadToSignalServer = false;

QString checkUploadFileName;
std::setlocale(LC_NUMERIC, "C");

for(int i = 1; i < a.arguments().length(); ++i)
{
Expand Down
2 changes: 0 additions & 2 deletions Source/GUI/Plots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <qwt_plot_layout.h>
#include <qwt_plot_canvas.h>
#include <cmath>
#include <clocale>
#include <unordered_set>
#include <QMouseEvent>
#include <QInputDialog>
Expand Down Expand Up @@ -145,7 +144,6 @@ Plots::Plots( QWidget *parent, FileInformation* fileInformation ) :
m_dataTypeIndex( Plots::AxisSeconds ),
m_commentsPlot(nullptr)
{
setlocale(LC_NUMERIC, "C");
QGridLayout* layout = new QGridLayout( this );
layout->setSpacing( 1 );
layout->setContentsMargins( 0, 0, 0, 0 );
Expand Down
3 changes: 3 additions & 0 deletions Source/GUI/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <QScreen>
#include <QClipboard>
#include <QGuiApplication>
#include <clocale>

#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QDesktopWidget>
Expand Down Expand Up @@ -82,6 +83,8 @@ MainWindow::MainWindow(QWidget *parent) :
DragDrop_Image=NULL;
DragDrop_Text=NULL;

std::setlocale(LC_NUMERIC, "C");

m_plotsChooser = new PlotsChooser();
connect(m_plotsChooser, &PlotsChooser::orderChanged, [&]() {
QList<std::tuple<quint64, quint64>> filtersSelectors = m_plotsChooser->getFilterSelectorsOrder();
Expand Down

0 comments on commit 0e4dbdd

Please sign in to comment.