mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 09:04:53 -07:00
Game created code improvements
+ No longer get "5hrs" and "5+ hrs" instead will be "4hrs" and "5+ hrs". + Refactored into an else-if with a single return. + removed comments + removed code from namespace and added to class
This commit is contained in:
parent
cf313d5a8d
commit
25dbfb37f4
2 changed files with 29 additions and 56 deletions
|
|
@ -18,6 +18,8 @@ private:
|
|||
QMap<int, GameTypeMap> gameTypes;
|
||||
|
||||
static const int NUM_COLS = 8;
|
||||
static const int SECS_PER_MIN = 60;
|
||||
static const int SECS_PER_HOUR = 3600;
|
||||
public:
|
||||
static const int SORT_ROLE = Qt::UserRole+1;
|
||||
|
||||
|
|
@ -26,7 +28,7 @@ public:
|
|||
int columnCount(const QModelIndex &/*parent*/ = QModelIndex()) const { return NUM_COLS; }
|
||||
QVariant data(const QModelIndex &index, int role) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
|
||||
const QString getGameCreatedString(const int secs) const;
|
||||
const ServerInfo_Game &getGame(int row);
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue