diff options
Diffstat (limited to 'kxkb/x11helper.cpp')
-rw-r--r-- | kxkb/x11helper.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/kxkb/x11helper.cpp b/kxkb/x11helper.cpp index e8f13f6aa..c44ba7971 100644 --- a/kxkb/x11helper.cpp +++ b/kxkb/x11helper.cpp @@ -57,7 +57,7 @@ const TQString X11Helper::X11_WIN_CLASS_UNKNOWN = "<unknown>"; static const TQRegExp NON_CLEAN_LAYOUT_REGEXP("[^a-z]"); -bool X11Helper::m_layoutsClean = true; +bool X11Helper::m_tqlayoutsClean = true; const QString X11Helper::findX11Dir() @@ -107,7 +107,7 @@ X11Helper::findXkbRulesFile(TQString x11Dir, Display *dpy) } RulesInfo* -X11Helper::loadRules(const TQString& file, bool layoutsOnly) +X11Helper::loadRules(const TQString& file, bool tqlayoutsOnly) { XkbRF_RulesPtr xkbRules = XkbRF_Load(TQFile::encodeName(file).data(), "", true, true); @@ -119,32 +119,32 @@ X11Helper::loadRules(const TQString& file, bool layoutsOnly) RulesInfo* rulesInfo = new RulesInfo(); for (int i = 0; i < xkbRules->layouts.num_desc; ++i) { - TQString layoutName(xkbRules->layouts.desc[i].name); - rulesInfo->layouts.replace( layoutName, qstrdup( xkbRules->layouts.desc[i].desc ) ); + TQString tqlayoutName(xkbRules->layouts.desc[i].name); + rulesInfo->tqlayouts.tqreplace( tqlayoutName, qstrdup( xkbRules->layouts.desc[i].desc ) ); - if( m_layoutsClean == true - && layoutName.find( NON_CLEAN_LAYOUT_REGEXP ) != -1 - && layoutName.endsWith("/jp") == false ) { + if( m_tqlayoutsClean == true + && tqlayoutName.find( NON_CLEAN_LAYOUT_REGEXP ) != -1 + && tqlayoutName.endsWith("/jp") == false ) { kdDebug() << "Layouts are not clean (Xorg < 6.9.0 or XFree86)" << endl; - m_layoutsClean = false; + m_tqlayoutsClean = false; } } - if( layoutsOnly == true ) { + if( tqlayoutsOnly == true ) { XkbRF_Free(xkbRules, true); return rulesInfo; } for (int i = 0; i < xkbRules->models.num_desc; ++i) - rulesInfo->models.replace(xkbRules->models.desc[i].name, qstrdup( xkbRules->models.desc[i].desc ) ); + rulesInfo->models.tqreplace(xkbRules->models.desc[i].name, qstrdup( xkbRules->models.desc[i].desc ) ); for (int i = 0; i < xkbRules->options.num_desc; ++i) - rulesInfo->options.replace(xkbRules->options.desc[i].name, qstrdup( xkbRules->options.desc[i].desc ) ); + rulesInfo->options.tqreplace(xkbRules->options.desc[i].name, qstrdup( xkbRules->options.desc[i].desc ) ); XkbRF_Free(xkbRules, true); // workaround for empty 'compose' options group description if( rulesInfo->options.find("compose:menu") && !rulesInfo->options.find("compose") ) { - rulesInfo->options.replace("compose", "Compose Key Position"); + rulesInfo->options.tqreplace("compose", "Compose Key Position"); } for(TQDictIterator<char> it(rulesInfo->options) ; it.current() != NULL; ++it ) { @@ -154,7 +154,7 @@ X11Helper::loadRules(const TQString& file, bool layoutsOnly) if( columnPos != -1 ) { TQString group = option.mid(0, columnPos); if( rulesInfo->options.find(group) == NULL ) { - rulesInfo->options.replace(group, group.latin1()); + rulesInfo->options.tqreplace(group, group.latin1()); kdDebug() << "Added missing option group: " << group << endl; } } @@ -162,17 +162,17 @@ X11Helper::loadRules(const TQString& file, bool layoutsOnly) // // workaround for empty misc options group description in XFree86 4.4.0 // if( rulesInfo->options.find("numpad:microsoft") && !rulesInfo->options.find("misc") ) { -// rulesInfo->options.replace("misc", "Miscellaneous compatibility options" ); +// rulesInfo->options.tqreplace("misc", "Miscellaneous compatibility options" ); // } return rulesInfo; } -// check $oldlayouts and $nonlatin groups for XFree 4.3 and later +// check $oldtqlayouts and $nonlatin groups for XFree 4.3 and later OldLayouts* X11Helper::loadOldLayouts(const TQString& rulesFile) { - static const char* oldLayoutsTag = "! $oldlayouts"; + static const char* oldLayoutsTag = "! $oldtqlayouts"; static const char* nonLatinLayoutsTag = "! $nonlatin"; TQStringList m_oldLayouts; TQStringList m_nonLatinLayouts; @@ -196,7 +196,7 @@ X11Helper::loadOldLayouts(const TQString& rulesFile) line = line.simplifyWhiteSpace(); m_oldLayouts = TQStringList::split(TQRegExp("\\s"), line); -// kdDebug() << "oldlayouts " << m_oldLayouts.join("|") << endl; +// kdDebug() << "oldtqlayouts " << m_oldLayouts.join("|") << endl; if( !m_nonLatinLayouts.empty() ) break; @@ -229,21 +229,21 @@ X11Helper::loadOldLayouts(const TQString& rulesFile) } -/* pretty simple algorithm - reads the layout file and +/* pretty simple algorithm - reads the tqlayout file and tries to find "xkb_symbols" - also checks whether previous line contains "hidden" to skip it + also checks whether previous line tqcontains "hidden" to skip it */ TQStringList* -X11Helper::getVariants(const TQString& layout, const TQString& x11Dir, bool oldLayouts) +X11Helper::getVariants(const TQString& tqlayout, const TQString& x11Dir, bool oldLayouts) { TQStringList* result = new TQStringList(); TQString file = x11Dir + "xkb/symbols/"; - // workaround for XFree 4.3 new directory for one-group layouts + // workaround for XFree 4.3 new directory for one-group tqlayouts if( TQDir(file+"pc").exists() && !oldLayouts ) file += "pc/"; - file += layout; + file += tqlayout; // kdDebug() << "reading variants from " << file << endl; |