From c00456e12e3477e0a20611d57020626001a0b897 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 15 Sep 2016 14:08:45 +0300 Subject: [PATCH] Fixed build for OS X 10.6 and 10.7 on Qt 5.3 and libstdc++. --- Telegram/SourceFiles/history.cpp | 2 ++ Telegram/SourceFiles/mediaview.cpp | 8 ++++++++ Telegram/SourceFiles/mtproto/file_download.cpp | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 4e6663113..b1f751645 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -5896,7 +5896,9 @@ void LocationManager::init() { App::setProxySettings(*manager); connect(manager, SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)), this, SLOT(onFailed(QNetworkReply*))); +#ifndef OS_MAC_OLD connect(manager, SIGNAL(sslErrors(QNetworkReply*, const QList&)), this, SLOT(onFailed(QNetworkReply*))); +#endif // OS_MAC_OLD connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(onFinished(QNetworkReply*))); if (black) { diff --git a/Telegram/SourceFiles/mediaview.cpp b/Telegram/SourceFiles/mediaview.cpp index 635c9166c..77eb491d7 100644 --- a/Telegram/SourceFiles/mediaview.cpp +++ b/Telegram/SourceFiles/mediaview.cpp @@ -1890,7 +1890,11 @@ void MediaView::keyPressEvent(QKeyEvent *e) { } void MediaView::wheelEvent(QWheelEvent *e) { +#ifdef OS_MAC_OLD + constexpr auto step = 120; +#else // OS_MAC_OLD constexpr auto step = static_cast(QWheelEvent::DefaultDeltasPerStep); +#endif // OS_MAC_OLD _verticalWheelDelta += e->angleDelta().y(); while (qAbs(_verticalWheelDelta) >= step) { @@ -1899,18 +1903,22 @@ void MediaView::wheelEvent(QWheelEvent *e) { if (e->modifiers().testFlag(Qt::ControlModifier)) { zoomOut(); } else { +#ifndef OS_MAC_OLD if (e->source() == Qt::MouseEventNotSynthesized) { moveToNext(1); } +#endif // OS_MAC_OLD } } else { _verticalWheelDelta -= step; if (e->modifiers().testFlag(Qt::ControlModifier)) { zoomIn(); } else { +#ifndef OS_MAC_OLD if (e->source() == Qt::MouseEventNotSynthesized) { moveToNext(-1); } +#endif // OS_MAC_OLD } } } diff --git a/Telegram/SourceFiles/mtproto/file_download.cpp b/Telegram/SourceFiles/mtproto/file_download.cpp index 34e0a5f2f..e4623dbc9 100644 --- a/Telegram/SourceFiles/mtproto/file_download.cpp +++ b/Telegram/SourceFiles/mtproto/file_download.cpp @@ -818,7 +818,9 @@ WebLoadManager::WebLoadManager(QThread *thread) { connect(this, SIGNAL(error(webFileLoader*)), _webLoadMainManager, SLOT(error(webFileLoader*))); connect(&_manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), this, SLOT(onFailed(QNetworkReply*))); +#ifndef OS_MAC_OLD connect(&_manager, SIGNAL(sslErrors(QNetworkReply*,const QList&)), this, SLOT(onFailed(QNetworkReply*))); +#endif // OS_MAC_OLD } void WebLoadManager::append(webFileLoader *loader, const QString &url) { @@ -1108,4 +1110,4 @@ void notifyImageLoaded() { } } // namespace internal -} \ No newline at end of file +}