Refactoring.
This commit is contained in:
parent
bf58addbe3
commit
bc6b9468b7
|
@ -87,7 +87,7 @@ DialogSaveManualLayout::DialogSaveManualLayout(vsizetype count, bool consoleExpo
|
|||
|
||||
ui->lineEditFileName->setValidator(new QRegularExpressionValidator(QRegularExpression(*baseFilenameRegExp), this));
|
||||
|
||||
const QString mask = m_count > 1 ? fileName + '_' : fileName;
|
||||
const QString mask = m_count > 1 ? fileName + '_'_L1 : fileName;
|
||||
if (not m_consoleExport)
|
||||
{
|
||||
ui->lineEditFileName->setText(mask);
|
||||
|
|
|
@ -42,6 +42,12 @@
|
|||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 4, 0)
|
||||
#include "../vmisc/compatibility.h"
|
||||
#endif
|
||||
|
||||
using namespace Qt::Literals::StringLiterals;
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
|
||||
QT_WARNING_DISABLE_INTEL(1418)
|
||||
|
@ -170,7 +176,7 @@ auto VPPiece::GetUniqueID() const -> QString
|
|||
|
||||
if (m_copyNumber > 1)
|
||||
{
|
||||
id = id + '_' + QString::number(m_copyNumber);
|
||||
id = id + '_'_L1 + QString::number(m_copyNumber);
|
||||
}
|
||||
|
||||
return id;
|
||||
|
|
|
@ -1593,7 +1593,7 @@ void DialogIncrements::SaveIncrName(const QString &text)
|
|||
QString name = newName;
|
||||
do
|
||||
{
|
||||
name = name + '_' + QString::number(num);
|
||||
name = name + '_'_L1 + QString::number(num);
|
||||
num++;
|
||||
} while (not m_data->IsUnique(name));
|
||||
newName = name;
|
||||
|
|
|
@ -92,7 +92,7 @@ DialogSaveLayout::DialogSaveLayout(int count, Draw mode, const QString &fileName
|
|||
|
||||
ui->lineEditFileName->setValidator(new QRegularExpressionValidator(QRegularExpression(*baseFilenameRegExp), this));
|
||||
|
||||
const QString mask = fileName + '_';
|
||||
const QString mask = fileName + '_'_L1;
|
||||
if (VApplication::IsGUIMode())
|
||||
{
|
||||
ui->lineEditFileName->setText(mask);
|
||||
|
|
|
@ -60,6 +60,12 @@
|
|||
#include "../vmisc/def.h"
|
||||
#include "dxiface.h"
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 4, 0)
|
||||
#include "../vmisc/compatibility.h"
|
||||
#endif
|
||||
|
||||
using namespace Qt::Literals::StringLiterals;
|
||||
|
||||
namespace
|
||||
{
|
||||
const qreal AAMATextHeight = 2.5;
|
||||
|
@ -726,7 +732,7 @@ auto VDxfEngine::ExportToAAMA(const QVector<VLayoutPiece> &details) -> bool
|
|||
QString blockName = detail.GetName();
|
||||
if (m_version <= DRW::AC1009)
|
||||
{
|
||||
blockName.replace(' ', '_');
|
||||
blockName.replace(' '_L1, '_'_L1);
|
||||
}
|
||||
|
||||
detailBlock->name = blockName.toStdString();
|
||||
|
@ -958,7 +964,7 @@ auto VDxfEngine::ExportToASTM(const QVector<VLayoutPiece> &details) -> bool
|
|||
QString blockName = detail.GetName();
|
||||
if (m_version <= DRW::AC1009)
|
||||
{
|
||||
blockName.replace(' ', '_');
|
||||
blockName.replace(' '_L1, '_'_L1);
|
||||
}
|
||||
|
||||
detailBlock->name = blockName.toStdString();
|
||||
|
|
|
@ -346,5 +346,5 @@ void VAbstractCubicBezierPath::CreateAlias()
|
|||
return;
|
||||
}
|
||||
|
||||
SetAlias(splPath + '_' + aliasSuffix);
|
||||
SetAlias(splPath + '_'_L1 + aliasSuffix);
|
||||
}
|
||||
|
|
|
@ -711,7 +711,7 @@ auto VLayoutPiece::GetUniqueID() const -> QString
|
|||
|
||||
if (not d->m_gradationId.isEmpty())
|
||||
{
|
||||
id = id + '_' + d->m_gradationId;
|
||||
id = id + '_'_L1 + d->m_gradationId;
|
||||
}
|
||||
|
||||
return id;
|
||||
|
|
|
@ -103,8 +103,8 @@ void InitLanguageList(QComboBox *combobox)
|
|||
for (auto locale : fileNames)
|
||||
{
|
||||
// get locale extracted by filename "valentina_de_De.qm"
|
||||
locale.truncate(locale.lastIndexOf('.')); // "valentina_de_De"
|
||||
locale.remove(0, locale.indexOf('_') + 1); // "de_De"
|
||||
locale.truncate(locale.lastIndexOf('.'_L1)); // "valentina_de_De"
|
||||
locale.remove(0, locale.indexOf('_'_L1) + 1); // "de_De"
|
||||
|
||||
if (locale.startsWith("ru"_L1))
|
||||
{
|
||||
|
|
|
@ -328,7 +328,7 @@ void VAbstractApplication::LoadTranslation(QString locale)
|
|||
installTranslator(appTranslator);
|
||||
|
||||
pmsTranslator = new QTranslator(this);
|
||||
LoadQM(pmsTranslator, QStringLiteral("measurements_") + Settings()->GetPMSystemCode() + '_', locale, appQmDir);
|
||||
LoadQM(pmsTranslator, QStringLiteral("measurements_") + Settings()->GetPMSystemCode() + '_'_L1, locale, appQmDir);
|
||||
installTranslator(pmsTranslator);
|
||||
|
||||
InitTrVars(); // Very important do it after load QM files.
|
||||
|
|
Loading…
Reference in New Issue
Block a user