summaryrefslogtreecommitdiffstats
path: root/kxkb
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit9a3f0aacd44fb866833ebcb852df3cd31475cb33 (patch)
tree9f699684624f4e78e13e7dd2393a103cc6fa8274 /kxkb
parent341ad02235b9c85cd31782225181ed475b74eaa3 (diff)
downloadtdebase-9a3f0aacd44fb866833ebcb852df3cd31475cb33.tar.gz
tdebase-9a3f0aacd44fb866833ebcb852df3cd31475cb33.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kxkb')
-rw-r--r--kxkb/extension.cpp6
-rw-r--r--kxkb/kcmlayout.cpp16
-rw-r--r--kxkb/kxkb.cpp4
-rw-r--r--kxkb/kxkbconfig.cpp18
-rw-r--r--kxkb/pixmap.cpp2
-rw-r--r--kxkb/rules.cpp12
-rw-r--r--kxkb/x11helper.cpp38
7 files changed, 48 insertions, 48 deletions
diff --git a/kxkb/extension.cpp b/kxkb/extension.cpp
index 09ab7abc0..3817a8c4c 100644
--- a/kxkb/extension.cpp
+++ b/kxkb/extension.cpp
@@ -125,7 +125,7 @@ bool XKBExtension::setLayout(const TQString& model,
const TQString layoutKey = getLayoutKey(layout, variant);
bool res;
- if( fileCache.tqcontains(layoutKey) ) {
+ if( fileCache.contains(layoutKey) ) {
res = setCompiledLayout( layoutKey );
kdDebug() << "setCompiledLayout " << layoutKey << ": " << res << endl;
@@ -224,7 +224,7 @@ bool XKBExtension::compileCurrentLayout(const TQString &layoutKey)
const TQString fileName = getPrecompiledLayoutFilename(layoutKey);
kdDebug() << "compiling layout " << this << " cache size: " << fileCache.count() << endl;
- if( fileCache.tqcontains(layoutKey) ) {
+ if( fileCache.contains(layoutKey) ) {
kdDebug() << "trashing old compiled layout for " << fileName << endl;
if( fileCache[ layoutKey ] != NULL )
fclose( fileCache[ layoutKey ] ); // recompiling - trash the old file
@@ -263,7 +263,7 @@ bool XKBExtension::setCompiledLayout(const TQString &layoutKey)
{
FILE *input = NULL;
- if( fileCache.tqcontains(layoutKey) ) {
+ if( fileCache.contains(layoutKey) ) {
input = fileCache[ layoutKey ];
}
diff --git a/kxkb/kcmlayout.cpp b/kxkb/kcmlayout.cpp
index e4a86243d..0874986c3 100644
--- a/kxkb/kcmlayout.cpp
+++ b/kxkb/kcmlayout.cpp
@@ -245,7 +245,7 @@ void LayoutConfig::initUI() {
for (TQStringList::ConstIterator it = options.begin(); it != options.end(); ++it)
{
TQString option = *it;
- TQString optionKey = option.mid(0, option.tqfind(':'));
+ TQString optionKey = option.mid(0, option.find(':'));
TQString optionName = m_rules->options()[option];
OptionListItem *item = m_optionGroups[i18n(optionKey.latin1())];
@@ -444,7 +444,7 @@ void LayoutConfig::displayNameChanged(const TQString& newDisplayName)
return;
const LayoutUnit layoutUnitKey = getLayoutUnitKey( selLayout );
- LayoutUnit& layoutUnit = *m_kxkbConfig.m_layouts.tqfind(layoutUnitKey);
+ LayoutUnit& layoutUnit = *m_kxkbConfig.m_layouts.find(layoutUnitKey);
TQString oldName = selLayout->text(LAYOUT_COLUMN_DISPLAY_NAME);
@@ -557,7 +557,7 @@ TQWidget* LayoutConfig::makeOptionsTab()
OptionListItem *parent;
for (; it.current(); ++it)
{
- if (!it.currentKey().tqcontains(':'))
+ if (!it.currentKey().contains(':'))
{
if( it.currentKey() == "ctrl" || it.currentKey() == "caps"
|| it.currentKey() == "altwin" ) {
@@ -580,7 +580,7 @@ TQWidget* LayoutConfig::makeOptionsTab()
for( ; it.current(); ++it)
{
TQString key = it.currentKey();
- int pos = key.tqfind(':');
+ int pos = key.find(':');
if (pos >= 0)
{
OptionListItem *parent = m_optionGroups[key.left(pos)];
@@ -589,7 +589,7 @@ TQWidget* LayoutConfig::makeOptionsTab()
if (parent != NULL) {
// workaroung for mistake in rules file for xkb options in XFree 4.2.0
TQString text(it.current());
- text = text.tqreplace( "Cap$", "Caps." );
+ text = text.replace( "Cap$", "Caps." );
if( parent->type() == TQCheckListItem::RadioButtonController )
new OptionListItem(parent, i18n(text.utf8()),
TQCheckListItem::RadioButton, key);
@@ -639,7 +639,7 @@ void LayoutConfig::updateLayoutCommand()
setxkbmap += ",us";
/* LayoutUnit layoutUnitKey = getLayoutUnitKey(sel);
- layoutDisplayName = m_kxkbConfig.getLayoutDisplayName( *m_kxkbConfig.m_layouts.tqfind(layoutUnitKey) );*/
+ layoutDisplayName = m_kxkbConfig.getLayoutDisplayName( *m_kxkbConfig.m_layouts.find(layoutUnitKey) );*/
layoutDisplayName = sel->text(LAYOUT_COLUMN_DISPLAY_NAME);
if( layoutDisplayName.isEmpty() ) {
int count = 0;
@@ -724,9 +724,9 @@ TQString LayoutConfig::createOptionString()
{
TQString option(it.currentKey());
- if (option.tqcontains(':')) {
+ if (option.contains(':')) {
- TQString optionKey = option.mid(0, option.tqfind(':'));
+ TQString optionKey = option.mid(0, option.find(':'));
OptionListItem *item = m_optionGroups[optionKey];
if( !item ) {
diff --git a/kxkb/kxkb.cpp b/kxkb/kxkb.cpp
index 06b64e59a..e10aa08a2 100644
--- a/kxkb/kxkb.cpp
+++ b/kxkb/kxkb.cpp
@@ -217,8 +217,8 @@ void KXKBApp::layoutApply()
bool KXKBApp::setLayout(const TQString& layoutPair)
{
const LayoutUnit layoutUnitKey(layoutPair);
- if( kxkbConfig.m_layouts.tqcontains(layoutUnitKey) ) {
- return setLayout( *kxkbConfig.m_layouts.tqfind(layoutUnitKey) );
+ if( kxkbConfig.m_layouts.contains(layoutUnitKey) ) {
+ return setLayout( *kxkbConfig.m_layouts.find(layoutUnitKey) );
}
return false;
}
diff --git a/kxkb/kxkbconfig.cpp b/kxkb/kxkbconfig.cpp
index e357abcb7..0e62fbc21 100644
--- a/kxkb/kxkbconfig.cpp
+++ b/kxkb/kxkbconfig.cpp
@@ -78,7 +78,7 @@ bool KxkbConfig::load(int loadMode)
m_layouts.clear();
for(TQStringList::ConstIterator it = layoutList.begin(); it != layoutList.end() ; ++it) {
m_layouts.append( LayoutUnit(*it) );
- kdDebug() << " layout " << LayoutUnit(*it).toPair() << " in list: " << m_layouts.tqcontains( LayoutUnit(*it) ) << endl;
+ kdDebug() << " layout " << LayoutUnit(*it).toPair() << " in list: " << m_layouts.contains( LayoutUnit(*it) ) << endl;
}
kdDebug() << "Found " << m_layouts.count() << " layouts, default is " << getDefaultLayout().toPair() << endl;
@@ -88,8 +88,8 @@ bool KxkbConfig::load(int loadMode)
TQStringList displayNamePair = TQStringList::split(':', *it );
if( displayNamePair.count() == 2 ) {
LayoutUnit layoutUnit( displayNamePair[0] );
- if( m_layouts.tqcontains( layoutUnit ) ) {
- m_layouts[m_layouts.tqfindIndex(layoutUnit)].displayName = displayNamePair[1].left(3);
+ if( m_layouts.contains( layoutUnit ) ) {
+ m_layouts[m_layouts.findIndex(layoutUnit)].displayName = displayNamePair[1].left(3);
}
}
}
@@ -102,8 +102,8 @@ bool KxkbConfig::load(int loadMode)
TQStringList includePair = TQStringList::split(':', *it );
if( includePair.count() == 2 ) {
LayoutUnit layoutUnit( includePair[0] );
- if( m_layouts.tqcontains( layoutUnit ) ) {
- m_layouts[m_layouts.tqfindIndex(layoutUnit)].includeGroup = includePair[1];
+ if( m_layouts.contains( layoutUnit ) ) {
+ m_layouts[m_layouts.findIndex(layoutUnit)].includeGroup = includePair[1];
kdDebug() << "Got inc group: " << includePair[0] << ": " << includePair[1] << endl;
}
}
@@ -115,10 +115,10 @@ bool KxkbConfig::load(int loadMode)
for(TQStringList::ConstIterator it = includeList.begin(); it != includeList.end() ; ++it) {
TQString layoutName = LayoutUnit::parseLayout( *it );
LayoutUnit layoutUnit( layoutName, "" );
- kdDebug() << "old layout for inc: " << layoutUnit.toPair() << " included " << m_layouts.tqcontains( layoutUnit ) << endl;
- if( m_layouts.tqcontains( layoutUnit ) ) {
+ kdDebug() << "old layout for inc: " << layoutUnit.toPair() << " included " << m_layouts.contains( layoutUnit ) << endl;
+ if( m_layouts.contains( layoutUnit ) ) {
TQString variantName = LayoutUnit::parseVariant(*it);
- m_layouts[m_layouts.tqfindIndex(layoutUnit)].includeGroup = variantName;
+ m_layouts[m_layouts.findIndex(layoutUnit)].includeGroup = variantName;
kdDebug() << "Got inc group: " << layoutUnit.toPair() << ": " << variantName << endl;
}
}
@@ -276,7 +276,7 @@ TQString KxkbConfig::getDefaultDisplayName(const TQString& code_)
displayName = code_;
}
else {
- int sepPos = code_.tqfind(TQRegExp("[-_]"));
+ int sepPos = code_.find(TQRegExp("[-_]"));
TQString leftCode = code_.mid(0, sepPos);
TQString rightCode;
if( sepPos != -1 )
diff --git a/kxkb/pixmap.cpp b/kxkb/pixmap.cpp
index ea685715b..25c9f6d7d 100644
--- a/kxkb/pixmap.cpp
+++ b/kxkb/pixmap.cpp
@@ -183,7 +183,7 @@ TQString LayoutIcon::getCountryFromLayoutName(const TQString& layoutName)
|| layoutName == "tel" || layoutName == "tml" || layoutName == "ben" ) // some Indian languages
flag = "in";
else {
- int sepPos = layoutName.tqfind(TQRegExp("[-_]"));
+ int sepPos = layoutName.find(TQRegExp("[-_]"));
TQString leftCode = layoutName.mid(0, sepPos);
TQString rightCode;
if( sepPos != -1 )
diff --git a/kxkb/rules.cpp b/kxkb/rules.cpp
index 2abe3f154..685c701fd 100644
--- a/kxkb/rules.cpp
+++ b/kxkb/rules.cpp
@@ -74,7 +74,7 @@ void XkbRules::loadRules(TQString file, bool layoutsOnly)
// };
//
// for(int i=0; fixedLayouts[i].layout != 0; i++ ) {
-// if( m_layouts.tqfind(fixedLayouts[i].locale) == 0 )
+// if( m_layouts.find(fixedLayouts[i].locale) == 0 )
// m_layouts.insert(fixedLayouts[i].locale, fixedLayouts[i].layout);
// }
// }
@@ -82,8 +82,8 @@ void XkbRules::loadRules(TQString file, bool layoutsOnly)
bool XkbRules::isSingleGroup(const TQString& layout)
{
return X11Helper::areSingleGroupsSupported()
- && !m_oldLayouts.tqcontains(layout)
- && !m_nonLatinLayouts.tqcontains(layout);
+ && !m_oldLayouts.contains(layout)
+ && !m_nonLatinLayouts.contains(layout);
}
@@ -131,7 +131,7 @@ XkbRules::getDefaultGroup(const TQString& layout, const TQString& includeGroup)
return 0;
}
- TQMap<TQString, unsigned int>::iterator it = m_initialGroups.tqfind(layout);
+ TQMap<TQString, unsigned int>::iterator it = m_initialGroups.find(layout);
return it == m_initialGroups.end() ? 0 : it.data();
}
@@ -139,14 +139,14 @@ XkbRules::getDefaultGroup(const TQString& layout, const TQString& includeGroup)
TQStringList
XkbRules::getAvailableVariants(const TQString& layout)
{
- if( layout.isEmpty() || !layouts().tqfind(layout) )
+ if( layout.isEmpty() || !layouts().find(layout) )
return TQStringList();
TQStringList* result1 = m_varLists[layout];
if( result1 )
return *result1;
- bool oldLayouts = m_oldLayouts.tqcontains(layout);
+ bool oldLayouts = m_oldLayouts.contains(layout);
TQStringList* result = X11Helper::getVariants(layout, X11_DIR, oldLayouts);
m_varLists.insert(layout, result);
diff --git a/kxkb/x11helper.cpp b/kxkb/x11helper.cpp
index cae856720..fae42829f 100644
--- a/kxkb/x11helper.cpp
+++ b/kxkb/x11helper.cpp
@@ -120,10 +120,10 @@ X11Helper::loadRules(const TQString& file, bool layoutsOnly)
for (int i = 0; i < xkbRules->layouts.num_desc; ++i) {
TQString layoutName(xkbRules->layouts.desc[i].name);
- rulesInfo->layouts.tqreplace( layoutName, qstrdup( xkbRules->layouts.desc[i].desc ) );
+ rulesInfo->layouts.replace( layoutName, qstrdup( xkbRules->layouts.desc[i].desc ) );
if( m_layoutsClean == true
- && layoutName.tqfind( NON_CLEAN_LAYOUT_REGEXP ) != -1
+ && layoutName.find( NON_CLEAN_LAYOUT_REGEXP ) != -1
&& layoutName.endsWith("/jp") == false ) {
kdDebug() << "Layouts are not clean (Xorg < 6.9.0 or XFree86)" << endl;
m_layoutsClean = false;
@@ -136,33 +136,33 @@ X11Helper::loadRules(const TQString& file, bool layoutsOnly)
}
for (int i = 0; i < xkbRules->models.num_desc; ++i)
- rulesInfo->models.tqreplace(xkbRules->models.desc[i].name, qstrdup( xkbRules->models.desc[i].desc ) );
+ rulesInfo->models.replace(xkbRules->models.desc[i].name, qstrdup( xkbRules->models.desc[i].desc ) );
for (int i = 0; i < xkbRules->options.num_desc; ++i)
- rulesInfo->options.tqreplace(xkbRules->options.desc[i].name, qstrdup( xkbRules->options.desc[i].desc ) );
+ rulesInfo->options.replace(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.tqfind("compose:menu") && !rulesInfo->options.tqfind("compose") ) {
- rulesInfo->options.tqreplace("compose", "Compose Key Position");
+ if( rulesInfo->options.find("compose:menu") && !rulesInfo->options.find("compose") ) {
+ rulesInfo->options.replace("compose", "Compose Key Position");
}
for(TQDictIterator<char> it(rulesInfo->options) ; it.current() != NULL; ++it ) {
TQString option(it.currentKey());
- int columnPos = option.tqfind(":");
+ int columnPos = option.find(":");
if( columnPos != -1 ) {
TQString group = option.mid(0, columnPos);
- if( rulesInfo->options.tqfind(group) == NULL ) {
- rulesInfo->options.tqreplace(group, group.latin1());
+ if( rulesInfo->options.find(group) == NULL ) {
+ rulesInfo->options.replace(group, group.latin1());
kdDebug() << "Added missing option group: " << group << endl;
}
}
}
// // workaround for empty misc options group description in XFree86 4.4.0
-// if( rulesInfo->options.tqfind("numpad:microsoft") && !rulesInfo->options.tqfind("misc") ) {
-// rulesInfo->options.tqreplace("misc", "Miscellaneous compatibility options" );
+// if( rulesInfo->options.find("numpad:microsoft") && !rulesInfo->options.find("misc") ) {
+// rulesInfo->options.replace("misc", "Miscellaneous compatibility options" );
// }
return rulesInfo;
@@ -187,10 +187,10 @@ X11Helper::loadOldLayouts(const TQString& rulesFile)
while (!ts.eof()) {
line = ts.readLine().simplifyWhiteSpace();
- if( line.tqfind(oldLayoutsTag) == 0 ) {
+ if( line.find(oldLayoutsTag) == 0 ) {
line = line.mid(strlen(oldLayoutsTag));
- line = line.mid(line.tqfind('=')+1).simplifyWhiteSpace();
+ line = line.mid(line.find('=')+1).simplifyWhiteSpace();
while( !ts.eof() && line.endsWith("\\") )
line = line.left(line.length()-1) + ts.readLine();
line = line.simplifyWhiteSpace();
@@ -202,10 +202,10 @@ X11Helper::loadOldLayouts(const TQString& rulesFile)
}
else
- if( line.tqfind(nonLatinLayoutsTag) == 0 ) {
+ if( line.find(nonLatinLayoutsTag) == 0 ) {
line = line.mid(strlen(nonLatinLayoutsTag)+1).simplifyWhiteSpace();
- line = line.mid(line.tqfind('=')+1).simplifyWhiteSpace();
+ line = line.mid(line.find('=')+1).simplifyWhiteSpace();
while( !ts.eof() && line.endsWith("\\") )
line = line.left(line.length()-1) + ts.readLine();
line = line.simplifyWhiteSpace();
@@ -262,15 +262,15 @@ X11Helper::getVariants(const TQString& layout, const TQString& x11Dir, bool oldL
if (line[0] == '#' || line.left(2) == "//" || line.isEmpty())
continue;
- int pos = line.tqfind("xkb_symbols");
+ int pos = line.find("xkb_symbols");
if (pos < 0)
continue;
- if( prev_line.tqfind("hidden") >=0 )
+ if( prev_line.find("hidden") >=0 )
continue;
- pos = line.tqfind('"', pos) + 1;
- int pos2 = line.tqfind('"', pos);
+ pos = line.find('"', pos) + 1;
+ int pos2 = line.find('"', pos);
if( pos < 0 || pos2 < 0 )
continue;