From db9f47c6f27f79989f4652f9cba124d0b6101a12 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 5 Feb 2016 22:56:42 +0300 Subject: [PATCH] fixed version in crash reporting for betas, fixed global app event filter install --- Telegram/SourceFiles/window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 9c52725536..2e1bc196ba 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -435,7 +435,7 @@ void Window::init() { psInitFrameless(); setWindowIcon(wndIcon); - App::app()->installEventFilter(this); + Application::instance()->installEventFilter(this); connect(windowHandle(), SIGNAL(windowStateChanged(Qt::WindowState)), this, SLOT(stateChanged(Qt::WindowState))); connect(windowHandle(), SIGNAL(activeChanged()), this, SLOT(checkHistoryActivation()), Qt::QueuedConnection); @@ -2156,7 +2156,7 @@ QString LastCrashedWindow::getReportField(const QLatin1String &name, const QLati if (name == qstr("version")) { if (data.endsWith(qstr(" beta"))) { - data = QString::number(-data.replace(QRegularExpression(qsl("[^\\d]")), "").mid(0, data.size() - 5).toLongLong()); + data = QString::number(-data.replace(QRegularExpression(qsl("[^\\d]")), "").toLongLong()); } else { data = QString::number(data.replace(QRegularExpression(qsl("[^\\d]")), "").toLongLong()); }