Qt4 build fix
This commit is contained in:
parent
51491162cb
commit
5a69b086a6
1 changed files with 6 additions and 4 deletions
|
@ -298,6 +298,7 @@ bool SnapmaticPicture::setPicture(const QImage &picture)
|
||||||
if (snapmaticStream.seek(jpegStreamEditorBegin))
|
if (snapmaticStream.seek(jpegStreamEditorBegin))
|
||||||
{
|
{
|
||||||
bool saveSuccess;
|
bool saveSuccess;
|
||||||
|
Q_UNUSED(saveSuccess)
|
||||||
QByteArray picByteArray1;
|
QByteArray picByteArray1;
|
||||||
QBuffer picStream1(&picByteArray1);
|
QBuffer picStream1(&picByteArray1);
|
||||||
picStream1.open(QIODevice::WriteOnly);
|
picStream1.open(QIODevice::WriteOnly);
|
||||||
|
@ -400,7 +401,7 @@ QImage SnapmaticPicture::getPicture()
|
||||||
}
|
}
|
||||||
else if (writeEnabled)
|
else if (writeEnabled)
|
||||||
{
|
{
|
||||||
bool returnOk;
|
bool returnOk = 0;
|
||||||
QImage returnPicture;
|
QImage returnPicture;
|
||||||
|
|
||||||
QBuffer snapmaticStream(&rawPicContent);
|
QBuffer snapmaticStream(&rawPicContent);
|
||||||
|
@ -419,7 +420,7 @@ QImage SnapmaticPicture::getPicture()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool returnOk;
|
bool returnOk = 0;
|
||||||
QImage returnPicture;
|
QImage returnPicture;
|
||||||
QIODevice *picStream;
|
QIODevice *picStream;
|
||||||
|
|
||||||
|
@ -475,6 +476,7 @@ void SnapmaticPicture::parseJsonContent()
|
||||||
{
|
{
|
||||||
QJsonDocument jsonDocument = QJsonDocument::fromJson(jsonStr.toUtf8());
|
QJsonDocument jsonDocument = QJsonDocument::fromJson(jsonStr.toUtf8());
|
||||||
QJsonObject jsonObject = jsonDocument.object();
|
QJsonObject jsonObject = jsonDocument.object();
|
||||||
|
QVariantMap jsonMap = jsonObject.toVariantMap(); // backward compatibility
|
||||||
|
|
||||||
if (jsonObject.contains("loc"))
|
if (jsonObject.contains("loc"))
|
||||||
{
|
{
|
||||||
|
@ -494,13 +496,13 @@ void SnapmaticPicture::parseJsonContent()
|
||||||
if (jsonObject.contains("creat"))
|
if (jsonObject.contains("creat"))
|
||||||
{
|
{
|
||||||
QDateTime createdTimestamp;
|
QDateTime createdTimestamp;
|
||||||
localSpJson.createdTimestamp = jsonObject["creat"].toVariant().toUInt();
|
localSpJson.createdTimestamp = jsonMap["creat"].toUInt();
|
||||||
createdTimestamp.setTime_t(localSpJson.createdTimestamp);
|
createdTimestamp.setTime_t(localSpJson.createdTimestamp);
|
||||||
localSpJson.createdDateTime = createdTimestamp;
|
localSpJson.createdDateTime = createdTimestamp;
|
||||||
}
|
}
|
||||||
if (jsonObject.contains("plyrs"))
|
if (jsonObject.contains("plyrs"))
|
||||||
{
|
{
|
||||||
localSpJson.playersList = jsonObject["plyrs"].toVariant().toStringList();
|
localSpJson.playersList = jsonMap["plyrs"].toStringList();
|
||||||
}
|
}
|
||||||
if (jsonObject.contains("meme"))
|
if (jsonObject.contains("meme"))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue