From 8155225c9be993acc0512956416d195edfef4eb9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 19 Jan 2011 01:42:14 +0000 Subject: Enable compilation with TQt for Qt4 3.4.0 TP2 This should not break compatibility with TQt for Qt3; if it does please fix it ASAP! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1215552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kxkb/extension.cpp | 6 ++-- kxkb/kcmlayout.cpp | 62 ++++++++++++++++---------------- kxkb/kcmlayoutwidget.ui | 96 ++++++++++++++++++++++++------------------------- kxkb/kcmmiscwidget.ui | 24 ++++++------- kxkb/kxkb.cpp | 6 ++-- kxkb/kxkbbindings.cpp | 4 +-- kxkb/kxkbconfig.cpp | 18 +++++----- kxkb/kxkbtraywindow.h | 2 +- kxkb/pixmap.cpp | 6 ++-- kxkb/rules.cpp | 14 ++++---- kxkb/x11helper.cpp | 42 +++++++++++----------- 11 files changed, 140 insertions(+), 140 deletions(-) (limited to 'kxkb') diff --git a/kxkb/extension.cpp b/kxkb/extension.cpp index 3817a8c4c..09ab7abc0 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.contains(layoutKey) ) { + if( fileCache.tqcontains(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.contains(layoutKey) ) { + if( fileCache.tqcontains(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.contains(layoutKey) ) { + if( fileCache.tqcontains(layoutKey) ) { input = fileCache[ layoutKey ]; } diff --git a/kxkb/kcmlayout.cpp b/kxkb/kcmlayout.cpp index 7af7ae691..e4a86243d 100644 --- a/kxkb/kcmlayout.cpp +++ b/kxkb/kcmlayout.cpp @@ -48,7 +48,7 @@ enum { static const TQString DEFAULT_VARIANT_NAME(""); -class OptionListItem : public QCheckListItem +class OptionListItem : public TQCheckListItem { public: @@ -101,39 +101,39 @@ LayoutConfig::LayoutConfig(TQWidget *parent, const char *name) TQVBoxLayout *main = new TQVBoxLayout(this, 0, KDialog::spacingHint()); widget = new LayoutConfigWidget(this, "widget"); - main->addWidget(widget); + main->addWidget(TQT_TQWIDGET(widget)); - connect( widget->chkEnable, TQT_SIGNAL( toggled( bool )), this, TQT_SLOT(changed())); - connect( widget->chkShowSingle, TQT_SIGNAL( toggled( bool )), this, TQT_SLOT(changed())); - connect( widget->chkShowFlag, TQT_SIGNAL( toggled( bool )), this, TQT_SLOT(changed())); - connect( widget->comboModel, TQT_SIGNAL(activated(int)), this, TQT_SLOT(changed())); + connect( TQT_TQOBJECT(widget->chkEnable), TQT_SIGNAL( toggled( bool )), TQT_TQOBJECT(this), TQT_SLOT(changed())); + connect( TQT_TQOBJECT(widget->chkShowSingle), TQT_SIGNAL( toggled( bool )), TQT_TQOBJECT(this), TQT_SLOT(changed())); + connect( TQT_TQOBJECT(widget->chkShowFlag), TQT_SIGNAL( toggled( bool )), TQT_TQOBJECT(this), TQT_SLOT(changed())); + connect( TQT_TQOBJECT(widget->comboModel), TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(changed())); - connect( widget->listLayoutsSrc, TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint&, int)), - this, TQT_SLOT(add())); - connect( widget->btnAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(add())); - connect( widget->btnRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(remove())); + connect( TQT_TQOBJECT(widget->listLayoutsSrc), TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint&, int)), + TQT_TQOBJECT(this), TQT_SLOT(add())); + connect( TQT_TQOBJECT(widget->btnAdd), TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(add())); + connect( TQT_TQOBJECT(widget->btnRemove), TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(remove())); - connect( widget->comboVariant, TQT_SIGNAL(activated(int)), this, TQT_SLOT(changed())); - connect( widget->comboVariant, TQT_SIGNAL(activated(int)), this, TQT_SLOT(variantChanged())); - connect( widget->listLayoutsDst, TQT_SIGNAL(selectionChanged(TQListViewItem *)), - this, TQT_SLOT(layoutSelChanged(TQListViewItem *))); + connect( TQT_TQOBJECT(widget->comboVariant), TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(changed())); + connect( TQT_TQOBJECT(widget->comboVariant), TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(variantChanged())); + connect( TQT_TQOBJECT(widget->listLayoutsDst), TQT_SIGNAL(selectionChanged(TQListViewItem *)), + TQT_TQOBJECT(this), TQT_SLOT(layoutSelChanged(TQListViewItem *))); - connect( widget->editDisplayName, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(displayNameChanged(const TQString&))); + connect( widget->editDisplayName, TQT_SIGNAL(textChanged(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(displayNameChanged(const TQString&))); - connect( widget->chkLatin, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); - connect( widget->chkLatin, TQT_SIGNAL(clicked()), this, TQT_SLOT(latinChanged())); + connect( widget->chkLatin, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(changed())); + connect( widget->chkLatin, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(latinChanged())); widget->btnUp->setIconSet(SmallIconSet("1uparrow")); - connect( widget->btnUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); - connect( widget->btnUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(moveUp())); + connect( widget->btnUp, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(changed())); + connect( widget->btnUp, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(moveUp())); widget->btnDown->setIconSet(SmallIconSet("1downarrow")); - connect( widget->btnDown, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); - connect( widget->btnDown, TQT_SIGNAL(clicked()), this, TQT_SLOT(moveDown())); + connect( widget->btnDown, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(changed())); + connect( widget->btnDown, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(moveDown())); connect( widget->grpSwitching, TQT_SIGNAL( clicked( int ) ), TQT_SLOT(changed())); - connect( widget->chkEnableSticky, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(changed())); - connect( widget->spinStickyDepth, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed())); + connect( widget->chkEnableSticky, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(changed())); + connect( widget->spinStickyDepth, TQT_SIGNAL(valueChanged(int)), TQT_TQOBJECT(this), TQT_SLOT(changed())); widget->listLayoutsSrc->setColumnText(LAYOUT_COLUMN_FLAG, ""); widget->listLayoutsDst->setColumnText(LAYOUT_COLUMN_FLAG, ""); @@ -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.find(':')); + TQString optionKey = option.mid(0, option.tqfind(':')); 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.find(layoutUnitKey); + LayoutUnit& layoutUnit = *m_kxkbConfig.m_layouts.tqfind(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().contains(':')) + if (!it.currentKey().tqcontains(':')) { 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.find(':'); + int pos = key.tqfind(':'); 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.replace( "Cap$", "Caps." ); + text = text.tqreplace( "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.find(layoutUnitKey) );*/ + layoutDisplayName = m_kxkbConfig.getLayoutDisplayName( *m_kxkbConfig.m_layouts.tqfind(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.contains(':')) { + if (option.tqcontains(':')) { - TQString optionKey = option.mid(0, option.find(':')); + TQString optionKey = option.mid(0, option.tqfind(':')); OptionListItem *item = m_optionGroups[optionKey]; if( !item ) { diff --git a/kxkb/kcmlayoutwidget.ui b/kxkb/kcmlayoutwidget.ui index 82c866009..bc1225bfb 100644 --- a/kxkb/kcmlayoutwidget.ui +++ b/kxkb/kcmlayoutwidget.ui @@ -1,6 +1,6 @@ LayoutConfigWidget - + LayoutConfigWidget @@ -20,7 +20,7 @@ 0 - + 600 510 @@ -30,17 +30,17 @@ unnamed - + tabWidget - + 600 500 - + tabLayout @@ -51,7 +51,7 @@ unnamed - + chkEnable @@ -62,7 +62,7 @@ true - + grpLayouts @@ -76,7 +76,7 @@ unnamed - + textLabel1_4 @@ -84,7 +84,7 @@ Available layouts: - + textLabel1_4_2 @@ -92,7 +92,7 @@ Active layouts: - + textLabel1_2 @@ -103,7 +103,7 @@ comboModel - + comboModel @@ -120,7 +120,7 @@ - + 1 @@ -197,7 +197,7 @@ If more than one layout is present in this list, the KDE panel will offer a docked flag. By clicking on this flag you can easily switch between layouts. The first layout will be default one. - + layout10 @@ -205,7 +205,7 @@ unnamed - + btnAdd @@ -213,7 +213,7 @@ Add >> - + btnRemove @@ -221,7 +221,7 @@ << Remove - + btnUp @@ -237,7 +237,7 @@ - + btnDown @@ -255,7 +255,7 @@ - + textLabel1_3 @@ -266,7 +266,7 @@ editCmdLine - + @@ -303,7 +303,7 @@ listLayoutsSrc - + 260 0 @@ -316,7 +316,7 @@ This is the list of available keyboard layouts in your system. You can add layout to the active list by selecting it and pressing "Add" button. - + editCmdLine @@ -327,7 +327,7 @@ This is the command which is executed when switching to the selected layout. It may help you if you want to debug layout switching, or if you want to switch layouts without the help of KDE. - + chkLatin @@ -341,7 +341,7 @@ If after you switch to this layout some keyboard shortcuts based on latin keys do not work try to enable this option. - + textLabel1_6 @@ -352,7 +352,7 @@ editDisplayName - + editDisplayName @@ -363,7 +363,7 @@ 3 - + textLabel1 @@ -374,7 +374,7 @@ comboVariant - + comboVariant @@ -393,7 +393,7 @@ Expanding - + 210 20 @@ -410,7 +410,7 @@ Expanding - + 210 20 @@ -421,7 +421,7 @@ - + tab @@ -442,14 +442,14 @@ Expanding - + 20 40 - + optionsFrame @@ -466,7 +466,7 @@ unnamed - + grpSwitching @@ -483,7 +483,7 @@ unnamed - + radioButton1 @@ -494,7 +494,7 @@ true - + radioButton1_3 @@ -502,7 +502,7 @@ Application - + radioButton1_2 @@ -512,7 +512,7 @@ - + chkShowFlag @@ -526,7 +526,7 @@ Shows country flag on background of layout name in tray icon - + grpBoxStickySwitching @@ -537,7 +537,7 @@ unnamed - + chkEnableSticky @@ -548,7 +548,7 @@ If you have more than two layouts and turn this option on, switching with the keyboard shortcut or clicking on the kxkb indicator will only cycle through the last few layouts. You can specify the number of layouts to rotate below. You can still access all layouts by right-clicking on the kxkb indicator. - + textLabel1_5 @@ -562,7 +562,7 @@ spinBox1 - + spinStickyDepth @@ -578,7 +578,7 @@ - + chkShowSingle @@ -590,7 +590,7 @@ - + tabOptions @@ -601,7 +601,7 @@ unnamed - + chkEnableOptions @@ -612,7 +612,7 @@ true - + groupBox3_2 @@ -626,7 +626,7 @@ unnamed - + checkResetOld @@ -634,7 +634,7 @@ &Reset old options - + textLabel1_3_2 @@ -642,7 +642,7 @@ Command: - + editCmdLineOpt @@ -650,7 +650,7 @@ true - + Options diff --git a/kxkb/kcmmiscwidget.ui b/kxkb/kcmmiscwidget.ui index 479188293..9fff22b4c 100644 --- a/kxkb/kcmmiscwidget.ui +++ b/kxkb/kcmmiscwidget.ui @@ -1,6 +1,6 @@ KeyboardConfigWidget - + KeyboardConfigWidget @@ -19,7 +19,7 @@ 0 - + numlockGroup @@ -39,7 +39,7 @@ unnamed - + RadioButton1_2 @@ -50,7 +50,7 @@ 1 - + RadioButton1_3 @@ -61,7 +61,7 @@ 2 - + RadioButton1 @@ -74,7 +74,7 @@ - + groupBox1 @@ -85,7 +85,7 @@ unnamed - + lblDelay @@ -104,7 +104,7 @@ delay - + delaySlider @@ -156,7 +156,7 @@ If supported, this option allows you to set the delay after which a pressed key will start generating keycodes. The 'Repeat rate' option controls the frequency of these keycodes. - + lblRate @@ -175,7 +175,7 @@ rate - + rateSlider @@ -230,7 +230,7 @@ If supported, this option allows you to set the rate at which keycodes are generated while a key is pressed. - + repeatBox @@ -266,7 +266,7 @@ If supported, this option allows you to hear audible clicks from your computer's speakers when you press the keys on your keyboard. This might be useful if your keyboard does not have mechanical keys, or if the sound that the keys make is very soft.<p>You can change the loudness of the key click feedback by dragging the slider button or by clicking the up/down arrows on the spin box. Setting the volume to 0% turns off the key click. - + TextLabel1 diff --git a/kxkb/kxkb.cpp b/kxkb/kxkb.cpp index 43e9f8046..06b64e59a 100644 --- a/kxkb/kxkb.cpp +++ b/kxkb/kxkb.cpp @@ -73,7 +73,7 @@ KXKBApp::KXKBApp(bool allowStyles, bool GUIenabled) } // keep in sync with kcmlayout.cpp - keys = new KGlobalAccel(this); + keys = new KGlobalAccel(TQT_TQOBJECT(this)); #include "kxkbbindings.cpp" keys->updateConnections(); @@ -217,8 +217,8 @@ void KXKBApp::layoutApply() bool KXKBApp::setLayout(const TQString& layoutPair) { const LayoutUnit layoutUnitKey(layoutPair); - if( kxkbConfig.m_layouts.contains(layoutUnitKey) ) { - return setLayout( *kxkbConfig.m_layouts.find(layoutUnitKey) ); + if( kxkbConfig.m_layouts.tqcontains(layoutUnitKey) ) { + return setLayout( *kxkbConfig.m_layouts.tqfind(layoutUnitKey) ); } return false; } diff --git a/kxkb/kxkbbindings.cpp b/kxkb/kxkbbindings.cpp index 3a6137ee1..9d8ebddf5 100644 --- a/kxkb/kxkbbindings.cpp +++ b/kxkb/kxkbbindings.cpp @@ -1,9 +1,9 @@ #ifndef NOSLOTS # define DEF( name, key3, key4, fnSlot ) \ - keys->insert( name, i18n(name), TQString::null, key3, key4, this, TQT_SLOT(fnSlot) ) + keys->insert( name, i18n(name), TQString(), key3, key4, this, TQT_SLOT(fnSlot) ) #else # define DEF( name, key3, key4, fnSlot ) \ - keys->insert( name, i18n(name), TQString::null, key3, key4 ) + keys->insert( name, i18n(name), TQString(), key3, key4 ) #endif keys->insert( "Program:kxkb", i18n("Keyboard") ); diff --git a/kxkb/kxkbconfig.cpp b/kxkb/kxkbconfig.cpp index 0e62fbc21..e357abcb7 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.contains( LayoutUnit(*it) ) << endl; + kdDebug() << " layout " << LayoutUnit(*it).toPair() << " in list: " << m_layouts.tqcontains( 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.contains( layoutUnit ) ) { - m_layouts[m_layouts.findIndex(layoutUnit)].displayName = displayNamePair[1].left(3); + if( m_layouts.tqcontains( layoutUnit ) ) { + m_layouts[m_layouts.tqfindIndex(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.contains( layoutUnit ) ) { - m_layouts[m_layouts.findIndex(layoutUnit)].includeGroup = includePair[1]; + if( m_layouts.tqcontains( layoutUnit ) ) { + m_layouts[m_layouts.tqfindIndex(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.contains( layoutUnit ) << endl; - if( m_layouts.contains( layoutUnit ) ) { + kdDebug() << "old layout for inc: " << layoutUnit.toPair() << " included " << m_layouts.tqcontains( layoutUnit ) << endl; + if( m_layouts.tqcontains( layoutUnit ) ) { TQString variantName = LayoutUnit::parseVariant(*it); - m_layouts[m_layouts.findIndex(layoutUnit)].includeGroup = variantName; + m_layouts[m_layouts.tqfindIndex(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_.find(TQRegExp("[-_]")); + int sepPos = code_.tqfind(TQRegExp("[-_]")); TQString leftCode = code_.mid(0, sepPos); TQString rightCode; if( sepPos != -1 ) diff --git a/kxkb/kxkbtraywindow.h b/kxkb/kxkbtraywindow.h index 089a7906b..38e42db5d 100644 --- a/kxkb/kxkbtraywindow.h +++ b/kxkb/kxkbtraywindow.h @@ -78,7 +78,7 @@ class KxkbSystemTray : public KSystemTray void mouseReleaseEvent(TQMouseEvent *ev) { - if (ev->button() == TQMouseEvent::LeftButton) + if (ev->button() == Qt::LeftButton) emit toggled(); KSystemTray::mouseReleaseEvent(ev); } diff --git a/kxkb/pixmap.cpp b/kxkb/pixmap.cpp index 0ca1500e3..ea685715b 100644 --- a/kxkb/pixmap.cpp +++ b/kxkb/pixmap.cpp @@ -83,7 +83,7 @@ LayoutIcon::findPixmap(const TQString& code_, bool showFlag, const TQString& dis if( pm->height() < FLAG_MAX_HEIGHT ) { TQPixmap* pix = new TQPixmap(FLAG_MAX_WIDTH, FLAG_MAX_HEIGHT); pix->fill( Qt::lightGray ); -// pix->fill( TQColor(qRgba(127,127,127,255)) ); +// pix->fill( TQColor(tqRgba(127,127,127,255)) ); // TQBitmap mask; // mask.fill(1); // pix->setMask(mask); @@ -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.find(TQRegExp("[-_]")); + int sepPos = layoutName.tqfind(TQRegExp("[-_]")); TQString leftCode = layoutName.mid(0, sepPos); TQString rightCode; if( sepPos != -1 ) @@ -211,7 +211,7 @@ void LayoutIcon::dimPixmap(TQPixmap& pm) for(int x=0; x::iterator it = m_initialGroups.find(layout); + TQMap::iterator it = m_initialGroups.tqfind(layout); return it == m_initialGroups.end() ? 0 : it.data(); } -QStringList +TQStringList XkbRules::getAvailableVariants(const TQString& layout) { - if( layout.isEmpty() || !layouts().find(layout) ) + if( layout.isEmpty() || !layouts().tqfind(layout) ) return TQStringList(); TQStringList* result1 = m_varLists[layout]; if( result1 ) return *result1; - bool oldLayouts = m_oldLayouts.contains(layout); + bool oldLayouts = m_oldLayouts.tqcontains(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 e8f13f6aa..cae856720 100644 --- a/kxkb/x11helper.cpp +++ b/kxkb/x11helper.cpp @@ -59,7 +59,7 @@ static const TQRegExp NON_CLEAN_LAYOUT_REGEXP("[^a-z]"); bool X11Helper::m_layoutsClean = true; -const QString +const TQString X11Helper::findX11Dir() { for(int ii=0; iilayouts.num_desc; ++i) { TQString layoutName(xkbRules->layouts.desc[i].name); - rulesInfo->layouts.replace( layoutName, qstrdup( xkbRules->layouts.desc[i].desc ) ); + rulesInfo->layouts.tqreplace( layoutName, qstrdup( xkbRules->layouts.desc[i].desc ) ); if( m_layoutsClean == true - && layoutName.find( NON_CLEAN_LAYOUT_REGEXP ) != -1 + && layoutName.tqfind( 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.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"); + if( rulesInfo->options.tqfind("compose:menu") && !rulesInfo->options.tqfind("compose") ) { + rulesInfo->options.tqreplace("compose", "Compose Key Position"); } for(TQDictIterator it(rulesInfo->options) ; it.current() != NULL; ++it ) { TQString option(it.currentKey()); - int columnPos = option.find(":"); + int columnPos = option.tqfind(":"); if( columnPos != -1 ) { TQString group = option.mid(0, columnPos); - if( rulesInfo->options.find(group) == NULL ) { - rulesInfo->options.replace(group, group.latin1()); + if( rulesInfo->options.tqfind(group) == NULL ) { + rulesInfo->options.tqreplace(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.find("numpad:microsoft") && !rulesInfo->options.find("misc") ) { -// rulesInfo->options.replace("misc", "Miscellaneous compatibility options" ); +// if( rulesInfo->options.tqfind("numpad:microsoft") && !rulesInfo->options.tqfind("misc") ) { +// rulesInfo->options.tqreplace("misc", "Miscellaneous compatibility options" ); // } return rulesInfo; @@ -187,10 +187,10 @@ X11Helper::loadOldLayouts(const TQString& rulesFile) while (!ts.eof()) { line = ts.readLine().simplifyWhiteSpace(); - if( line.find(oldLayoutsTag) == 0 ) { + if( line.tqfind(oldLayoutsTag) == 0 ) { line = line.mid(strlen(oldLayoutsTag)); - line = line.mid(line.find('=')+1).simplifyWhiteSpace(); + line = line.mid(line.tqfind('=')+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.find(nonLatinLayoutsTag) == 0 ) { + if( line.tqfind(nonLatinLayoutsTag) == 0 ) { line = line.mid(strlen(nonLatinLayoutsTag)+1).simplifyWhiteSpace(); - line = line.mid(line.find('=')+1).simplifyWhiteSpace(); + line = line.mid(line.tqfind('=')+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.find("xkb_symbols"); + int pos = line.tqfind("xkb_symbols"); if (pos < 0) continue; - if( prev_line.find("hidden") >=0 ) + if( prev_line.tqfind("hidden") >=0 ) continue; - pos = line.find('"', pos) + 1; - int pos2 = line.find('"', pos); + pos = line.tqfind('"', pos) + 1; + int pos2 = line.tqfind('"', pos); if( pos < 0 || pos2 < 0 ) continue; -- cgit v1.2.1