Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
7c2c6eac
Commit
7c2c6eac
authored
Jan 03, 2012
by
Max-Wilhelm Bruker
Browse files
changed creation_time to time_t to get around Qt4.7 dependency
parent
609e3fc4
Changes
3
Show whitespace changes
Inline
Side-by-side
cockatrice/src/remotedecklist_treewidget.cpp
View file @
7c2c6eac
...
@@ -207,7 +207,7 @@ void RemoteDeckList_TreeModel::addFileToTree(const ServerInfo_DeckStorage_TreeIt
...
@@ -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
.
set
MSecsSinceEpoch
(
fileInfo
.
creation_time
());
time
.
set
Time_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
));
...
...
common/pb/proto/serverinfo_deckstorage.proto
View file @
7c2c6eac
message
ServerInfo_DeckStorage_File
{
message
ServerInfo_DeckStorage_File
{
optional
uint
64
creation_time
=
1
;
optional
uint
32
creation_time
=
1
;
}
}
message
ServerInfo_DeckStorage_Folder
{
message
ServerInfo_DeckStorage_Folder
{
...
...
servatrice/src/serversocketinterface.cpp
View file @
7c2c6eac
...
@@ -296,7 +296,7 @@ bool ServerSocketInterface::deckListHelper(int folderId, ServerInfo_DeckStorage_
...
@@ -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
().
to
MSecsSinceEpoch
());
newFile
->
set_creation_time
(
query
.
value
(
2
).
toDateTime
().
to
Time_t
());
}
}
return
true
;
return
true
;
...
@@ -437,7 +437,7 @@ Response::ResponseCode ServerSocketInterface::cmdDeckUpload(const Command_DeckUp
...
@@ -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
::
current
MSecsSinceEpoch
());
fileInfo
->
mutable_file
()
->
set_creation_time
(
QDateTime
::
current
DateTime
().
toTime_t
());
rc
.
setResponseExtension
(
re
);
rc
.
setResponseExtension
(
re
);
return
Response
::
RespOk
;
return
Response
::
RespOk
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment