diff --git a/Telegram/_qtbase_5_5_1_patch.diff b/Telegram/_qtbase_5_5_1_patch.diff index 8447f44c4..2b727bab4 100644 --- a/Telegram/_qtbase_5_5_1_patch.diff +++ b/Telegram/_qtbase_5_5_1_patch.diff @@ -11203,6 +11203,19 @@ index ca92103..f681b08 100644 QPainter p(&m_qImage); p.setCompositionMode(QPainter::CompositionMode_Source); const QVector rects = region.rects(); +diff --git a/src/plugins/platforms/cocoa/qcocoakeymapper.mm b/src/plugins/platforms/cocoa/qcocoakeymapper.mm +index c2d206f..d3881f6 100644 +--- a/src/plugins/platforms/cocoa/qcocoakeymapper.mm ++++ b/src/plugins/platforms/cocoa/qcocoakeymapper.mm +@@ -356,7 +356,7 @@ Qt::KeyboardModifiers QCocoaKeyMapper::queryKeyboardModifiers() + bool QCocoaKeyMapper::updateKeyboard() + { + const UCKeyboardLayout *uchrData = 0; +- QCFType source = TISCopyCurrentKeyboardInputSource(); ++ QCFType source = TISCopyCurrentASCIICapableKeyboardInputSource();//TISCopyCurrentKeyboardInputSource(); + if (keyboard_mode != NullMode && source == currentInputSource) { + return false; + } diff --git a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm index 713758c..9b23ca2 100755 --- a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm @@ -11376,7 +11389,7 @@ index 3188463..cbee264 100644 [iconButton setImage:image]; [image release]; diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm -index 1ec33df..03c84a1 100644 +index 1ec33df..45d436c 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -1357,7 +1357,8 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent) @@ -11389,7 +11402,36 @@ index 1ec33df..03c84a1 100644 m_scrolling = true; ph = Qt::ScrollBegin; } -@@ -1502,6 +1503,11 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent) +@@ -1418,14 +1419,20 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent) + quint32 nativeVirtualKey = [nsevent keyCode]; + + QChar ch = QChar::ReplacementCharacter; +- int keyCode = Qt::Key_unknown; +- if ([characters length] != 0) { +- if (((modifiers & Qt::MetaModifier) || (modifiers & Qt::AltModifier)) && ([charactersIgnoringModifiers length] != 0)) +- ch = QChar([charactersIgnoringModifiers characterAtIndex:0]); +- else +- ch = QChar([characters characterAtIndex:0]); +- keyCode = [self convertKeyCode:ch]; +- } ++ if ([characters length] != 0) // https://bugreports.qt.io/browse/QTBUG-42584 ++ ch = QChar([characters characterAtIndex:0]); ++ else if ([charactersIgnoringModifiers length] != 0 && ((modifiers & Qt::MetaModifier) || (modifiers & Qt::AltModifier))) ++ ch = QChar([charactersIgnoringModifiers characterAtIndex:0]); ++ ++ int keyCode = [self convertKeyCode:ch]; ++ //int keyCode = Qt::Key_unknown; ++ //if ([characters length] != 0) { ++ // if (((modifiers & Qt::MetaModifier) || (modifiers & Qt::AltModifier)) && ([charactersIgnoringModifiers length] != 0)) ++ // ch = QChar([charactersIgnoringModifiers characterAtIndex:0]); ++ // else ++ // ch = QChar([characters characterAtIndex:0]); ++ // keyCode = [self convertKeyCode:ch]; ++ //} + + // we will send a key event unless the input method sets m_sendKeyEvent to false + m_sendKeyEvent = true; +@@ -1502,6 +1509,11 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent) && qtKey == Qt::Key_Period) { [self handleKeyEvent:nsevent eventType:int(QEvent::KeyPress)]; return YES; diff --git a/doc/building-xcode-old.md b/doc/building-xcode-old.md index 00d2e3e37..cef39bc6a 100644 --- a/doc/building-xcode-old.md +++ b/doc/building-xcode-old.md @@ -157,25 +157,35 @@ Then in Terminal go to **/Users/user/TBuild/Libraries/ffmpeg** and run sudo make install ####Qt 5.3.2, slightly patched +#####Get the source code -http://download.qt-project.org/official_releases/qt/5.3/5.3.2/single/qt-everywhere-opensource-src-5.3.2.tar.gz +In Terminal go to **/Users/user/TBuild/Libraries** and run: -Extract to **/Users/user/TBuild/Libraries**, rename **qt-everywhere-opensource-src-5.3.2** to **QtStatic** to have **/Users/user/TBuild/Libraries/QtStatic/qtbase** folder + git clone git://code.qt.io/qt/qt5.git QtStatic + cd QtStatic + git checkout 5.3 + perl init-repository --module-subset=qtbase,qtimageformats + git checkout v5.3.2 + cd qtimageformats && git checkout v5.3.2 && cd .. + cd qtbase && git checkout v5.3.2 && cd .. -Apply patch: +#####Apply the patch -* OR copy (with overwrite!) everything from **/Users/user/TBuild/tdesktop/\_qt\_5\_3\_2\_patch/** to **/Users/user/TBuild/Libraries/QtStatic/** -* OR copy **/Users/user/TBuild/tdesktop/\_qt\_5\_3\_2\_patch.diff** to **/Users/user/TBuild/Libraries/QtStatic/**, go there in Terminal and run +From **/Users/user/TBuild/Libraries/QtStatic/qtbase**, run: - git apply _qt_5_3_2_patch.diff + git apply ../../../tdesktop/Telegram/_qtbase_5_3_2_patch.diff + +From **/Users/user/TBuild/Libraries/QtStatic/qtimageformats**, run: + + git apply ../../../tdesktop/Telegram/_qtimageformats_5_3_2_patch.diff #####Building library -In Terminal go to **/Users/user/TBuild/Libraries/QtStatic** and there run +Go to **/Users/user/TBuild/Libraries/QtStatic** and run: - ./configure -debug-and-release -opensource -confirm-license -static -opengl desktop -no-openssl -securetransport -nomake examples -nomake tests -platform macx-g++ - make -j4 module-qtbase module-qtimageformats - sudo make module-qtbase-install_subtargets module-qtimageformats-install_subtargets + ./configure -debug-and-release -opensource -confirm-license -static -opengl desktop -nomake examples -nomake tests -platform macx-g++ + make -j4 + sudo make -j4 install building (**make** command) will take really long time.