mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-02 19:43:55 -07:00
changed creation_time to time_t to get around Qt4.7 dependency
This commit is contained in:
parent
609e3fc41d
commit
7c2c6eac14
3 changed files with 4 additions and 4 deletions
|
|
@ -207,7 +207,7 @@ void RemoteDeckList_TreeModel::addFileToTree(const ServerInfo_DeckStorage_TreeIt
|
||||||
{
|
{
|
||||||
const ServerInfo_DeckStorage_File &fileInfo = file.file();
|
const ServerInfo_DeckStorage_File &fileInfo = file.file();
|
||||||
QDateTime time;
|
QDateTime time;
|
||||||
time.setMSecsSinceEpoch(fileInfo.creation_time());
|
time.setTime_t(fileInfo.creation_time());
|
||||||
|
|
||||||
beginInsertRows(nodeToIndex(parent), parent->size(), parent->size());
|
beginInsertRows(nodeToIndex(parent), parent->size(), parent->size());
|
||||||
parent->append(new FileNode(QString::fromStdString(file.name()), file.id(), time, parent));
|
parent->append(new FileNode(QString::fromStdString(file.name()), file.id(), time, parent));
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
message ServerInfo_DeckStorage_File {
|
message ServerInfo_DeckStorage_File {
|
||||||
optional uint64 creation_time = 1;
|
optional uint32 creation_time = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ServerInfo_DeckStorage_Folder {
|
message ServerInfo_DeckStorage_Folder {
|
||||||
|
|
|
||||||
|
|
@ -296,7 +296,7 @@ bool ServerSocketInterface::deckListHelper(int folderId, ServerInfo_DeckStorage_
|
||||||
newItem->set_name(query.value(1).toString().toStdString());
|
newItem->set_name(query.value(1).toString().toStdString());
|
||||||
|
|
||||||
ServerInfo_DeckStorage_File *newFile = newItem->mutable_file();
|
ServerInfo_DeckStorage_File *newFile = newItem->mutable_file();
|
||||||
newFile->set_creation_time(query.value(2).toDateTime().toMSecsSinceEpoch());
|
newFile->set_creation_time(query.value(2).toDateTime().toTime_t());
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -437,7 +437,7 @@ Response::ResponseCode ServerSocketInterface::cmdDeckUpload(const Command_DeckUp
|
||||||
ServerInfo_DeckStorage_TreeItem *fileInfo = re->mutable_new_file();
|
ServerInfo_DeckStorage_TreeItem *fileInfo = re->mutable_new_file();
|
||||||
fileInfo->set_id(query.lastInsertId().toInt());
|
fileInfo->set_id(query.lastInsertId().toInt());
|
||||||
fileInfo->set_name(deckName.toStdString());
|
fileInfo->set_name(deckName.toStdString());
|
||||||
fileInfo->mutable_file()->set_creation_time(QDateTime::currentMSecsSinceEpoch());
|
fileInfo->mutable_file()->set_creation_time(QDateTime::currentDateTime().toTime_t());
|
||||||
rc.setResponseExtension(re);
|
rc.setResponseExtension(re);
|
||||||
|
|
||||||
return Response::RespOk;
|
return Response::RespOk;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue