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
7ce9d374
Commit
7ce9d374
authored
Feb 03, 2015
by
Fabio Bas
Browse files
Fixed "analyze on deckstats"; Fix #662
Plus: added support for deck name
parent
b7521bad
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/deckstats_interface.cpp
View file @
7ce9d374
...
...
@@ -32,7 +32,7 @@ void DeckStatsInterface::queryFinished(QNetworkReply *reply)
QString
data
(
reply
->
readAll
());
reply
->
deleteLater
();
QRegExp
rx
(
"
id=
\"
deckstats_deck_url
\"
value
=
\"
([^
\"
]+)
\"
"
);
QRegExp
rx
(
"
<meta property=
\"
og:url
\"
content
=
\"
([^
\"
]+)
\"
/>
"
);
if
(
!
rx
.
indexIn
(
data
))
{
QMessageBox
::
critical
(
0
,
tr
(
"Error"
),
tr
(
"The reply from the server could not be parsed."
));
deleteLater
();
...
...
@@ -53,11 +53,13 @@ void DeckStatsInterface::getAnalyzeRequestData(DeckList *deck, QByteArray *data)
#if QT_VERSION < 0x050000
QUrl
params
;
params
.
addQueryItem
(
"deck"
,
deckWithoutTokens
.
writeToString_Plain
());
params
.
addQueryItem
(
"decktitle"
,
deck
->
getName
());
data
->
append
(
params
.
encodedQuery
());
#else
QUrl
params
;
QUrlQuery
urlQuery
;
urlQuery
.
addQueryItem
(
"deck"
,
deckWithoutTokens
.
writeToString_Plain
());
urlQuery
.
addQueryItem
(
"decktitle"
,
deck
->
getName
());
params
.
setQuery
(
urlQuery
);
data
->
append
(
params
.
query
(
QUrl
::
EncodeReserved
));
#endif
...
...
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