Diffstat (limited to 'microkde/kdecore/klocale.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kdecore/klocale.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp index 673d845..3674f28 100644 --- a/microkde/kdecore/klocale.cpp +++ b/microkde/kdecore/klocale.cpp | |||
@@ -143,48 +143,52 @@ void KLocale::setWeekStartMonday( bool b ) | |||
143 | 143 | ||
144 | KLocale::IntDateFormat KLocale::getIntDateFormat( ) | 144 | KLocale::IntDateFormat KLocale::getIntDateFormat( ) |
145 | { | 145 | { |
146 | return mIntDateFormat; | 146 | return mIntDateFormat; |
147 | 147 | ||
148 | } | 148 | } |
149 | void KLocale::setIntDateFormat( KLocale::IntDateFormat i ) | 149 | void KLocale::setIntDateFormat( KLocale::IntDateFormat i ) |
150 | { | 150 | { |
151 | mIntDateFormat = i; | 151 | mIntDateFormat = i; |
152 | } | 152 | } |
153 | KLocale::IntDateFormat KLocale::getIntTimeFormat( ) | 153 | KLocale::IntDateFormat KLocale::getIntTimeFormat( ) |
154 | { | 154 | { |
155 | return mIntTimeFormat; | 155 | return mIntTimeFormat; |
156 | 156 | ||
157 | } | 157 | } |
158 | void KLocale::setIntTimeFormat( KLocale::IntDateFormat i ) | 158 | void KLocale::setIntTimeFormat( KLocale::IntDateFormat i ) |
159 | { | 159 | { |
160 | mIntTimeFormat = i; | 160 | mIntTimeFormat = i; |
161 | } | 161 | } |
162 | 162 | ||
163 | void KLocale::setLanguage( int i ) | 163 | void KLocale::setLanguage( int i ) |
164 | { | 164 | { |
165 | mLanguage = i; | 165 | mLanguage = i; |
166 | } | 166 | } |
167 | int KLocale::language( ) | ||
168 | { | ||
169 | return mLanguage; | ||
170 | } | ||
167 | QString KLocale::translate( const char *index ) const | 171 | QString KLocale::translate( const char *index ) const |
168 | { | 172 | { |
169 | return i18n( index ); | 173 | return i18n( index ); |
170 | } | 174 | } |
171 | 175 | ||
172 | QString KLocale::translate( const char *, const char *fallback) const | 176 | QString KLocale::translate( const char *, const char *fallback) const |
173 | { | 177 | { |
174 | return i18n( fallback ); | 178 | return i18n( fallback ); |
175 | } | 179 | } |
176 | 180 | ||
177 | QString KLocale::formatTime(const QTime &pTime, bool includeSecs, IntDateFormat intIntDateFormat) const | 181 | QString KLocale::formatTime(const QTime &pTime, bool includeSecs, IntDateFormat intIntDateFormat) const |
178 | { | 182 | { |
179 | const QString rst = timeFormat(intIntDateFormat); | 183 | const QString rst = timeFormat(intIntDateFormat); |
180 | 184 | ||
181 | // only "pm/am" here can grow, the rest shrinks, but | 185 | // only "pm/am" here can grow, the rest shrinks, but |
182 | // I'm rather safe than sorry | 186 | // I'm rather safe than sorry |
183 | QChar *buffer = new QChar[rst.length() * 3 / 2 + 30]; | 187 | QChar *buffer = new QChar[rst.length() * 3 / 2 + 30]; |
184 | 188 | ||
185 | uint index = 0; | 189 | uint index = 0; |
186 | bool escape = false; | 190 | bool escape = false; |
187 | int number = 0; | 191 | int number = 0; |
188 | 192 | ||
189 | for ( uint format_index = 0; format_index < rst.length(); format_index++ ) | 193 | for ( uint format_index = 0; format_index < rst.length(); format_index++ ) |
190 | { | 194 | { |