summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/firstuse.cpp9
-rw-r--r--libopie2/opiepim/core/opimevent.cpp2
-rw-r--r--library/backend/event.cpp2
-rw-r--r--noncore/applets/zkbapplet/keyzcfg/zkbnames.cpp26
-rw-r--r--noncore/games/qasteroids/view.cpp7
-rw-r--r--noncore/games/solitaire/cardpile.h2
6 files changed, 29 insertions, 19 deletions
diff --git a/core/launcher/firstuse.cpp b/core/launcher/firstuse.cpp
index acddeea..8344787 100644
--- a/core/launcher/firstuse.cpp
+++ b/core/launcher/firstuse.cpp
@@ -58,20 +58,21 @@ using namespace Opie::Core;
58#include <sys/types.h> 58#include <sys/types.h>
59#if defined(Q_OS_LINUX) || defined(_OS_LINUX_) 59#if defined(Q_OS_LINUX) || defined(_OS_LINUX_)
60#include <unistd.h> 60#include <unistd.h>
61#endif 61#endif
62 62
63 63
64struct { 64struct settingsTable_t {
65 bool enabled; 65 bool enabled : 1;
66 const char *app; 66 const char *app;
67 const char *start; 67 const char *start;
68 const char *stop; 68 const char *stop;
69 const char *desc; 69 const char *desc;
70} 70};
71settingsTable [] = 71
72static settingsTable_t settingsTable [] =
72{ 73{
73 { FALSE, "language", "raise()", "accept()", // No tr 74 { FALSE, "language", "raise()", "accept()", // No tr
74 QT_TR_NOOP("Language") }, 75 QT_TR_NOOP("Language") },
75 { FALSE, "doctab", "raise()", "accept()", // No tr 76 { FALSE, "doctab", "raise()", "accept()", // No tr
76 QT_TR_NOOP("DocTab") }, 77 QT_TR_NOOP("DocTab") },
77#ifndef Q_OS_WIN32 78#ifndef Q_OS_WIN32
diff --git a/libopie2/opiepim/core/opimevent.cpp b/libopie2/opiepim/core/opimevent.cpp
index c656c3d..7bc6c32 100644
--- a/libopie2/opiepim/core/opimevent.cpp
+++ b/libopie2/opiepim/core/opimevent.cpp
@@ -67,13 +67,13 @@ int OCalendarHelper::ocurrence( const QDate& date )
67 67
68 68
69int OCalendarHelper::dayOfWeek( char day ) 69int OCalendarHelper::dayOfWeek( char day )
70{ 70{
71 int dayOfWeek = 1; 71 int dayOfWeek = 1;
72 char i = OPimRecurrence::MON; 72 char i = OPimRecurrence::MON;
73 while ( !( i & day ) && i <= OPimRecurrence::SUN ) 73 while ( !( i & day ) && i <= static_cast<char>(OPimRecurrence::SUN) )
74 { 74 {
75 i <<= 1; 75 i <<= 1;
76 ++dayOfWeek; 76 ++dayOfWeek;
77 } 77 }
78 return dayOfWeek; 78 return dayOfWeek;
79} 79}
diff --git a/library/backend/event.cpp b/library/backend/event.cpp
index 90860e8..abc420b 100644
--- a/library/backend/event.cpp
+++ b/library/backend/event.cpp
@@ -396,13 +396,13 @@ int Event::occurrence( const QDate& date )
396 \internal 396 \internal
397*/ 397*/
398int Event::dayOfWeek( char day ) 398int Event::dayOfWeek( char day )
399{ 399{
400 int dayOfWeek = 1; 400 int dayOfWeek = 1;
401 char i = Event::MON; 401 char i = Event::MON;
402 while ( !( i & day ) && i <= Event::SUN ) { 402 while ( !( i & day ) && i <= static_cast<char>(Event::SUN) ) {
403 i <<= 1; 403 i <<= 1;
404 ++dayOfWeek; 404 ++dayOfWeek;
405 } 405 }
406 return dayOfWeek; 406 return dayOfWeek;
407} 407}
408 408
diff --git a/noncore/applets/zkbapplet/keyzcfg/zkbnames.cpp b/noncore/applets/zkbapplet/keyzcfg/zkbnames.cpp
index b2180ba..a47bf6c 100644
--- a/noncore/applets/zkbapplet/keyzcfg/zkbnames.cpp
+++ b/noncore/applets/zkbapplet/keyzcfg/zkbnames.cpp
@@ -2,16 +2,18 @@
2 2
3#include "zkbnames.h" 3#include "zkbnames.h"
4 4
5QString Null_String((const char*) 0); 5QString Null_String((const char*) 0);
6 6
7// Implementation of KeyNames 7// Implementation of KeyNames
8static struct { 8struct Key_Names_t {
9 int key; 9 int key;
10 char *name; 10 char *name;
11} Key_Names[] = { 11};
12
13static const Key_Names_t Key_Names[] = {
12 { 32, "Space" }, 14 { 32, "Space" },
13 { 39, "Apostrophe" }, 15 { 39, "Apostrophe" },
14 { 44, "Comma" }, 16 { 44, "Comma" },
15 { 46, "Period" }, 17 { 46, "Period" },
16 { 47, "Slash" }, 18 { 47, "Slash" },
17 { 65, "A" }, 19 { 65, "A" },
@@ -102,16 +104,18 @@ const QString& KeyNames::find(int k) {
102 } else { 104 } else {
103 return it.data(); 105 return it.data();
104 } 106 }
105} 107}
106 108
107// Implementation of ModifierNames 109// Implementation of ModifierNames
108struct { 110struct Modifier_Names_t {
109 int value; 111 int value;
110 char* name; 112 char* name;
111} Modifier_Names[] = { 113};
114
115static const Modifier_Names_t Modifier_Names[] = {
112 { 8, "Shift" }, 116 { 8, "Shift" },
113 { 16, "Control" }, 117 { 16, "Control" },
114 { 32, "Alt" }, 118 { 32, "Alt" },
115 { 0x4000, "Keypad" }, 119 { 0x4000, "Keypad" },
116 { 0, 0 } 120 { 0, 0 }
117}; 121};
@@ -156,20 +160,22 @@ const QString& ModifierNames::find(int k) {
156 return it.data(); 160 return it.data();
157 } 161 }
158} 162}
159 163
160// Implementation of KeycodeNames 164// Implementation of KeycodeNames
161 165
162struct { 166struct Keycode_Names_t {
163 char* name; 167 char* name;
164 int keycode; 168 int keycode;
165} Keycode_Names[] = { 169};
170
171static const Keycode_Names_t Keycode_Names[] = {
166 { "Escape", 0x1000 }, 172 { "Escape", 0x1000 },
167 { "Tab", 0x1001 }, 173 { "Tab", 0x1001 },
168 { "Backtab", 0x1002 }, 174 { "Backtab", 0x1002 },
169 { "Backspace", 0x1003 }, 175 { "Backspace", 0x1003 },
170 { "BackSpace", 0x1003 }, 176 { "BackSpace", 0x1003 },
171 { "Return", 0x1004 }, 177 { "Return", 0x1004 },
172 { "Enter", 0x1005 }, 178 { "Enter", 0x1005 },
173 { "Insert", 0x1006 }, 179 { "Insert", 0x1006 },
174 { "Delete", 0x1007 }, 180 { "Delete", 0x1007 },
175 { "Pause", 0x1008 }, 181 { "Pause", 0x1008 },
@@ -178,15 +184,15 @@ struct {
178 { "Home", 0x1010 }, 184 { "Home", 0x1010 },
179 { "End", 0x1011 }, 185 { "End", 0x1011 },
180 { "Left", 0x1012 }, 186 { "Left", 0x1012 },
181 { "Up", 0x1013 }, 187 { "Up", 0x1013 },
182 { "Right", 0x1014 }, 188 { "Right", 0x1014 },
183 { "Down", 0x1015 }, 189 { "Down", 0x1015 },
184 { "Prior", 0x1016 }, 190 { "Prior", 0x1016 },
185 { "PageUp", 0x1016 }, 191 { "PageUp", 0x1016 },
186 { "Next", 0x1017 }, 192 { "Next", 0x1017 },
187 { "PageDown", 0x1017 }, 193 { "PageDown", 0x1017 },
188 { "Shift", 0x1020 }, 194 { "Shift", 0x1020 },
189 { "Control", 0x1021 }, 195 { "Control", 0x1021 },
190 { "Meta", 0x1022 }, 196 { "Meta", 0x1022 },
191 { "Alt", 0x1023 }, 197 { "Alt", 0x1023 },
192 { "CapsLock", 0x1024 }, 198 { "CapsLock", 0x1024 },
diff --git a/noncore/games/qasteroids/view.cpp b/noncore/games/qasteroids/view.cpp
index 352c63b..3a4d410 100644
--- a/noncore/games/qasteroids/view.cpp
+++ b/noncore/games/qasteroids/view.cpp
@@ -52,19 +52,20 @@
52 52
53#define PI_X_2 6.283185307 53#define PI_X_2 6.283185307
54#ifndef M_PI 54#ifndef M_PI
55#define M_PI 3.141592654 55#define M_PI 3.141592654
56#endif 56#endif
57 57
58struct 58struct kas_animations_t
59{ 59{
60 int id; 60 int id;
61 const char *path; 61 const char *path;
62 int frames; 62 int frames;
63} 63};
64kas_animations [] = 64
65static const kas_animations_t kas_animations [] =
65{ 66{
66// { ID_ROCK_LARGE, "rock1/rock1\%1.png", 32 }, 67// { ID_ROCK_LARGE, "rock1/rock1\%1.png", 32 },
67 { ID_ROCK_MEDIUM, "rock2/rock2\%1.png", 32 }, 68 { ID_ROCK_MEDIUM, "rock2/rock2\%1.png", 32 },
68 { ID_ROCK_SMALL, "rock3/rock3\%1.png", 32 }, 69 { ID_ROCK_SMALL, "rock3/rock3\%1.png", 32 },
69 { ID_SHIP, "ship/ship\%1.png", 32 }, 70 { ID_SHIP, "ship/ship\%1.png", 32 },
70 { ID_MISSILE, "missile/missile.png", 0 }, 71 { ID_MISSILE, "missile/missile.png", 0 },
diff --git a/noncore/games/solitaire/cardpile.h b/noncore/games/solitaire/cardpile.h
index 1eb2499..757e6b3 100644
--- a/noncore/games/solitaire/cardpile.h
+++ b/noncore/games/solitaire/cardpile.h
@@ -17,12 +17,14 @@
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef CARD_PILE_H 20#ifndef CARD_PILE_H
21#define CARD_PILE_H 21#define CARD_PILE_H
22 22
23#include "card.h"
24
23 25
24#include <qpoint.h> 26#include <qpoint.h>
25#include <qlist.h> 27#include <qlist.h>
26 28
27 29
28enum ePileStackingType { 30enum ePileStackingType {