From 7aff20b4ee849281b71ea63c85440a6cb8c2825a Mon Sep 17 00:00:00 2001 From: Mitchell Rosen Date: Mon, 17 Nov 2014 10:35:54 -0800 Subject: [PATCH] Fix the build --- cockatrice/src/gamesmodel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cockatrice/src/gamesmodel.cpp b/cockatrice/src/gamesmodel.cpp index da177fbe..95d02c06 100644 --- a/cockatrice/src/gamesmodel.cpp +++ b/cockatrice/src/gamesmodel.cpp @@ -23,7 +23,7 @@ namespace { * 24+ hours will return "1+ days ago", because it seems unlikely that we care about * an accurate timestamp of day old games. */ - std::string prettyPrintSecsAgo(uint32_t secs) { + QString prettyPrintSecsAgo(uint32_t secs) { std::ostringstream str_stream; if (secs < SECS_PER_MIN) { @@ -45,7 +45,7 @@ namespace { str_stream << "5+ hours ago"; } - return tr(str_stream.str()); + return QObject::tr(str_stream.str().c_str()); } } @@ -74,7 +74,7 @@ QVariant GamesModel::data(const QModelIndex &index, int role) const int secs = now - then; switch (role) { - case Qt::DisplayRole: return QString::fromStdString(prettyPrintSecsAgo(secs)); + case Qt::DisplayRole: return prettyPrintSecsAgo(secs); case SORT_ROLE: return QVariant(secs); default: { qDebug() << "Returning data for col 1 of games model when role != display, role != sort";