summaryrefslogtreecommitdiffstats
path: root/kxkb/rules.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 20:16:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 20:16:47 +0000
commit495d08bc2db58ee7fc4ea55a7158f2f61b82fc56 (patch)
treedaabcb652c07b9a17cad88ca50b63a2d91ead4a3 /kxkb/rules.cpp
parent50001f1757f97510e80cb1990e2f2d5b00144c2a (diff)
downloadtdebase-495d08bc2db58ee7fc4ea55a7158f2f61b82fc56.tar.gz
tdebase-495d08bc2db58ee7fc4ea55a7158f2f61b82fc56.zip
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1211357 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kxkb/rules.cpp')
-rw-r--r--kxkb/rules.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/kxkb/rules.cpp b/kxkb/rules.cpp
index dbf5b823d..940b2db35 100644
--- a/kxkb/rules.cpp
+++ b/kxkb/rules.cpp
@@ -15,8 +15,8 @@
#include "rules.h"
-XkbRules::XkbRules(bool layoutsOnly):
- m_layouts(90)
+XkbRules::XkbRules(bool tqlayoutsOnly):
+ m_tqlayouts(90)
{
X11_DIR = X11Helper::findX11Dir();
@@ -34,23 +34,23 @@ XkbRules::XkbRules(bool layoutsOnly):
return;
}
- loadRules(rulesFile, layoutsOnly);
+ loadRules(rulesFile, tqlayoutsOnly);
loadOldLayouts(rulesFile);
loadGroups(::locate("config", "kxkb_groups"));
}
-void XkbRules::loadRules(TQString file, bool layoutsOnly)
+void XkbRules::loadRules(TQString file, bool tqlayoutsOnly)
{
- RulesInfo* rules = X11Helper::loadRules(file, layoutsOnly);
+ RulesInfo* rules = X11Helper::loadRules(file, tqlayoutsOnly);
if (rules == NULL) {
kdDebug() << "Unable to load rules" << endl;
return;
}
- m_layouts= rules->layouts;
- if( layoutsOnly == false ) {
+ m_tqlayouts= rules->tqlayouts;
+ if( tqlayoutsOnly == false ) {
m_models = rules->models;
m_options = rules->options;
}
@@ -65,7 +65,7 @@ void XkbRules::loadRules(TQString file, bool layoutsOnly)
// // the rule file wasn't found
// static struct {
// const char * locale;
-// const char * layout;
+// const char * tqlayout;
// } fixedLayouts[] = {
// { "ben", "Bengali" },
// { "ar", "Arabic" },
@@ -73,21 +73,21 @@ void XkbRules::loadRules(TQString file, bool layoutsOnly)
// { 0, 0 }
// };
//
-// for(int i=0; fixedLayouts[i].layout != 0; i++ ) {
-// if( m_layouts.find(fixedLayouts[i].locale) == 0 )
-// m_layouts.insert(fixedLayouts[i].locale, fixedLayouts[i].layout);
+// for(int i=0; fixedLayouts[i].tqlayout != 0; i++ ) {
+// if( m_tqlayouts.find(fixedLayouts[i].locale) == 0 )
+// m_tqlayouts.insert(fixedLayouts[i].locale, fixedLayouts[i].tqlayout);
// }
// }
-bool XkbRules::isSingleGroup(const TQString& layout)
+bool XkbRules::isSingleGroup(const TQString& tqlayout)
{
return X11Helper::areSingleGroupsSupported()
- && !m_oldLayouts.contains(layout)
- && !m_nonLatinLayouts.contains(layout);
+ && !m_oldLayouts.tqcontains(tqlayout)
+ && !m_nonLatinLayouts.tqcontains(tqlayout);
}
-// check $oldlayouts and $nonlatin groups for XFree 4.3 and later
+// check $oldtqlayouts and $nonlatin groups for XFree 4.3 and later
void XkbRules::loadOldLayouts(TQString rulesFile)
{
OldLayouts* oldLayoutsStruct = X11Helper::loadOldLayouts( rulesFile );
@@ -95,8 +95,8 @@ void XkbRules::loadOldLayouts(TQString rulesFile)
m_nonLatinLayouts = oldLayoutsStruct->nonLatinLayouts;
}
-// for multi-group layouts in XFree 4.2 and older
-// or if layout is present in $oldlayout or $nonlatin groups
+// for multi-group tqlayouts in XFree 4.2 and older
+// or if tqlayout is present in $oldtqlayout or $nonlatin groups
void XkbRules::loadGroups(TQString file)
{
TQFile f(file);
@@ -121,35 +121,35 @@ void XkbRules::loadGroups(TQString file)
}
unsigned int
-XkbRules::getDefaultGroup(const TQString& layout, const TQString& includeGroup)
+XkbRules::getDefaultGroup(const TQString& tqlayout, const TQString& includeGroup)
{
-// check for new one-group layouts in XFree 4.3 and older
- if( isSingleGroup(layout) ) {
+// check for new one-group tqlayouts in XFree 4.3 and older
+ if( isSingleGroup(tqlayout) ) {
if( includeGroup.isEmpty() == false )
return 1;
else
return 0;
}
- TQMap<TQString, unsigned int>::iterator it = m_initialGroups.find(layout);
+ TQMap<TQString, unsigned int>::iterator it = m_initialGroups.find(tqlayout);
return it == m_initialGroups.end() ? 0 : it.data();
}
QStringList
-XkbRules::getAvailableVariants(const TQString& layout)
+XkbRules::getAvailableVariants(const TQString& tqlayout)
{
- if( layout.isEmpty() || !layouts().find(layout) )
+ if( tqlayout.isEmpty() || !tqlayouts().find(tqlayout) )
return TQStringList();
- TQStringList* result1 = m_varLists[layout];
+ TQStringList* result1 = m_varLists[tqlayout];
if( result1 )
return *result1;
- bool oldLayouts = m_oldLayouts.contains(layout);
- TQStringList* result = X11Helper::getVariants(layout, X11_DIR, oldLayouts);
+ bool oldLayouts = m_oldLayouts.tqcontains(tqlayout);
+ TQStringList* result = X11Helper::getVariants(tqlayout, X11_DIR, oldLayouts);
- m_varLists.insert(layout, result);
+ m_varLists.insert(tqlayout, result);
return *result;
}