Clazy warnings.
--HG-- branch : develop
This commit is contained in:
parent
7f9906bbcc
commit
b7c1b4c4a6
|
@ -312,7 +312,7 @@ void VApplication::NewValentina(const QString &fileName)
|
||||||
}
|
}
|
||||||
else
|
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));
|
qCDebug(vApp, "New process with arguments. program = %s", qUtf8Printable(run));
|
||||||
if (QProcess::startDetached(run))
|
if (QProcess::startDetached(run))
|
||||||
{
|
{
|
||||||
|
@ -409,7 +409,7 @@ void VApplication::ActivateDarkMode()
|
||||||
VSettings *settings = qApp->ValentinaSettings();
|
VSettings *settings = qApp->ValentinaSettings();
|
||||||
if (settings->GetDarkMode())
|
if (settings->GetDarkMode())
|
||||||
{
|
{
|
||||||
QFile f(":qdarkstyle/style.qss");
|
QFile f(QStringLiteral(":qdarkstyle/style.qss"));
|
||||||
if (!f.exists())
|
if (!f.exists())
|
||||||
{
|
{
|
||||||
qDebug()<<"Unable to set stylesheet, file not found\n";
|
qDebug()<<"Unable to set stylesheet, file not found\n";
|
||||||
|
@ -495,7 +495,7 @@ QString VApplication::LogDirPath() const
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
QString VApplication::LogPath() 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
|
//use an icon theme that we provide via a .qrc file
|
||||||
//This case happens under Windows and Mac OS X
|
//This case happens under Windows and Mac OS X
|
||||||
//This does not happen under GNOME or KDE
|
//This does not happen under GNOME or KDE
|
||||||
QIcon::setThemeName("win.icon.theme");
|
QIcon::setThemeName(QStringLiteral("win.icon.theme"));
|
||||||
}
|
}
|
||||||
ActivateDarkMode();
|
ActivateDarkMode();
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,6 +73,7 @@ QVector<VLayoutPiecePath> ConvertInternalPaths(const VPiece &piece, const VConta
|
||||||
QVector<VLayoutPiecePath> paths;
|
QVector<VLayoutPiecePath> paths;
|
||||||
const QVector<quint32> pathsId = piece.GetInternalPaths();
|
const QVector<quint32> pathsId = piece.GetInternalPaths();
|
||||||
const QVector<QPointF> cuttingPath = piece.CuttingPathPoints(pattern);
|
const QVector<QPointF> cuttingPath = piece.CuttingPathPoints(pattern);
|
||||||
|
paths.reserve(pathsId.size());
|
||||||
for (auto id : pathsId)
|
for (auto id : pathsId)
|
||||||
{
|
{
|
||||||
const VPiecePath path = pattern->GetPiecePath(id);
|
const VPiecePath path = pattern->GetPiecePath(id);
|
||||||
|
@ -204,6 +205,7 @@ QStringList PieceLabelText(const QVector<QPointF> &labelShape, const VTextManage
|
||||||
QStringList text;
|
QStringList text;
|
||||||
if (labelShape.count() > 2)
|
if (labelShape.count() > 2)
|
||||||
{
|
{
|
||||||
|
text.reserve(tm.GetSourceLinesCount());
|
||||||
for (int i = 0; i < tm.GetSourceLinesCount(); ++i)
|
for (int i = 0; i < tm.GetSourceLinesCount(); ++i)
|
||||||
{
|
{
|
||||||
text.append(tm.GetSourceLine(i).m_qsText);
|
text.append(tm.GetSourceLine(i).m_qsText);
|
||||||
|
@ -217,6 +219,7 @@ QVector<VLayoutPlaceLabel> ConvertPlaceLabels(const VPiece &piece, const VContai
|
||||||
{
|
{
|
||||||
QVector<VLayoutPlaceLabel> labels;
|
QVector<VLayoutPlaceLabel> labels;
|
||||||
const QVector<quint32> placeLabels = piece.GetPlaceLabels();
|
const QVector<quint32> placeLabels = piece.GetPlaceLabels();
|
||||||
|
labels.reserve(placeLabels.size());
|
||||||
for(auto placeLabel : placeLabels)
|
for(auto placeLabel : placeLabels)
|
||||||
{
|
{
|
||||||
const auto label = pattern->GeometricObject<VPlaceLabelItem>(placeLabel);
|
const auto label = pattern->GeometricObject<VPlaceLabelItem>(placeLabel);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user