summaryrefslogtreecommitdiff
path: root/core/launcher/inputmethods.cpp
authorzecke <zecke>2004-10-16 00:01:01 (UTC)
committer zecke <zecke>2004-10-16 00:01:01 (UTC)
commitdf14f647ff1a60ca82e0fa9bd91458be146153b8 (patch) (side-by-side diff)
tree4859961352851a4392e1442f2080c15bff8ad7bc /core/launcher/inputmethods.cpp
parent419f9710c488f56a7a117eb1529970d3371e0094 (diff)
downloadopie-df14f647ff1a60ca82e0fa9bd91458be146153b8.zip
opie-df14f647ff1a60ca82e0fa9bd91458be146153b8.tar.gz
opie-df14f647ff1a60ca82e0fa9bd91458be146153b8.tar.bz2
Replace QPEApplication::qpeDir() + "/ with
QPEApplication::qpeDir() + " as it is guranteed that qpeDir() will have '/' as the last charachter
Diffstat (limited to 'core/launcher/inputmethods.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/inputmethods.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/launcher/inputmethods.cpp b/core/launcher/inputmethods.cpp
index 586628b..24669ac 100644
--- a/core/launcher/inputmethods.cpp
+++ b/core/launcher/inputmethods.cpp
@@ -196,108 +196,108 @@ QRect InputMethods::inputRect() const
return QRect();
else
return mkeyboard->widget->geometry();
}
void InputMethods::unloadInputMethods()
{
unloadMethod( inputMethodList );
unloadMethod( inputModifierList );
inputMethodList.clear();
inputModifierList.clear();
}
void InputMethods::unloadMethod( QValueList<InputMethod>& list ) {
QValueList<InputMethod>::Iterator it;
for (it = list.begin(); it != list.end(); ++it )
(*it).releaseInterface();
}
QStringList InputMethods::plugins()const {
- QString path = QPEApplication::qpeDir() + "/plugins/inputmethods";
+ QString path = QPEApplication::qpeDir() + "plugins/inputmethods";
#ifdef Q_OS_MACX
QDir dir( path, "lib*.dylib" );
#else
QDir dir( path, "lib*.so" );
#endif /* Q_OS_MACX */
return dir.entryList();
}
void InputMethods::installTranslator( const QString& type ) {
QStringList langs = Global::languageList();
QStringList::ConstIterator lit;
for ( lit= langs.begin(); lit!=langs.end(); ++lit) {
QString lang = *lit;
QTranslator * trans = new QTranslator(qApp);
- QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
+ QString tfn = QPEApplication::qpeDir()+"i18n/"+lang+"/"+type+".qm";
if ( trans->load( tfn ))
qApp->installTranslator( trans );
else
delete trans;
}
}
void InputMethods::setPreferedHandlers() {
Config cfg("qpe");
cfg.setGroup("InputMethod");
QString current = cfg.readEntry("current");
QString im = cfg.readEntry("im");
QValueList<InputMethod>::Iterator it;
if (!inputModifierList.isEmpty() && !im.isEmpty() ) {
for (it = inputModifierList.begin(); it != inputModifierList.end(); ++it )
if ( (*it).name() == im ) {
imethod = &(*it); break;
}
}
if (!inputMethodList.isEmpty() && !current.isEmpty() ) {
for (it = inputMethodList.begin(); it != inputMethodList.end(); ++it )
if ( (*it).name() == current ) {
owarn << "preferred keyboard is " << current << "" << oendl;
mkeyboard = &(*it);
kbdButton->setPixmap( *mkeyboard->icon() );
break;
}
}
}
void InputMethods::loadInputMethods()
{
#ifndef QT_NO_COMPONENT
hideInputMethod();
mkeyboard = 0;
unloadInputMethods();
- QString path = QPEApplication::qpeDir() + "/plugins/inputmethods";
+ QString path = QPEApplication::qpeDir() + "plugins/inputmethods";
QStringList list = plugins();
QStringList::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
InputMethodInterface *iface = 0;
ExtInputMethodInterface *eface = 0;
QLibrary *lib = new QLibrary( path + "/" + *it );
if ( lib->queryInterface( IID_InputMethod, (QUnknownInterface**)&iface ) == QS_OK ) {
InputMethod input;
input.newIM = FALSE;
input.library = lib;
input.libName = *it;
input.interface = iface;
input.widget = input.interface->inputMethod( 0, inputWidgetStyle );
input.interface->onKeyPress( this, SLOT(sendKey(ushort,ushort,ushort,bool,bool)) );
inputMethodList.append( input );
} else if ( lib->queryInterface( IID_ExtInputMethod, (QUnknownInterface**)&eface ) == QS_OK ) {
InputMethod input;
input.newIM = TRUE;
input.library = lib;
input.libName = *it;
input.extInterface = eface;
input.widget = input.extInterface->keyboardWidget( 0, inputWidgetStyle );
// may be either a simple, or advanced.