author | sandman <sandman> | 2002-08-30 02:50:56 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-08-30 02:50:56 (UTC) |
commit | 57e4c1b05208650eaac76268eb9bb25a1caa2184 (patch) (unidiff) | |
tree | 6389ea3b2799dbbb731d1780102568642129e335 /qt | |
parent | c4af3c78c9f6f073c1e0b11b331a2e24df80b9ff (diff) | |
download | opie-57e4c1b05208650eaac76268eb9bb25a1caa2184.zip opie-57e4c1b05208650eaac76268eb9bb25a1caa2184.tar.gz opie-57e4c1b05208650eaac76268eb9bb25a1caa2184.tar.bz2 |
New/ported patches for Qt/E 2.3.3
-rw-r--r-- | qt/qte233-for-opie091-display.patch | 15 | ||||
-rw-r--r-- | qt/qte233-for-opie091-keyboard.patch | 145 | ||||
-rw-r--r-- | qt/qte233-for-opie091-style.patch | 11 | ||||
-rw-r--r-- | qt/qte233-for-opie091-unpolish.patch | 23 |
4 files changed, 194 insertions, 0 deletions
diff --git a/qt/qte233-for-opie091-display.patch b/qt/qte233-for-opie091-display.patch new file mode 100644 index 0000000..d5b97e8 --- a/dev/null +++ b/qt/qte233-for-opie091-display.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | --- src.orig/kernel/qapplication_qws.cppMon Mar 18 02:11:25 2002 | ||
2 | +++ src/kernel/qapplication_qws.cppFri Aug 30 04:48:23 2002 | ||
3 | @@ -1458,11 +1458,7 @@ | ||
4 | qt_appType = type; | ||
5 | qws_single_process = TRUE; | ||
6 | QWSServer::startup(flags); | ||
7 | -QString strEnv( "QWS_DISPLAY=" ); | ||
8 | -strEnv += qws_display_spec; | ||
9 | -char p[strEnv.length() + 1]; | ||
10 | -strncpy( p, strEnv.latin1(), strEnv.length() ); | ||
11 | -putenv( p ); | ||
12 | +setenv( "QWS_DISPLAY", qws_display_spec, 1 ); | ||
13 | } | ||
14 | |||
15 | if( qt_is_gui_used ) | ||
diff --git a/qt/qte233-for-opie091-keyboard.patch b/qt/qte233-for-opie091-keyboard.patch new file mode 100644 index 0000000..9d76a64 --- a/dev/null +++ b/qt/qte233-for-opie091-keyboard.patch | |||
@@ -0,0 +1,145 @@ | |||
1 | --- src.orig/kernel/qkeyboard_qws.cppMon Mar 18 02:11:25 2002 | ||
2 | +++ src/kernel/qkeyboard_qws.cppFri Aug 30 04:28:39 2002 | ||
3 | @@ -269,7 +269,7 @@ | ||
4 | { Qt::Key_O, 'o' , 'O' , 'O'-64 }, | ||
5 | { Qt::Key_P, 'p' , 'P' , 'P'-64 }, | ||
6 | { Qt::Key_BraceLeft, '[' , '{' , 0xffff }, | ||
7 | - { Qt::Key_Escape, ']' , '}' , 0xffff }, | ||
8 | + { Qt::Key_BraceRight, ']' , '}' , 0xffff }, | ||
9 | { Qt::Key_Return, 13 , 13 , 0xffff }, | ||
10 | { Qt::Key_Control, 0xffff , 0xffff , 0xffff }, | ||
11 | { Qt::Key_A, 'a' , 'A' , 'A'-64 }, // 30 | ||
12 | @@ -394,7 +394,7 @@ | ||
13 | bool numLock; | ||
14 | #endif | ||
15 | bool caps; | ||
16 | - bool extended; | ||
17 | + int extended; | ||
18 | int modifiers; | ||
19 | int prevuni; | ||
20 | int prevkey; | ||
21 | @@ -524,7 +524,7 @@ | ||
22 | shift = false; | ||
23 | alt = false; | ||
24 | ctrl = false; | ||
25 | - extended = false; | ||
26 | + extended = 0; | ||
27 | prevuni = 0; | ||
28 | prevkey = 0; | ||
29 | caps = FALSE; | ||
30 | @@ -561,10 +561,24 @@ | ||
31 | int keyCode = Qt::Key_unknown; | ||
32 | bool release = false; | ||
33 | int keypad = 0; | ||
34 | +#if defined(QT_QWS_IPAQ) | ||
35 | + static int ipaq_return_pressed = false; // iPAQ Action Key has ScanCode 0x60: 0x60|0x80 = 0xe0 == extended mode 1 ! | ||
36 | +#endif | ||
37 | + | ||
38 | #if !defined(QT_QWS_CUSTOM) | ||
39 | - if (code == 224) { | ||
40 | + if ((code == 224) | ||
41 | +#if defined(QT_QWS_IPAQ) | ||
42 | + && !ipaq_return_pressed | ||
43 | +#endif | ||
44 | + ) | ||
45 | + { | ||
46 | // extended | ||
47 | -extended = true; | ||
48 | +extended = 1; | ||
49 | +return; | ||
50 | + } | ||
51 | + else if (code == 225) { | ||
52 | + // extended 2 | ||
53 | + extended = 2; | ||
54 | return; | ||
55 | } | ||
56 | #endif | ||
57 | @@ -574,7 +588,7 @@ | ||
58 | code &= 0x7f; | ||
59 | } | ||
60 | |||
61 | - if (extended) { | ||
62 | + if (extended == 1) { | ||
63 | switch (code) { | ||
64 | case 72: | ||
65 | keyCode = Qt::Key_Up; | ||
66 | @@ -612,6 +626,32 @@ | ||
67 | case 53: | ||
68 | keyCode = Qt::Key_Slash; | ||
69 | break; | ||
70 | +case 0x1d: | ||
71 | + keyCode = Qt::Key_Control; | ||
72 | + break; | ||
73 | +case 0x2a: | ||
74 | + keyCode = Qt::Key_SysReq; | ||
75 | + break; | ||
76 | +case 0x38: | ||
77 | + keyCode = Qt::Key_Alt; | ||
78 | + break; | ||
79 | +case 0x5b: | ||
80 | + keyCode = Qt::Key_Super_L; | ||
81 | + break; | ||
82 | +case 0x5c: | ||
83 | + keyCode = Qt::Key_Super_R; | ||
84 | + break; | ||
85 | +case 0x5d: | ||
86 | + keyCode = Qt::Key_Menu; | ||
87 | + break; | ||
88 | +} | ||
89 | + } else if (extended == 2) { | ||
90 | +switch (code) { | ||
91 | +case 0x1d: | ||
92 | + return; | ||
93 | +case 0x45: | ||
94 | + keyCode = Qt::Key_Pause; | ||
95 | + break; | ||
96 | } | ||
97 | } else { | ||
98 | #if defined(QT_QWS_CUSTOM) | ||
99 | @@ -650,6 +690,7 @@ | ||
100 | repeatable = FALSE; | ||
101 | break; | ||
102 | case 0x60: | ||
103 | + ipaq_return_pressed = !release; | ||
104 | keyCode = Key_Return; | ||
105 | break; | ||
106 | case 0x67: | ||
107 | @@ -687,13 +728,19 @@ | ||
108 | else | ||
109 | repeater->stop(); | ||
110 | #endif | ||
111 | + | ||
112 | +/* | ||
113 | + Translate shift+Key_Tab to Key_Backtab | ||
114 | +*/ | ||
115 | +if (( keyCode == Key_Tab ) && shift ) | ||
116 | + keyCode = Key_Backtab; | ||
117 | } | ||
118 | |||
119 | /* | ||
120 | Keypad consists of extended keys 53 and 28, | ||
121 | and non-extended keys 55 and 71 through 83. | ||
122 | */ | ||
123 | - if ( extended ? (code == 53 || code == 28) : | ||
124 | + if ((extended == 1) ? (code == 53 || code == 28) : | ||
125 | (code == 55 || ( code >= 71 && code <= 83 )) ) | ||
126 | keypad = Qt::Keypad; | ||
127 | |||
128 | @@ -803,7 +850,7 @@ | ||
129 | unicode = QWSServer::keyMap()[code].shift_unicode ? QWSServer::keyMap()[code].shift_unicode : 0xffff; | ||
130 | else | ||
131 | unicode = QWSServer::keyMap()[code].unicode ? QWSServer::keyMap()[code].unicode : 0xffff; | ||
132 | - } else { | ||
133 | + } else if (extended == 1) { | ||
134 | if ( code == 53 ) | ||
135 | unicode = '/'; | ||
136 | } | ||
137 | @@ -829,7 +876,7 @@ | ||
138 | prevkey = prevuni = 0; | ||
139 | } | ||
140 | } | ||
141 | - extended = false; | ||
142 | + extended = 0; | ||
143 | } | ||
144 | |||
145 | |||
diff --git a/qt/qte233-for-opie091-style.patch b/qt/qte233-for-opie091-style.patch new file mode 100644 index 0000000..1944da8 --- a/dev/null +++ b/qt/qte233-for-opie091-style.patch | |||
@@ -0,0 +1,11 @@ | |||
1 | --- src.orig/widgets/qcommonstyle.cppMon Mar 18 02:11:26 2002 | ||
2 | +++ src/widgets/qcommonstyle.cppFri Aug 30 04:28:27 2002 | ||
3 | @@ -562,7 +562,7 @@ | ||
4 | bool enabled, bool active ) | ||
5 | { | ||
6 | #ifndef QT_NO_MENUBAR | ||
7 | -#ifndef QT_NO_STYLE_SGI | ||
8 | +#if 1 // #ifndef QT_NO_STYLE_SGI | ||
9 | if (draw_menu_bar_impl != 0) { | ||
10 | QDrawMenuBarItemImpl impl = draw_menu_bar_impl; | ||
11 | (this->*impl)(p, x, y, w, h, mi, g, enabled, active); | ||
diff --git a/qt/qte233-for-opie091-unpolish.patch b/qt/qte233-for-opie091-unpolish.patch new file mode 100644 index 0000000..ba9e9b3 --- a/dev/null +++ b/qt/qte233-for-opie091-unpolish.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | --- src.orig/kernel/qapplication.cppMon Mar 18 02:11:25 2002 | ||
2 | +++ src/kernel/qapplication.cppFri Aug 30 04:28:34 2002 | ||
3 | @@ -930,10 +930,10 @@ | ||
4 | void QApplication::setStyle( QStyle *style ) | ||
5 | { | ||
6 | QStyle* old = app_style; | ||
7 | - app_style = style; | ||
8 | |||
9 | if ( startingUp() ) { | ||
10 | delete old; | ||
11 | +app_style = style; | ||
12 | return; | ||
13 | } | ||
14 | |||
15 | @@ -954,6 +954,8 @@ | ||
16 | old->unPolish( qApp ); | ||
17 | } | ||
18 | |||
19 | + app_style = style; | ||
20 | + | ||
21 | // take care of possible palette requirements of certain gui | ||
22 | // styles. Do it before polishing the application since the style | ||
23 | // might call QApplication::setStyle() itself | ||