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
6fa94dd4
Commit
6fa94dd4
authored
Jun 20, 2014
by
Mark Morschhäuser
Browse files
Qt5: toAscii() and fromAscii() Methods are deprecated
parent
a903c231
Changes
3
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/qt-json/json.cpp
View file @
6fa94dd4
...
@@ -553,7 +553,7 @@ int Json::nextToken(const QString &json, int &index)
...
@@ -553,7 +553,7 @@ int Json::nextToken(const QString &json, int &index)
QChar
c
=
json
[
index
];
QChar
c
=
json
[
index
];
index
++
;
index
++
;
switch
(
c
.
to
Ascii
())
switch
(
c
.
to
Latin1
())
{
{
case
'{'
:
return
JsonTokenCurlyOpen
;
case
'{'
:
return
JsonTokenCurlyOpen
;
case
'}'
:
return
JsonTokenCurlyClose
;
case
'}'
:
return
JsonTokenCurlyClose
;
...
...
servatrice/src/passwordhasher.cpp
View file @
6fa94dd4
...
@@ -16,7 +16,7 @@ QString PasswordHasher::computeHash(const QString &password, const QString &salt
...
@@ -16,7 +16,7 @@ QString PasswordHasher::computeHash(const QString &password, const QString &salt
const
int
algo
=
GCRY_MD_SHA512
;
const
int
algo
=
GCRY_MD_SHA512
;
const
int
rounds
=
1000
;
const
int
rounds
=
1000
;
QByteArray
passwordBuffer
=
(
salt
+
password
).
to
Ascii
();
QByteArray
passwordBuffer
=
(
salt
+
password
).
to
Latin1
();
int
hashLen
=
gcry_md_get_algo_dlen
(
algo
);
int
hashLen
=
gcry_md_get_algo_dlen
(
algo
);
char
hash
[
hashLen
],
tmp
[
hashLen
];
char
hash
[
hashLen
],
tmp
[
hashLen
];
gcry_md_hash_buffer
(
algo
,
hash
,
passwordBuffer
.
data
(),
passwordBuffer
.
size
());
gcry_md_hash_buffer
(
algo
,
hash
,
passwordBuffer
.
data
(),
passwordBuffer
.
size
());
...
...
servatrice/src/servatrice.cpp
View file @
6fa94dd4
...
@@ -319,7 +319,7 @@ void Servatrice::updateServerList()
...
@@ -319,7 +319,7 @@ void Servatrice::updateServerList()
query
.
prepare
(
"select id, ssl_cert, hostname, address, game_port, control_port from "
+
dbPrefix
+
"_servers order by id asc"
);
query
.
prepare
(
"select id, ssl_cert, hostname, address, game_port, control_port from "
+
dbPrefix
+
"_servers order by id asc"
);
servatriceDatabaseInterface
->
execSqlQuery
(
query
);
servatriceDatabaseInterface
->
execSqlQuery
(
query
);
while
(
query
.
next
())
{
while
(
query
.
next
())
{
ServerProperties
prop
(
query
.
value
(
0
).
toInt
(),
QSslCertificate
(
query
.
value
(
1
).
toString
().
to
Ascii
()),
query
.
value
(
2
).
toString
(),
QHostAddress
(
query
.
value
(
3
).
toString
()),
query
.
value
(
4
).
toInt
(),
query
.
value
(
5
).
toInt
());
ServerProperties
prop
(
query
.
value
(
0
).
toInt
(),
QSslCertificate
(
query
.
value
(
1
).
toString
().
to
Latin1
()),
query
.
value
(
2
).
toString
(),
QHostAddress
(
query
.
value
(
3
).
toString
()),
query
.
value
(
4
).
toInt
(),
query
.
value
(
5
).
toInt
());
serverList
.
append
(
prop
);
serverList
.
append
(
prop
);
qDebug
()
<<
QString
(
"#%1 CERT=%2 NAME=%3 IP=%4:%5 CPORT=%6"
).
arg
(
prop
.
id
).
arg
(
QString
(
prop
.
cert
.
digest
().
toHex
())).
arg
(
prop
.
hostname
).
arg
(
prop
.
address
.
toString
()).
arg
(
prop
.
gamePort
).
arg
(
prop
.
controlPort
);
qDebug
()
<<
QString
(
"#%1 CERT=%2 NAME=%3 IP=%4:%5 CPORT=%6"
).
arg
(
prop
.
id
).
arg
(
QString
(
prop
.
cert
.
digest
().
toHex
())).
arg
(
prop
.
hostname
).
arg
(
prop
.
address
.
toString
()).
arg
(
prop
.
gamePort
).
arg
(
prop
.
controlPort
);
}
}
...
...
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