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
2b484aa9
Commit
2b484aa9
authored
Jul 07, 2015
by
Zach
Browse files
Merge pull request #1221 from Fizztastic/fix_818
Load .cod files from clipboard in deck editor
parents
e76c109f
0b8fab47
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/dlg_load_deck_from_clipboard.cpp
View file @
2b484aa9
...
...
@@ -48,7 +48,20 @@ void DlgLoadDeckFromClipboard::actOK()
QTextStream
stream
(
&
buffer
);
DeckLoader
*
l
=
new
DeckLoader
;
if
(
l
->
loadFromStream_Plain
(
stream
))
{
if
(
buffer
.
contains
(
"<cockatrice_deck version=
\"
1
\"
>"
))
{
if
(
l
->
loadFromString_Native
(
buffer
))
{
deckList
=
l
;
accept
();
}
else
{
QMessageBox
::
critical
(
this
,
tr
(
"Error"
),
tr
(
"Invalid deck list."
));
delete
l
;
}
}
else
if
(
l
->
loadFromStream_Plain
(
stream
))
{
deckList
=
l
;
accept
();
}
else
{
...
...
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