mirror of
https://github.com/vale981/tdesktop
synced 2025-03-05 09:41:41 -05:00
Add rapidjson submodule.
This commit is contained in:
parent
0c84fc1271
commit
a03d42daa8
4 changed files with 11 additions and 1 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -19,3 +19,6 @@
|
||||||
[submodule "Telegram/ThirdParty/qtlottie"]
|
[submodule "Telegram/ThirdParty/qtlottie"]
|
||||||
path = Telegram/ThirdParty/qtlottie
|
path = Telegram/ThirdParty/qtlottie
|
||||||
url = https://github.com/telegramdesktop/qtlottie.git
|
url = https://github.com/telegramdesktop/qtlottie.git
|
||||||
|
[submodule "Telegram/ThirdParty/rapidjson"]
|
||||||
|
path = Telegram/ThirdParty/rapidjson
|
||||||
|
url = https://github.com/Tencent/rapidjson.git
|
||||||
|
|
|
@ -16,6 +16,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
|
||||||
|
#include <rapidjson/document.h>
|
||||||
|
|
||||||
#include "logs.h"
|
#include "logs.h"
|
||||||
#include "rasterrenderer/rasterrenderer.h"
|
#include "rasterrenderer/rasterrenderer.h"
|
||||||
|
|
||||||
|
@ -55,6 +57,9 @@ Animation::Animation(const QByteArray &content)
|
||||||
auto error = QJsonParseError();
|
auto error = QJsonParseError();
|
||||||
const auto document = QJsonDocument::fromJson(content, &error);
|
const auto document = QJsonDocument::fromJson(content, &error);
|
||||||
const auto parsed = crl::now();
|
const auto parsed = crl::now();
|
||||||
|
auto test = rapidjson::Document();
|
||||||
|
test.Parse(content.data());
|
||||||
|
const auto second = crl::now();
|
||||||
if (error.error != QJsonParseError::NoError) {
|
if (error.error != QJsonParseError::NoError) {
|
||||||
qWarning()
|
qWarning()
|
||||||
<< "Lottie Error: Parse failed with code "
|
<< "Lottie Error: Parse failed with code "
|
||||||
|
@ -70,7 +75,7 @@ Animation::Animation(const QByteArray &content)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const auto finish = crl::now();
|
const auto finish = crl::now();
|
||||||
LOG(("INIT: %1 (PARSE %2)").arg(finish - now).arg(parsed - now));
|
LOG(("INIT: %1 (PARSE %2, RAPIDJSON %3)").arg(finish - now).arg(parsed - now).arg(second - parsed));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1
Telegram/ThirdParty/rapidjson
vendored
Submodule
1
Telegram/ThirdParty/rapidjson
vendored
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 01950eb7acec78818d68b762efc869bba2420d82
|
|
@ -51,6 +51,7 @@
|
||||||
'<(submodules_loc)/GSL/include',
|
'<(submodules_loc)/GSL/include',
|
||||||
'<(submodules_loc)/variant/include',
|
'<(submodules_loc)/variant/include',
|
||||||
'<(submodules_loc)/crl/src',
|
'<(submodules_loc)/crl/src',
|
||||||
|
'<(submodules_loc)/rapidjson/include',
|
||||||
],
|
],
|
||||||
'sources': [
|
'sources': [
|
||||||
# interface for tdesktop
|
# interface for tdesktop
|
||||||
|
|
Loading…
Add table
Reference in a new issue