Commit e605f4b2 authored by Frederik Schwarzer's avatar Frederik Schwarzer
Browse files

Format.

GIT_SILENT
parent e8679c35
......@@ -255,9 +255,9 @@ void App::slotEndOfGame()
} else {
m_board->setGameOverEnabled(true);
auto const timeString = i18nc("time string: hh:mm:ss", "%1:%2:%3",
QString().sprintf("%02d", m_board->currentTime() / 3600),
QString().sprintf("%02d", (m_board->currentTime() / 60) % 60),
QString().sprintf("%02d", m_board->currentTime() % 60));
QString().sprintf("%02d", m_board->currentTime() / 3600),
QString().sprintf("%02d", (m_board->currentTime() / 60) % 60),
QString().sprintf("%02d", m_board->currentTime() % 60));
KScoreDialog::FieldInfo scoreInfo;
scoreInfo[KScoreDialog::Score].setNum(score(m_board->xTiles(), m_board->yTiles(), m_board->currentTime(), m_board->gravityFlag()));
scoreInfo[KScoreDialog::Time] = timeString;
......@@ -299,10 +299,10 @@ void App::updateTimeDisplay()
//qCDebug(KSHISEN_General) << "Time: " << m_board->currentTime();
auto const currentTime = m_board->currentTime();
auto const message = i18n("Your time: %1:%2:%3 %4",
QString().sprintf("%02d", currentTime / 3600),
QString().sprintf("%02d", (currentTime / 60) % 60),
QString().sprintf("%02d", currentTime % 60),
m_board->isPaused() ? i18n("(Paused) ") : QString());
QString().sprintf("%02d", currentTime / 3600),
QString().sprintf("%02d", (currentTime / 60) % 60),
QString().sprintf("%02d", currentTime % 60),
m_board->isPaused() ? i18n("(Paused) ") : QString());
m_gameTimerLabel->setText(message);
}
......
......@@ -227,7 +227,7 @@ void Board::applyGravity(TilePos const tilePos1, TilePos const tilePos2)
// more complex that living with that second iteration once in a while.
// Maybe later ... (schwarzer)
std::array<int, 2> const affectedColumns = {tilePos1.x(), tilePos2.x()};
for (auto const column: affectedColumns) {
for (auto const column : affectedColumns) {
auto rptr = yTiles() - 1;
auto wptr = yTiles() - 1;
while (rptr >= 0) {
......@@ -602,9 +602,9 @@ bool Board::isTileHighlighted(TilePos const & tilePos) const
void Board::updateField(TilePos const & tilePos)
{
auto const r = QRect(xOffset() + tilePos.x() * m_tiles.qWidth() * 2,
yOffset() + tilePos.y() * m_tiles.qHeight() * 2,
m_tiles.width(),
m_tiles.height());
yOffset() + tilePos.y() * m_tiles.qHeight() * 2,
m_tiles.width(),
m_tiles.height());
update(r);
}
......@@ -1771,12 +1771,12 @@ bool Board::isSolvable(bool restore)
auto const tile2 = TilePos(p.front().path().back().x(), p.front().path().back().y());
if (!tilesMatch(field(tile1), field(tile2))) {
auto errMessage = QStringLiteral("Removing unmatched tiles: (%1,%2) => %3 (%4,%5) => %6")
.arg(p.front().path().front().x())
.arg(p.front().path().front().y())
.arg(field(tile1))
.arg(p.front().path().back().x())
.arg(p.front().path().back().y())
.arg(field(tile2));
.arg(p.front().path().front().x())
.arg(p.front().path().front().y())
.arg(field(tile1))
.arg(p.front().path().back().x())
.arg(p.front().path().back().y())
.arg(field(tile2));
qCCritical(KSHISEN_General) << errMessage;
}
setField(tile1, EMPTY);
......
......@@ -21,7 +21,7 @@
#include "../move.h"
#include "../types.h"
class MoveTest: public QObject
class MoveTest : public QObject
{
Q_OBJECT
private slots:
......
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