Skip to content

Commit

Permalink
Make Clang-Tidy happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Oct 25, 2019
1 parent 5f5a60f commit 5f14660
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/plugins/test/ZincWindow/src/zincwindowplugin.h
Expand Up @@ -62,9 +62,9 @@ class ZincWindowPlugin : public QObject, public I18nInterface,
#include "windowinterface.inl"

private:
QAction *mZincWindowAction;
QAction *mZincWindowAction = nullptr;

ZincWindowWindow *mZincWindowWindow;
ZincWindowWindow *mZincWindowWindow = nullptr;
};

//==============================================================================
Expand Down
16 changes: 8 additions & 8 deletions src/plugins/tools/CellMLTools/src/cellmltoolsplugin.cpp
Expand Up @@ -300,9 +300,9 @@ void CellMLToolsPlugin::exportTo(CellMLSupport::CellmlFile::Version pVersion)
}

Core::warningMessageBox(tr("Export CellML File To %1").arg(format),
tr("<strong>%1</strong> could not be exported to <strong>%2</strong>%3.").arg(QDir::toNativeSeparators(fileName))
.arg(format)
.arg(errorMessage));
tr("<strong>%1</strong> could not be exported to <strong>%2</strong>%3.").arg(QDir::toNativeSeparators(fileName),
format,
errorMessage));
}
}

Expand Down Expand Up @@ -445,8 +445,8 @@ bool CellMLToolsPlugin::runCommand(Command pCommand,
CellMLSupport::CellmlFileIssues cellmlFileIssues = cellmlFile->issues();

for (const auto &cellmlFileIssue : cellmlFileIssues) {
output += QString("%1[%2] [%3:%4] %5").arg(output.isEmpty()?QString():"\n")
.arg((cellmlFileIssue.type() == CellMLSupport::CellmlFileIssue::Type::Error)?"Error":"Warning")
output += QString("%1[%2] [%3:%4] %5").arg(output.isEmpty()?QString():"\n",
(cellmlFileIssue.type() == CellMLSupport::CellmlFileIssue::Type::Error)?"Error":"Warning")
.arg(cellmlFileIssue.line())
.arg(cellmlFileIssue.column())
.arg(Core::plainString(cellmlFileIssue.formattedMessage()));
Expand Down Expand Up @@ -550,9 +550,9 @@ void CellMLToolsPlugin::exportToUserDefinedFormat()
}

Core::warningMessageBox(tr("Export CellML File To User-Defined Format"),
tr("<strong>%1</strong> could not be exported to the user-defined format described in <strong>%2</strong>%3.").arg(QDir::toNativeSeparators(fileName))
.arg(QDir::toNativeSeparators(userDefinedFormatFileName))
.arg(errorMessage));
tr("<strong>%1</strong> could not be exported to the user-defined format described in <strong>%2</strong>%3.").arg(QDir::toNativeSeparators(fileName),
QDir::toNativeSeparators(userDefinedFormatFileName),
errorMessage));
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/widget/EditorWidget/src/editorlistwidget.cpp
Expand Up @@ -63,8 +63,8 @@ EditorListItem::EditorListItem(Type pType, int pLine, int pColumn,
if (pFileInfo.isEmpty()) {
setText(pMessage);
} else {
setText(QString("[%1] %s").arg(pFileInfo)
.arg(pMessage));
setText(QString("[%1] %s").arg(pFileInfo,
pMessage));
}
} else if (pColumn == -1) {
if (pFileInfo.isEmpty()) {
Expand Down
Expand Up @@ -1095,8 +1095,8 @@ void GraphPanelPlotOverlayWidget::drawCoordinates(QPainter *pPainter,
pPainter->setFont(mOwner->axisFont(QwtPlot::xBottom));

QPointF point = mOwner->canvasPoint(pPoint);
QString coordinates = QString("X: %1\nY: %2").arg(QLocale().toString(point.x(), 'g', 15))
.arg(QLocale().toString(point.y(), 'g', 15));
QString coordinates = QString("X: %1\nY: %2").arg(QLocale().toString(point.x(), 'g', 15),
QLocale().toString(point.y(), 'g', 15));
QPen pen = pPainter->pen();

pen.setStyle(Qt::SolidLine);
Expand Down Expand Up @@ -1399,7 +1399,7 @@ void GraphPanelPlotLegendWidget::updateWidget(QWidget *pWidget,
// Check whether we are dealing with one of our main legend labels

auto legendLabel = static_cast<QwtLegendLabel *>(pWidget);
bool mainLegendLabel = mLegendLabels.values().contains(legendLabel);
bool mainLegendLabel = std::find(mLegendLabels.begin(), mLegendLabels.end(), legendLabel) != mLegendLabels.end();

if (mainLegendLabel) {
// We are dealing with a main legend label, i.e. a legend label
Expand Down Expand Up @@ -1474,7 +1474,7 @@ bool GraphPanelPlotLegendWidget::needScrollBar() const

int legendLabelsHeight = 0;

for (auto legendLabel : mLegendLabels.values()) {
for (auto legendLabel : mLegendLabels) {
legendLabelsHeight += legendLabel->height();
}

Expand Down

0 comments on commit 5f14660

Please sign in to comment.