2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Move some code around.

Move logs:SignalHandlers to core/crash_reports:CrashReports.
Move all pre-launch windows to core/crash_report_window module.
Move some global code to core/launcher:Launcher.
It should replace settings / platform_specific module in some way.
This commit is contained in:
John Preston
2017-12-11 18:45:29 +04:00
parent 9d4558de2b
commit 97c15865a5
48 changed files with 2873 additions and 2373 deletions

View File

@@ -38,6 +38,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "storage/storage_facade.h"
#include "storage/storage_shared_media.h"
#include "data/data_channel_admins.h"
#include "core/crash_reports.h"
namespace {
@@ -1499,7 +1500,7 @@ void History::addToSharedMedia(std::vector<MsgId> (&medias)[kSharedMediaTypeCoun
}
value.push_back(indices.join(","));
}
SignalHandlers::setCrashAnnotation("full", value.join(";"));
CrashReports::SetAnnotation("full", value.join(";"));
Assert(!"History desync caught!");
//// Logging
@@ -1631,11 +1632,11 @@ void History::addOlderSlice(const QVector<MTPMessage> &slice) {
logged.push_back(QString::number(minAdded));
logged.push_back(QString::number(maxAdded));
SignalHandlers::setCrashAnnotation("old_minmaxwas_minmaxadd", logged.join(";"));
CrashReports::SetAnnotation("old_minmaxwas_minmaxadd", logged.join(";"));
addBlockToSharedMedia(block);
SignalHandlers::setCrashAnnotation("old_minmaxwas_minmaxadd", "");
CrashReports::ClearAnnotation("old_minmaxwas_minmaxadd");
if (isChannel()) {
asChannelHistory()->checkJoinedMessage();
@@ -1693,7 +1694,7 @@ void History::addNewerSlice(const QVector<MTPMessage> &slice) {
}
logged.push_back(QString::number(minAdded));
logged.push_back(QString::number(maxAdded));
SignalHandlers::setCrashAnnotation("new_minmaxwas_minmaxadd", logged.join(";"));
CrashReports::SetAnnotation("new_minmaxwas_minmaxadd", logged.join(";"));
if (!atLeastOneAdded) {
newLoaded = true;
@@ -1701,7 +1702,7 @@ void History::addNewerSlice(const QVector<MTPMessage> &slice) {
}
addToSharedMedia(medias, wasLoadedAtBottom != loadedAtBottom());
SignalHandlers::setCrashAnnotation("new_minmaxwas_minmaxadd", "");
CrashReports::ClearAnnotation("new_minmaxwas_minmaxadd");
}
if (!wasLoadedAtBottom) {