From 86f4b21879daa19745a5334df41f177c2828edb5 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 3 Jan 2017 10:46:28 +0200 Subject: [PATCH] Instead of method QLocale::system() better to use the default constructor. Usefull in case we will deside change default locale. --HG-- branch : develop --- .../tape/dialogs/configpages/tapeconfigurationpage.cpp | 4 ++-- src/app/tape/dialogs/dialogabouttape.cpp | 2 +- src/app/tape/dialogs/tapeconfigdialog.cpp | 4 ++-- src/app/tape/mapplication.cpp | 2 +- src/app/tape/tmainwindow.cpp | 10 +++++----- src/app/valentina/core/vapplication.cpp | 2 +- src/app/valentina/dialogs/configdialog.cpp | 4 ++-- .../dialogs/configpages/configurationpage.cpp | 4 ++-- src/app/valentina/dialogs/dialogaboutapp.cpp | 2 +- src/app/valentina/dialogs/dialoghistory.cpp | 2 +- src/app/valentina/dialogs/dialogincrements.cpp | 4 ++-- src/app/valentina/dialogs/dialoglayoutprogress.cpp | 2 +- src/app/valentina/dialogs/dialoglayoutsettings.cpp | 2 +- src/app/valentina/dialogs/dialognewpattern.cpp | 2 +- src/app/valentina/dialogs/dialogpatternproperties.cpp | 2 +- src/app/valentina/dialogs/dialogpatternxmledit.cpp | 2 +- src/app/valentina/dialogs/dialogsavelayout.cpp | 2 +- src/app/valentina/mainwindow.cpp | 2 +- src/libs/vmisc/vabstractapplication.h | 2 +- src/libs/vmisc/vcommonsettings.cpp | 2 +- src/libs/vmisc/vsettings.cpp | 2 +- src/libs/vpatterndb/vtranslatevars.cpp | 8 ++++---- src/libs/vpropertyexplorer/plugins/vstringproperty.cpp | 2 +- src/libs/vtools/dialogs/support/dialogundo.cpp | 2 +- src/libs/vtools/dialogs/tools/dialogtool.cpp | 2 +- src/libs/vtools/dialogs/tools/dialogtool.h | 2 +- 26 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/app/tape/dialogs/configpages/tapeconfigurationpage.cpp b/src/app/tape/dialogs/configpages/tapeconfigurationpage.cpp index 922a5dfea..6daefc9b0 100644 --- a/src/app/tape/dialogs/configpages/tapeconfigurationpage.cpp +++ b/src/app/tape/dialogs/configpages/tapeconfigurationpage.cpp @@ -193,7 +193,7 @@ QGroupBox *TapeConfigurationPage::LangGroup() //-------------------- Decimal separator setup separatorLabel = new QLabel(tr("Decimal separator parts:")); - osOptionCheck = new QCheckBox(tr("With OS options (%1)").arg(QLocale::system().decimalPoint().toLatin1())); + osOptionCheck = new QCheckBox(tr("With OS options (%1)").arg(QLocale().decimalPoint())); osOptionCheck->setChecked(settings->GetOsSeparator()); langLayout->addRow(separatorLabel, osOptionCheck); @@ -322,7 +322,7 @@ void TapeConfigurationPage::RetranslateUi() langGroup->setTitle(tr("Language")); guiLabel->setText(tr("GUI language:")); separatorLabel->setText(tr("Decimal separator parts:")); - osOptionCheck->setText(tr("With OS options (%1)").arg(QLocale::system().decimalPoint().toLatin1())); + osOptionCheck->setText(tr("With OS options (%1)").arg(QLocale().decimalPoint())); pmSystemGroup->setTitle(tr("Pattern making system")); systemLabel->setText(tr("Pattern making system:")); diff --git a/src/app/tape/dialogs/dialogabouttape.cpp b/src/app/tape/dialogs/dialogabouttape.cpp index e2d5c6ef6..dbf3e2340 100644 --- a/src/app/tape/dialogs/dialogabouttape.cpp +++ b/src/app/tape/dialogs/dialogabouttape.cpp @@ -47,7 +47,7 @@ DialogAboutTape::DialogAboutTape(QWidget *parent) { ui->setupUi(this); - //mApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c()); + //mApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); RetranslateUi(); connect(ui->pushButton_Web_Site, &QPushButton::clicked, RECEIVER(this)[this]() diff --git a/src/app/tape/dialogs/tapeconfigdialog.cpp b/src/app/tape/dialogs/tapeconfigdialog.cpp index 8c2b4a00c..6bf75ea3e 100644 --- a/src/app/tape/dialogs/tapeconfigdialog.cpp +++ b/src/app/tape/dialogs/tapeconfigdialog.cpp @@ -105,7 +105,7 @@ TapeConfigDialog::TapeConfigDialog(QWidget *parent) setWindowTitle(tr("Config Dialog")); - qApp->TapeSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c()); + qApp->TapeSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); } //--------------------------------------------------------------------------------------------------------------------- @@ -193,7 +193,7 @@ void TapeConfigDialog::Apply() configurationPage->Apply(); pathPage->Apply(); - qApp->TapeSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c()); + qApp->TapeSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); emit UpdateProperties(); setResult(QDialog::Accepted); } diff --git a/src/app/tape/mapplication.cpp b/src/app/tape/mapplication.cpp index 90a9f1ec0..6c13938ae 100644 --- a/src/app/tape/mapplication.cpp +++ b/src/app/tape/mapplication.cpp @@ -392,7 +392,7 @@ void MApplication::InitOptions() qCDebug(mApp, "Command-line arguments: %s", qUtf8Printable(this->arguments().join(", "))); qCDebug(mApp, "Process ID: %s", qUtf8Printable(QString().setNum(this->applicationPid()))); - LoadTranslation(QLocale::system().name());// By default the console version uses system locale + LoadTranslation(QLocale().name());// By default the console version uses system locale static const char * GENERIC_ICON_TO_CHECK = "document-open"; if (QIcon::hasThemeIcon(GENERIC_ICON_TO_CHECK) == false) diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index ce6537d23..e0be0b916 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -101,7 +101,7 @@ TMainWindow::TMainWindow(QWidget *parent) { ui->setupUi(this); - qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c()); + qApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); #if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0) ui->lineEditFind->setClearButtonEnabled(true); @@ -476,7 +476,7 @@ void TMainWindow::changeEvent(QEvent *event) { if (event->type() == QEvent::LanguageChange) { - qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c()); + qApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); // retranslate designer form (single inheritance approach) ui->retranslateUi(this); @@ -570,7 +570,7 @@ bool TMainWindow::eventFilter(QObject *object, QEvent *event) { if (qApp->Settings()->GetOsSeparator()) { - plainTextEdit->insertPlainText(QLocale::system().decimalPoint()); + plainTextEdit->insertPlainText(QLocale().decimalPoint()); } else { @@ -589,7 +589,7 @@ bool TMainWindow::eventFilter(QObject *object, QEvent *event) { if (qApp->Settings()->GetOsSeparator()) { - textEdit->insert(QLocale::system().decimalPoint()); + textEdit->insert(QLocale().decimalPoint()); } else { @@ -1945,7 +1945,7 @@ void TMainWindow::InitWindow() const qint32 index = ui->comboBoxGender->findData(static_cast(m->Gender())); ui->comboBoxGender->setCurrentIndex(index); - ui->dateEditBirthDate->setDisplayFormat(QLocale::system().dateFormat()); + ui->dateEditBirthDate->setDisplayFormat(QLocale().dateFormat()); ui->dateEditBirthDate->setDate(m->BirthDate()); ui->lineEditEmail->setText(m->Email()); diff --git a/src/app/valentina/core/vapplication.cpp b/src/app/valentina/core/vapplication.cpp index 99bd9d202..f1dc4a997 100644 --- a/src/app/valentina/core/vapplication.cpp +++ b/src/app/valentina/core/vapplication.cpp @@ -274,7 +274,7 @@ VApplication::VApplication(int &argc, char **argv) // making sure will create new instance...just in case we will ever do 2 objects of VApplication VCommandLine::Reset(); - LoadTranslation(QLocale::system().name());// By default the console version uses system locale + LoadTranslation(QLocale().name());// By default the console version uses system locale VCommandLine::Get(*this); undoStack = new QUndoStack(this); } diff --git a/src/app/valentina/dialogs/configdialog.cpp b/src/app/valentina/dialogs/configdialog.cpp index 35320e738..75dc30e15 100644 --- a/src/app/valentina/dialogs/configdialog.cpp +++ b/src/app/valentina/dialogs/configdialog.cpp @@ -94,7 +94,7 @@ ConfigDialog::ConfigDialog(QWidget *parent) : setWindowTitle(tr("Config Dialog")); - qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c()); + qApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); } //--------------------------------------------------------------------------------------------------------------------- @@ -196,7 +196,7 @@ void ConfigDialog::Apply() communityPage->Apply(); pathPage->Apply(); - qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c()); + qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); emit UpdateProperties(); setResult(QDialog::Accepted); } diff --git a/src/app/valentina/dialogs/configpages/configurationpage.cpp b/src/app/valentina/dialogs/configpages/configurationpage.cpp index 306c2262c..3290cf9a0 100644 --- a/src/app/valentina/dialogs/configpages/configurationpage.cpp +++ b/src/app/valentina/dialogs/configpages/configurationpage.cpp @@ -250,7 +250,7 @@ QGroupBox *ConfigurationPage::LangGroup() //-------------------- Decimal separator setup separatorLabel = new QLabel(tr("Decimal separator parts:")); - osOptionCheck = new QCheckBox(tr("With OS options (%1)").arg(QLocale::system().decimalPoint().toLatin1())); + osOptionCheck = new QCheckBox(tr("With OS options (%1)").arg(QLocale().decimalPoint())); osOptionCheck->setChecked(settings->GetOsSeparator()); langLayout->addRow(separatorLabel, osOptionCheck); @@ -448,7 +448,7 @@ void ConfigurationPage::RetranslateUi() guiLabel->setText(tr("GUI language:")); separatorLabel->setText(tr("Decimal separator parts:")); - osOptionCheck->setText(tr("With OS options (%1)").arg(QLocale::system().decimalPoint().toLatin1())); + osOptionCheck->setText(tr("With OS options (%1)").arg(QLocale().decimalPoint())); unitLabel->setText(tr("Default unit:")); this->unitCombo->setItemText(0, tr("Centimeters")); diff --git a/src/app/valentina/dialogs/dialogaboutapp.cpp b/src/app/valentina/dialogs/dialogaboutapp.cpp index d779f4a01..8439083c4 100644 --- a/src/app/valentina/dialogs/dialogaboutapp.cpp +++ b/src/app/valentina/dialogs/dialogaboutapp.cpp @@ -45,7 +45,7 @@ DialogAboutApp::DialogAboutApp(QWidget *parent) : { ui->setupUi(this); - qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c()); + qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); ui->label_Valentina_Version->setText(QString("Valentina %1").arg(APP_VERSION_STR)); ui->labelBuildRevision->setText(QString("Build revision: %1").arg(BUILD_REVISION)); diff --git a/src/app/valentina/dialogs/dialoghistory.cpp b/src/app/valentina/dialogs/dialoghistory.cpp index 2db9a48c4..7cd426595 100644 --- a/src/app/valentina/dialogs/dialoghistory.cpp +++ b/src/app/valentina/dialogs/dialoghistory.cpp @@ -55,7 +55,7 @@ DialogHistory::DialogHistory(VContainer *data, VPattern *doc, QWidget *parent) { ui->setupUi(this); - qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c()); + qApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); bOk = ui->buttonBox->button(QDialogButtonBox::Ok); connect(bOk, &QPushButton::clicked, this, &DialogHistory::DialogAccepted); diff --git a/src/app/valentina/dialogs/dialogincrements.cpp b/src/app/valentina/dialogs/dialogincrements.cpp index 3c440c09b..c6224086f 100644 --- a/src/app/valentina/dialogs/dialogincrements.cpp +++ b/src/app/valentina/dialogs/dialogincrements.cpp @@ -75,7 +75,7 @@ DialogIncrements::DialogIncrements(VContainer *data, VPattern *doc, QWidget *par formulaBaseHeight = ui->plainTextEditFormula->height(); ui->plainTextEditFormula->installEventFilter(this); - qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c()); + qApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); qCDebug(vDialog, "Showing variables."); ShowUnits(); @@ -762,7 +762,7 @@ bool DialogIncrements::eventFilter(QObject *object, QEvent *event) { if (qApp->Settings()->GetOsSeparator()) { - textEdit->insert(QLocale::system().decimalPoint()); + textEdit->insert(QLocale().decimalPoint()); } else { diff --git a/src/app/valentina/dialogs/dialoglayoutprogress.cpp b/src/app/valentina/dialogs/dialoglayoutprogress.cpp index fa98be00d..e74e933c7 100644 --- a/src/app/valentina/dialogs/dialoglayoutprogress.cpp +++ b/src/app/valentina/dialogs/dialoglayoutprogress.cpp @@ -42,7 +42,7 @@ DialogLayoutProgress::DialogLayoutProgress(int count, QWidget *parent) { ui->setupUi(this); - qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c()); + qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); ui->progressBar->setMaximum(maxCount); ui->progressBar->setValue(0); diff --git a/src/app/valentina/dialogs/dialoglayoutsettings.cpp b/src/app/valentina/dialogs/dialoglayoutsettings.cpp index 39aa59c71..cbe13ec07 100644 --- a/src/app/valentina/dialogs/dialoglayoutsettings.cpp +++ b/src/app/valentina/dialogs/dialoglayoutsettings.cpp @@ -60,7 +60,7 @@ DialogLayoutSettings::DialogLayoutSettings(VLayoutGenerator *generator, QWidget { ui->setupUi(this); - qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c()); + qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); //moved from ReadSettings - well...it seems it can be done once only (i.e. constructor) because Init funcs dont //even cleanse lists before adding diff --git a/src/app/valentina/dialogs/dialognewpattern.cpp b/src/app/valentina/dialogs/dialognewpattern.cpp index e71185f69..4fc2682cd 100644 --- a/src/app/valentina/dialogs/dialognewpattern.cpp +++ b/src/app/valentina/dialogs/dialognewpattern.cpp @@ -49,7 +49,7 @@ DialogNewPattern::DialogNewPattern(VContainer *data, const QString &patternPiece ui->lineEditName->setClearButtonEnabled(true); #endif - qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c()); + qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); QRect position = this->frameGeometry(); position.moveCenter(QDesktopWidget().availableGeometry().center()); diff --git a/src/app/valentina/dialogs/dialogpatternproperties.cpp b/src/app/valentina/dialogs/dialogpatternproperties.cpp index 1f9b0b231..47863a255 100644 --- a/src/app/valentina/dialogs/dialogpatternproperties.cpp +++ b/src/app/valentina/dialogs/dialogpatternproperties.cpp @@ -71,7 +71,7 @@ DialogPatternProperties::DialogPatternProperties(const QString &filePath, VPatte SCASSERT(doc != nullptr) - qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c()); + qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); if (m_filePath.isEmpty()) { diff --git a/src/app/valentina/dialogs/dialogpatternxmledit.cpp b/src/app/valentina/dialogs/dialogpatternxmledit.cpp index f028fd1f8..5f7024d24 100644 --- a/src/app/valentina/dialogs/dialogpatternxmledit.cpp +++ b/src/app/valentina/dialogs/dialogpatternxmledit.cpp @@ -46,7 +46,7 @@ DialogPatternXmlEdit::DialogPatternXmlEdit(QWidget *parent, VPattern *xmldoc) { ui->setupUi(this); - qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c()); + qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); this->xmlmodel = new VXMLTreeView(); this->doc=xmldoc; diff --git a/src/app/valentina/dialogs/dialogsavelayout.cpp b/src/app/valentina/dialogs/dialogsavelayout.cpp index 04af0ee44..8044caf97 100644 --- a/src/app/valentina/dialogs/dialogsavelayout.cpp +++ b/src/app/valentina/dialogs/dialogsavelayout.cpp @@ -56,7 +56,7 @@ DialogSaveLayout::DialogSaveLayout(int count, const QString &fileName, QWidget * ui->lineEditFileName->setClearButtonEnabled(true); #endif - qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c()); + qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); QPushButton *bOk = ui->buttonBox->button(QDialogButtonBox::Ok); SCASSERT(bOk != nullptr) diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 1c8e03d7b..f968bdb9d 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -4016,7 +4016,7 @@ QStringList MainWindow::GetUnlokedRestoreFileList() const //--------------------------------------------------------------------------------------------------------------------- void MainWindow::WindowsLocale() { - qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c()); + qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vmisc/vabstractapplication.h b/src/libs/vmisc/vabstractapplication.h index d55406d64..cf13f287d 100644 --- a/src/libs/vmisc/vabstractapplication.h +++ b/src/libs/vmisc/vabstractapplication.h @@ -159,7 +159,7 @@ template inline QString VAbstractApplication::LocaleToString(const T &value) { QLocale loc; - qApp->Settings()->GetOsSeparator() ? loc = QLocale::system() : loc = QLocale::c(); + qApp->Settings()->GetOsSeparator() ? loc = QLocale() : loc = QLocale::c(); return loc.toString(value); } diff --git a/src/libs/vmisc/vcommonsettings.cpp b/src/libs/vmisc/vcommonsettings.cpp index 803b9f063..e09caac44 100644 --- a/src/libs/vmisc/vcommonsettings.cpp +++ b/src/libs/vmisc/vcommonsettings.cpp @@ -263,7 +263,7 @@ void VCommonSettings::SetSendReportState(const bool &value) //--------------------------------------------------------------------------------------------------------------------- QString VCommonSettings::GetLocale() const { - return value(SettingConfigurationLocale, QLocale::system().name()).toString(); + return value(SettingConfigurationLocale, QLocale().name()).toString(); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vmisc/vsettings.cpp b/src/libs/vmisc/vsettings.cpp index 372be8c51..bcf1d2c5b 100644 --- a/src/libs/vmisc/vsettings.cpp +++ b/src/libs/vmisc/vsettings.cpp @@ -90,7 +90,7 @@ VSettings::VSettings(Format format, Scope scope, const QString &organization, co //--------------------------------------------------------------------------------------------------------------------- QString VSettings::GetLabelLanguage() const { - return value(SettingConfigurationLabelLanguage, QLocale::system().bcp47Name()).toString(); + return value(SettingConfigurationLabelLanguage, QLocale().bcp47Name()).toString(); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vpatterndb/vtranslatevars.cpp b/src/libs/vpatterndb/vtranslatevars.cpp index 17b71bafe..ac20fb359 100644 --- a/src/libs/vpatterndb/vtranslatevars.cpp +++ b/src/libs/vpatterndb/vtranslatevars.cpp @@ -782,14 +782,14 @@ QString VTranslateVars::FormulaFromUser(const QString &formula, bool osSeparator } } - QLocale loc = QLocale::system(); // User locale + QLocale loc = QLocale(); // User locale if (loc != QLocale::c() && osSeparator) {// User want use Os separator QList nKeys = numbers.keys();// Positions for all numbers in expression QList nValues = numbers.values(); for (int i = 0; i < nKeys.size(); ++i) { - loc = QLocale::system();// From system locale + loc = QLocale();// From system locale bool ok = false; const qreal d = loc.toDouble(nValues.at(i), &ok); if (ok == false) @@ -919,7 +919,7 @@ QString VTranslateVars::FormulaToUser(const QString &formula, bool osSeparator) } } - QLocale loc = QLocale::system();// User locale + QLocale loc = QLocale();// User locale if (loc != QLocale::C && osSeparator) {// User want use Os separator QList nKeys = numbers.keys();// Positions for all numbers in expression @@ -935,7 +935,7 @@ QString VTranslateVars::FormulaToUser(const QString &formula, bool osSeparator) continue;//Leave with out translation } - loc = QLocale::system();// To user locale + loc = QLocale();// To user locale QString dStr = loc.toString(d);// Number string in user locale const QChar thSep = loc.groupSeparator(); if (thSep.isSpace()) diff --git a/src/libs/vpropertyexplorer/plugins/vstringproperty.cpp b/src/libs/vpropertyexplorer/plugins/vstringproperty.cpp index 0b2a82707..302fa49a9 100644 --- a/src/libs/vpropertyexplorer/plugins/vstringproperty.cpp +++ b/src/libs/vpropertyexplorer/plugins/vstringproperty.cpp @@ -166,7 +166,7 @@ bool VPE::VStringProperty::eventFilter(QObject *object, QEvent *event) { if (m_osSeparator) { - textEdit->insert(QLocale::system().decimalPoint()); + textEdit->insert(QLocale().decimalPoint()); } else { diff --git a/src/libs/vtools/dialogs/support/dialogundo.cpp b/src/libs/vtools/dialogs/support/dialogundo.cpp index b8609dbc4..5a5389a34 100644 --- a/src/libs/vtools/dialogs/support/dialogundo.cpp +++ b/src/libs/vtools/dialogs/support/dialogundo.cpp @@ -46,7 +46,7 @@ DialogUndo::DialogUndo(QWidget *parent) { ui->setupUi(this); - qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c()); + qApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); bool opening = qApp->getOpeningPattern(); if (opening) diff --git a/src/libs/vtools/dialogs/tools/dialogtool.cpp b/src/libs/vtools/dialogs/tools/dialogtool.cpp index cb7759961..8dedd4752 100644 --- a/src/libs/vtools/dialogs/tools/dialogtool.cpp +++ b/src/libs/vtools/dialogs/tools/dialogtool.cpp @@ -363,7 +363,7 @@ bool DialogTool::eventFilter(QObject *object, QEvent *event) { if (qApp->Settings()->GetOsSeparator()) { - plainTextEdit->insertPlainText(QLocale::system().decimalPoint()); + plainTextEdit->insertPlainText(QLocale().decimalPoint()); } else { diff --git a/src/libs/vtools/dialogs/tools/dialogtool.h b/src/libs/vtools/dialogs/tools/dialogtool.h index 388832a0d..81ac40462 100644 --- a/src/libs/vtools/dialogs/tools/dialogtool.h +++ b/src/libs/vtools/dialogs/tools/dialogtool.h @@ -342,7 +342,7 @@ inline void DialogTool::InitOkCancel(T *ui) SCASSERT(bCancel != nullptr) connect(bCancel, &QPushButton::clicked, this, &DialogTool::DialogRejected); - qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c()); + qApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); } //---------------------------------------------------------------------------------------------------------------------