mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-05 00:46:08 +00:00
Update submodules to the latest spellcheck.
This commit is contained in:
32
Telegram/SourceFiles/core/base_integration.cpp
Normal file
32
Telegram/SourceFiles/core/base_integration.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
This file is part of Telegram Desktop,
|
||||
the official desktop application for the Telegram messaging service.
|
||||
|
||||
For license and copyright information please follow this link:
|
||||
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#include "core/base_integration.h"
|
||||
|
||||
#include "core/sandbox.h"
|
||||
#include "core/crash_reports.h"
|
||||
|
||||
namespace Core {
|
||||
|
||||
BaseIntegration::BaseIntegration(int argc, char *argv[])
|
||||
: Integration(argc, argv) {
|
||||
}
|
||||
|
||||
void BaseIntegration::enterFromEventLoop(FnMut<void()> &&method) {
|
||||
Core::Sandbox::Instance().customEnterFromEventLoop(
|
||||
std::move(method));
|
||||
}
|
||||
|
||||
void BaseIntegration::logAssertionViolation(const QString &info) {
|
||||
#ifdef LOG
|
||||
LOG(("Assertion Failed! ") + info);
|
||||
#endif // LOG
|
||||
|
||||
CrashReports::SetAnnotation("Assertion", info);
|
||||
}
|
||||
|
||||
} // namespace Core
|
23
Telegram/SourceFiles/core/base_integration.h
Normal file
23
Telegram/SourceFiles/core/base_integration.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
This file is part of Telegram Desktop,
|
||||
the official desktop application for the Telegram messaging service.
|
||||
|
||||
For license and copyright information please follow this link:
|
||||
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "base/integration.h"
|
||||
|
||||
namespace Core {
|
||||
|
||||
class BaseIntegration : public base::Integration {
|
||||
public:
|
||||
BaseIntegration(int argc, char *argv[]);
|
||||
|
||||
void enterFromEventLoop(FnMut<void()> &&method) override;
|
||||
void logAssertionViolation(const QString &info) override;
|
||||
|
||||
};
|
||||
|
||||
} // namespace Core
|
@@ -57,24 +57,3 @@ void StartCatching(not_null<Core::Launcher*> launcher);
|
||||
void FinishCatching();
|
||||
|
||||
} // namespace CrashReports
|
||||
|
||||
namespace base {
|
||||
namespace assertion {
|
||||
|
||||
inline void log(const char *message, const char *file, int line) {
|
||||
const auto info = QStringLiteral("%1 %2:%3"
|
||||
).arg(message
|
||||
).arg(file
|
||||
).arg(line
|
||||
);
|
||||
const auto entry = QStringLiteral("Assertion Failed! ") + info;
|
||||
|
||||
#ifdef LOG
|
||||
LOG((entry));
|
||||
#endif // LOG
|
||||
|
||||
CrashReports::SetAnnotation("Assertion", info);
|
||||
}
|
||||
|
||||
} // namespace assertion
|
||||
} // namespace base
|
||||
|
@@ -235,8 +235,10 @@ Launcher::Launcher(
|
||||
const QString &systemVersion)
|
||||
: _argc(argc)
|
||||
, _argv(argv)
|
||||
, _baseIntegration(_argc, _argv)
|
||||
, _deviceModel(deviceModel)
|
||||
, _systemVersion(systemVersion) {
|
||||
base::Integration::Set(&_baseIntegration);
|
||||
}
|
||||
|
||||
void Launcher::init() {
|
||||
|
@@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "core/base_integration.h"
|
||||
|
||||
namespace Core {
|
||||
|
||||
class Launcher {
|
||||
@@ -63,6 +65,7 @@ private:
|
||||
int _argc;
|
||||
char **_argv;
|
||||
QStringList _arguments;
|
||||
BaseIntegration _baseIntegration;
|
||||
|
||||
const QString _deviceModel;
|
||||
const QString _systemVersion;
|
||||
|
Reference in New Issue
Block a user