Use QLocale::c() instead of QLocale(QLocale::C).
--HG-- branch : develop
This commit is contained in:
parent
f0cac1c191
commit
23d9898154
|
@ -47,7 +47,7 @@ DialogAboutTape::DialogAboutTape(QWidget *parent)
|
|||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
//mApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||
//mApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c());
|
||||
|
||||
RetranslateUi();
|
||||
connect(ui->pushButton_Web_Site, &QPushButton::clicked, [this]()
|
||||
|
@ -126,7 +126,7 @@ void DialogAboutTape::RetranslateUi()
|
|||
ui->labelBuildRevision->setText(tr("Build revision: %1").arg(BUILD_REVISION));
|
||||
ui->label_QT_Version->setText(buildCompatibilityString());
|
||||
|
||||
const QDate date = QLocale(QLocale::C).toDate(QString(__DATE__).simplified(), QLatin1String("MMM d yyyy"));
|
||||
const QDate date = QLocale::c().toDate(QString(__DATE__).simplified(), QLatin1String("MMM d yyyy"));
|
||||
ui->label_Tape_Built->setText(tr("Built on %1 at %2").arg(date.toString()).arg(__TIME__));
|
||||
|
||||
ui->label_Legal_Stuff->setText(QApplication::translate("InternalStrings",
|
||||
|
|
|
@ -105,7 +105,7 @@ TapeConfigDialog::TapeConfigDialog(QWidget *parent)
|
|||
|
||||
setWindowTitle(tr("Config Dialog"));
|
||||
|
||||
qApp->TapeSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||
qApp->TapeSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -201,7 +201,7 @@ void TapeConfigDialog::Apply()
|
|||
default:
|
||||
break;
|
||||
}
|
||||
qApp->TapeSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||
qApp->TapeSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c());
|
||||
emit UpdateProperties();
|
||||
setResult(QDialog::Accepted);
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ ConfigDialog::ConfigDialog(QWidget *parent) :
|
|||
|
||||
setWindowTitle(tr("Config Dialog"));
|
||||
|
||||
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -208,7 +208,7 @@ void ConfigDialog::Apply()
|
|||
default:
|
||||
break;
|
||||
}
|
||||
qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||
qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c());
|
||||
emit UpdateProperties();
|
||||
setResult(QDialog::Accepted);
|
||||
}
|
||||
|
|
|
@ -45,13 +45,13 @@ DialogAboutApp::DialogAboutApp(QWidget *parent) :
|
|||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||
qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : 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));
|
||||
ui->label_QT_Version->setText(buildCompatibilityString());
|
||||
|
||||
QDate date = QLocale(QLocale::C).toDate(QString(__DATE__).simplified(), QLatin1String("MMM d yyyy"));
|
||||
QDate date = QLocale::c().toDate(QString(__DATE__).simplified(), QLatin1String("MMM d yyyy"));
|
||||
ui->label_Valentina_Built->setText(tr("Built on %1 at %2").arg(date.toString()).arg(__TIME__));
|
||||
|
||||
ui->label_Legal_Stuff->setText(QApplication::translate("InternalStrings",
|
||||
|
|
|
@ -53,7 +53,7 @@ DialogHistory::DialogHistory(VContainer *data, VPattern *doc, QWidget *parent)
|
|||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c());
|
||||
|
||||
bOk = ui->buttonBox->button(QDialogButtonBox::Ok);
|
||||
connect(bOk, &QPushButton::clicked, this, &DialogHistory::DialogAccepted);
|
||||
|
|
|
@ -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(QLocale::C));
|
||||
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c());
|
||||
|
||||
qCDebug(vDialog, "Showing variables.");
|
||||
ShowUnits();
|
||||
|
|
|
@ -42,7 +42,7 @@ DialogLayoutProgress::DialogLayoutProgress(int count, QWidget *parent)
|
|||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||
qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c());
|
||||
|
||||
ui->progressBar->setMaximum(maxCount);
|
||||
ui->progressBar->setValue(0);
|
||||
|
|
|
@ -60,7 +60,7 @@ DialogLayoutSettings::DialogLayoutSettings(VLayoutGenerator *generator, QWidget
|
|||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||
qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : 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
|
||||
|
|
|
@ -49,7 +49,7 @@ DialogNewPattern::DialogNewPattern(VContainer *data, const QString &patternPiece
|
|||
ui->lineEditName->setClearButtonEnabled(true);
|
||||
#endif
|
||||
|
||||
qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||
qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c());
|
||||
|
||||
QRect position = this->frameGeometry();
|
||||
position.moveCenter(QDesktopWidget().availableGeometry().center());
|
||||
|
|
|
@ -71,7 +71,7 @@ DialogPatternProperties::DialogPatternProperties(const QString &filePath, VPatte
|
|||
|
||||
SCASSERT(doc != nullptr);
|
||||
|
||||
qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||
qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c());
|
||||
|
||||
if (m_filePath.isEmpty())
|
||||
{
|
||||
|
|
|
@ -46,7 +46,7 @@ DialogPatternXmlEdit::DialogPatternXmlEdit(QWidget *parent, VPattern *xmldoc)
|
|||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||
qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c());
|
||||
|
||||
this->xmlmodel = new VXMLTreeView();
|
||||
this->doc=xmldoc;
|
||||
|
|
|
@ -55,7 +55,7 @@ DialogSaveLayout::DialogSaveLayout(int count, const QString &fileName, QWidget *
|
|||
ui->lineEditFileName->setClearButtonEnabled(true);
|
||||
#endif
|
||||
|
||||
qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||
qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c());
|
||||
|
||||
QPushButton *bOk = ui->buttonBox->button(QDialogButtonBox::Ok);
|
||||
SCASSERT(bOk != nullptr);
|
||||
|
|
|
@ -3914,7 +3914,7 @@ QStringList MainWindow::GetUnlokedRestoreFileList() const
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void MainWindow::WindowsLocale()
|
||||
{
|
||||
qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||
qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -157,7 +157,7 @@ template <typename T>
|
|||
inline QString VAbstractApplication::LocaleToString(const T &value)
|
||||
{
|
||||
QLocale loc;
|
||||
qApp->Settings()->GetOsSeparator() ? loc = QLocale::system() : loc = QLocale(QLocale::C);
|
||||
qApp->Settings()->GetOsSeparator() ? loc = QLocale::system() : loc = QLocale::c();
|
||||
return loc.toString(value);
|
||||
}
|
||||
|
||||
|
|
|
@ -779,7 +779,7 @@ QString VTranslateVars::FormulaFromUser(const QString &formula, bool osSeparator
|
|||
}
|
||||
|
||||
QLocale loc = QLocale::system(); // User locale
|
||||
if (loc != QLocale(QLocale::C) && osSeparator)
|
||||
if (loc != QLocale::c() && osSeparator)
|
||||
{// User want use Os separator
|
||||
QList<int> nKeys = numbers.keys();// Positions for all numbers in expression
|
||||
QList<QString> nValues = numbers.values();
|
||||
|
@ -794,7 +794,7 @@ QString VTranslateVars::FormulaFromUser(const QString &formula, bool osSeparator
|
|||
continue;//Leave with out translation
|
||||
}
|
||||
|
||||
loc = QLocale(QLocale::C);// To internal locale
|
||||
loc = QLocale::c();// To internal locale
|
||||
const QString dStr = loc.toString(d);// Internal look for number
|
||||
newFormula.replace(nKeys.at(i), nValues.at(i).length(), dStr);
|
||||
const int bias = nValues.at(i).length() - dStr.length();
|
||||
|
@ -922,7 +922,7 @@ QString VTranslateVars::FormulaToUser(const QString &formula, bool osSeparator)
|
|||
QList<QString> nValues = numbers.values();
|
||||
for (int i = 0; i < nKeys.size(); ++i)
|
||||
{
|
||||
loc = QLocale(QLocale::C);// From pattern locale
|
||||
loc = QLocale::c();// From pattern locale
|
||||
bool ok = false;
|
||||
const qreal d = loc.toDouble(nValues.at(i), &ok);
|
||||
if (ok == false)
|
||||
|
|
|
@ -46,7 +46,7 @@ DialogUndo::DialogUndo(QWidget *parent)
|
|||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c());
|
||||
|
||||
bool opening = qApp->getOpeningPattern();
|
||||
if (opening)
|
||||
|
|
|
@ -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(QLocale::C));
|
||||
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale::c());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue
Block a user