diff options
Diffstat (limited to 'kicker/kicker')
25 files changed, 115 insertions, 115 deletions
diff --git a/kicker/kicker/buttons/knewbutton.cpp b/kicker/kicker/buttons/knewbutton.cpp index b8144d735..2b5153545 100644 --- a/kicker/kicker/buttons/knewbutton.cpp +++ b/kicker/kicker/buttons/knewbutton.cpp @@ -215,7 +215,7 @@ bool KNewButton::eventFilter(TQObject *o, TQEvent *e) e->type() == TQEvent::MouseButtonDblClick ) { TQMouseEvent *me = TQT_TQMOUSEEVENT(e); - if (TQT_TQRECT_OBJECT(rect()).tqcontains(mapFromGlobal(me->globalPos()))) + if (TQT_TQRECT_OBJECT(rect()).contains(mapFromGlobal(me->globalPos()))) { if (m_pressedDuringPopup && m_popup && m_openTimer != -1 && (me->button() & Qt::LeftButton) ) @@ -355,9 +355,9 @@ void KNewButton::mouseMoveEvent(TQMouseEvent* e) { KButton::mouseMoveEvent(e); - m_mouseInside = m_sloppyRegion.tqcontains(e->pos()); + m_mouseInside = m_sloppyRegion.contains(e->pos()); - if ( m_sloppyRegion.tqcontains(e->pos())) + if ( m_sloppyRegion.contains(e->pos())) { if (m_hoverTimer == -1 && KickerSettings::openOnHover()) m_hoverTimer = startTimer(kMax(200,TQApplication::doubleClickInterval()/2)); diff --git a/kicker/kicker/core/applethandle.cpp b/kicker/kicker/core/applethandle.cpp index 621038002..382779648 100644 --- a/kicker/kicker/core/applethandle.cpp +++ b/kicker/kicker/core/applethandle.cpp @@ -200,7 +200,7 @@ bool AppletHandle::eventFilter(TQObject *o, TQEvent *e) // a hack for applets that have out-of-process // elements (e.g the systray) so that the handle // doesn't flicker when moving over those elements - if (TQT_TQRECT_OBJECT(w->rect()).tqcontains(w->mapFromGlobal(TQCursor::pos()))) + if (TQT_TQRECT_OBJECT(w->rect()).contains(w->mapFromGlobal(TQCursor::pos()))) { nowDrawIt = true; } @@ -269,7 +269,7 @@ void AppletHandle::checkHandleHover() { if (!m_handleHoverTimer || (m_menuButton && m_menuButton->isOn()) || - m_applet->tqgeometry().tqcontains(m_applet->mapToParent( + m_applet->tqgeometry().contains(m_applet->mapToParent( m_applet->mapFromGlobal(TQCursor::pos())))) { return; diff --git a/kicker/kicker/core/container_extension.cpp b/kicker/kicker/core/container_extension.cpp index a4e9f0634..c2023b7df 100644 --- a/kicker/kicker/core/container_extension.cpp +++ b/kicker/kicker/core/container_extension.cpp @@ -680,7 +680,7 @@ void ExtensionContainer::unhideTriggered(UnhideTrigger::Trigger tr, int Xinerama // Otherwise hide mode is automatic. The code below is slightly // complex so as to keep the same behavior as it has always had: // only unhide when the cursor position is within the widget geometry. - // We can't just do geometry().tqcontains(TQCursor::pos()) because + // We can't just do geometry().contains(TQCursor::pos()) because // now we hide the panel completely off screen. int x = TQCursor::pos().x(); @@ -754,7 +754,7 @@ void ExtensionContainer::autoHideTimeout() TQRect r = geometry(); TQPoint p = TQCursor::pos(); - if (!r.tqcontains(p) && + if (!r.contains(p) && (m_settings.unhideLocation() == UnhideTrigger::None || !shouldUnhideForTrigger(m_unhideTriggeredAt))) { diff --git a/kicker/kicker/core/containerarea.cpp b/kicker/kicker/core/containerarea.cpp index 412eeec1e..e4e78fd3d 100644 --- a/kicker/kicker/core/containerarea.cpp +++ b/kicker/kicker/core/containerarea.cpp @@ -314,7 +314,7 @@ void ContainerArea::loadContainers(const TQStringList& containers) BaseContainer* a = 0; - int sep = appletId.tqfindRev('_'); + int sep = appletId.findRev('_'); Q_ASSERT(sep != -1); TQString appletType = appletId.left(sep); @@ -962,7 +962,7 @@ void ContainerArea::mouseMoveEvent(TQMouseEvent *ev) return; } - if (ev->state() == Qt::LeftButton && !TQT_TQRECT_OBJECT(rect()).tqcontains(ev->pos())) + if (ev->state() == Qt::LeftButton && !TQT_TQRECT_OBJECT(rect()).contains(ev->pos())) { // leaveEvent() doesn't work, while grabbing the mouse _autoScrollTimer.stop(); @@ -1542,7 +1542,7 @@ TQRect ContainerArea::availableSpaceFollowing(BaseContainer* a) if (a) { - BaseContainer::Iterator it = m_containers.tqfind(a); + BaseContainer::Iterator it = m_containers.find(a); if (it != m_containers.end() && ++it != m_containers.end()) { @@ -1784,7 +1784,7 @@ void ContainerArea::updateContainersBackground() // properly, so just cache the geometry and update background only when // the geometry changes or when the background really changes (in which // case the cached is cleared). - if( !m_cachedGeometry.tqcontains( *it )) + if( !m_cachedGeometry.contains( *it )) { m_cachedGeometry[ *it ] = TQRect(); connect( *it, TQT_SIGNAL( destroyed()), TQT_SLOT( destroyCachedGeometry())); diff --git a/kicker/kicker/core/containerarealayout.cpp b/kicker/kicker/core/containerarealayout.cpp index 4853b8d88..ae4cca873 100644 --- a/kicker/kicker/core/containerarealayout.cpp +++ b/kicker/kicker/core/containerarealayout.cpp @@ -350,7 +350,7 @@ void ContainerAreaLayout::insertIntoFreeSpace(TQWidget* widget, TQPoint insertio if (current) { m_items.erase(m_items.fromLast()); - ItemList::iterator insertIt = m_items.tqfind(current); + ItemList::iterator insertIt = m_items.find(current); if (insertIt == m_items.begin()) { @@ -625,7 +625,7 @@ void ContainerAreaLayout::moveContainerSwitch(TQWidget* container, int distance) : kMin(newPos, last->leftR() - moving->widthR()); // Move 'moving' to its new position in the container list. - ItemList::iterator itMoving = m_items.tqfind(moving); + ItemList::iterator itMoving = m_items.find(moving); if (itMoving != m_items.end()) { diff --git a/kicker/kicker/core/extensionmanager.cpp b/kicker/kicker/core/extensionmanager.cpp index 7921c636d..03e039ee0 100644 --- a/kicker/kicker/core/extensionmanager.cpp +++ b/kicker/kicker/core/extensionmanager.cpp @@ -140,7 +140,7 @@ void ExtensionManager::initialize() TQString extensionId(*it); // create a matching applet container - if (extensionId.tqfind("Extension") == -1) + if (extensionId.find("Extension") == -1) { continue; } @@ -259,7 +259,7 @@ void ExtensionManager::migrateMenubar() { TQString extensionId(*it); - if (extensionId.tqfind("Extension") == -1) + if (extensionId.find("Extension") == -1) { continue; } @@ -291,12 +291,12 @@ void ExtensionManager::migrateMenubar() } KConfigGroup group(&extensionConfig, appletId.latin1()); - TQString appletType = appletId.left(appletId.tqfindRev('_')); + TQString appletType = appletId.left(appletId.findRev('_')); if (appletType == "Applet") { TQString appletFile = group.readPathEntry("DesktopFile"); - if (appletFile.tqfind("menuapplet.desktop") != -1) + if (appletFile.find("menuapplet.desktop") != -1) { TQString menubarConfig = locate("config", extension); KIO::NetAccess::copy(menubarConfig, diff --git a/kicker/kicker/core/main.cpp b/kicker/kicker/core/main.cpp index 44d891f1e..76e94a0e3 100644 --- a/kicker/kicker/core/main.cpp +++ b/kicker/kicker/core/main.cpp @@ -73,7 +73,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char ** argv ) XCloseDisplay(dpy); dpy = 0; - if ((pos = display_name.tqfindRev('.')) != -1) + if ((pos = display_name.findRev('.')) != -1) display_name.remove(pos, 10); TQCString env; diff --git a/kicker/kicker/core/pluginmanager.cpp b/kicker/kicker/core/pluginmanager.cpp index 86270db62..d1706ada9 100644 --- a/kicker/kicker/core/pluginmanager.cpp +++ b/kicker/kicker/core/pluginmanager.cpp @@ -272,7 +272,7 @@ AppletContainer* PluginManager::createAppletContainer( return 0; } - bool untrusted = m_untrustedApplets.tqfind(desktopFile) != m_untrustedApplets.end(); + bool untrusted = m_untrustedApplets.find(desktopFile) != m_untrustedApplets.end(); if (isStartup && untrusted) { // don't load extensions that bombed on us previously! @@ -325,7 +325,7 @@ ExtensionContainer* PluginManager::createExtensionContainer(const TQString& desk if (!internal) { - bool untrusted = m_untrustedExtensions.tqfind(desktopFile) != m_untrustedExtensions.end(); + bool untrusted = m_untrustedExtensions.find(desktopFile) != m_untrustedExtensions.end(); if (isStartup && untrusted) { // don't load extensions that bombed on us previously! diff --git a/kicker/kicker/kicker-3.4-reverseLayout.cpp b/kicker/kicker/kicker-3.4-reverseLayout.cpp index bc3baa9e1..97a35aff6 100644 --- a/kicker/kicker/kicker-3.4-reverseLayout.cpp +++ b/kicker/kicker/kicker-3.4-reverseLayout.cpp @@ -88,7 +88,7 @@ int main(int argc, char** argv) applets[*it].freeSpace = 1 - applets[*it].freeSpace; // Take care of stretchable applets. - if (stretchableApplets.tqcontains(applets[*it].desktopFile)) + if (stretchableApplets.contains(applets[*it].desktopFile)) { if (it != appletIds.begin()) { diff --git a/kicker/kicker/plugins/kickoff-beagle-plugin.cpp b/kicker/kicker/plugins/kickoff-beagle-plugin.cpp index a506bcd5d..3cad77ca4 100644 --- a/kicker/kicker/plugins/kickoff-beagle-plugin.cpp +++ b/kicker/kicker/plugins/kickoff-beagle-plugin.cpp @@ -315,7 +315,7 @@ HitMenuItem *KickoffBeaglePlugin::hitToHitMenuItem (int category, Hit *hit) case WEBHIST: uri = hit->getUri (); title = (*hit) [dc_title]; - title = title.tqreplace(TQRegExp("\n")," "); + title = title.replace(TQRegExp("\n")," "); mimetype = "text/html"; if (title.isEmpty () || title.stripWhiteSpace ().isEmpty ()) { title = uri.prettyURL (); @@ -375,15 +375,15 @@ HitMenuItem *KickoffBeaglePlugin::hitToHitMenuItem (int category, Hit *hit) TQString command = desktopfile.readEntry("Exec"); if (command==input) score = 100; - else if (command.tqfind(input)==0) + else if (command.find(input)==0) score = 50; - else if (command.tqfind(input)!=-1) + else if (command.find(input)!=-1) score = 10; else if (title==input) score = 100; - else if (title.tqfind(input)==0) + else if (title.find(input)==0) score = 50; - else if (title.tqfind(input)!=-1) + else if (title.find(input)!=-1) score = 10; break; } diff --git a/kicker/kicker/ui/addapplet.cpp b/kicker/kicker/ui/addapplet.cpp index 47a2c5835..163a4ae9d 100644 --- a/kicker/kicker/ui/addapplet.cpp +++ b/kicker/kicker/ui/addapplet.cpp @@ -435,7 +435,7 @@ void AddAppletDialog::addApplet(AppletWidget* applet) // reset the odd/even colouring from this item on down in the list bool odd = applet->odd(); - AppletWidget::List::const_iterator it = m_appletWidgetList.tqfind(applet); + AppletWidget::List::const_iterator it = m_appletWidgetList.find(applet); for (; it != m_appletWidgetList.constEnd(); ++it) { if ((*it)->isHidden()) @@ -484,8 +484,8 @@ bool AddAppletDialog::appletMatchesSearch(const AppletWidget* w, return (m_selectedType == AppletInfo::Undefined || w->info().type() & m_selectedType) && - (w->info().name().tqcontains(s, false) || - w->info().comment().tqcontains(s, false)); + (w->info().name().contains(s, false) || + w->info().comment().contains(s, false)); } void AddAppletDialog::delayedSearch() diff --git a/kicker/kicker/ui/addapplet_mnu.cpp b/kicker/kicker/ui/addapplet_mnu.cpp index 19bbf0f11..6d5c4482f 100644 --- a/kicker/kicker/ui/addapplet_mnu.cpp +++ b/kicker/kicker/ui/addapplet_mnu.cpp @@ -54,11 +54,11 @@ void PanelAddAppletMenu::slotAboutToShow() if (ai.icon().isEmpty() || ai.icon() == "unknown") { - insertItem(ai.name().tqreplace( "&", "&&" ), i); + insertItem(ai.name().replace( "&", "&&" ), i); } else { - insertItem(SmallIconSet(ai.icon()), ai.name().tqreplace( "&", "&&" ), i); + insertItem(SmallIconSet(ai.icon()), ai.name().replace( "&", "&&" ), i); } if (ai.isUniqueApplet() && PluginManager::the()->hasInstance(ai)) diff --git a/kicker/kicker/ui/addbutton_mnu.cpp b/kicker/kicker/ui/addbutton_mnu.cpp index c04a832e6..02c4718d4 100644 --- a/kicker/kicker/ui/addbutton_mnu.cpp +++ b/kicker/kicker/ui/addbutton_mnu.cpp @@ -46,7 +46,7 @@ PanelAddButtonMenu::PanelAddButtonMenu(ContainerArea* cArea, TQWidget * parent, void PanelAddButtonMenu::slotExec(int id) { - if (!entryMap_.tqcontains(id)) + if (!entryMap_.contains(id)) return; KSycocaEntry * e = entryMap_[id]; diff --git a/kicker/kicker/ui/addextension_mnu.cpp b/kicker/kicker/ui/addextension_mnu.cpp index 325897a8c..b22187443 100644 --- a/kicker/kicker/ui/addextension_mnu.cpp +++ b/kicker/kicker/ui/addextension_mnu.cpp @@ -44,7 +44,7 @@ void PanelAddExtensionMenu::slotAboutToShow() AppletInfo::List::const_iterator it = extensions.constBegin(); for( int i = 0; it != extensions.constEnd(); ++it, ++i ) { const AppletInfo& ai = (*it); - insertItem( ai.name().tqreplace( "&", "&&" ), i ); + insertItem( ai.name().replace( "&", "&&" ), i ); if ( ai.isUniqueApplet() && PluginManager::the()->hasInstance(ai) ) { setItemEnabled( i, false ); setItemChecked( i, true ); diff --git a/kicker/kicker/ui/appletop_mnu.cpp b/kicker/kicker/ui/appletop_mnu.cpp index 2bd8f7bd0..fb4f97ea8 100644 --- a/kicker/kicker/ui/appletop_mnu.cpp +++ b/kicker/kicker/ui/appletop_mnu.cpp @@ -41,7 +41,7 @@ PanelAppletOpMenu::PanelAppletOpMenu(int actions, TQPopupMenu *opMenu, const TQP bool isButton = (parent && parent->inherits("ButtonContainer")); bool isMenu = false; TQString titleText = title; - titleText = titleText.tqreplace('&', "&&"); + titleText = titleText.replace('&', "&&"); if (isButton) { isMenu = static_cast<ButtonContainer*>(parent)->isAMenu(); diff --git a/kicker/kicker/ui/browser_mnu.cpp b/kicker/kicker/ui/browser_mnu.cpp index 46f79db2b..ee62791e9 100644 --- a/kicker/kicker/ui/browser_mnu.cpp +++ b/kicker/kicker/ui/browser_mnu.cpp @@ -244,7 +244,7 @@ void PanelBrowserMenu::initialize() title = c.readEntry("Name", title); TQString s = c.readEntry("Icon"); - if(!_icons->tqcontains(s)) { + if(!_icons->contains(s)) { icon = KGlobal::iconLoader()->loadIcon(s, KIcon::Small, KIcon::SizeSmall, KIcon::DefaultState, 0, true); @@ -344,7 +344,7 @@ void PanelBrowserMenu::append(const TQPixmap &pixmap, const TQString &title, con // avoid &'s being converted to accelerators TQString newTitle = title; newTitle = KStringHandler::cEmSqueeze( newTitle, fontMetrics(), 20 ); - newTitle.tqreplace("&", "&&"); + newTitle.replace("&", "&&"); // insert menu item int id = insertItem(pixmap, newTitle); @@ -362,7 +362,7 @@ void PanelBrowserMenu::append(const TQPixmap &pixmap, const TQString &title, Pan // avoid &'s being converted to accelerators TQString newTitle = title; newTitle = KStringHandler::cEmSqueeze( newTitle, fontMetrics(), 20 ); - newTitle.tqreplace("&", "&&"); + newTitle.replace("&", "&&"); // insert submenu insertItem(pixmap, newTitle, subMenu); @@ -388,7 +388,7 @@ void PanelBrowserMenu::mouseMoveEvent(TQMouseEvent *e) // get id int id = idAt(_lastpress); - if(!_filemap.tqcontains(id)) return; + if(!_filemap.contains(id)) return; // reset _lastpress _lastpress = TQPoint(-1, -1); @@ -439,7 +439,7 @@ void PanelBrowserMenu::slotExec(int id) { kapp->propagateSessionManager(); - if(!_filemap.tqcontains(id)) return; + if(!_filemap.contains(id)) return; KURL url; url.setPath(path() + "/" + _filemap[id]); @@ -494,9 +494,9 @@ void PanelBrowserMenu::slotMimeCheck() // kdDebug() << url.url() << ": " << icon << endl; file = KStringHandler::cEmSqueeze( file, fontMetrics(), 20 ); - file.tqreplace("&", "&&"); + file.replace("&", "&&"); - if(!_icons->tqcontains(icon)) { + if(!_icons->contains(icon)) { TQPixmap pm = SmallIcon(icon); if( pm.height() > 16 ) { diff --git a/kicker/kicker/ui/exe_dlg.cpp b/kicker/kicker/ui/exe_dlg.cpp index 0829f6ccb..d39fb5942 100644 --- a/kicker/kicker/ui/exe_dlg.cpp +++ b/kicker/kicker/ui/exe_dlg.cpp @@ -164,7 +164,7 @@ void PanelExeDialog::slotTextChanged(const TQString &str) } TQString exeLocation = str; - TQMap<TQString, TQString>::iterator it = m_partialPath2full.tqfind(str); + TQMap<TQString, TQString>::iterator it = m_partialPath2full.find(str); if (it != m_partialPath2full.end()) exeLocation = it.data(); @@ -174,7 +174,7 @@ void PanelExeDialog::slotTextChanged(const TQString &str) void PanelExeDialog::slotReturnPressed() { - if (m_partialPath2full.tqcontains(ui->m_exec->url())) + if (m_partialPath2full.contains(ui->m_exec->url())) ui->m_exec->setURL(m_partialPath2full[ui->m_exec->url()]); } diff --git a/kicker/kicker/ui/itemview.cpp b/kicker/kicker/ui/itemview.cpp index f86ae537a..3a2978261 100644 --- a/kicker/kicker/ui/itemview.cpp +++ b/kicker/kicker/ui/itemview.cpp @@ -385,7 +385,7 @@ void KMenuItemSeparator::setLink( const TQString &text, const TQString &url ) bool KMenuItemSeparator::hitsLink( const TQPoint &pos ) { - return m_link_rect.tqcontains( pos ); + return m_link_rect.contains( pos ); } void KMenuItemSeparator::preparePixmap( int width ) @@ -1162,7 +1162,7 @@ bool KMenuItemDrag::decode(const TQMimeSource* e, KMenuItemInfo& item) item.m_title = item.m_path; item.m_icon = KMimeType::iconForURL( url ); item.m_title = item.m_path.section( '/', -1, -1 ); - int last_slash = url.tqfindRev ('/', -1); + int last_slash = url.findRev ('/', -1); if (last_slash == 0) item.m_description = i18n("Directory: /)"); else @@ -1205,7 +1205,7 @@ bool FavoritesItemView::acceptDrag (TQDropEvent* event) const TQStringList favs = KickerSettings::favorites(); if (item.m_s) - return favs.tqfind(item.m_s->storageId())==favs.end(); + return favs.find(item.m_s->storageId())==favs.end(); else { TQStringList::Iterator it; @@ -1219,7 +1219,7 @@ bool FavoritesItemView::acceptDrag (TQDropEvent* event) const for (it = favs.begin(); it != favs.end(); ++it) { if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().tqreplace("file://",TQString())==uri) + if (df.readURL().replace("file://",TQString())==uri) break; } } @@ -1233,15 +1233,15 @@ bool FavoritesItemView::acceptDrag (TQDropEvent* event) const TQStringList favs = KickerSettings::favorites(); if (text.endsWith(".desktop")) { - KService::Ptr p = KService::serviceByDesktopPath(text.tqreplace("file://",TQString())); - return (p && favs.tqfind(p->storageId())==favs.end()); + KService::Ptr p = KService::serviceByDesktopPath(text.replace("file://",TQString())); + return (p && favs.find(p->storageId())==favs.end()); } else { TQStringList::Iterator it; for (it = favs.begin(); it != favs.end(); ++it) { if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().tqreplace("file://",TQString())==text) + if (df.readURL().replace("file://",TQString())==text) break; } } diff --git a/kicker/kicker/ui/k_mnu.cpp b/kicker/kicker/ui/k_mnu.cpp index 110cd15f0..65011890e 100644 --- a/kicker/kicker/ui/k_mnu.cpp +++ b/kicker/kicker/ui/k_mnu.cpp @@ -652,7 +652,7 @@ TQMouseEvent PanelKMenu::translateMouseEvent( TQMouseEvent* e ) { TQRect side = sideImageRect(); - if ( !side.tqcontains( e->pos() ) ) + if ( !side.contains( e->pos() ) ) return *e; TQPoint newpos( e->pos() ); diff --git a/kicker/kicker/ui/k_new_mnu.cpp b/kicker/kicker/ui/k_new_mnu.cpp index 542e08be9..1a87b163d 100644 --- a/kicker/kicker/ui/k_new_mnu.cpp +++ b/kicker/kicker/ui/k_new_mnu.cpp @@ -141,12 +141,12 @@ static TQString workaroundStringFreeze(const TQString& str) { TQString s = str; - s.tqreplace("<u>","&"); + s.replace("<u>","&"); TQRegExp re("<[^>]+>"); re.setMinimal(true); re.setCaseSensitive(false); - s.tqreplace(re, ""); + s.replace(re, ""); s = s.simplifyWhiteSpace(); return s; @@ -517,7 +517,7 @@ bool KMenu::eventFilter ( TQObject * receiver, TQEvent* e) return false; } - if (m_sloppyRegion.tqcontains(p)) { + if (m_sloppyRegion.contains(p)) { if (e->type() == TQEvent::MouseButtonPress /*&& m_sloppyTimer.isActive()*/) m_sloppySourceClicked = true; @@ -682,9 +682,9 @@ bool KMenu::eventFilter ( TQObject * receiver, TQEvent* e) void KMenu::slotSloppyTimeout() { - if (m_sloppyRegion.tqcontains(TQCursor::pos()) && !m_sloppySource.isNull()) + if (m_sloppyRegion.contains(TQCursor::pos()) && !m_sloppySource.isNull()) { - if ( m_sloppySource.tqcontains(TQCursor::pos())) + if ( m_sloppySource.contains(TQCursor::pos())) { m_stacker->raiseWidget(m_sloppyWidget); @@ -882,7 +882,7 @@ void KMenu::slotGoExitSubMenu(const TQString& url) m_exitView->rightView()->insertItem( "switchuser", i18n( "Start New Session" ), i18n( "Start a parallel session" ), "kicker:/switchuser", nId++, index++ ); - m_exitView->rightView()->insertItem( "lock", i18n( "Lock Current && Start New Session").tqreplace("&&","&"), + m_exitView->rightView()->insertItem( "lock", i18n( "Lock Current && Start New Session").replace("&&","&"), i18n( "Lock screen and start a parallel session" ), "kicker:/switchuserafterlock", nId++, index++ ); SessList sess; @@ -918,7 +918,7 @@ void KMenu::goSubMenu(const TQString& relPath, bool keyboard) int index = rel.length() - 1; if ( rel.endsWith( "/" ) ) index--; - index = rel.tqfindRev( '/', index ); + index = rel.findRev( '/', index ); kdDebug() << "goup, rel '" << rel << "' " << index << endl; TQString currel = rel; rel = rel.left( index + 1 ); @@ -1165,7 +1165,7 @@ void KMenu::fillMenu(KServiceGroup::Ptr& KService::Ptr s(static_cast<KService *>(e)); if (_relPath.isEmpty()) { TQStringList favs = KickerSettings::favorites(); - if (favs.tqfind(s->storageId())!=favs.end()) + if (favs.find(s->storageId())!=favs.end()) continue; } #ifdef KDELIBS_SUSE @@ -1259,7 +1259,7 @@ void KMenu::initialize() if ((*it)[0]=='/') { KDesktopFile df((*it),true); TQString url = df.readURL(); - if (!KURL(url).isLocalFile() || TQFile::exists(url.tqreplace("file://",TQString()))) + if (!KURL(url).isLocalFile() || TQFile::exists(url.replace("file://",TQString()))) m_favoriteView->insertItem(df.readIcon(),df.readName(),df.readGenericName(), url, nId++, index++); } else { @@ -1314,7 +1314,7 @@ void KMenu::insertStaticExitItems() m_exitView->leftView()->insertItem( "exit", i18n( "Shutdown Computer" ), i18n( "Turn off computer" ), "kicker:/shutdown", nId++, index++ ); - m_exitView->leftView()->insertItem( "reload", i18n( "&Restart Computer" ).tqreplace("&",""), + m_exitView->leftView()->insertItem( "reload", i18n( "&Restart Computer" ).replace("&",""), i18n( "Restart and boot the default system" ), "kicker:/restart", nId++, index++ ); @@ -1906,7 +1906,7 @@ bool KMenu::dontQueryNow (const TQString& str) if (str == current_query.get()) return true; int length = str.length (); - int last_whitespace = str.tqfindRev (' ', -1); + int last_whitespace = str.findRev (' ', -1); if (last_whitespace == length-1) return false; // if the user typed a space, search if (last_whitespace >= length-2) @@ -1964,7 +1964,7 @@ void KMenu::createNewProgramList(TQString relPath) } else if(e->isType(KST_KService)) { KService::Ptr s(static_cast<KService *>(e)); if(s->type() == "Application" && !s->noDisplay() ) { - TQString shortStorageId = s->storageId().tqreplace(".desktop",TQString()); + TQString shortStorageId = s->storageId().replace(".desktop",TQString()); TQStringList::Iterator it_find = m_seenPrograms.begin(); TQStringList::Iterator it_end = m_seenPrograms.end(); bool found = false; @@ -1979,7 +1979,7 @@ void KMenu::createNewProgramList(TQString relPath) m_seenProgramsChanged=true; m_seenPrograms+=shortStorageId; m_seenPrograms+=m_tqcurrentDate; - if (m_newInstalledPrograms.tqfind(s->storageId())==m_newInstalledPrograms.end()) + if (m_newInstalledPrograms.find(s->storageId())==m_newInstalledPrograms.end()) m_newInstalledPrograms+=s->storageId(); } else { @@ -1987,7 +1987,7 @@ void KMenu::createNewProgramList(TQString relPath) if (*(it_find)!="-") { TQDate date = TQDate::fromString(*(it_find),Qt::ISODate); if (date.daysTo(TQDate::currentDate())<3) { - if (m_newInstalledPrograms.tqfind(s->storageId())==m_newInstalledPrograms.end()) + if (m_newInstalledPrograms.find(s->storageId())==m_newInstalledPrograms.end()) m_newInstalledPrograms+=s->storageId(); } else { @@ -2033,24 +2033,24 @@ void KMenu::searchProgramList(TQString relPath) int score = 0; if (s->exec()==input) score = 100; - else if (s->exec().tqfind(input)==0) + else if (s->exec().find(input)==0) score = 50; - else if (s->exec().tqfind(input)!=-1) + else if (s->exec().find(input)!=-1) score = 10; else if (s->name().lower()==input) score = 100; else if (s->genericName().lower()==input) score = 100; - else if (s->name().lower().tqfind(input)==0) + else if (s->name().lower().find(input)==0) score = 50; - else if (s->genericName().lower().tqfind(input)==0) + else if (s->genericName().lower().find(input)==0) score = 50; - else if (s->name().lower().tqfind(input)!=-1) + else if (s->name().lower().find(input)!=-1) score = 10; - else if (s->genericName().lower().tqfind(input)!=-1) + else if (s->genericName().lower().find(input)!=-1) score = 10; - if (s->exec().tqfind(' ')==-1) + if (s->exec().find(' ')==-1) score+=1; if (s->substituteUid()) @@ -2082,7 +2082,7 @@ void KMenu::searchProgramList(TQString relPath) insertSearchResult(hit_item); TQString exe = s->exec(); - int pos = exe.tqfind(' '); + int pos = exe.find(' '); if (pos>0) exe=exe.left(pos); m_programsInMenu+=KGlobal::dirs()->findExe(exe); @@ -2329,13 +2329,13 @@ void KMenu::doQuery (bool return_pressed) if (exe.endsWith("/bin/gimp")) { TQStringList::ConstIterator it = m_programsInMenu.begin(); for (; it != m_programsInMenu.end(); ++it) - if ((*it).tqfind("bin/gimp-remote-")!=-1) { + if ((*it).find("bin/gimp-remote-")!=-1) { gimp_hack = true; break; } } #endif - if (m_programsInMenu.tqfind(exe)!=m_programsInMenu.end() + if (m_programsInMenu.find(exe)!=m_programsInMenu.end() #ifdef KDELIBS_SUSE || gimp_hack #endif @@ -2540,7 +2540,7 @@ TQString KMenu::iconForHitMenuItem(HitMenuItem *hit_item) return favicon; } - if (mimetype_iconstore.tqcontains (hit_item->mimetype)) + if (mimetype_iconstore.contains (hit_item->mimetype)) return (mimetype_iconstore [hit_item->mimetype]); else { KMimeType::Ptr mimetype_ptr = KMimeType::mimeType (hit_item->mimetype); @@ -2770,7 +2770,7 @@ void KMenu::slotContextMenuRequested( TQListViewItem * item, const TQPoint & pos i18n("Add to Favorites"), AddToFavorites); TQStringList favs = KickerSettings::favorites(); - if (m_popupService && favs.tqfind(m_popupService->storageId())!=favs.end()) + if (m_popupService && favs.find(m_popupService->storageId())!=favs.end()) m_popupMenu->setItemEnabled(num, false); else { TQStringList::Iterator it; @@ -2779,7 +2779,7 @@ void KMenu::slotContextMenuRequested( TQListViewItem * item, const TQPoint & pos if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().tqreplace("file://",TQString())==m_popupPath.path) + if (df.readURL().replace("file://",TQString())==m_popupPath.path) break; } } @@ -2971,7 +2971,7 @@ void KMenu::slotContextMenu(int selected) case AddToFavorites: if (m_popupService) { - if (favs.tqfind(m_popupService->storageId())==favs.end()) { + if (favs.find(m_popupService->storageId())==favs.end()) { KService::Ptr p = KService::serviceByStorageId(m_popupService->storageId()); m_favoriteView->insertMenuItem(p, serviceMenuEndId()+favs.count()+1); favs+=m_popupService->storageId(); @@ -2982,7 +2982,7 @@ void KMenu::slotContextMenu(int selected) for (it = favs.begin(); it != favs.end(); ++it) { if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().tqreplace("file://",TQString())==m_popupPath.path) + if (df.readURL().replace("file://",TQString())==m_popupPath.path) break; } } @@ -3010,7 +3010,7 @@ void KMenu::slotContextMenu(int selected) case RemoveFromFavorites: if (m_popupService) { - favs.erase(favs.tqfind(m_popupService->storageId())); + favs.erase(favs.find(m_popupService->storageId())); for (TQListViewItemIterator it(m_favoriteView); it.current(); ++it) { KMenuItem* kitem = static_cast<KMenuItem*>(it.current()); @@ -3024,7 +3024,7 @@ void KMenu::slotContextMenu(int selected) for (TQStringList::Iterator it = favs.begin(); it != favs.end(); ++it) { if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().tqreplace("file://",TQString())==m_popupPath.path) { + if (df.readURL().replace("file://",TQString())==m_popupPath.path) { TQFile::remove((*it)); favs.erase(it); break; @@ -3277,7 +3277,7 @@ void KMenu::searchActionClicked(TQListViewItem* item) if( !KURIFilter::self()->filterURI(data, list) ) { KDesktopFile file("searchproviders/google.desktop", true, "services"); - data.setData(file.readEntry("Query").tqreplace("\\{@}", m_kcommand->currentText())); + data.setData(file.readEntry("Query").replace("\\{@}", m_kcommand->currentText())); } (void) new KRun( data.uri(), parentWidget()); @@ -3320,7 +3320,7 @@ void KMenu::updateRecentlyUsedApps(KService::Ptr &service) TQString strItem(service->desktopEntryPath()); // don't add an item from root kmenu level - if (!strItem.tqcontains('/')) + if (!strItem.contains('/')) { return; } @@ -3377,7 +3377,7 @@ void KMenu::slotFavoritesMoved( TQListViewItem* item, TQListViewItem* /*afterFir // remove at old position if (kitem->service()) { - favs.erase(favs.tqfind(kitem->service()->storageId())); + favs.erase(favs.find(kitem->service()->storageId())); addFav = kitem->service()->storageId(); } else @@ -3387,7 +3387,7 @@ void KMenu::slotFavoritesMoved( TQListViewItem* item, TQListViewItem* /*afterFir if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().tqreplace("file://",TQString())==kitem->path()) + if (df.readURL().replace("file://",TQString())==kitem->path()) { addFav = *it; favs.erase(it); @@ -3412,7 +3412,7 @@ void KMenu::slotFavoritesMoved( TQListViewItem* item, TQListViewItem* /*afterFir if ((*it)[0]=='/' && !kafterNow->service()) { KDesktopFile df((*it),true); - if (df.readURL().tqreplace("file://",TQString())==kafterNow->path()) + if (df.readURL().replace("file://",TQString())==kafterNow->path()) { kdDebug() << "insert after " << kafterNow->path() << endl; favs.insert(++it,addFav); @@ -3549,7 +3549,7 @@ void KMenu::slotFavDropped(TQDropEvent * ev, TQListViewItem *after ) if (item.m_s) { - if (favs.tqfind(item.m_s->storageId())==favs.end()) + if (favs.find(item.m_s->storageId())==favs.end()) { newItem = m_favoriteView->insertMenuItem(item.m_s, serviceMenuEndId()+favs.count()+1); favs += item.m_s->storageId(); @@ -3569,7 +3569,7 @@ void KMenu::slotFavDropped(TQDropEvent * ev, TQListViewItem *after ) if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().tqreplace("file://",TQString())==uri) + if (df.readURL().replace("file://",TQString())==uri) break; } } @@ -3597,8 +3597,8 @@ void KMenu::slotFavDropped(TQDropEvent * ev, TQListViewItem *after ) if (text.endsWith(".desktop")) { - KService::Ptr p = KService::serviceByDesktopPath(text.tqreplace("file://",TQString())); - if (p && favs.tqfind(p->storageId())==favs.end()) { + KService::Ptr p = KService::serviceByDesktopPath(text.replace("file://",TQString())); + if (p && favs.find(p->storageId())==favs.end()) { newItem = m_favoriteView->insertMenuItem(p, serviceMenuEndId()+favs.count()+1); favs+=p->storageId(); } @@ -3611,7 +3611,7 @@ void KMenu::slotFavDropped(TQDropEvent * ev, TQListViewItem *after ) if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().tqreplace("file://",TQString())==text) + if (df.readURL().replace("file://",TQString())==text) break; } } diff --git a/kicker/kicker/ui/kickoff_bar.cpp b/kicker/kicker/ui/kickoff_bar.cpp index 6be19459c..6a41a719b 100644 --- a/kicker/kicker/ui/kickoff_bar.cpp +++ b/kicker/kicker/ui/kickoff_bar.cpp @@ -56,7 +56,7 @@ void KickoffTabBar::paint(TQPainter* p, TQTab* t, bool selected) const // else if(t == d->pressed) // flags |= TQStyle::Style_Sunken; //selection flags - if(t->rect().tqcontains(mapFromGlobal(TQCursor::pos()))) + if(t->rect().contains(mapFromGlobal(TQCursor::pos()))) flags |= TQStyle::Style_MouseOver; tqstyle().tqdrawControl( TQStyle::CE_TabBarTab, p, this, t->rect(), tqcolorGroup(), flags, TQStyleOption(t) ); @@ -114,7 +114,7 @@ void KickoffTabBar::paintLabel(TQPainter* p, const TQRect& br, TQTab* t, bool ha flags |= TQStyle::Style_Selected; // else if(t == d->pressed) // flags |= TQStyle::Style_Sunken; - if(t->rect().tqcontains(mapFromGlobal(TQCursor::pos()))) + if(t->rect().contains(mapFromGlobal(TQCursor::pos()))) flags |= TQStyle::Style_MouseOver; tqstyle().tqdrawControl( TQStyle::CE_TabBarLabel, p, this, rt, t->isEnabled() ? tqcolorGroup(): tqpalette().disabled(), diff --git a/kicker/kicker/ui/query.cpp b/kicker/kicker/ui/query.cpp index 0bcff59c1..12b9b6910 100644 --- a/kicker/kicker/ui/query.cpp +++ b/kicker/kicker/ui/query.cpp @@ -111,7 +111,7 @@ bool Query::matches(const TQString &term) bool next_alternative = false; for ( TQStringList::ConstIterator it = alt->excludes.begin(); it != alt->excludes.end(); ++it ) { - if ( lower_term.tqfind(*it)!=-1 ) { + if ( lower_term.find(*it)!=-1 ) { next_alternative = true; continue; } @@ -120,7 +120,7 @@ bool Query::matches(const TQString &term) continue; for ( TQStringList::ConstIterator it = alt->includes.begin(); it != alt->includes.end(); ++it ) { - if ( lower_term.tqfind(*it)==-1 ) { + if ( lower_term.find(*it)==-1 ) { next_alternative = true; continue; } diff --git a/kicker/kicker/ui/removeapplet_mnu.cpp b/kicker/kicker/ui/removeapplet_mnu.cpp index 295651523..8dfaa00d2 100644 --- a/kicker/kicker/ui/removeapplet_mnu.cpp +++ b/kicker/kicker/ui/removeapplet_mnu.cpp @@ -63,7 +63,7 @@ void PanelRemoveAppletMenu::slotAboutToShow() } items.append(PanelMenuItemInfo(container->icon(), - container->visibleName().tqreplace("&", "&&"), + container->visibleName().replace("&", "&&"), id)); ++id; ++it; diff --git a/kicker/kicker/ui/removeextension_mnu.cpp b/kicker/kicker/ui/removeextension_mnu.cpp index c28ae1162..9a1655bae 100644 --- a/kicker/kicker/ui/removeextension_mnu.cpp +++ b/kicker/kicker/ui/removeextension_mnu.cpp @@ -57,7 +57,7 @@ void PanelRemoveExtensionMenu::slotAboutToShow() for (ExtensionList::iterator it = m_containers.begin(); it != itEnd; ++it) { const AppletInfo info = (*it)->info(); - TQString name = info.name().tqreplace("&", "&&"); + TQString name = info.name().replace("&", "&&"); switch ((*it)->position()) { case KPanelExtension::Top: diff --git a/kicker/kicker/ui/service_mnu.cpp b/kicker/kicker/ui/service_mnu.cpp index 9c4d09929..ee0414644 100644 --- a/kicker/kicker/ui/service_mnu.cpp +++ b/kicker/kicker/ui/service_mnu.cpp @@ -231,7 +231,7 @@ void PanelServiceMenu::fillMenu(KServiceGroup::Ptr& _root, TQString inlineHeaderName = g->showInlineHeader() ? groupCaption : ""; // Item names may contain ampersands. To avoid them being converted // to accelerators, replace them with two ampersands. - groupCaption.tqreplace("&", "&&"); + groupCaption.replace("&", "&&"); if ( nbChildCount == 1 && g->allowInline() && g->inlineAlias()) { @@ -411,10 +411,10 @@ void PanelServiceMenu::insertMenuItem(KService::Ptr & s, int nId, if (KickerSettings::menuEntryFormat() == KickerSettings::NameAndDescription) { if ((!suppressGenericNames || - !suppressGenericNames->tqcontains(s->untranslatedGenericName())) && - serviceName.tqfind(comment, 0, true) == -1) + !suppressGenericNames->contains(s->untranslatedGenericName())) && + serviceName.find(comment, 0, true) == -1) { - if (comment.tqfind(serviceName, 0, true) == -1) + if (comment.find(serviceName, 0, true) == -1) { serviceName = i18n("Entries in K-menu: %1 app name, %2 description", "%1 - %2").arg(serviceName, comment); } @@ -450,7 +450,7 @@ void PanelServiceMenu::insertMenuItem(KService::Ptr & s, int nId, // item names may contain ampersands. To avoid them being converted // to accelerators, replace them with two ampersands. - serviceName.tqreplace("&", "&&"); + serviceName.replace("&", "&&"); TQString icon = s->icon(); if (icon=="unknown") @@ -544,7 +544,7 @@ bool PanelServiceMenu::highlightMenuItem( const TQString &menuItemId ) void PanelServiceMenu::slotExec(int id) { - if (!entryMap_.tqcontains(id)) + if (!entryMap_.contains(id)) { return; } @@ -578,7 +578,7 @@ void PanelServiceMenu::mouseReleaseEvent(TQMouseEvent * ev) return; } - if (!entryMap_.tqcontains(id)) + if (!entryMap_.contains(id)) { kdDebug(1210) << "Cannot find service with menu id " << id << endl; return; @@ -769,7 +769,7 @@ void PanelServiceMenu::mouseMoveEvent(TQMouseEvent * ev) if (id < serviceMenuStartId()) return; - if (!entryMap_.tqcontains(id)) { + if (!entryMap_.contains(id)) { kdDebug(1210) << "Cannot find service with menu id " << id << endl; return; } @@ -838,7 +838,7 @@ void PanelServiceMenu::dragEnterEvent(TQDragEnterEvent *event) void PanelServiceMenu::dragLeaveEvent(TQDragLeaveEvent *) { // see PanelServiceMenu::dragEnterEvent why this is nescessary - if (!TQT_TQRECT_OBJECT(frameGeometry()).tqcontains(TQCursor::pos())) + if (!TQT_TQRECT_OBJECT(frameGeometry()).contains(TQCursor::pos())) { KURLDrag::setTarget(0); } @@ -932,12 +932,12 @@ void PanelServiceMenu::setSearchString(const TQString &searchString) int id = *menuItemIt; KService* s = dynamic_cast< KService* >( static_cast< KSycocaEntry* >( entryMap_[ id ])); TQString menuText = text(id); - if (menuText.tqcontains(searchString, false) > 0 - || ( s != NULL && ( s->name().tqcontains(searchString, false) > 0 - || s->exec().tqcontains(searchString, false) > 0 - || s->comment().tqcontains(searchString, false) > 0 - || s->genericName().tqcontains(searchString, false) > 0 - || s->exec().tqcontains(searchString, false) > 0 ) + if (menuText.contains(searchString, false) > 0 + || ( s != NULL && ( s->name().contains(searchString, false) > 0 + || s->exec().contains(searchString, false) > 0 + || s->comment().contains(searchString, false) > 0 + || s->genericName().contains(searchString, false) > 0 + || s->exec().contains(searchString, false) > 0 ) )) { setItemEnabled(id, true); foundSomething = true; @@ -951,7 +951,7 @@ void PanelServiceMenu::setSearchString(const TQString &searchString) /*for (int i=count()-1; i>=0; --i) { int id = idAt(i); TQString menuText = text(id); - if (menuText.tqcontains(searchString, false) > 0) { + if (menuText.contains(searchString, false) > 0) { setItemEnabled(id, true); foundSomething = true; nonemptyMenus.insert(id); @@ -995,7 +995,7 @@ void PanelServiceMenu::updateRecentlyUsedApps(KService::Ptr &service) TQString strItem(service->desktopEntryPath()); // don't add an item from root kmenu level - if (!strItem.tqcontains('/')) + if (!strItem.contains('/')) { return; } |