diff --git a/src/app/valentina/core/vapplication.cpp b/src/app/valentina/core/vapplication.cpp index d5eb0ee38..17d1333a0 100644 --- a/src/app/valentina/core/vapplication.cpp +++ b/src/app/valentina/core/vapplication.cpp @@ -593,9 +593,7 @@ QStringList VApplication::LabelLanguages() void VApplication::StartLogging() { CreateLogDir(); - // cppcheck-suppress leakReturnValNotUsed BeginLogging(); - // cppcheck-suppress leakReturnValNotUsed ClearOldLogs(); #if defined(Q_OS_WIN) && defined(Q_CC_GNU) ClearOldReports(); @@ -853,7 +851,6 @@ void VApplication::CollectReport(const QString &reportName) const reportFile.remove(); // Clear after yourself filename = QString("%1/reports/log-%2.log").arg(qApp->applicationDirPath()).arg(timestamp); - // cppcheck-suppress leakReturnValNotUsed GatherLogs(); QFile logFile(QString("%1/valentina.log").arg(LogDirPath())); logFile.copy(filename); // Collect log @@ -917,7 +914,6 @@ void VApplication::SendReport(const QString &reportName) const content.append(QString("\r\n-------------------------------\r\n")); content.append(QString("Log:")+"\r\n"); - // cppcheck-suppress leakReturnValNotUsed GatherLogs(); QFile logFile(QString("%1/valentina.log").arg(LogDirPath())); if (logFile.open(QIODevice::ReadOnly | QIODevice::Text)) diff --git a/src/libs/ifc/xml/vdomdocument.cpp b/src/libs/ifc/xml/vdomdocument.cpp index e9fd75bce..f99b67c16 100644 --- a/src/libs/ifc/xml/vdomdocument.cpp +++ b/src/libs/ifc/xml/vdomdocument.cpp @@ -464,6 +464,7 @@ void VDomDocument::ValidateXML(const QString &schema, const QString &fileName) { qCDebug(vXML, "Validation xml file %s.", qUtf8Printable(fileName)); QFile pattern(fileName); + // cppcheck-suppress ConfigurationNotChecked if (pattern.open(QIODevice::ReadOnly) == false) { const QString errorMsg(tr("Can't open file %1:\n%2.").arg(fileName).arg(pattern.errorString())); @@ -471,6 +472,7 @@ void VDomDocument::ValidateXML(const QString &schema, const QString &fileName) } QFile fileSchema(schema); + // cppcheck-suppress ConfigurationNotChecked if (fileSchema.open(QIODevice::ReadOnly) == false) { pattern.close(); @@ -521,6 +523,7 @@ void VDomDocument::ValidateXML(const QString &schema, const QString &fileName) void VDomDocument::setXMLContent(const QString &fileName) { QFile file(fileName); + // cppcheck-suppress ConfigurationNotChecked if (file.open(QIODevice::ReadOnly) == false) { const QString errorMsg(tr("Can't open file %1:\n%2.").arg(fileName).arg(file.errorString())); @@ -659,6 +662,7 @@ bool VDomDocument::SaveDocument(const QString &fileName, QString &error) const } bool success = false; QSaveFile file(fileName); + // cppcheck-suppress ConfigurationNotChecked if (file.open(QIODevice::WriteOnly)) { const int indent = 4; @@ -792,6 +796,7 @@ bool VDomDocument::SafeCopy(const QString &source, const QString &destination, Q QTemporaryFile destFile(destination + QLatin1String(".XXXXXX")); destFile.setAutoRemove(false); + // cppcheck-suppress ConfigurationNotChecked if (not destFile.open()) { error = destFile.errorString(); @@ -800,6 +805,7 @@ bool VDomDocument::SafeCopy(const QString &source, const QString &destination, Q else { QFile sourceFile(source); + // cppcheck-suppress ConfigurationNotChecked if (sourceFile.open(QIODevice::ReadOnly)) { result = true; diff --git a/src/libs/vmisc/qxtcsvmodel.cpp b/src/libs/vmisc/qxtcsvmodel.cpp index 8739614fa..05905799a 100644 --- a/src/libs/vmisc/qxtcsvmodel.cpp +++ b/src/libs/vmisc/qxtcsvmodel.cpp @@ -195,7 +195,6 @@ void QxtCsvModel::setSource(const QString &filename, bool withHeader, QChar sepa void QxtCsvModel::setSource(QIODevice *file, bool withHeader, QChar separator, QTextCodec* codec) { QxtCsvModelPrivate* d_ptr = &qxt_d(); - // cppcheck-suppress unreadVariable bool headerSet = !withHeader; if (not file->isOpen()) { diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp index c212fa511..dc9980957 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp @@ -645,7 +645,6 @@ bool VToolSplinePath::IsMovable(int index) const const auto splPath = VAbstractTool::data.GeometricObject(id); //index == -1 - can delete, but decided to left - // cppcheck-suppress redundantCondition if (index == -1 || index < 1 || index > splPath->CountSubSpl()) { return false;