summaryrefslogtreecommitdiff
path: root/core/launcher/inputmethods.cpp
Unidiff
Diffstat (limited to 'core/launcher/inputmethods.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/inputmethods.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/launcher/inputmethods.cpp b/core/launcher/inputmethods.cpp
index 8f3e812..62e316c 100644
--- a/core/launcher/inputmethods.cpp
+++ b/core/launcher/inputmethods.cpp
@@ -206,49 +206,53 @@ QRect InputMethods::inputRect() const
206 else 206 else
207 return mkeyboard->widget->geometry(); 207 return mkeyboard->widget->geometry();
208} 208}
209 209
210void InputMethods::unloadInputMethods() 210void InputMethods::unloadInputMethods()
211{ 211{
212 unloadMethod( inputMethodList ); 212 unloadMethod( inputMethodList );
213 unloadMethod( inputModifierList ); 213 unloadMethod( inputModifierList );
214 inputMethodList.clear(); 214 inputMethodList.clear();
215 inputModifierList.clear(); 215 inputModifierList.clear();
216 216
217} 217}
218 218
219void InputMethods::unloadMethod( QValueList<InputMethod>& list ) { 219void InputMethods::unloadMethod( QValueList<InputMethod>& list ) {
220 QValueList<InputMethod>::Iterator it; 220 QValueList<InputMethod>::Iterator it;
221 221
222 for (it = list.begin(); it != list.end(); ++it ) 222 for (it = list.begin(); it != list.end(); ++it )
223 (*it).releaseInterface(); 223 (*it).releaseInterface();
224 224
225} 225}
226 226
227 227
228QStringList InputMethods::plugins()const { 228QStringList InputMethods::plugins()const {
229 QString path = QPEApplication::qpeDir() + "/plugins/inputmethods"; 229 QString path = QPEApplication::qpeDir() + "/plugins/inputmethods";
230#ifdef Q_OS_MACX
231 QDir dir( path, "lib*.dylib" );
232#else
230 QDir dir( path, "lib*.so" ); 233 QDir dir( path, "lib*.so" );
234#endif /* Q_OS_MACX */
231 return dir.entryList(); 235 return dir.entryList();
232} 236}
233 237
234void InputMethods::installTranslator( const QString& type ) { 238void InputMethods::installTranslator( const QString& type ) {
235 QStringList langs = Global::languageList(); 239 QStringList langs = Global::languageList();
236 QStringList::ConstIterator lit; 240 QStringList::ConstIterator lit;
237 for ( lit= langs.begin(); lit!=langs.end(); ++lit) { 241 for ( lit= langs.begin(); lit!=langs.end(); ++lit) {
238 QString lang = *lit; 242 QString lang = *lit;
239 QTranslator * trans = new QTranslator(qApp); 243 QTranslator * trans = new QTranslator(qApp);
240 244
241 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; 245 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
242 246
243 if ( trans->load( tfn )) 247 if ( trans->load( tfn ))
244 qApp->installTranslator( trans ); 248 qApp->installTranslator( trans );
245 else 249 else
246 delete trans; 250 delete trans;
247 } 251 }
248} 252}
249 253
250void InputMethods::setPreferedHandlers() { 254void InputMethods::setPreferedHandlers() {
251 Config cfg("qpe"); 255 Config cfg("qpe");
252 cfg.setGroup("InputMethod"); 256 cfg.setGroup("InputMethod");
253 QString current = cfg.readEntry("current"); 257 QString current = cfg.readEntry("current");
254 QString im = cfg.readEntry("im"); 258 QString im = cfg.readEntry("im");