Clazy warnings.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-10-28 14:52:49 +02:00
parent 7f9906bbcc
commit b7c1b4c4a6
2 changed files with 7 additions and 4 deletions

View File

@ -312,7 +312,7 @@ void VApplication::NewValentina(const QString &fileName)
}
else
{
const QString run = QString("\"%1\" \"%2\"").arg(QCoreApplication::applicationFilePath(), fileName);
const QString run = QStringLiteral("\"%1\" \"%2\"").arg(QCoreApplication::applicationFilePath(), fileName);
qCDebug(vApp, "New process with arguments. program = %s", qUtf8Printable(run));
if (QProcess::startDetached(run))
{
@ -409,7 +409,7 @@ void VApplication::ActivateDarkMode()
VSettings *settings = qApp->ValentinaSettings();
if (settings->GetDarkMode())
{
QFile f(":qdarkstyle/style.qss");
QFile f(QStringLiteral(":qdarkstyle/style.qss"));
if (!f.exists())
{
qDebug()<<"Unable to set stylesheet, file not found\n";
@ -495,7 +495,7 @@ QString VApplication::LogDirPath() const
//---------------------------------------------------------------------------------------------------------------------
QString VApplication::LogPath() const
{
return QString("%1/valentina-pid%2.log").arg(LogDirPath()).arg(applicationPid());
return QStringLiteral("%1/valentina-pid%2.log").arg(LogDirPath()).arg(applicationPid());
}
//---------------------------------------------------------------------------------------------------------------------
@ -615,7 +615,7 @@ void VApplication::InitOptions()
//use an icon theme that we provide via a .qrc file
//This case happens under Windows and Mac OS X
//This does not happen under GNOME or KDE
QIcon::setThemeName("win.icon.theme");
QIcon::setThemeName(QStringLiteral("win.icon.theme"));
}
ActivateDarkMode();
}

View File

@ -73,6 +73,7 @@ QVector<VLayoutPiecePath> ConvertInternalPaths(const VPiece &piece, const VConta
QVector<VLayoutPiecePath> paths;
const QVector<quint32> pathsId = piece.GetInternalPaths();
const QVector<QPointF> cuttingPath = piece.CuttingPathPoints(pattern);
paths.reserve(pathsId.size());
for (auto id : pathsId)
{
const VPiecePath path = pattern->GetPiecePath(id);
@ -204,6 +205,7 @@ QStringList PieceLabelText(const QVector<QPointF> &labelShape, const VTextManage
QStringList text;
if (labelShape.count() > 2)
{
text.reserve(tm.GetSourceLinesCount());
for (int i = 0; i < tm.GetSourceLinesCount(); ++i)
{
text.append(tm.GetSourceLine(i).m_qsText);
@ -217,6 +219,7 @@ QVector<VLayoutPlaceLabel> ConvertPlaceLabels(const VPiece &piece, const VContai
{
QVector<VLayoutPlaceLabel> labels;
const QVector<quint32> placeLabels = piece.GetPlaceLabels();
labels.reserve(placeLabels.size());
for(auto placeLabel : placeLabels)
{
const auto label = pattern->GeometricObject<VPlaceLabelItem>(placeLabel);