mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-22 03:08:48 +00:00
Fix build with TDESKTOP_DISABLE_CRASH_REPORTS.
Regression was introduced in 97c15865a5
.
Fixes #4173.
This commit is contained in:
parent
2d5188b968
commit
0a4038d061
@ -514,6 +514,8 @@ void SetAnnotationRef(const std::string &key, const QString *valuePtr) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef TDESKTOP_DISABLE_CRASH_REPORTS
|
||||
|
||||
dump::~dump() {
|
||||
if (ReportFile) {
|
||||
fflush(ReportFile);
|
||||
@ -573,4 +575,6 @@ const dump &operator<<(const dump &stream, double num) {
|
||||
return stream;
|
||||
}
|
||||
|
||||
#endif // TDESKTOP_DISABLE_CRASH_REPORTS
|
||||
|
||||
} // namespace CrashReports
|
||||
|
@ -22,6 +22,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
||||
|
||||
namespace CrashReports {
|
||||
|
||||
#ifndef TDESKTOP_DISABLE_CRASH_REPORTS
|
||||
|
||||
struct dump {
|
||||
~dump();
|
||||
};
|
||||
@ -33,6 +35,8 @@ const dump &operator<<(const dump &stream, unsigned long num);
|
||||
const dump &operator<<(const dump &stream, unsigned long long num);
|
||||
const dump &operator<<(const dump &stream, double num);
|
||||
|
||||
#endif // TDESKTOP_DISABLE_CRASH_REPORTS
|
||||
|
||||
enum Status {
|
||||
CantOpen,
|
||||
LastCrashed,
|
||||
|
@ -90,8 +90,10 @@ QAbstractNativeEventFilter *psNativeEventFilter() {
|
||||
}
|
||||
|
||||
void psWriteDump() {
|
||||
#ifndef TDESKTOP_DISABLE_CRASH_REPORTS
|
||||
double v = objc_appkitVersion();
|
||||
CrashReports::dump() << "OS-Version: " << v;
|
||||
#endif // TDESKTOP_DISABLE_CRASH_REPORTS
|
||||
}
|
||||
|
||||
QString demanglestr(const QString &mangled) {
|
||||
|
Loading…
Reference in New Issue
Block a user