diff options
author | John Fultz <jfultz@wolfram.com> | 2020-06-17 23:52:03 -0500 |
---|---|---|
committer | John Fultz <jfultz@wolfram.com> | 2020-06-17 23:52:03 -0500 |
commit | b7413384aafca679584df1e5e18dd7e6282ff4f3 (patch) | |
tree | 65e5e434fc0dcc7e2dc51520a659219a575bbc68 /quacker/graphicalreporter.cpp | |
parent | 61aa7d337a045759e06803c89b5f364ca4ed26b1 (diff) |
Xcode compiler warnings.
* Replace std::random_shuffle() with std::shuffle().
* Populate switch statements which were checking the
Move enums, but not Move::PlaceError.
* endl -> Qt::endl for QTextStream usage.
* QString::SkipEmptyParts -> Qt::SkipEmptyParts
* QLabel::pixmap() now takes Qt::ReturnByValue
* Use QElapsedTimer where appropriate.
Diffstat (limited to 'quacker/graphicalreporter.cpp')
-rw-r--r-- | quacker/graphicalreporter.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/quacker/graphicalreporter.cpp b/quacker/graphicalreporter.cpp index 8111f7b..86b539d 100644 --- a/quacker/graphicalreporter.cpp +++ b/quacker/graphicalreporter.cpp @@ -94,27 +94,27 @@ void GraphicalReporter::reportPosition(const Quackle::GamePosition &position, Qu if (image.save(filename, "PNG")) { - m_indexStream << QString("<a href=\"%1\">%2</a>").arg(filebasename).arg(title) << endl; + m_indexStream << QString("<a href=\"%1\">%2</a>").arg(filebasename).arg(title) << m_endl; } else { QMessageBox::critical(0, GraphicalBoard::tr("Error Writing File - Quacker"), GraphicalBoard::tr("Could not write image %1.").arg(filename)); } - m_indexStream << "<p><img src=\"" << filebasename << "\"></p>" << endl; + m_indexStream << "<p><img src=\"" << filebasename << "\"></p>" << m_endl; } else { m_indexStream << title; const int boardTileSize = position.gameOver()? 45 : 25; - m_indexStream << QuackleIO::Util::sanitizeUserVisibleLetterString(QuackleIO::Util::uvStringToQString(position.board().htmlBoard(boardTileSize))) << endl; + m_indexStream << QuackleIO::Util::sanitizeUserVisibleLetterString(QuackleIO::Util::uvStringToQString(position.board().htmlBoard(boardTileSize))) << m_endl; } } const Quackle::PlayerList players(position.endgameAdjustedScores()); - m_indexStream << "<table cellspacing=6>" << endl; + m_indexStream << "<table cellspacing=6>" << m_endl; for (Quackle::PlayerList::const_iterator it = players.begin(); it != players.end(); ++it) { m_indexStream << "<tr>"; @@ -131,9 +131,9 @@ void GraphicalReporter::reportPosition(const Quackle::GamePosition &position, Qu << "<td>" << QuackleIO::Util::sanitizeUserVisibleLetterString(QuackleIO::Util::uvStringToQString((*it).rack().toString())) << "</td>" << "<td>" << (*it).score() << "</td>" << "</tr>" - << endl; + << m_endl; } - m_indexStream << "</table>" << endl; + m_indexStream << "</table>" << m_endl; if (computerPlayer && !position.gameOver()) { @@ -153,7 +153,7 @@ void GraphicalReporter::reportPosition(const Quackle::GamePosition &position, Qu moves.push_back(position.committedMove()); } - m_indexStream << "<ol>" << endl; + m_indexStream << "<ol>" << m_endl; for (Quackle::MoveList::const_iterator it = moves.begin(); it != moves.end(); ++it) { QString item; @@ -203,9 +203,9 @@ void GraphicalReporter::reportPosition(const Quackle::GamePosition &position, Qu item += QString(" ←"); if (!item.isEmpty()) - m_indexStream << "<li>" << item << "</li>" << endl; + m_indexStream << "<li>" << item << "</li>" << m_endl; } - m_indexStream << "</ol>" << endl; + m_indexStream << "</ol>" << m_endl; } m_indexStream << "\n\n"; |