Commit 81835a07 authored by Laurent Montel's avatar Laurent Montel 😁

Fix clazy warning

parent 3a099b44
......@@ -44,7 +44,7 @@ class KTron : public KXmlGuiWindow {
Q_OBJECT
public:
KTron(QWidget *parent=0);
KTron(QWidget *parent=nullptr);
~KTron();
private:
......
......@@ -57,7 +57,7 @@ int main(int argc, char* argv[])
migrate.migrate();
KAboutData aboutData( QStringLiteral("ksnakeduel"), i18n("KSnakeDuel"),
QLatin1String(KTRON_VERSION), i18n(description), KAboutLicense::GPL, i18n(notice));
QStringLiteral(KTRON_VERSION), i18n(description), KAboutLicense::GPL, i18n(notice));
aboutData.addAuthor(i18n("Matthias Kiefer"), i18n("Original author"), QStringLiteral("matthias.kiefer@gmx.de"));
aboutData.addAuthor(i18n("Benjamin Meyer"), i18n("Various improvements"), QStringLiteral("ben+ktron@meyerhome.net"));
aboutData.addAuthor(i18n("Stas Verberkt"), i18n("KDE 4 Port, interface revision and KSnake mode"), QStringLiteral("legolas@legolasweb.nl"));
......
......@@ -258,7 +258,7 @@ int Renderer::calculateOffsetY(int y)
return (y * p->m_partSize.height()) + (p->m_sceneSize.height() - (TRON_PLAYFIELD_HEIGHT + 2) * p->m_partSize.height()) / 2;
}
void Renderer::drawPart(QPainter & painter, int x, int y, QString svgName)
void Renderer::drawPart(QPainter & painter, int x, int y, const QString &svgName)
{
//qCDebug(KSNAKEDUEL_LOG) << "Drawing part: " << svgName;
......
......@@ -53,7 +53,7 @@ class Renderer {
QPixmap messageBox(const QString &message);
void resetPlayField();
void drawPart(QPainter & painter, int x, int y, QString svgName);
void drawPart(QPainter & painter, int x, int y, const QString &svgName);
void updatePlayField(PlayField &playfield);
QPixmap *getPlayField();
......
......@@ -180,7 +180,7 @@ Player *Tron::getPlayer(int playerNr)
if (playerNr != 0 && playerNr != 1)
{
qCDebug(KSNAKEDUEL_LOG) << "Inexistent player requested: " << playerNr;
return 0;
return nullptr;
}
return players[playerNr];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment