From 10f3d2049a20f03cb959993156dbec10511f5599 Mon Sep 17 00:00:00 2001 From: Iman Date: Sun, 7 Aug 2016 13:06:14 +0430 Subject: [PATCH 1/7] Update building-msvc.md Signed-off-by: Iman (github: IMAN4K) --- doc/building-msvc.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/building-msvc.md b/doc/building-msvc.md index ec67b58d6..e5e758605 100644 --- a/doc/building-msvc.md +++ b/doc/building-msvc.md @@ -205,6 +205,11 @@ If you didn't install Windows SDKs before, you need to install them now. To inst If you already have Windows SDKs then find the library folder and correct it at configure's command below (like **C:\Program Files (x86)\Windows Kits\8.0\Lib\win8\um\x86**). #### Building library +go to Libraries directory + + D: + cd /tbuild/libraries/qt5_6_0/qtbase +and run configure -debug-and-release -force-debug-info -opensource -confirm-license -static -I "D:\TBuild\Libraries\openssl\Release\include" -L "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" -l Gdi32 -no-opengl -openssl-linked OPENSSL_LIBS_DEBUG="D:\TBuild\Libraries\openssl_debug\Debug\lib\ssleay32.lib D:\TBuild\Libraries\openssl_debug\Debug\lib\libeay32.lib" OPENSSL_LIBS_RELEASE="D:\TBuild\Libraries\openssl\Release\lib\ssleay32.lib D:\TBuild\Libraries\openssl\Release\lib\libeay32.lib" -mp -nomake examples -nomake tests -platform win32-msvc2015 nmake From 71cfc83c1d55058a591db060871877aa52ce054b Mon Sep 17 00:00:00 2001 From: Iman Date: Sun, 7 Aug 2016 13:39:27 +0430 Subject: [PATCH 2/7] Update building-msvc.md --- doc/building-msvc.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/building-msvc.md b/doc/building-msvc.md index e5e758605..b82c0cd79 100644 --- a/doc/building-msvc.md +++ b/doc/building-msvc.md @@ -253,8 +253,8 @@ and run #### Build * Open in VS2015 **D:\TBuild\Libraries\breakpad\src\client\windows\breakpad_client.sln** -* Change "Treat WChar_t As Built in Type" to "No" in all projects & configurations -* Change "Treat Warnings As Errors" to "No" in all projects & configurations +* Change "Treat WChar_t As Built in Type" to "No" in all projects & configurations (should be in project>>properties>>C/C++>>Language) +* Change "Treat Warnings As Errors" to "No" in all projects & configurations (should be in project>>properties>>C/C++>>General) * Build Debug configuration * Build Release configuration From 43a40c3b9a5c7c78343dfbbf3e971ac5c98836a1 Mon Sep 17 00:00:00 2001 From: EXL Date: Thu, 18 Aug 2016 15:35:39 +0000 Subject: [PATCH 3/7] Add zooming in media viewer on Ctrl + mouse wheel Mouse wheel without Ctrl key is used for switch to the prev/next image; Clicking on mouse wheel is used to reset zoom; To switch images are taken only a physical mouse wheel events. Signed-off-by: Serg Koles (github: EXL) --- Telegram/SourceFiles/mediaview.cpp | 144 +++++++++++++++++++---------- Telegram/SourceFiles/mediaview.h | 6 ++ 2 files changed, 99 insertions(+), 51 deletions(-) diff --git a/Telegram/SourceFiles/mediaview.cpp b/Telegram/SourceFiles/mediaview.cpp index 44669a276..fcaaf98e0 100644 --- a/Telegram/SourceFiles/mediaview.cpp +++ b/Telegram/SourceFiles/mediaview.cpp @@ -520,6 +520,74 @@ void MediaView::step_radial(uint64 ms, bool timer) { } } +void MediaView::zoomIn() { + int32 newZoom = _zoom; + if (newZoom == ZoomToScreenLevel) { + if (qCeil(_zoomToScreen) <= MaxZoomLevel) { + newZoom = qCeil(_zoomToScreen); + } + } else { + if (newZoom < _zoomToScreen && (newZoom + 1 > _zoomToScreen || (_zoomToScreen > MaxZoomLevel && newZoom == MaxZoomLevel))) { + newZoom = ZoomToScreenLevel; + } else if (newZoom < MaxZoomLevel) { + ++newZoom; + } + } + zoomUpdate(newZoom); +} + +void MediaView::zoomOut() { + int32 newZoom = _zoom; + if (newZoom == ZoomToScreenLevel) { + if (qFloor(_zoomToScreen) >= -MaxZoomLevel) { + newZoom = qFloor(_zoomToScreen); + } + } else { + if (newZoom > _zoomToScreen && (newZoom - 1 < _zoomToScreen || (_zoomToScreen < -MaxZoomLevel && newZoom == -MaxZoomLevel))) { + newZoom = ZoomToScreenLevel; + } else if (newZoom > -MaxZoomLevel) { + --newZoom; + } + } + zoomUpdate(newZoom); +} + +void MediaView::zoomReset() { + int32 newZoom = _zoom; + if (_zoom == 0) { + if (qFloor(_zoomToScreen) == qCeil(_zoomToScreen) && qRound(_zoomToScreen) >= -MaxZoomLevel && qRound(_zoomToScreen) <= MaxZoomLevel) { + newZoom = qRound(_zoomToScreen); + } else { + newZoom = ZoomToScreenLevel; + } + } else { + newZoom = 0; + } + _x = -_width / 2; + _y = -((gifShown() ? _gif->height() : (_current.height() / cIntRetinaFactor())) / 2); + float64 z = (_zoom == ZoomToScreenLevel) ? _zoomToScreen : _zoom; + if (z >= 0) { + _x = qRound(_x * (z + 1)); + _y = qRound(_y * (z + 1)); + } else { + _x = qRound(_x / (-z + 1)); + _y = qRound(_y / (-z + 1)); + } + _x += width() / 2; + _y += height() / 2; + update(); + zoomUpdate(newZoom); +} + +void MediaView::zoomUpdate(int32 &newZoom) { + if (newZoom != ZoomToScreenLevel) { + while ((newZoom < 0 && (-newZoom + 1) > _w) || (-newZoom + 1) > _h) { + ++newZoom; + } + } + setZoomLevel(newZoom); +} + void MediaView::clearData() { if (!isHidden()) { hide(); @@ -1810,62 +1878,34 @@ void MediaView::keyPressEvent(QKeyEvent *e) { moveToNext(-1); } else if (e->key() == Qt::Key_Right) { moveToNext(1); - } else if (e->modifiers().testFlag(Qt::ControlModifier) && (e->key() == Qt::Key_Plus || e->key() == Qt::Key_Equal || e->key() == ']' || e->key() == Qt::Key_Asterisk || e->key() == Qt::Key_Minus || e->key() == Qt::Key_Underscore || e->key() == Qt::Key_0)) { - int32 newZoom = _zoom; - if (e->key() == Qt::Key_Plus || e->key() == Qt::Key_Equal || e->key() == Qt::Key_Asterisk || e->key() == ']') { - if (newZoom == ZoomToScreenLevel) { - if (qCeil(_zoomToScreen) <= MaxZoomLevel) { - newZoom = qCeil(_zoomToScreen); - } - } else { - if (newZoom < _zoomToScreen && (newZoom + 1 > _zoomToScreen || (_zoomToScreen > MaxZoomLevel && newZoom == MaxZoomLevel))) { - newZoom = ZoomToScreenLevel; - } else if (newZoom < MaxZoomLevel) { - ++newZoom; - } - } + } else if (e->modifiers().testFlag(Qt::ControlModifier) && (e->key() == Qt::Key_Plus || e->key() == Qt::Key_Equal || e->key() == ']' || e->key() == Qt::Key_Asterisk || e->key() == Qt::Key_Minus || e->key() == Qt::Key_Underscore || e->key() == Qt::Key_0)) { + if (e->key() == Qt::Key_Plus || e->key() == Qt::Key_Equal || e->key() == Qt::Key_Asterisk || e->key() == ']') { + zoomIn(); } else if (e->key() == Qt::Key_Minus || e->key() == Qt::Key_Underscore) { - if (newZoom == ZoomToScreenLevel) { - if (qFloor(_zoomToScreen) >= -MaxZoomLevel) { - newZoom = qFloor(_zoomToScreen); - } - } else { - if (newZoom > _zoomToScreen && (newZoom - 1 < _zoomToScreen || (_zoomToScreen < -MaxZoomLevel && newZoom == -MaxZoomLevel))) { - newZoom = ZoomToScreenLevel; - } else if (newZoom > -MaxZoomLevel) { - --newZoom; - } - } + zoomOut(); } else { - if (_zoom == 0) { - if (qFloor(_zoomToScreen) == qCeil(_zoomToScreen) && qRound(_zoomToScreen) >= -MaxZoomLevel && qRound(_zoomToScreen) <= MaxZoomLevel) { - newZoom = qRound(_zoomToScreen); - } else { - newZoom = ZoomToScreenLevel; - } - } else { - newZoom = 0; - } - _x = -_width / 2; - _y = -((gifShown() ? _gif->height() : (_current.height() / cIntRetinaFactor())) / 2); - float64 z = (_zoom == ZoomToScreenLevel) ? _zoomToScreen : _zoom; - if (z >= 0) { - _x = qRound(_x * (z + 1)); - _y = qRound(_y * (z + 1)); - } else { - _x = qRound(_x / (-z + 1)); - _y = qRound(_y / (-z + 1)); - } - _x += width() / 2; - _y += height() / 2; - update(); + zoomReset(); } - if (newZoom != ZoomToScreenLevel) { - while ((newZoom < 0 && (-newZoom + 1) > _w) || (-newZoom + 1) > _h) { - ++newZoom; + } +} + +void MediaView::wheelEvent(QWheelEvent *e) { + if (e->delta() < 0) { + if (e->modifiers().testFlag(Qt::ControlModifier)) { + zoomOut(); + } else { + if (e->source() == Qt::MouseEventNotSynthesized) { + moveToNext(-1); + } + } + } else { + if (e->modifiers().testFlag(Qt::ControlModifier)) { + zoomIn(); + } else { + if (e->source() == Qt::MouseEventNotSynthesized) { + moveToNext(1); } } - setZoomLevel(newZoom); } } @@ -2114,6 +2154,8 @@ void MediaView::mousePressEvent(QMouseEvent *e) { _yStart = _y; } } + } else if (e->button() == Qt::MiddleButton) { + zoomReset(); } activateControls(); } diff --git a/Telegram/SourceFiles/mediaview.h b/Telegram/SourceFiles/mediaview.h index c33222545..3f8756b39 100644 --- a/Telegram/SourceFiles/mediaview.h +++ b/Telegram/SourceFiles/mediaview.h @@ -107,6 +107,7 @@ protected: void paintEvent(QPaintEvent *e) override; void keyPressEvent(QKeyEvent *e) override; + void wheelEvent(QWheelEvent *e) override; void mousePressEvent(QMouseEvent *e) override; void mouseDoubleClickEvent(QMouseEvent *e) override; void mouseMoveEvent(QMouseEvent *e) override; @@ -170,6 +171,11 @@ private: void step_state(uint64 ms, bool timer); void step_radial(uint64 ms, bool timer); + void zoomIn(); + void zoomOut(); + void zoomReset(); + void zoomUpdate(int32 &newZoom); + void paintDocRadialLoading(Painter &p, bool radial, float64 radialOpacity); QBrush _transparentBrush; From a7b692e8edf4b855d2096c9abd24179866bfb279 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 14 Sep 2016 19:05:40 +0300 Subject: [PATCH 4/7] PR #1954 improvements. Inverted the direction of move-by-wheel, so that scrolling down will move you forward through the photos or documents overview. Added an accumulation of the scroll amount so that you don't zoom or skip photos each time a (possibly very frequent) wheel event fires. --- Telegram/SourceFiles/mediaview.cpp | 31 ++++++++++++++++++------------ Telegram/SourceFiles/mediaview.h | 2 ++ 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/Telegram/SourceFiles/mediaview.cpp b/Telegram/SourceFiles/mediaview.cpp index bf2b6a1f7..635c9166c 100644 --- a/Telegram/SourceFiles/mediaview.cpp +++ b/Telegram/SourceFiles/mediaview.cpp @@ -1890,20 +1890,27 @@ void MediaView::keyPressEvent(QKeyEvent *e) { } void MediaView::wheelEvent(QWheelEvent *e) { - if (e->delta() < 0) { - if (e->modifiers().testFlag(Qt::ControlModifier)) { - zoomOut(); - } else { - if (e->source() == Qt::MouseEventNotSynthesized) { - moveToNext(-1); + constexpr auto step = static_cast(QWheelEvent::DefaultDeltasPerStep); + + _verticalWheelDelta += e->angleDelta().y(); + while (qAbs(_verticalWheelDelta) >= step) { + if (_verticalWheelDelta < 0) { + _verticalWheelDelta += step; + if (e->modifiers().testFlag(Qt::ControlModifier)) { + zoomOut(); + } else { + if (e->source() == Qt::MouseEventNotSynthesized) { + moveToNext(1); + } } - } - } else { - if (e->modifiers().testFlag(Qt::ControlModifier)) { - zoomIn(); } else { - if (e->source() == Qt::MouseEventNotSynthesized) { - moveToNext(1); + _verticalWheelDelta -= step; + if (e->modifiers().testFlag(Qt::ControlModifier)) { + zoomIn(); + } else { + if (e->source() == Qt::MouseEventNotSynthesized) { + moveToNext(-1); + } } } } diff --git a/Telegram/SourceFiles/mediaview.h b/Telegram/SourceFiles/mediaview.h index 3f8756b39..ff1e85b6a 100644 --- a/Telegram/SourceFiles/mediaview.h +++ b/Telegram/SourceFiles/mediaview.h @@ -322,6 +322,8 @@ private: typedef QMap ShowingOpacities; ShowingOpacities _animOpacities; + int _verticalWheelDelta = 0; + void updateOverRect(OverState state); bool updateOverState(OverState newState); float64 overLevel(OverState control) const; From 96202f775cc3e75f2406b1f65b0a9bbeb0de1507 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 15 Sep 2016 13:26:31 +0300 Subject: [PATCH 5/7] Fixed settings reset in case of tiled background. --- Telegram/SourceFiles/localstorage.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Telegram/SourceFiles/localstorage.cpp b/Telegram/SourceFiles/localstorage.cpp index 3cceb24e4..848fbedb5 100644 --- a/Telegram/SourceFiles/localstorage.cpp +++ b/Telegram/SourceFiles/localstorage.cpp @@ -581,6 +581,7 @@ namespace { FileKey _backgroundKey = 0; bool _backgroundWasRead = false; + bool _readingUserSettings = false; FileKey _userSettingsKey = 0; FileKey _recentHashtagsAndBotsKey = 0; bool _recentHashtagsAndBotsWereRead = false; @@ -1548,6 +1549,12 @@ namespace { } void _writeUserSettings() { + if (_readingUserSettings) { + LOG(("App Error: attempt to write settings while reading them!")); + return; + } + LOG(("App Info: writing encrypted user settings...")); + if (!_userSettingsKey) { _userSettingsKey = genKey(); _mapChanged = true; @@ -1622,22 +1629,28 @@ namespace { void _readUserSettings() { FileReadDescriptor userSettings; if (!readEncryptedFile(userSettings, _userSettingsKey)) { + LOG(("App Info: could not read encrypted user settings...")); _readOldUserSettings(); return _writeUserSettings(); } LOG(("App Info: reading encrypted user settings...")); + _readingUserSettings = true; while (!userSettings.stream.atEnd()) { quint32 blockId; userSettings.stream >> blockId; if (!_checkStreamStatus(userSettings.stream)) { + _readingUserSettings = false; return _writeUserSettings(); } if (!_readSetting(blockId, userSettings.stream, userSettings.version)) { + _readingUserSettings = false; return _writeUserSettings(); } } + _readingUserSettings = false; + LOG(("App Info: encrypted user settings read.")); } void _writeMtpData() { From 708bf688ea468a0c76ae356e1e67595f4c60de46 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 15 Sep 2016 13:50:43 +0300 Subject: [PATCH 6/7] Xcode 8 supported. Fixed quit by Cmd+Q in case of macOS fullscreen window. --- Telegram/SourceFiles/application.cpp | 7 +++++++ Telegram/SourceFiles/application.h | 9 ++------- Telegram/gyp/qt.gypi | 4 +++- Telegram/gyp/refresh.sh | 4 ++-- Telegram/gyp/utils.gyp | 22 +++++++++++++++------- 5 files changed, 29 insertions(+), 17 deletions(-) diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 27d75fcea..3cb326d6c 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -126,6 +126,13 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) { } } +bool Application::event(QEvent *e) { + if (e->type() == QEvent::Close) { + App::quit(); + } + return QApplication::event(e); +} + void Application::socketConnected() { LOG(("Socket connected, this is not the first application instance, sending show command...")); _secondInstance = true; diff --git a/Telegram/SourceFiles/application.h b/Telegram/SourceFiles/application.h index 025164cd6..60c2d520b 100644 --- a/Telegram/SourceFiles/application.h +++ b/Telegram/SourceFiles/application.h @@ -28,12 +28,12 @@ class Application : public QApplication { Q_OBJECT public: - Application(int &argc, char **argv); + bool event(QEvent *e) override; + // Single instance application public slots: - void socketConnected(); void socketError(QLocalSocket::LocalSocketError e); void socketDisconnected(); @@ -48,7 +48,6 @@ public slots: void closeApplication(); // will be done in aboutToQuit() private: - typedef QPair LocalClient; typedef QList LocalClients; @@ -64,7 +63,6 @@ private: // Autoupdating public: - void startUpdateCheck(bool forceWait); void stopUpdate(); @@ -78,7 +76,6 @@ public: int32 updatingReady(); signals: - void updateChecking(); void updateLatest(); void updateProgress(qint64 ready, qint64 total); @@ -86,7 +83,6 @@ signals: void updateFailed(); public slots: - void updateCheck(); void updateGotCurrent(); @@ -96,7 +92,6 @@ public slots: void onUpdateFailed(); private: - SingleTimer _updateCheckTimer; QNetworkReply *_updateReply = nullptr; QNetworkAccessManager _updateManager; diff --git a/Telegram/gyp/qt.gypi b/Telegram/gyp/qt.gypi index b82f83325..5ef32496a 100644 --- a/Telegram/gyp/qt.gypi +++ b/Telegram/gyp/qt.gypi @@ -191,7 +191,6 @@ '<(qt_loc)/plugins/bearer', '<(qt_loc)/plugins/platforms', '<(qt_loc)/plugins/imageformats', - '<(qt_loc)/plugins/platforminputcontexts', ], 'defines': [ 'QT_WIDGETS_LIB', @@ -201,6 +200,9 @@ ], 'conditions': [ [ 'build_linux', { + 'library_dirs': [ + '<(qt_loc)/plugins/platforminputcontexts', + ], 'libraries': [ '/usr/local/lib/libxkbcommon.a', '<@(qt_libs_release)', diff --git a/Telegram/gyp/refresh.sh b/Telegram/gyp/refresh.sh index 39337e4d0..5a456ce28 100755 --- a/Telegram/gyp/refresh.sh +++ b/Telegram/gyp/refresh.sh @@ -11,7 +11,7 @@ if [ "$MySystem" == "Linux" ]; then ../../../Libraries/gyp/gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=cmake cd ../../out/Debug ../../../Libraries/cmake-3.6.2/bin/cmake . - cd ../Release + cd ../Release ../../../Libraries/cmake-3.6.2/bin/cmake . cd ../../Telegram/gyp else @@ -19,7 +19,7 @@ else #gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=xcode-ninja #gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=xcode # use patched gyp with Xcode project generator - ../../../Libraries/gyp/gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=xcode + ../../../Libraries/gyp/gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp -Gxcode_upgrade_check_project_version=800 --format=xcode fi cd ../.. diff --git a/Telegram/gyp/utils.gyp b/Telegram/gyp/utils.gyp index 117c87aa5..209c73704 100644 --- a/Telegram/gyp/utils.gyp +++ b/Telegram/gyp/utils.gyp @@ -91,14 +91,22 @@ 'lzma', ], }], + [ 'build_mac', { + 'include_dirs': [ + '<(libs_loc)/openssl-xcode/include' + ], + 'library_dirs': [ + '<(libs_loc)/openssl-xcode', + ], + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-lssl', + '-lcrypto', + '-llzma', + ], + }, + }], ], - 'xcode_settings': { - 'OTHER_LDFLAGS': [ - '-lssl', - '-lcrypto', - '-llzma', - ], - }, 'include_dirs': [ '<(src_loc)', '<(libs_loc)/lzma/C', From c00456e12e3477e0a20611d57020626001a0b897 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 15 Sep 2016 14:08:45 +0300 Subject: [PATCH 7/7] 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 +}