summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2004-04-24 15:51:18 (UTC)
committer mickeyl <mickeyl>2004-04-24 15:51:18 (UTC)
commit629ced22fc26892442be433403a9cfa9f662f08a (patch) (unidiff)
tree830973cb7ba701b0a897220e1307ad3f1243384b
parentf7b5905d990f374dd6cb177b7a03628cc593b7cf (diff)
downloadopie-629ced22fc26892442be433403a9cfa9f662f08a.zip
opie-629ced22fc26892442be433403a9cfa9f662f08a.tar.gz
opie-629ced22fc26892442be433403a9cfa9f662f08a.tar.bz2
gcc 3.4 fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/dasher/SettingsStore.cpp5
-rw-r--r--inputmethods/dasher/SettingsStore.h1
-rw-r--r--inputmethods/dvorak/dvorak.cpp8
-rw-r--r--inputmethods/keyboard/keyboard.cpp10
-rw-r--r--inputmethods/multikey/keyboard.cpp10
5 files changed, 20 insertions, 14 deletions
diff --git a/inputmethods/dasher/SettingsStore.cpp b/inputmethods/dasher/SettingsStore.cpp
index f7661bd..7e0fa58 100644
--- a/inputmethods/dasher/SettingsStore.cpp
+++ b/inputmethods/dasher/SettingsStore.cpp
@@ -7,24 +7,29 @@
7///////////////////////////////////////////////////////////////////////////// 7/////////////////////////////////////////////////////////////////////////////
8 8
9 9
10 10
11 11
12#include "SettingsStore.h" 12#include "SettingsStore.h"
13 13
14using namespace std; 14using namespace std;
15 15
16/* TODO: Consider using Template functions to make this neater. */ 16/* TODO: Consider using Template functions to make this neater. */
17 17
18 18
19CSettingsStore::~CSettingsStore()
20{
21}
22
23
19bool CSettingsStore::GetBoolOption(const string& Key) 24bool CSettingsStore::GetBoolOption(const string& Key)
20{ 25{
21 if (BoolMap.find(Key)==BoolMap.end()) { 26 if (BoolMap.find(Key)==BoolMap.end()) {
22 bool Value = false; 27 bool Value = false;
23 LoadSetting(Key, &Value); 28 LoadSetting(Key, &Value);
24 BoolMap[Key] = Value; 29 BoolMap[Key] = Value;
25 } 30 }
26 31
27 return BoolMap[Key]; 32 return BoolMap[Key];
28} 33}
29 34
30 35
diff --git a/inputmethods/dasher/SettingsStore.h b/inputmethods/dasher/SettingsStore.h
index 8ef9fcf..2ddf152 100644
--- a/inputmethods/dasher/SettingsStore.h
+++ b/inputmethods/dasher/SettingsStore.h
@@ -18,24 +18,25 @@
18 18
19 19
20/* 20/*
21 The public interface uses UTF-8 strings. All Keys should be 21 The public interface uses UTF-8 strings. All Keys should be
22 in American English and encodable in ASCII. However, 22 in American English and encodable in ASCII. However,
23 string Values may contain special characters where appropriate. 23 string Values may contain special characters where appropriate.
24*/ 24*/
25 25
26 26
27class CSettingsStore 27class CSettingsStore
28{ 28{
29public: 29public:
30 virtual ~CSettingsStore();
30 bool GetBoolOption(const std::string& Key); 31 bool GetBoolOption(const std::string& Key);
31 long GetLongOption(const std::string& Key); 32 long GetLongOption(const std::string& Key);
32 std::string& GetStringOption(const std::string& Key); 33 std::string& GetStringOption(const std::string& Key);
33 34
34 void SetBoolOption(const std::string& Key, bool Value); 35 void SetBoolOption(const std::string& Key, bool Value);
35 void SetLongOption(const std::string& Key, long Value); 36 void SetLongOption(const std::string& Key, long Value);
36 void SetStringOption(const std::string& Key, const std::string& Value); 37 void SetStringOption(const std::string& Key, const std::string& Value);
37 38
38 void SetBoolDefault(const std::string& Key, bool Value); 39 void SetBoolDefault(const std::string& Key, bool Value);
39 void SetLongDefault(const std::string& Key, long Value); 40 void SetLongDefault(const std::string& Key, long Value);
40 void SetStringDefault(const std::string& Key, const std::string& Value); 41 void SetStringDefault(const std::string& Key, const std::string& Value);
41private: 42private:
diff --git a/inputmethods/dvorak/dvorak.cpp b/inputmethods/dvorak/dvorak.cpp
index 97afa0a..2137f22 100644
--- a/inputmethods/dvorak/dvorak.cpp
+++ b/inputmethods/dvorak/dvorak.cpp
@@ -80,33 +80,33 @@ void KeyboardPicks::initialise()
80} 80}
81 81
82QSize KeyboardPicks::sizeHint() const 82QSize KeyboardPicks::sizeHint() const
83{ 83{
84 return QSize(240,fontMetrics().lineSpacing()); 84 return QSize(240,fontMetrics().lineSpacing());
85} 85}
86 86
87 87
88void KeyboardConfig::generateText(const QString &s) 88void KeyboardConfig::generateText(const QString &s)
89{ 89{
90#if defined(Q_WS_QWS) || defined(_WS_QWS_) 90#if defined(Q_WS_QWS) || defined(_WS_QWS_)
91 for (int i=0; i<(int)backspaces; i++) { 91 for (int i=0; i<(int)backspaces; i++) {
92 parent->emitKey( 0, Qt::Key_Backspace, 0, true, false ); 92 parent->emitKey( 0, ::Qt::Key_Backspace, 0, true, false );
93 parent->emitKey( 0, Qt::Key_Backspace, 0, false, false ); 93 parent->emitKey( 0, ::Qt::Key_Backspace, 0, false, false );
94 } 94 }
95 for (int i=0; i<(int)s.length(); i++) { 95 for (int i=0; i<(int)s.length(); i++) {
96 parent->emitKey( s[i].unicode(), 0, 0, true, false ); 96 parent->emitKey( s[i].unicode(), 0, 0, true, false );
97 parent->emitKey( s[i].unicode(), 0, 0, false, false ); 97 parent->emitKey( s[i].unicode(), 0, 0, false, false );
98 } 98 }
99 parent->emitKey( 0, Qt::Key_Space, 0, true, false ); 99 parent->emitKey( 0, ::Qt::Key_Space, 0, true, false );
100 parent->emitKey( 0, Qt::Key_Space, 0, false, false ); 100 parent->emitKey( 0, ::Qt::Key_Space, 0, false, false );
101 backspaces = 0; 101 backspaces = 0;
102#endif 102#endif
103} 103}
104 104
105 105
106//PC keyboard layout and scancodes 106//PC keyboard layout and scancodes
107 107
108/* 108/*
109 Format: length, code, length, code, ..., 0 109 Format: length, code, length, code, ..., 0
110 110
111 length is measured in half the width of a standard key. 111 length is measured in half the width of a standard key.
112 If code < 0x80 we have length/2 consecutive standard keys, 112 If code < 0x80 we have length/2 consecutive standard keys,
diff --git a/inputmethods/keyboard/keyboard.cpp b/inputmethods/keyboard/keyboard.cpp
index a85a7b1..fb88f2a 100644
--- a/inputmethods/keyboard/keyboard.cpp
+++ b/inputmethods/keyboard/keyboard.cpp
@@ -89,37 +89,37 @@ void KeyboardPicks::initialise()
89 setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed)); 89 setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed));
90 mode = 0; 90 mode = 0;
91 dc = new KeyboardConfig(this); 91 dc = new KeyboardConfig(this);
92 configs.append(dc); 92 configs.append(dc);
93} 93}
94 94
95QSize KeyboardPicks::sizeHint() const 95QSize KeyboardPicks::sizeHint() const
96{ 96{
97 return QSize(240,fontMetrics().lineSpacing()); 97 return QSize(240,fontMetrics().lineSpacing());
98} 98}
99 99
100 100
101void KeyboardConfig::generateText(const QString &s) 101void KeyboardConfig::generateText(const QString &s)
102{ 102{
103#if defined(Q_WS_QWS) || defined(_WS_QWS_) 103#if defined(Q_WS_QWS) || defined(_WS_QWS_)
104 for (int i=0; i<(int)backspaces; i++) { 104 for (int i=0; i<(int)backspaces; i++) {
105 parent->emitKey( 0, Qt::Key_Backspace, 0, true, false ); 105 parent->emitKey( 0, ::Qt::Key_Backspace, 0, true, false );
106 parent->emitKey( 0, Qt::Key_Backspace, 0, false, false ); 106 parent->emitKey( 0, ::Qt::Key_Backspace, 0, false, false );
107 } 107 }
108 for (int i=0; i<(int)s.length(); i++) { 108 for (int i=0; i<(int)s.length(); i++) {
109 parent->emitKey( s[i].unicode(), 0, 0, true, false ); 109 parent->emitKey( s[i].unicode(), 0, 0, true, false );
110 parent->emitKey( s[i].unicode(), 0, 0, false, false ); 110 parent->emitKey( s[i].unicode(), 0, 0, false, false );
111 } 111 }
112 parent->emitKey( 0, Qt::Key_Space, 0, true, false ); 112 parent->emitKey( 0, ::Qt::Key_Space, 0, true, false );
113 parent->emitKey( 0, Qt::Key_Space, 0, false, false ); 113 parent->emitKey( 0, ::Qt::Key_Space, 0, false, false );
114 backspaces = 0; 114 backspaces = 0;
115#endif 115#endif
116} 116}
117 117
118 118
119//PC keyboard layout and scancodes 119//PC keyboard layout and scancodes
120 120
121/* 121/*
122 Format: length, code, length, code, ..., 0 122 Format: length, code, length, code, ..., 0
123 123
124 length is measured in half the width of a standard key. 124 length is measured in half the width of a standard key.
125 If code < 0x80 we have length/2 consecutive standard keys, 125 If code < 0x80 we have length/2 consecutive standard keys,
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp
index 4f4f25f..7ddfd3e 100644
--- a/inputmethods/multikey/keyboard.cpp
+++ b/inputmethods/multikey/keyboard.cpp
@@ -134,37 +134,37 @@ void KeyboardPicks::initialise()
134 dc = new KeyboardConfig(this); 134 dc = new KeyboardConfig(this);
135 configs.append(dc); 135 configs.append(dc);
136} 136}
137 137
138/* KeyboardPicks::sizeHint {{{1 */ 138/* KeyboardPicks::sizeHint {{{1 */
139QSize KeyboardPicks::sizeHint() const 139QSize KeyboardPicks::sizeHint() const
140{ 140{
141 return QSize(240,fontMetrics().lineSpacing()); 141 return QSize(240,fontMetrics().lineSpacing());
142} 142}
143 143
144 144
145/* KeyboardConfig::generateText {{{1 */ 145/* KeyboardConfig::generateText {{{1 */
146void KeyboardConfig::generateText(const QString &s) 146void KeyboardConfig::generateText(const QString &s)
147{ 147{
148#if defined(Q_WS_QWS) || defined(_WS_QWS_) 148#if defined(Q_WS_QWS) || defined(_WS_QWS_)
149 for (int i=0; i<(int)backspaces; i++) { 149 for (int i=0; i<(int)backspaces; i++) {
150 parent->emitKey( 0, Qt::Key_Backspace, 0, true, false ); 150 parent->emitKey( 0, ::Qt::Key_Backspace, 0, true, false );
151 parent->emitKey( 0, Qt::Key_Backspace, 0, false, false ); 151 parent->emitKey( 0, ::Qt::Key_Backspace, 0, false, false );
152 } 152 }
153 for (int i=0; i<(int)s.length(); i++) { 153 for (int i=0; i<(int)s.length(); i++) {
154 parent->emitKey( s[i].unicode(), 0, 0, true, false ); 154 parent->emitKey( s[i].unicode(), 0, 0, true, false );
155 parent->emitKey( s[i].unicode(), 0, 0, false, false ); 155 parent->emitKey( s[i].unicode(), 0, 0, false, false );
156 } 156 }
157 parent->emitKey( 0, Qt::Key_Space, 0, true, false ); 157 parent->emitKey( 0, ::Qt::Key_Space, 0, true, false );
158 parent->emitKey( 0, Qt::Key_Space, 0, false, false ); 158 parent->emitKey( 0, ::Qt::Key_Space, 0, false, false );
159 backspaces = 0; 159 backspaces = 0;
160#endif 160#endif
161} 161}
162 162
163 163
164 164
165 165
166/* Keyboard::paintEvent {{{1 */ 166/* Keyboard::paintEvent {{{1 */
167void Keyboard::paintEvent(QPaintEvent* e) 167void Keyboard::paintEvent(QPaintEvent* e)
168{ 168{
169 QPainter painter(this); 169 QPainter painter(this);
170 painter.setClipRect(e->rect()); 170 painter.setClipRect(e->rect());