More cases for string literals.
This commit is contained in:
parent
59b42849cf
commit
df51f1a873
|
@ -30,7 +30,6 @@
|
||||||
#define VPATTERN_H
|
#define VPATTERN_H
|
||||||
|
|
||||||
#include "../ifc/xml/vabstractpattern.h"
|
#include "../ifc/xml/vabstractpattern.h"
|
||||||
#include "../ifc/xml/vtoolrecord.h"
|
|
||||||
#include "../vpatterndb/vcontainer.h"
|
#include "../vpatterndb/vcontainer.h"
|
||||||
#include "../ifc/xml/vpatternconverter.h"
|
#include "../ifc/xml/vpatternconverter.h"
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,8 @@
|
||||||
|
|
||||||
#include "../vmisc/compatibility.h"
|
#include "../vmisc/compatibility.h"
|
||||||
|
|
||||||
|
using namespace Qt::Literals::StringLiterals;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
auto IsMimeTypeImage(const QMimeType &mime) -> bool
|
auto IsMimeTypeImage(const QMimeType &mime) -> bool
|
||||||
{
|
{
|
||||||
|
@ -108,10 +110,10 @@ auto PrepareImageFilters() -> QString
|
||||||
|
|
||||||
if (not sufixes.isEmpty())
|
if (not sufixes.isEmpty())
|
||||||
{
|
{
|
||||||
filters.append(QObject::tr("Images") + QStringLiteral(" (%1)").arg(sufixes.join(' ')));
|
filters.append(QObject::tr("Images") + " (%1)"_L1.arg(sufixes.join(' '_L1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
filters.append(QObject::tr("All files") + QStringLiteral(" (*.*)"));
|
filters.append(QObject::tr("All files") + " (*.*)"_L1);
|
||||||
|
|
||||||
return filters.join(QStringLiteral(";;"));
|
return filters.join(";;"_L1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2476,7 +2476,7 @@ void VAbstractPattern::SetGroupTags(quint32 id, const QStringList &tags)
|
||||||
QDomElement group = elementById(id, TagGroup);
|
QDomElement group = elementById(id, TagGroup);
|
||||||
if (group.isElement())
|
if (group.isElement())
|
||||||
{
|
{
|
||||||
SetAttributeOrRemoveIf<QString>(group, AttrTags, tags.join(','),
|
SetAttributeOrRemoveIf<QString>(group, AttrTags, tags.join(','_L1),
|
||||||
[](const QString &rawTags) noexcept { return rawTags.isEmpty(); });
|
[](const QString &rawTags) noexcept { return rawTags.isEmpty(); });
|
||||||
modified = true;
|
modified = true;
|
||||||
emit patternChanged(false);
|
emit patternChanged(false);
|
||||||
|
|
|
@ -45,6 +45,8 @@
|
||||||
#include <ciso646> // and, not, or
|
#include <ciso646> // and, not, or
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
using namespace Qt::Literals::StringLiterals;
|
||||||
|
|
||||||
const QString VBackgroundPatternImage::brokenImage = QStringLiteral("://icon/svg/broken_path.svg");
|
const QString VBackgroundPatternImage::brokenImage = QStringLiteral("://icon/svg/broken_path.svg");
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
|
@ -100,7 +102,7 @@ auto VBackgroundPatternImage::FromFile(const QString &fileName, bool builtIn) ->
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
QString base64 = SplitString(QString::fromLatin1(file.readAll().toBase64().data())).join('\n');
|
QString base64 = SplitString(QString::fromLatin1(file.readAll().toBase64().data())).join('\n'_L1);
|
||||||
image.SetContentData(base64.toLatin1(), mime.name());
|
image.SetContentData(base64.toLatin1(), mime.name());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -47,6 +47,8 @@
|
||||||
#include "../vmisc/compatibility.h"
|
#include "../vmisc/compatibility.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
|
using namespace Qt::Literals::StringLiterals;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
auto VPatternImage::FromFile(const QString &fileName) -> VPatternImage
|
auto VPatternImage::FromFile(const QString &fileName) -> VPatternImage
|
||||||
{
|
{
|
||||||
|
@ -66,7 +68,7 @@ auto VPatternImage::FromFile(const QString &fileName) -> VPatternImage
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
QString base64 = SplitString(QString::fromLatin1(file.readAll().toBase64().data())).join('\n');
|
QString base64 = SplitString(QString::fromLatin1(file.readAll().toBase64().data())).join('\n'_L1);
|
||||||
|
|
||||||
image.SetContentData(base64.toLatin1(), mime.name());
|
image.SetContentData(base64.toLatin1(), mime.name());
|
||||||
return image;
|
return image;
|
||||||
|
|
|
@ -36,6 +36,12 @@
|
||||||
#include "vmeasurement_p.h"
|
#include "vmeasurement_p.h"
|
||||||
#include "vvariable.h"
|
#include "vvariable.h"
|
||||||
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 4, 0)
|
||||||
|
#include "../vmisc/compatibility.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
using namespace Qt::Literals::StringLiterals;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
VMeasurement::VMeasurement(quint32 index, const QString &name)
|
VMeasurement::VMeasurement(quint32 index, const QString &name)
|
||||||
: VVariable(name),
|
: VVariable(name),
|
||||||
|
@ -123,7 +129,7 @@ auto VMeasurement::CorrectionHash(qreal baseA, qreal baseB, qreal baseC) -> QStr
|
||||||
{
|
{
|
||||||
hashBlocks.append(QString::number(baseC));
|
hashBlocks.append(QString::number(baseC));
|
||||||
}
|
}
|
||||||
return hashBlocks.join(';');
|
return hashBlocks.join(';'_L1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user