From 7d2caa12d357ad91b8141baed07ce973534ca46d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Mon, 18 Apr 2016 18:41:39 +0200 Subject: [PATCH] 2016-04-18 18:41 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/gtqtc/gtqtc1.cpp * src/rtl/gtwin/gtwin.c * src/rtl/gtwvt/gtwvt.c ! fixed stupid C&P typo in my previous modification - thanks to Lorenzo. --- ChangeLog.txt | 6 ++++++ contrib/gtqtc/gtqtc1.cpp | 2 +- src/rtl/gtwin/gtwin.c | 2 +- src/rtl/gtwvt/gtwvt.c | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 4250cb888d..a5af5e07c1 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,12 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2016-04-18 18:41 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * contrib/gtqtc/gtqtc1.cpp + * src/rtl/gtwin/gtwin.c + * src/rtl/gtwvt/gtwvt.c + ! fixed stupid C&P typo in my previous modification - thanks to Lorenzo. + 2016-04-18 18:05 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rtl/strrepl.c ! fixed hb_strReplace() for strings longer then 1024 bytes and diff --git a/contrib/gtqtc/gtqtc1.cpp b/contrib/gtqtc/gtqtc1.cpp index 7a8a82eec8..6b87e48d70 100644 --- a/contrib/gtqtc/gtqtc1.cpp +++ b/contrib/gtqtc/gtqtc1.cpp @@ -3211,7 +3211,7 @@ void QTConsole::keyPressEvent( QKeyEvent * evt ) wc = qStr[ i ].unicode(); hb_gt_qtc_addKeyToInputQueue( pQTC, wc < 127 && - ( iFlags && ( HB_KF_CTRL | HB_KF_ALT ) ) ? + ( iFlags & ( HB_KF_CTRL | HB_KF_ALT ) ) ? HB_INKEY_NEW_KEY( wc, iFlags ) : HB_INKEY_NEW_UNICODEF( wc, iFlags ) ); } diff --git a/src/rtl/gtwin/gtwin.c b/src/rtl/gtwin/gtwin.c index 0880e52f8b..ab3e48f7e8 100644 --- a/src/rtl/gtwin/gtwin.c +++ b/src/rtl/gtwin/gtwin.c @@ -1563,7 +1563,7 @@ static int hb_gt_win_ReadKey( PHB_GT pGT, int iEventMask ) iChar += 'A' - 1; iKey = HB_INKEY_NEW_KEY( iChar, iFlags ); } - else if( iKey < 127 && ( iFlags && ( HB_KF_CTRL | HB_KF_ALT ) ) ) + else if( iKey < 127 && ( iFlags & ( HB_KF_CTRL | HB_KF_ALT ) ) ) iKey = HB_INKEY_NEW_KEY( iKey, iFlags ); else if( iChar != 0 ) { diff --git a/src/rtl/gtwvt/gtwvt.c b/src/rtl/gtwvt/gtwvt.c index e66c6b5f1a..791fc63663 100644 --- a/src/rtl/gtwvt/gtwvt.c +++ b/src/rtl/gtwvt/gtwvt.c @@ -2605,7 +2605,7 @@ static HB_BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, #if defined( UNICODE ) if( iKey >= 127 ) iKey = HB_INKEY_NEW_UNICODEF( iKey, iFlags ); - else if( iFlags && ( HB_KF_CTRL | HB_KF_ALT ) ) + else if( iFlags & ( HB_KF_CTRL | HB_KF_ALT ) ) iKey = HB_INKEY_NEW_KEY( iKey, iFlags ); else iKey = HB_INKEY_NEW_CHARF( iKey, iFlags ); @@ -2613,7 +2613,7 @@ static HB_BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, int u = HB_GTSELF_KEYTRANS( pWVT->pGT, iKey ); if( u ) iKey = HB_INKEY_NEW_UNICODEF( u, iFlags ); - else if( iKey < 127 && ( iFlags && ( HB_KF_CTRL | HB_KF_ALT ) ) ) + else if( iKey < 127 && ( iFlags & ( HB_KF_CTRL | HB_KF_ALT ) ) ) iKey = HB_INKEY_NEW_KEY( iKey, iFlags ); else {