diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 4c6f8d69e2d1501837affb472c4eb8fec4462240 (patch) | |
tree | 766a8ad7939fcf3eec534184c36bd0e0f80489e2 | |
parent | 469cc56a805bd3d6940d54adbef554877c29853c (diff) | |
download | tdepim-4c6f8d69e2d1501837affb472c4eb8fec4462240.tar.gz tdepim-4c6f8d69e2d1501837affb472c4eb8fec4462240.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
627 files changed, 2958 insertions, 2958 deletions
diff --git a/NewsLog.txt b/NewsLog.txt index 7a71dd3a..e0a0e81d 100644 --- a/NewsLog.txt +++ b/NewsLog.txt @@ -593,7 +593,7 @@ Friday, October 2th 2009 Problems addressed ------------------ -* kolab/issue3783: SMIME encrypted and signed mail: Audit log dialog tqcontains ???? at the bottom +* kolab/issue3783: SMIME encrypted and signed mail: Audit log dialog contains ???? at the bottom * kolab/issue3823: mimetreeviewer doesn't show structure of forward-as-attachment message #n where #n > 1 * kolab/issue3889: Kontact crahes if opening/changing calendar view (rt#5868) * kolab/issue3867: Save S/MIME encrypted mails unencrypted after reading them diff --git a/README.Kolab b/README.Kolab index 455e5448..46fc111b 100644 --- a/README.Kolab +++ b/README.Kolab @@ -39,7 +39,7 @@ KAddressBook: The scheme for the base DN is to take the parts of the fully qualified hostname of the kolab server and put ",dc=" between the parts and "dc=" in front of it. Or in Qt code: - baseDN = "dc=" + hostname.tqreplace( '.', ",dc=" ); + baseDN = "dc=" + hostname.replace( '.', ",dc=" ); Finally check the checkbox to activate the LDAP server. Now you can search the Kolab LDAP server and get all users on the system. diff --git a/akregator/COPYING b/akregator/COPYING index 2ad70b8b..c13faf0d 100644 --- a/akregator/COPYING +++ b/akregator/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which tqcontains + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following: The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source -code means all the source code for all modules it tqcontains, plus any +code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/akregator/src/actionmanagerimpl.cpp b/akregator/src/actionmanagerimpl.cpp index 09a9b3cd..b8c94669 100644 --- a/akregator/src/actionmanagerimpl.cpp +++ b/akregator/src/actionmanagerimpl.cpp @@ -148,7 +148,7 @@ void ActionManagerImpl::slotUpdateTagActions(bool enabled, const TQStringList& t for (TQValueList<TagAction*>::ConstIterator it = actions.begin(); it != actions.end(); ++it) { - (*it)->setChecked(tagIds.tqcontains((*it)->tag().id())); + (*it)->setChecked(tagIds.contains((*it)->tag().id())); } } } @@ -197,7 +197,7 @@ void ActionManagerImpl::slotTagAdded(const Tag& tag) if (!Settings::showTaggingGUI()) return; - if (!d->tagActions.tqcontains(tag.id())) + if (!d->tagActions.contains(tag.id())) { d->tagActions[tag.id()] = new TagAction(tag, TQT_TQOBJECT(d->view), TQT_SLOT(slotAssignTag(const Tag&, bool)), d->tagMenu); d->tagMenu->insert(d->tagActions[tag.id()]); diff --git a/akregator/src/addfeeddialog.cpp b/akregator/src/addfeeddialog.cpp index 8c5f4d4b..591e0d61 100644 --- a/akregator/src/addfeeddialog.cpp +++ b/akregator/src/addfeeddialog.cpp @@ -79,7 +79,7 @@ void AddFeedDialog::slotOk( ) if (feedURL.startsWith("feed:")) feedURL = feedURL.right( feedURL.length() - 5 ); - if (feedURL.tqfind(":/") == -1) + if (feedURL.find(":/") == -1) feedURL.prepend("http://"); f->setXmlUrl(feedURL); diff --git a/akregator/src/akregator_part.cpp b/akregator/src/akregator_part.cpp index 1cfd42b1..bd9f77cf 100644 --- a/akregator/src/akregator_part.cpp +++ b/akregator/src/akregator_part.cpp @@ -522,7 +522,7 @@ bool Part::mergePart(KParts::Part* part) { if (m_mergedPart) { factory()->removeClient(m_mergedPart); - if (childClients()->tqcontainsRef(m_mergedPart)) + if (childClients()->containsRef(m_mergedPart)) removeChildClient(m_mergedPart); } if (part) diff --git a/akregator/src/akregator_view.cpp b/akregator/src/akregator_view.cpp index c110d305..c92e4ec2 100644 --- a/akregator/src/akregator_view.cpp +++ b/akregator/src/akregator_view.cpp @@ -411,10 +411,10 @@ void View::slotOnShutdown() void View::saveSettings() { const TQValueList<int> spl1 = m_horizontalSplitter->sizes(); - if ( spl1.tqcontains( 0 ) == 0 ) + if ( spl1.contains( 0 ) == 0 ) Settings::setSplitter1Sizes( spl1 ); const TQValueList<int> spl2 = m_articleSplitter->sizes(); - if ( spl2.tqcontains( 0 ) == 0 ) + if ( spl2.contains( 0 ) == 0 ) Settings::setSplitter2Sizes( spl2 ); Settings::setViewMode( m_viewMode ); Settings::writeConfig(); @@ -1329,7 +1329,7 @@ void View::slotArticleDelete() for (TQValueList<Article>::Iterator it = articles.begin(); it != articles.end(); ++it) { Feed* feed = (*it).feed(); - if (!feeds.tqcontains(feed)) + if (!feeds.contains(feed)) feeds.append(feed); feed->setNotificationMode(false); (*it).setDeleted(); @@ -1529,7 +1529,7 @@ void View::updateTagActions() TQStringList atags = (*it).tags(); for (TQStringList::ConstIterator it2 = atags.begin(); it2 != atags.end(); ++it2) { - if (!tags.tqcontains(*it2)) + if (!tags.contains(*it2)) tags += *it2; } } diff --git a/akregator/src/article.cpp b/akregator/src/article.cpp index c0151af3..3b7f321a 100644 --- a/akregator/src/article.cpp +++ b/akregator/src/article.cpp @@ -102,7 +102,7 @@ void Article::initialize(RSS::Article article, Backend::FeedStorage* archive) d->guid = article.guid(); - if (!d->archive->tqcontains(d->guid)) + if (!d->archive->contains(d->guid)) { d->archive->addEntry(d->guid); @@ -425,7 +425,7 @@ void Article::removeTag(const TQString& tag) bool Article::hasTag(const TQString& tag) const { - return d->archive->tags(d->guid).tqcontains(tag); + return d->archive->tags(d->guid).contains(tag); } TQStringList Article::tags() const @@ -453,7 +453,7 @@ TQString Article::buildTitle(const TQString& description) if (description.stripWhiteSpace().isEmpty()) return ""; - int i = s.tqfind('>',500); /*avoid processing too much */ + int i = s.find('>',500); /*avoid processing too much */ if (i != -1) s = s.left(i+1); TQRegExp rx("(<([^\\s>]*)(?:[^>]*)>)[^<]*", false); @@ -470,7 +470,7 @@ TQString Article::buildTitle(const TQString& description) } else toReplace=rx.cap(1); // strip just tag - s=s.tqreplace(s.tqfind(toReplace),toReplace.length(),replaceWith); // do the deed + s=s.replace(s.find(toReplace),toReplace.length(),replaceWith); // do the deed } if (s.length()> 90) s=s.left(90)+"..."; diff --git a/akregator/src/articlefilter.cpp b/akregator/src/articlefilter.cpp index e8e36f07..715ede19 100644 --- a/akregator/src/articlefilter.cpp +++ b/akregator/src/articlefilter.cpp @@ -179,7 +179,7 @@ bool Criterion::satisfiedBy( const Article &article ) const switch ( predicateType ) { case Contains: - satisfied = concreteSubject.toString().tqfind( m_object.toString(), 0, false ) != -1; + satisfied = concreteSubject.toString().find( m_object.toString(), 0, false ) != -1; break; case Equals: if (subjectType=="int") diff --git a/akregator/src/articlelistview.cpp b/akregator/src/articlelistview.cpp index 68e41730..ecf26228 100644 --- a/akregator/src/articlelistview.cpp +++ b/akregator/src/articlelistview.cpp @@ -354,7 +354,7 @@ void ArticleListView::slotArticlesAdded(TreeNode* /*node*/, const TQValueList<Ar for (TQValueList<Article>::ConstIterator it = list.begin(); it != list.end(); ++it) { - if (!d->articleMap.tqcontains(*it)) + if (!d->articleMap.contains(*it)) { if (!(*it).isNull() && !(*it).isDeleted()) { @@ -385,7 +385,7 @@ void ArticleListView::slotArticlesUpdated(TreeNode* /*node*/, const TQValueList< for (TQValueList<Article>::ConstIterator it = list.begin(); it != list.end(); ++it) { - if (!(*it).isNull() && d->articleMap.tqcontains(*it)) + if (!(*it).isNull() && d->articleMap.contains(*it)) { ArticleItem* ali = d->articleMap[*it]; @@ -447,7 +447,7 @@ void ArticleListView::slotArticlesRemoved(TreeNode* /*node*/, const TQValueList< for (TQValueList<Article>::ConstIterator it = list.begin(); it != list.end(); ++it) { - if (d->articleMap.tqcontains(*it)) + if (d->articleMap.contains(*it)) { ArticleItem* ali = d->articleMap[*it]; d->articleMap.remove(*it); diff --git a/akregator/src/articleviewer.cpp b/akregator/src/articleviewer.cpp index a6ab467d..977abc99 100644 --- a/akregator/src/articleviewer.cpp +++ b/akregator/src/articleviewer.cpp @@ -87,7 +87,7 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor { text += TQString("<div class=\"body\">"); TQString url=node->xmlUrl(); - TQString file = url.tqreplace("/", "_").tqreplace(":", "_"); + TQString file = url.replace("/", "_").replace(":", "_"); KURL u(m_view->m_imageDir); u.setFileName(file); text += TQString("<a href=\"%1\"><img class=\"headimage\" src=\"%2.png\"></a>\n").tqarg(node->htmlUrl()).tqarg(u.url()); @@ -410,7 +410,7 @@ TQString ArticleViewer::formatArticleNormalMode(Feed* feed, const Article& artic text += TQString("<div class=\"headertitle\" dir=\"%1\">\n").tqarg(directionOf(Utils::stripTags(article.title()))); if (article.link().isValid()) text += "<a href=\""+article.link().url()+"\">"; - text += article.title().tqreplace("<", "<").tqreplace(">", ">"); // TODO: better leave things escaped in the parser + text += article.title().replace("<", "<").replace(">", ">"); // TODO: better leave things escaped in the parser if (article.link().isValid()) text += "</a>"; text += "</div>\n"; @@ -505,7 +505,7 @@ TQString ArticleViewer::formatArticleCombinedMode(Feed* feed, const Article& art text += TQString("<div class=\"headertitle\" dir=\"%1\">\n").tqarg(directionOf(Utils::stripTags(article.title()))); if (link.isValid()) text += "<a href=\""+link.url()+"\">"; - text += article.title().tqreplace("<", "<").tqreplace(">", ">"); // TODO: better leave things escaped in the parser + text += article.title().replace("<", "<").replace(">", ">"); // TODO: better leave things escaped in the parser if (link.isValid()) text += "</a>"; text += "</div>\n"; diff --git a/akregator/src/articleviewer.rc b/akregator/src/articleviewer.rc index a74bdf5c..5b61457b 100644 --- a/akregator/src/articleviewer.rc +++ b/akregator/src/articleviewer.rc @@ -11,7 +11,7 @@ <Action name="viewer_copy"/> <Action name="selectAll"/> <Separator/> - <Action name="tqfind"/> + <Action name="find"/> <Action name="findNext"/> </Menu> <Menu noMerge="1" name="view"> diff --git a/akregator/src/feed.cpp b/akregator/src/feed.cpp index 8e0c4c90..2188b384 100644 --- a/akregator/src/feed.cpp +++ b/akregator/src/feed.cpp @@ -87,7 +87,7 @@ class Feed::FeedPrivate /** caches guids of tagged articles. key: tag, value: list of guids */ TQMap<TQString, TQStringList> taggedArticles; - /** list of deleted articles. This tqcontains **/ + /** list of deleted articles. This contains **/ TQValueList<Article> deletedArticles; /** caches guids of deleted articles for notification */ @@ -450,7 +450,7 @@ void Feed::appendArticles(const RSS::Document &doc) for (it = d_articles.begin(); it != en; ++it) { - if ( !d->articles.tqcontains((*it).guid()) ) // article not in list + if ( !d->articles.contains((*it).guid()) ) // article not in list { Article mya(*it, this); mya.offsetPubDate(nudge); @@ -535,7 +535,7 @@ void Feed::appendArticle(const Article& a) { if ( (a.keep() && Settings::doNotExpireImportantArticles()) || ( !usesExpiryByAge() || !isExpired(a) ) ) // if not expired { - if (!d->articles.tqcontains(a.guid())) + if (!d->articles.contains(a.guid())) { d->articles[a.guid()] = a; if (!a.isDeleted() && a.status() != Article::Read) @@ -726,10 +726,10 @@ void Feed::setUnread(int unread) void Feed::setArticleDeleted(Article& a) { - if (!d->deletedArticles.tqcontains(a)) + if (!d->deletedArticles.contains(a)) d->deletedArticles.append(a); - if (!d->removedArticlesNotify.tqcontains(a)) + if (!d->removedArticlesNotify.contains(a)) d->removedArticlesNotify.append(a); articlesModified(); diff --git a/akregator/src/feediconmanager.cpp b/akregator/src/feediconmanager.cpp index adc3fce4..ba75561e 100644 --- a/akregator/src/feediconmanager.cpp +++ b/akregator/src/feediconmanager.cpp @@ -59,7 +59,7 @@ FeedIconManager* FeedIconManager::self() void FeedIconManager::fetchIcon(Feed* feed) { - if (!d->registeredFeeds.tqcontains(feed)) + if (!d->registeredFeeds.contains(feed)) { d->registeredFeeds.append(feed); connect(feed, TQT_SIGNAL(signalDestroyed(TreeNode*)), this, TQT_SLOT(slotFeedDestroyed(TreeNode*))); @@ -133,8 +133,8 @@ void FeedIconManager::slotFeedDestroyed(TreeNode* node) { Feed* feed = dynamic_cast<Feed*>(node); if (feed) - while (d->registeredFeeds.tqcontains(feed)) - d->registeredFeeds.remove(d->registeredFeeds.tqfind(feed)); + while (d->registeredFeeds.contains(feed)) + d->registeredFeeds.remove(d->registeredFeeds.find(feed)); } void FeedIconManager::slotIconChanged(bool /*isHost*/, const TQString& hostOrURL, @@ -147,7 +147,7 @@ void FeedIconManager::slotIconChanged(bool /*isHost*/, const TQString& hostOrURL if (!p.isNull()) // we don't set null pixmaps, as feed checks pixmap.isNull() to find out whether the icon was already loaded or not. It would request the icon another time, resulting an infinite loop (until stack overflow that is { while (( f = d->urlDict.take(hostOrURL) )) - if (d->registeredFeeds.tqcontains(f)) + if (d->registeredFeeds.contains(f)) f->setFavicon(p); } emit signalIconChanged(hostOrURL, iconFile); diff --git a/akregator/src/feedlist.cpp b/akregator/src/feedlist.cpp index 50496d8b..72db0911 100644 --- a/akregator/src/feedlist.cpp +++ b/akregator/src/feedlist.cpp @@ -117,7 +117,7 @@ void FeedList::parseChildNodes(TQDomNode &node, Folder* tqparent) Feed* feed = Feed::fromOPML(e); if (feed) { - if (!d->urlMap[feed->xmlUrl()].tqcontains(feed)) + if (!d->urlMap[feed->xmlUrl()].contains(feed)) d->urlMap[feed->xmlUrl()].append(feed); tqparent->appendChild(feed); } @@ -219,7 +219,7 @@ void FeedList::append(FeedList* list, Folder* tqparent, TreeNode* after) if ( list == this ) return; - if ( !flatList()->tqcontains(tqparent) ) + if ( !flatList()->contains(tqparent) ) tqparent = rootNode(); TQValueList<TreeNode*> tqchildren = list->rootNode()->tqchildren(); diff --git a/akregator/src/feedlistview.cpp b/akregator/src/feedlistview.cpp index a891445f..fa33b89d 100644 --- a/akregator/src/feedlistview.cpp +++ b/akregator/src/feedlistview.cpp @@ -457,12 +457,12 @@ TreeNode* NodeListView::findNodeByTitle(const TQString& title) TreeNodeItem* NodeListView::findNodeItem(TreeNode* node) { - return d->itemDict.tqfind(node); + return d->itemDict.find(node); } TreeNodeItem* NodeListView::findItemByTitle(const TQString& text, int column, ComparisonFlags compare) const { - return dynamic_cast<TreeNodeItem*> (KListView::tqfindItem(text, column, compare)); + return dynamic_cast<TreeNodeItem*> (KListView::findItem(text, column, compare)); } void NodeListView::ensureNodeVisible(TreeNode* node) diff --git a/akregator/src/feedstorage.h b/akregator/src/feedstorage.h index c0685695..32e6c058 100644 --- a/akregator/src/feedstorage.h +++ b/akregator/src/feedstorage.h @@ -92,7 +92,7 @@ class AKREGATOR_EXPORT FeedStorage : public TQObject virtual void clear() = 0; - virtual bool tqcontains(const TQString& guid) = 0; + virtual bool contains(const TQString& guid) = 0; virtual void addEntry(const TQString& guid) = 0; virtual void deleteArticle(const TQString& guid) = 0; virtual int comments(const TQString& guid) = 0; diff --git a/akregator/src/feedstoragedummyimpl.cpp b/akregator/src/feedstoragedummyimpl.cpp index 9d7b8e12..5ae572a8 100644 --- a/akregator/src/feedstoragedummyimpl.cpp +++ b/akregator/src/feedstoragedummyimpl.cpp @@ -147,21 +147,21 @@ TQStringList FeedStorageDummyImpl::articles(const Category& cat) void FeedStorageDummyImpl::addEntry(const TQString& guid) { - if (!d->entries.tqcontains(guid)) + if (!d->entries.contains(guid)) { d->entries[guid] = FeedStorageDummyImplPrivate::Entry(); setTotalCount(totalCount()+1); } } -bool FeedStorageDummyImpl::tqcontains(const TQString& guid) +bool FeedStorageDummyImpl::contains(const TQString& guid) { - return d->entries.tqcontains(guid); + return d->entries.contains(guid); } void FeedStorageDummyImpl::deleteArticle(const TQString& guid) { - if (!d->entries.tqcontains(guid)) + if (!d->entries.contains(guid)) return; setDeleted(guid); @@ -172,33 +172,33 @@ void FeedStorageDummyImpl::deleteArticle(const TQString& guid) int FeedStorageDummyImpl::comments(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].comments : 0; + return contains(guid) ? d->entries[guid].comments : 0; } TQString FeedStorageDummyImpl::commentsLink(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].commentsLink : ""; + return contains(guid) ? d->entries[guid].commentsLink : ""; } bool FeedStorageDummyImpl::guidIsHash(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].guidIsHash : false; + return contains(guid) ? d->entries[guid].guidIsHash : false; } bool FeedStorageDummyImpl::guidIsPermaLink(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].guidIsPermaLink : false; + return contains(guid) ? d->entries[guid].guidIsPermaLink : false; } uint FeedStorageDummyImpl::hash(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].hash : 0; + return contains(guid) ? d->entries[guid].hash : 0; } void FeedStorageDummyImpl::setDeleted(const TQString& guid) { - if (!tqcontains(guid)) + if (!contains(guid)) return; FeedStorageDummyImplPrivate::Entry entry = d->entries[guid]; @@ -233,99 +233,99 @@ void FeedStorageDummyImpl::setDeleted(const TQString& guid) TQString FeedStorageDummyImpl::link(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].link : ""; + return contains(guid) ? d->entries[guid].link : ""; } uint FeedStorageDummyImpl::pubDate(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].pubDate : 0; + return contains(guid) ? d->entries[guid].pubDate : 0; } int FeedStorageDummyImpl::status(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].status : 0; + return contains(guid) ? d->entries[guid].status : 0; } void FeedStorageDummyImpl::setqStatus(const TQString& guid, int status) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].status = status; } TQString FeedStorageDummyImpl::title(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].title : ""; + return contains(guid) ? d->entries[guid].title : ""; } TQString FeedStorageDummyImpl::description(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].description : ""; + return contains(guid) ? d->entries[guid].description : ""; } void FeedStorageDummyImpl::setPubDate(const TQString& guid, uint pubdate) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].pubDate = pubdate; } void FeedStorageDummyImpl::setGuidIsHash(const TQString& guid, bool isHash) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].guidIsHash = isHash; } void FeedStorageDummyImpl::setLink(const TQString& guid, const TQString& link) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].link = link; } void FeedStorageDummyImpl::setHash(const TQString& guid, uint hash) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].hash = hash; } void FeedStorageDummyImpl::setTitle(const TQString& guid, const TQString& title) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].title = title; } void FeedStorageDummyImpl::setDescription(const TQString& guid, const TQString& description) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].description = description; } void FeedStorageDummyImpl::setCommentsLink(const TQString& guid, const TQString& commentsLink) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].commentsLink = commentsLink; } void FeedStorageDummyImpl::setComments(const TQString& guid, int comments) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].comments = comments; } void FeedStorageDummyImpl::setGuidIsPermaLink(const TQString& guid, bool isPermaLink) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].guidIsPermaLink = isPermaLink; } void FeedStorageDummyImpl::addTag(const TQString& guid, const TQString& tag) { - if (tqcontains(guid)) + if (contains(guid)) { d->entries[guid].tags.append(tag); - if (!d->taggedArticles[tag].tqcontains(guid)) + if (!d->taggedArticles[tag].contains(guid)) d->taggedArticles[tag].append(guid); - if (!d->tags.tqcontains(tag)) + if (!d->tags.contains(tag)) d->tags.append(tag); } @@ -333,7 +333,7 @@ void FeedStorageDummyImpl::addTag(const TQString& guid, const TQString& tag) void FeedStorageDummyImpl::addCategory(const TQString& guid, const Category& cat) { - if (!tqcontains(guid)) + if (!contains(guid)) return; d->entries[guid].categories.append(cat); @@ -345,19 +345,19 @@ void FeedStorageDummyImpl::addCategory(const TQString& guid, const Category& cat void FeedStorageDummyImpl::setAuthor(const TQString& guid, const TQString& author) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].author = author; } TQString FeedStorageDummyImpl::author(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].author : TQString(); + return contains(guid) ? d->entries[guid].author : TQString(); } TQValueList<Category> FeedStorageDummyImpl::categories(const TQString& guid) { if (!guid.isNull()) - return tqcontains(guid) ? d->entries[guid].categories : TQValueList<Category>(); + return contains(guid) ? d->entries[guid].categories : TQValueList<Category>(); else return d->categories; } @@ -365,7 +365,7 @@ TQValueList<Category> FeedStorageDummyImpl::categories(const TQString& guid) void FeedStorageDummyImpl::removeTag(const TQString& guid, const TQString& tag) { - if (tqcontains(guid)) + if (contains(guid)) { d->entries[guid].tags.remove(tag); d->taggedArticles[tag].remove(guid); @@ -377,7 +377,7 @@ void FeedStorageDummyImpl::removeTag(const TQString& guid, const TQString& tag) TQStringList FeedStorageDummyImpl::tags(const TQString& guid) { if (!guid.isNull()) - return tqcontains(guid) ? d->entries[guid].tags : TQStringList(); + return contains(guid) ? d->entries[guid].tags : TQStringList(); else { return d->tags; @@ -396,7 +396,7 @@ void FeedStorageDummyImpl::add(FeedStorage* source) void FeedStorageDummyImpl::copyArticle(const TQString& guid, FeedStorage* source) { - if (!tqcontains(guid)) + if (!contains(guid)) addEntry(guid); setComments(guid, source->comments(guid)); @@ -424,7 +424,7 @@ void FeedStorageDummyImpl::clear() void FeedStorageDummyImpl::setEnclosure(const TQString& guid, const TQString& url, const TQString& type, int length) { - if (tqcontains(guid)) + if (contains(guid)) { FeedStorageDummyImplPrivate::Entry entry = d->entries[guid]; entry.hasEnclosure = true; @@ -436,7 +436,7 @@ void FeedStorageDummyImpl::setEnclosure(const TQString& guid, const TQString& ur void FeedStorageDummyImpl::removeEnclosure(const TQString& guid) { - if (tqcontains(guid)) + if (contains(guid)) { FeedStorageDummyImplPrivate::Entry entry = d->entries[guid]; entry.hasEnclosure = false; @@ -448,7 +448,7 @@ void FeedStorageDummyImpl::removeEnclosure(const TQString& guid) void FeedStorageDummyImpl::enclosure(const TQString& guid, bool& hasEnclosure, TQString& url, TQString& type, int& length) { - if (tqcontains(guid)) + if (contains(guid)) { FeedStorageDummyImplPrivate::Entry entry = d->entries[guid]; hasEnclosure = entry.hasEnclosure; diff --git a/akregator/src/feedstoragedummyimpl.h b/akregator/src/feedstoragedummyimpl.h index 4ba4a460..bd71a11c 100644 --- a/akregator/src/feedstoragedummyimpl.h +++ b/akregator/src/feedstoragedummyimpl.h @@ -50,7 +50,7 @@ class FeedStorageDummyImpl : public FeedStorage virtual TQStringList articles(const Category& cat); - virtual bool tqcontains(const TQString& guid); + virtual bool contains(const TQString& guid); virtual void addEntry(const TQString& guid); virtual void deleteArticle(const TQString& guid); virtual int comments(const TQString& guid); diff --git a/akregator/src/fetchqueue.cpp b/akregator/src/fetchqueue.cpp index d171d25e..c00abe2e 100644 --- a/akregator/src/fetchqueue.cpp +++ b/akregator/src/fetchqueue.cpp @@ -72,7 +72,7 @@ void FetchQueue::slotAbort() void FetchQueue::addFeed(Feed *f) { - if (!d->queuedFeeds.tqcontains(f) && !d->fetchingFeeds.tqcontains(f)) + if (!d->queuedFeeds.contains(f) && !d->fetchingFeeds.contains(f)) { connectToFeed(f); d->queuedFeeds.append(f); diff --git a/akregator/src/folder.cpp b/akregator/src/folder.cpp index d55c75ae..2a0f2776 100644 --- a/akregator/src/folder.cpp +++ b/akregator/src/folder.cpp @@ -99,7 +99,7 @@ TQStringList Folder::tags() const // intersect tag sets instead of appending lists, to avoid dupes. This sucks. Definitely. I want TQSet. Now. TQStringList t2 = (*it)->tags(); for (TQStringList::ConstIterator it2 = t2.begin(); it2 != t2.end(); ++it2) - if (!t.tqcontains(*it2)) + if (!t.contains(*it2)) t.append(*it2); } return t; @@ -137,7 +137,7 @@ TQValueList<TreeNode*> Folder::tqchildren() const void Folder::insertChild(TreeNode* node, TreeNode* after) { - int pos = d->tqchildren.tqfindIndex(after); + int pos = d->tqchildren.findIndex(after); if (pos < 0) prependChild(node); @@ -202,7 +202,7 @@ void Folder::prependChild(TreeNode* node) void Folder::removeChild(TreeNode* node) { // kdDebug() << "enter Folder::removeChild() node:" << (node ? node->title() : "null") << endl; - if (node && d->tqchildren.tqcontains(node)) + if (node && d->tqchildren.contains(node)) { node->setParent(0); d->tqchildren.remove(node); diff --git a/akregator/src/frame.cpp b/akregator/src/frame.cpp index 55fac570..e800bafd 100644 --- a/akregator/src/frame.cpp +++ b/akregator/src/frame.cpp @@ -123,7 +123,7 @@ void Frame::setCaption(const TQString &s) void Frame::seStatusText(const TQString &s) { m_statusText=s; - m_statusText.tqreplace(TQRegExp("<[^>]*>"), ""); + m_statusText.replace(TQRegExp("<[^>]*>"), ""); emit statusText(m_statusText); } diff --git a/akregator/src/librss/tools_p.cpp b/akregator/src/librss/tools_p.cpp index 72058fa0..baaa6409 100644 --- a/akregator/src/librss/tools_p.cpp +++ b/akregator/src/librss/tools_p.cpp @@ -24,7 +24,7 @@ time_t parseISO8601Date(const TQString &s) return 0; // error // FIXME: imho this is done in KRFCDate::parseDateISO8601() automatically, so we could omit it? -fo - if (s.tqfind('T') != -1) + if (s.find('T') != -1) return KRFCDate::parseDateISO8601(s); else return KRFCDate::parseDateISO8601(s + "T12:00:00"); @@ -43,11 +43,11 @@ TQString childNodesAsXML(const TQDomNode& tqparent) static TQString plainTextToHtml(const TQString& plainText) { TQString str(plainText); - str.tqreplace("&", "&"); - str.tqreplace("\"", """); - str.tqreplace("<", "<"); - //str.tqreplace(">", ">"); - str.tqreplace("\n", "<br/>"); + str.replace("&", "&"); + str.replace("\"", """); + str.replace("<", "<"); + //str.replace(">", ">"); + str.replace("\n", "<br/>"); return str; } @@ -84,7 +84,7 @@ static ContentFormat mapTypeToFormat(const TQString& modep, const TQString& type xmltypes.append(TQString::fromUtf8("application/xml-dtd")); - if (xmltypes.tqcontains(type) + if (xmltypes.contains(type) || type.tqendsWith(TQString::fromUtf8("+xml"), false) || type.tqendsWith(TQString::fromUtf8("/xml"), false)) return XML; @@ -102,7 +102,7 @@ static TQString extractAtomContent(const TQDomElement& e) { case HTML: { - const bool hasPre = e.text().tqcontains( "<pre>", false ) || e.text().tqcontains( "<pre ", false ); + const bool hasPre = e.text().contains( "<pre>", false ) || e.text().contains( "<pre ", false ); return KCharsets::resolveEntities( hasPre ? e.text() : e.text().simplifyWhiteSpace() ); } case Text: @@ -132,10 +132,10 @@ TQString extractNode(const TQDomNode &tqparent, const TQString &elemName, bool i } else // check for HTML; not necessary for Atom:content { - bool hasPre = result.tqcontains("<pre>", false) || result.tqcontains("<pre ", false); - bool hasHtml = hasPre || result.tqcontains("<"); // FIXME: test if we have html, should be more clever -> regexp + bool hasPre = result.contains("<pre>", false) || result.contains("<pre ", false); + bool hasHtml = hasPre || result.contains("<"); // FIXME: test if we have html, should be more clever -> regexp if(!isInlined && !hasHtml) // perform nl2br if not a inline elt and it has no html elts - result = result = result.tqreplace(TQChar('\n'), "<br />"); + result = result = result.replace(TQChar('\n'), "<br />"); if(!hasPre) // strip white spaces if no <pre> result = result.simplifyWhiteSpace(); } @@ -151,7 +151,7 @@ TQString extractTitle(const TQDomNode & tqparent) TQString result = node.toElement().text(); - result = KCharsets::resolveEntities(KCharsets::resolveEntities(result).tqreplace(TQRegExp("<[^>]*>"), "").remove("\\")); + result = KCharsets::resolveEntities(KCharsets::resolveEntities(result).replace(TQRegExp("<[^>]*>"), "").remove("\\")); result = result.simplifyWhiteSpace(); if (result.isEmpty()) @@ -177,7 +177,7 @@ static void authorFromString(const TQString& strp, TQString& name, TQString& ema { TQString all = remail.cap(0); email = remail.cap(1); - str.tqreplace(all, ""); // remove mail address + str.replace(all, ""); // remove mail address } // simplify the rest and use it as name diff --git a/akregator/src/mk4storage/feedstoragemk4impl.cpp b/akregator/src/mk4storage/feedstoragemk4impl.cpp index ec0fe7b6..75ee1e2f 100644 --- a/akregator/src/mk4storage/feedstoragemk4impl.cpp +++ b/akregator/src/mk4storage/feedstoragemk4impl.cpp @@ -147,8 +147,8 @@ FeedStorageMK4Impl::FeedStorageMK4Impl(const TQString& url, StorageMK4Impl* main kdDebug() << url2 << endl; TQString t = url2; TQString t2 = url2; - TQString filePath = main->archivePath() +"/"+ t.tqreplace("/", "_").tqreplace(":", "_"); - d->oldArchivePath = KGlobal::dirs()->saveLocation("data", "akregator/Archive/") + t2.tqreplace("/", "_").tqreplace(":", "_") + ".xml"; + TQString filePath = main->archivePath() +"/"+ t.replace("/", "_").replace(":", "_"); + d->oldArchivePath = KGlobal::dirs()->saveLocation("data", "akregator/Archive/") + t2.replace("/", "_").replace(":", "_") + ".xml"; d->convert = !TQFile::exists(filePath + ".mk4") && TQFile::exists(d->oldArchivePath); d->storage = new c4_Storage((filePath + ".mk4").local8Bit(), true); @@ -297,7 +297,7 @@ void FeedStorageMK4Impl::addEntry(const TQString& guid) { c4_Row row; d->pguid(row) = guid.ascii(); - if (!tqcontains(guid)) + if (!contains(guid)) { d->archiveView.Add(row); markDirty(); @@ -305,7 +305,7 @@ void FeedStorageMK4Impl::addEntry(const TQString& guid) } } -bool FeedStorageMK4Impl::tqcontains(const TQString& guid) +bool FeedStorageMK4Impl::contains(const TQString& guid) { return findArticle(guid) != -1; } @@ -789,7 +789,7 @@ void FeedStorageMK4Impl::add(FeedStorage* source) void FeedStorageMK4Impl::copyArticle(const TQString& guid, FeedStorage* source) { - if (!tqcontains(guid)) + if (!contains(guid)) addEntry(guid); setComments(guid, source->comments(guid)); setCommentsLink(guid, source->commentsLink(guid)); diff --git a/akregator/src/mk4storage/feedstoragemk4impl.h b/akregator/src/mk4storage/feedstoragemk4impl.h index d13f04de..057ba2e7 100644 --- a/akregator/src/mk4storage/feedstoragemk4impl.h +++ b/akregator/src/mk4storage/feedstoragemk4impl.h @@ -50,7 +50,7 @@ class FeedStorageMK4Impl : public FeedStorage virtual TQStringList articles(const Category& cat); - virtual bool tqcontains(const TQString& guid); + virtual bool contains(const TQString& guid); virtual void addEntry(const TQString& guid); virtual void deleteArticle(const TQString& guid); virtual int comments(const TQString& guid); diff --git a/akregator/src/mk4storage/metakit/CHANGES b/akregator/src/mk4storage/metakit/CHANGES index e5d4aad1..1e1761ca 100644 --- a/akregator/src/mk4storage/metakit/CHANGES +++ b/akregator/src/mk4storage/metakit/CHANGES @@ -1198,7 +1198,7 @@ Moved C++ member documentation out of "mk4.h" header. Added examples/ directory, with a find.py timing example. Fixed bugs in - new Mk4tcl: "$vw tqfind" and "$vw delete end". Added tests for new + new Mk4tcl: "$vw find" and "$vw delete end". Added tests for new Mk4tcl OO interface: ":mk5object.test". 2000-06-16 Improved modifiable custom viewers diff --git a/akregator/src/mk4storage/metakit/include/mk4str.inl b/akregator/src/mk4storage/metakit/include/mk4str.inl index eddbefb8..4f95fa51 100644 --- a/akregator/src/mk4storage/metakit/include/mk4str.inl +++ b/akregator/src/mk4storage/metakit/include/mk4str.inl @@ -131,12 +131,12 @@ d4_inline bool c4_String::operator< (const c4_String& str_) const d4_inline int c4_String::Find(char ch_) const { - return tqfind(ch_); + return find(ch_); } d4_inline int c4_String::ReverseFind(char ch_) const { - return rtqfind(ch_); + return rfind(ch_); } d4_inline int c4_String::FindOneOf(const char* set_) const @@ -146,7 +146,7 @@ d4_inline int c4_String::FindOneOf(const char* set_) const d4_inline int c4_String::Find(const char* sub_) const { - return tqfind(sub_); + return find(sub_); } d4_inline c4_String c4_String::SpanIncluding(const char* set_) const diff --git a/akregator/src/mk4storage/metakit/src/store.cpp b/akregator/src/mk4storage/metakit/src/store.cpp index 3a458337..a32de665 100644 --- a/akregator/src/mk4storage/metakit/src/store.cpp +++ b/akregator/src/mk4storage/metakit/src/store.cpp @@ -161,7 +161,7 @@ void c4_Notifier::Notify() * Manager for persistent storage of view structures. * * The storage class uses a view, with additional functionality to be able - * to store and reload the data it tqcontains (including nested subviews). + * to store and reload the data it contains (including nested subviews). * * By default, data is loaded on demand, i.e. whenever data which has * not yet been referenced is used for the first time. Loading is limited diff --git a/akregator/src/mk4storage/storagemk4impl.cpp b/akregator/src/mk4storage/storagemk4impl.cpp index af71d97b..becbd518 100644 --- a/akregator/src/mk4storage/storagemk4impl.cpp +++ b/akregator/src/mk4storage/storagemk4impl.cpp @@ -276,7 +276,7 @@ void StorageMK4Impl::slotCommit() FeedStorage* StorageMK4Impl::archiveFor(const TQString& url) { - if (!d->feeds.tqcontains(url)) + if (!d->feeds.contains(url)) { FeedStorage* fs = new FeedStorageMK4Impl(url, this); d->feeds[url] = fs; diff --git a/akregator/src/nodelist.cpp b/akregator/src/nodelist.cpp index edea9c6e..1ed274d1 100644 --- a/akregator/src/nodelist.cpp +++ b/akregator/src/nodelist.cpp @@ -216,7 +216,7 @@ int NodeList::generateID() void NodeList::slotNodeAdded(TreeNode* node) { Folder* tqparent = node->tqparent(); - if ( !node || !d->flatList.tqcontains(tqparent) || d->flatList.tqcontains(node) ) + if ( !node || !d->flatList.contains(tqparent) || d->flatList.contains(node) ) return; addNode(node, false); @@ -224,7 +224,7 @@ void NodeList::slotNodeAdded(TreeNode* node) void NodeList::slotNodeDestroyed(TreeNode* node) { - if ( !node || !d->flatList.tqcontains(node) ) + if ( !node || !d->flatList.contains(node) ) return; removeNode(node); @@ -232,7 +232,7 @@ void NodeList::slotNodeDestroyed(TreeNode* node) void NodeList::slotNodeRemoved(Folder* /*tqparent*/, TreeNode* node) { - if ( !node || !d->flatList.tqcontains(node) ) + if ( !node || !d->flatList.contains(node) ) return; removeNode(node); diff --git a/akregator/src/pageviewer.cpp b/akregator/src/pageviewer.cpp index 8d10256c..0392535c 100644 --- a/akregator/src/pageviewer.cpp +++ b/akregator/src/pageviewer.cpp @@ -390,7 +390,7 @@ void PageViewer::slotPaletteOrFontChanged() if ( !obj ) // not all views have a browser extension ! return; - int id = obj->tqmetaObject()->tqfindSlot("reparseConfiguration()"); + int id = obj->tqmetaObject()->findSlot("reparseConfiguration()"); if (id == -1) return; TQUObject o[1]; diff --git a/akregator/src/pageviewer.rc b/akregator/src/pageviewer.rc index a7b98fee..dd44ee36 100644 --- a/akregator/src/pageviewer.rc +++ b/akregator/src/pageviewer.rc @@ -17,7 +17,7 @@ <Action name="viewer_copy"/> <Action name="selectAll"/> <Separator/> - <Action name="tqfind"/> + <Action name="find"/> <Action name="findNext"/> <Merge/> </Menu> diff --git a/akregator/src/plugin.cpp b/akregator/src/plugin.cpp index 599d3972..495dabc3 100644 --- a/akregator/src/plugin.cpp +++ b/akregator/src/plugin.cpp @@ -25,7 +25,7 @@ Plugin::addPluginProperty( const TQString& key, const TQString& value ) TQString Plugin::pluginProperty( const TQString& key ) { - if ( m_properties.tqfind( key.lower() ) == m_properties.end() ) + if ( m_properties.find( key.lower() ) == m_properties.end() ) return "false"; return m_properties[key.lower()]; @@ -35,7 +35,7 @@ Plugin::pluginProperty( const TQString& key ) bool Plugin::hasPluginProperty( const TQString& key ) { - return m_properties.tqfind( key.lower() ) != m_properties.end(); + return m_properties.find( key.lower() ) != m_properties.end(); } } diff --git a/akregator/src/progressmanager.cpp b/akregator/src/progressmanager.cpp index 6ef94f4c..931b0476 100644 --- a/akregator/src/progressmanager.cpp +++ b/akregator/src/progressmanager.cpp @@ -102,7 +102,7 @@ void ProgressManager::slotNodeAdded(TreeNode* node) Feed* feed = dynamic_cast<Feed*>(node); if (feed) { - if (!d->handlers.tqcontains(feed)) + if (!d->handlers.contains(feed)) d->handlers[feed] = new ProgressItemHandler(feed); connect(feed, TQT_SIGNAL(signalDestroyed(TreeNode*)), this, TQT_SLOT(slotNodeDestroyed(TreeNode*))); } diff --git a/akregator/src/simplenodeselector.cpp b/akregator/src/simplenodeselector.cpp index 57612bd4..c4e91e5a 100644 --- a/akregator/src/simplenodeselector.cpp +++ b/akregator/src/simplenodeselector.cpp @@ -185,7 +185,7 @@ void SimpleNodeSelector::slotItemSelected(TQListViewItem* item) void SimpleNodeSelector::slotNodeDestroyed(TreeNode* node) { - if (d->nodeToItem.tqcontains(node)) + if (d->nodeToItem.contains(node)) { TQListViewItem* item = d->nodeToItem[node]; d->nodeToItem.remove(node); diff --git a/akregator/src/speechclient.cpp b/akregator/src/speechclient.cpp index b0fc92c9..8665213d 100644 --- a/akregator/src/speechclient.cpp +++ b/akregator/src/speechclient.cpp @@ -135,7 +135,7 @@ void SpeechClient::slotAbortJobs() ASYNC SpeechClient::textRemoved(const TQCString& /*appId*/, uint jobNum) { kdDebug() << "SpeechClient::textRemoved() called" << endl; - if (d->pendingJobs.tqcontains(jobNum)) + if (d->pendingJobs.contains(jobNum)) { d->pendingJobs.remove(jobNum); if (d->pendingJobs.isEmpty()) diff --git a/akregator/src/storagedummyimpl.cpp b/akregator/src/storagedummyimpl.cpp index e8d5c4c0..393be7d1 100644 --- a/akregator/src/storagedummyimpl.cpp +++ b/akregator/src/storagedummyimpl.cpp @@ -100,12 +100,12 @@ bool StorageDummyImpl::rollback() int StorageDummyImpl::unreadFor(const TQString &url) { - return d->feeds.tqcontains(url) ? d->feeds[url].unread : 0; + return d->feeds.contains(url) ? d->feeds[url].unread : 0; } void StorageDummyImpl::setUnreadFor(const TQString &url, int unread) { - if (!d->feeds.tqcontains(url)) + if (!d->feeds.contains(url)) d->addEntry(url, unread, unread, 0); else d->feeds[url].unread = unread; @@ -113,12 +113,12 @@ void StorageDummyImpl::setUnreadFor(const TQString &url, int unread) int StorageDummyImpl::totalCountFor(const TQString &url) { - return d->feeds.tqcontains(url) ? d->feeds[url].totalCount : 0; + return d->feeds.contains(url) ? d->feeds[url].totalCount : 0; } void StorageDummyImpl::setTotalCountFor(const TQString &url, int total) { - if (!d->feeds.tqcontains(url)) + if (!d->feeds.contains(url)) d->addEntry(url, 0, total, 0); else d->feeds[url].totalCount = total; @@ -126,12 +126,12 @@ void StorageDummyImpl::setTotalCountFor(const TQString &url, int total) int StorageDummyImpl::lastFetchFor(const TQString& url) { - return d->feeds.tqcontains(url) ? d->feeds[url].lastFetch : 0; + return d->feeds.contains(url) ? d->feeds[url].lastFetch : 0; } void StorageDummyImpl::setLastFetchFor(const TQString& url, int lastFetch) { - if (!d->feeds.tqcontains(url)) + if (!d->feeds.contains(url)) d->addEntry(url, 0, 0, lastFetch); else d->feeds[url].lastFetch = lastFetch; @@ -143,7 +143,7 @@ void StorageDummyImpl::slotCommit() FeedStorage* StorageDummyImpl::archiveFor(const TQString& url) { - if (!d->feeds.tqcontains(url)) + if (!d->feeds.contains(url)) d->feeds[url].feedStorage = new FeedStorageDummyImpl(url, this); return d->feeds[url].feedStorage; diff --git a/akregator/src/storagefactoryregistry.cpp b/akregator/src/storagefactoryregistry.cpp index 608c05b1..50fb6005 100644 --- a/akregator/src/storagefactoryregistry.cpp +++ b/akregator/src/storagefactoryregistry.cpp @@ -70,7 +70,7 @@ StorageFactory* StorageFactoryRegistry::getFactory(const TQString& typestr) bool StorageFactoryRegistry::containsFactory(const TQString& typestr) const { - return d->map.tqcontains(typestr); + return d->map.contains(typestr); } TQStringList StorageFactoryRegistry::list() const diff --git a/akregator/src/tabwidget.cpp b/akregator/src/tabwidget.cpp index 60ba42b3..cbd7e737 100644 --- a/akregator/src/tabwidget.cpp +++ b/akregator/src/tabwidget.cpp @@ -218,7 +218,7 @@ void TabWidget::setTitle( const TQString &title , TQWidget* sender) newTitle = newTitle.left( newMaxLength-3 ) + "..."; } - newTitle.tqreplace( '&', "&&" ); + newTitle.replace( '&', "&&" ); if ( tabLabel( sender ) != newTitle ) changeTab( sender, newTitle ); @@ -235,7 +235,7 @@ void TabWidget::setTitle( const TQString &title , TQWidget* sender) newTitle = newTitle.left( newMaxLength-3 ) + "..."; } - newTitle.tqreplace( '&', "&&" ); + newTitle.replace( '&', "&&" ); if ( newTitle != tabLabel( page( i ) ) ) changeTab( page( i ), newTitle ); } @@ -298,8 +298,8 @@ void TabWidget::slotCloseTab() d->currentItem = currentPage(); if (indexOf(d->currentItem) == 0) return; - if (d->frames.tqfind(d->currentItem) != NULL) - removeFrame(d->frames.tqfind(d->currentItem)); + if (d->frames.find(d->currentItem) != NULL) + removeFrame(d->frames.find(d->currentItem)); delete d->currentItem; d->currentItem = 0; } @@ -323,8 +323,8 @@ void TabWidget::initiateDrag(int tab) void TabWidget::slotCloseRequest(TQWidget* widget) { - if (d->frames.tqfind(widget) != NULL) - removeFrame(d->frames.tqfind(widget)); + if (d->frames.find(widget) != NULL) + removeFrame(d->frames.find(widget)); } } // namespace Akregator diff --git a/akregator/src/tagnode.cpp b/akregator/src/tagnode.cpp index 35c72072..24d81755 100644 --- a/akregator/src/tagnode.cpp +++ b/akregator/src/tagnode.cpp @@ -196,7 +196,7 @@ void TagNode::slotArticlesAdded(TreeNode* node, const TQValueList<Article>& list bool added = false; for (TQValueList<Article>::ConstIterator it = list.begin(); it != list.end(); ++it) { - if (!d->articles.tqcontains(*it) && d->filter.matches(*it)) + if (!d->articles.contains(*it) && d->filter.matches(*it)) { d->articles.append(*it); d->addedArticlesNotify.append(*it); @@ -216,7 +216,7 @@ void TagNode::slotArticlesUpdated(TreeNode* node, const TQValueList<Article>& li bool updated = false; for (TQValueList<Article>::ConstIterator it = list.begin(); it != list.end(); ++it) { - if (d->articles.tqcontains(*it)) + if (d->articles.contains(*it)) { if (!d->filter.matches(*it)) // articles is in list, but doesn't match our criteria anymore -> remove it { @@ -252,7 +252,7 @@ void TagNode::slotArticlesRemoved(TreeNode* node, const TQValueList<Article>& li bool removed = false; for (TQValueList<Article>::ConstIterator it = list.begin(); it != list.end(); ++it) { - if (d->articles.tqcontains(*it)) + if (d->articles.contains(*it)) { d->articles.remove(*it); d->removedArticlesNotify.append(*it); diff --git a/akregator/src/tagnode.h b/akregator/src/tagnode.h index 8598a8a2..ebdf15a0 100644 --- a/akregator/src/tagnode.h +++ b/akregator/src/tagnode.h @@ -76,7 +76,7 @@ public: virtual int totalCount() const; - /** Returns a sequence of the articles this node tqcontains. For feed groups, this returns a concatenated list of all articles in the sub tree. + /** Returns a sequence of the articles this node contains. For feed groups, this returns a concatenated list of all articles in the sub tree. If @c tag is not null, only articles tagged with @c tag are returned @return sequence of articles */ diff --git a/akregator/src/tagnodelist.cpp b/akregator/src/tagnodelist.cpp index ba531d03..cf87b770 100644 --- a/akregator/src/tagnodelist.cpp +++ b/akregator/src/tagnodelist.cpp @@ -158,7 +158,7 @@ void TagNodeList::slotNodeRemoved(Folder* tqparent, TreeNode* node) bool TagNodeList::containsTagId(const TQString& tagId) { - return d->tagIdToNodeMap.tqcontains(tagId); + return d->tagIdToNodeMap.contains(tagId); } TQValueList<TagNode*> TagNodeList::toList() const diff --git a/akregator/src/tagset.cpp b/akregator/src/tagset.cpp index 1be7f952..a6b41285 100644 --- a/akregator/src/tagset.cpp +++ b/akregator/src/tagset.cpp @@ -54,7 +54,7 @@ TagSet::~TagSet() void TagSet::insert(const Tag& tag) { - if (!d->map.tqcontains(tag.id())) + if (!d->map.contains(tag.id())) { d->map.insert(tag.id(), tag); tag.addedToTagSet(this); @@ -64,7 +64,7 @@ void TagSet::insert(const Tag& tag) void TagSet::remove(const Tag& tag) { - if (d->map.tqcontains(tag.id())) + if (d->map.contains(tag.id())) { d->map.remove(tag.id()); tag.removedFromTagSet(this); @@ -74,17 +74,17 @@ void TagSet::remove(const Tag& tag) bool TagSet::containsID(const TQString& id) const { - return d->map.tqcontains(id); + return d->map.contains(id); } -bool TagSet::tqcontains(const Tag& tag) const +bool TagSet::contains(const Tag& tag) const { - return d->map.tqcontains(tag.id()); + return d->map.contains(tag.id()); } Tag TagSet::findByID(const TQString& id) const { - return d->map.tqcontains(id) ? d->map[id] : Tag(); + return d->map.contains(id) ? d->map[id] : Tag(); } TQMap<TQString,Tag> TagSet::toMap() const diff --git a/akregator/src/tagset.h b/akregator/src/tagset.h index 637fce50..49b19aed 100644 --- a/akregator/src/tagset.h +++ b/akregator/src/tagset.h @@ -63,8 +63,8 @@ class TagSet : public TQObject /** returns the tag set as map ((id, Tag) pairs) */ TQMap<TQString,Tag> toMap() const; - /** returns @c true if this set tqcontains @c tag */ - bool tqcontains(const Tag& tag) const; + /** returns @c true if this set contains @c tag */ + bool contains(const Tag& tag) const; /** returns @c true if this set contains a tag with a given ID */ bool containsID(const TQString& id) const; diff --git a/akregator/src/treenode.cpp b/akregator/src/treenode.cpp index 27ee2eca..58e4ae8e 100644 --- a/akregator/src/treenode.cpp +++ b/akregator/src/treenode.cpp @@ -96,7 +96,7 @@ TreeNode* TreeNode::nextSibling() const TQValueList<TreeNode*> tqchildren = d->tqparent->tqchildren(); TreeNode* me = (TreeNode*)this; - int idx = tqchildren.tqfindIndex(me); + int idx = tqchildren.findIndex(me); return idx+1 < tqchildren.size() ? *(tqchildren.at(idx+1)) : 0L; } @@ -108,7 +108,7 @@ TreeNode* TreeNode::prevSibling() const TQValueList<TreeNode*> tqchildren = d->tqparent->tqchildren(); TreeNode* me = (TreeNode*)this; - int idx = tqchildren.tqfindIndex(me); + int idx = tqchildren.findIndex(me); return idx > 0 ? *(d->tqparent->tqchildren().at(idx-1)) : 0L; } diff --git a/akregator/src/treenode.h b/akregator/src/treenode.h index d6c6f860..b50b050a 100644 --- a/akregator/src/treenode.h +++ b/akregator/src/treenode.h @@ -112,7 +112,7 @@ public: virtual void setParent(Folder* tqparent); - /** Returns a sequence of the articles this node tqcontains. For feed groups, this returns a concatenated list of all articles in the sub tree. + /** Returns a sequence of the articles this node contains. For feed groups, this returns a concatenated list of all articles in the sub tree. If @c tag is not null, only articles tagged with @c tag are returned @return sequence of articles */ diff --git a/akregator/src/utils.cpp b/akregator/src/utils.cpp index fb7b0186..6bc6cf14 100644 --- a/akregator/src/utils.cpp +++ b/akregator/src/utils.cpp @@ -30,7 +30,7 @@ namespace Akregator { TQString Utils::stripTags(const TQString& str) { - return TQString(str).tqreplace(TQRegExp("<[^>]*>"), ""); + return TQString(str).replace(TQRegExp("<[^>]*>"), ""); } uint Utils::calcHash(const TQString& str) @@ -48,7 +48,7 @@ TQString Utils::fileNameForUrl(const TQString& url_p) { TQString url2(url_p); - url2 = url2.tqreplace("/", "_").tqreplace(":", "_"); + url2 = url2.replace("/", "_").replace(":", "_"); if (url2.length() > 255) url2 = url2.left(200) + TQString::number(Akregator::Utils::calcHash(url2), 16); diff --git a/akregator/src/viewer.cpp b/akregator/src/viewer.cpp index 989ff8ae..4302f0a7 100644 --- a/akregator/src/viewer.cpp +++ b/akregator/src/viewer.cpp @@ -112,7 +112,7 @@ void Viewer::displayInExternalBrowser(const KURL &url, const TQString &mimetype) { TQString cmd = Settings::externalBrowserCustomCommand(); TQString urlStr = url.url(); - cmd.tqreplace(TQRegExp("%u"), urlStr); + cmd.replace(TQRegExp("%u"), urlStr); KProcess *proc = new KProcess; TQStringList cmdAndArgs = KShell::splitArgs(cmd); *proc << cmdAndArgs; @@ -202,7 +202,7 @@ void Viewer::slotPopupMenu(KXMLGUIClient*, const TQPoint& p, const KURL& kurl, c void Viewer::slotCopy() { TQString text = selectedText(); - text.tqreplace( TQChar( 0xa0 ), ' ' ); + text.replace( TQChar( 0xa0 ), ' ' ); TQClipboard *cb = TQApplication::tqclipboard(); disconnect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) ); cb->setText(text); diff --git a/certmanager/certificateinfowidgetimpl.cpp b/certmanager/certificateinfowidgetimpl.cpp index 9067672e..b661eeed 100644 --- a/certmanager/certificateinfowidgetimpl.cpp +++ b/certmanager/certificateinfowidgetimpl.cpp @@ -155,7 +155,7 @@ void CertificateInfoWidgetImpl::setKey( const GpgME::Key & key ) { for ( Kleo::DN::const_iterator dnit = dn.begin() ; dnit != dn.end() ; ++dnit ) { TQString displayName = (*dnit).name(); - if( dnComponentNames.tqcontains(displayName) ) displayName = dnComponentNames[displayName]; + if( dnComponentNames.contains(displayName) ) displayName = dnComponentNames[displayName]; item = new TQListViewItem( listView, item, displayName, (*dnit).value() ); } diff --git a/certmanager/certificatewizardimpl.cpp b/certmanager/certificatewizardimpl.cpp index 89f4d66e..4924cd0b 100644 --- a/certmanager/certificatewizardimpl.cpp +++ b/certmanager/certificatewizardimpl.cpp @@ -391,7 +391,7 @@ void CertificateWizardImpl::slotURLSelected( const TQString& _url ) // The application/pkcs10 mimetype didn't have a native extension, // so the filedialog didn't have the checkbox for auto-adding it. TQString fileName = url.fileName(); - int pos = fileName.tqfindRev( '.' ); + int pos = fileName.findRev( '.' ); if ( pos < 0 ) // no extension url.setFileName( fileName + ".p10" ); #endif diff --git a/certmanager/certmanager.cpp b/certmanager/certmanager.cpp index 2ebe66a6..7c80966a 100644 --- a/certmanager/certmanager.cpp +++ b/certmanager/certmanager.cpp @@ -363,8 +363,8 @@ void CertManager::createActions() { mComboAction = new ComboAction( lst, actionCollection(), TQT_TQOBJECT(this), TQT_SLOT( slotToggleRemote(int) ), "location_combo_action", mNextFindRemote? 1 : 0 ); - mFindAction = new KAction( i18n("Find"), "tqfind", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSearch()), - actionCollection(), "tqfind" ); + mFindAction = new KAction( i18n("Find"), "find", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSearch()), + actionCollection(), "find" ); KStdAction::keyBindings( TQT_TQOBJECT(this), TQT_SLOT(slotEditKeybindings()), actionCollection() ); KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT(slotShowConfigurationDialog()), actionCollection() ); @@ -745,7 +745,7 @@ void CertManager::slotStartCertificateDownload( const TQString& fingerprint, con TQString CertManager::displayNameForJob( const Kleo::Job *job ) { - JobsDisplayNameMap::iterator it = mJobsDisplayNameMap.tqfind( job ); + JobsDisplayNameMap::iterator it = mJobsDisplayNameMap.find( job ); TQString displayName; if ( it != mJobsDisplayNameMap.end() ) { displayName = *it; diff --git a/certmanager/conf/dirservconfigpage.cpp b/certmanager/conf/dirservconfigpage.cpp index 61a427d8..e95089d8 100644 --- a/certmanager/conf/dirservconfigpage.cpp +++ b/certmanager/conf/dirservconfigpage.cpp @@ -235,7 +235,7 @@ void DirectoryServicesConfigurationPage::save() KURL::List::const_iterator end = toAdd.end(); for( ; it != end; ++it ) { // check if the URL is already in currentList - if ( currentList.tqfind( *it ) == currentList.end() ) + if ( currentList.find( *it ) == currentList.end() ) // if not, add it currentList.append( *it ); } diff --git a/certmanager/kleopatraui.rc b/certmanager/kleopatraui.rc index 786ae1a3..d07e08b8 100644 --- a/certmanager/kleopatraui.rc +++ b/certmanager/kleopatraui.rc @@ -52,7 +52,7 @@ <Action name="label_action" /> <Action name="query_lineedit_action" /> <Action name="location_combo_action" /> - <Action name="tqfind" /> + <Action name="find" /> </ToolBar> <Menu name="listview_popup"> diff --git a/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp b/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp index d179aa95..b1d55ac9 100644 --- a/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp +++ b/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp @@ -158,7 +158,7 @@ void Kleo::GnuPGProcessBase::parseStatusOutput() { static const int startTokenLen = sizeof startToken / sizeof *startToken - 1; int lineStart = 0; - for ( int lineEnd = d->statusBuffer.tqfind( '\n' ) ; lineEnd >= 0 ; lineEnd = d->statusBuffer.tqfind( '\n', lineStart = lineEnd+1 ) ) { + for ( int lineEnd = d->statusBuffer.find( '\n' ) ; lineEnd >= 0 ; lineEnd = d->statusBuffer.find( '\n', lineStart = lineEnd+1 ) ) { // get next line: const TQCString line = d->statusBuffer.mid( lineStart, lineEnd - lineStart ).stripWhiteSpace(); if ( line.isEmpty() ) @@ -179,7 +179,7 @@ void Kleo::GnuPGProcessBase::parseStatusOutput() { TQString cmd; TQStringList args; int tagStart = 0; - for ( int tagEnd = command.tqfind( ' ' ) ; tagEnd >= 0 ; tagEnd = command.tqfind( ' ', tagStart = tagEnd+1 ) ) { + for ( int tagEnd = command.find( ' ' ) ; tagEnd >= 0 ; tagEnd = command.find( ' ', tagStart = tagEnd+1 ) ) { const TQCString tag = command.mid( tagStart, tagEnd - tagStart ); if ( cmd.isNull() ) cmd = fromHexEscapedUtf8( tag ); diff --git a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp index 31224685..51f8f68c 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp @@ -131,7 +131,7 @@ Kleo::CryptoConfigComponent* QGpgMECryptoConfig::component( const TQString& name { if ( !mParsed ) const_cast<QGpgMECryptoConfig*>( this )->runGpgConf( false ); - return mComponents.tqfind( name ); + return mComponents.find( name ); } void QGpgMECryptoConfig::sync( bool runtime ) @@ -240,7 +240,7 @@ TQStringList QGpgMECryptoConfigComponent::groupList() const Kleo::CryptoConfigGroup* QGpgMECryptoConfigComponent::group(const TQString& name ) const { - return mGroups.tqfind( name ); + return mGroups.find( name ); } void QGpgMECryptoConfigComponent::sync( bool runtime ) @@ -341,7 +341,7 @@ TQStringList QGpgMECryptoConfigGroup::entryList() const Kleo::CryptoConfigEntry* QGpgMECryptoConfigGroup::entry( const TQString& name ) const { - return mEntries.tqfind( name ); + return mEntries.find( name ); } //// @@ -357,15 +357,15 @@ static TQString gpgconf_escape( const TQString& str ) // Escape special chars (including ':' and '%') TQString enc = KURL::encode_string( str, 106 ); // and convert to utf8 first (to get %12%34 for one special char) // Also encode commas, for lists. - enc.tqreplace( ',', "%2c" ); + enc.replace( ',', "%2c" ); return enc; } static TQString urlpart_encode( const TQString& str ) { TQString enc( str ); - enc.tqreplace( '%', "%25" ); // first! - enc.tqreplace( ':', "%3a" ); + enc.replace( '%', "%25" ); // first! + enc.replace( ':', "%3a" ); //kdDebug() << " urlpart_encode: " << str << " -> " << enc << endl; return enc; } diff --git a/certmanager/lib/cryptplugwrapper.cpp b/certmanager/lib/cryptplugwrapper.cpp index 1d35f1c1..4ffc59c9 100644 --- a/certmanager/lib/cryptplugwrapper.cpp +++ b/certmanager/lib/cryptplugwrapper.cpp @@ -468,9 +468,9 @@ TQString CryptPlugWrapper::libName() const TQString CryptPlugWrapper::protocol() const { - if ( _libName.tqcontains( "smime" ) ) + if ( _libName.contains( "smime" ) ) return "SMIME"; - if ( _libName.tqcontains( "openpgp" ) ) + if ( _libName.contains( "openpgp" ) ) return "OpenPGP"; return TQString(); } @@ -485,9 +485,9 @@ TQString CryptPlugWrapper::displayName() const { if ( !_name.isEmpty() ) return _name; - if ( _libName.tqcontains( "smime" ) ) + if ( _libName.contains( "smime" ) ) return "gpgsm"; - if ( _libName.tqcontains( "openpgp" ) ) + if ( _libName.contains( "openpgp" ) ) return "gpg"; return i18n("(Unknown Protocol)"); } @@ -503,10 +503,10 @@ bool CryptPlugWrapper::initialize( InitqStatus* initqStatus, TQString* errorMsg _initqStatus = IniStatus_NoLibName; kdDebug(5150) << "No library name was given.\n" << endl; } else { - if ( _libName.tqcontains( "smime" ) ) { + if ( _libName.contains( "smime" ) ) { _cp = new SMIMECryptPlug(); _config = new Config( GPGME_PROTOCOL_CMS ); - } else if ( _libName.tqcontains( "openpgp" ) ) { + } else if ( _libName.contains( "openpgp" ) ) { _cp = new OpenPGPCryptPlug(); _config = new Config( GPGME_PROTOCOL_OpenPGP ); } else { diff --git a/certmanager/lib/cryptplugwrapperlist.cpp b/certmanager/lib/cryptplugwrapperlist.cpp index 7b1c7572..43f88670 100644 --- a/certmanager/lib/cryptplugwrapperlist.cpp +++ b/certmanager/lib/cryptplugwrapperlist.cpp @@ -28,7 +28,7 @@ CryptPlugWrapper * CryptPlugWrapperList::findForLibName( const TQString & libName ) const { for ( TQPtrListIterator<CryptPlugWrapper> it( *this ) ; it.current() ; ++it ) - if ( (*it)->libName().tqfind( libName, 0, false ) >= 0 ) + if ( (*it)->libName().find( libName, 0, false ) >= 0 ) return *it; return 0; } diff --git a/certmanager/lib/kleo/dn.cpp b/certmanager/lib/kleo/dn.cpp index 0f0c357d..7e39185c 100644 --- a/certmanager/lib/kleo/dn.cpp +++ b/certmanager/lib/kleo/dn.cpp @@ -309,7 +309,7 @@ reorder_dn( const Kleo::DN::Attribute::List & dn ) { // find all unknown entries in their order of appearance for ( Kleo::DN::const_iterator it = dn.begin(); it != dn.end(); ++it ) - if ( attrOrder.tqfind( (*it).name() ) == attrOrder.end() ) + if ( attrOrder.find( (*it).name() ) == attrOrder.end() ) unknownEntries.push_back( *it ); // process the known attrs in the desired order diff --git a/certmanager/lib/kleo/downloadjob.h b/certmanager/lib/kleo/downloadjob.h index d7f83f24..1583c486 100644 --- a/certmanager/lib/kleo/downloadjob.h +++ b/certmanager/lib/kleo/downloadjob.h @@ -69,7 +69,7 @@ namespace Kleo { /** Starts the download operation. \a fingerprints is a list of fingerprints used to specify the list of keys downloaded. Empty - patterns are ignored. If \a fingerprints is empty, tqcontains + patterns are ignored. If \a fingerprints is empty, contains only empty strings or anything other than fingerprints, the result is undefined. */ diff --git a/certmanager/lib/tests/test.data b/certmanager/lib/tests/test.data index f09481ba..b4bce1a9 100644 --- a/certmanager/lib/tests/test.data +++ b/certmanager/lib/tests/test.data @@ -116,7 +116,7 @@ static int status( void * void_ctx, const char * line ) { static int inquire( void * void_ctx, const char * keyword ) { assuan_context_t ctx = (assuan_context_t)void_ctx; assert( ctx ); - const std::map<std::string,std::string>::const_iterator it = inquireData.tqfind( keyword ); + const std::map<std::string,std::string>::const_iterator it = inquireData.find( keyword ); if ( it == inquireData.end() ) return gpg_error( GPG_ERR_UNKNOWN_COMMAND ); @@ -179,7 +179,7 @@ int main( int argc, char * argv[] ) { options.push_back( argv[++optind] ); } else if ( qstrcmp( arg, "--inquire" ) == 0 ) { const std::string inqval = argv[++optind]; - const size_t pos = inqval.tqfind( '=' ); + const size_t pos = inqval.find( '=' ); // ### implement indirection with "@file"... inquireData[inqval.substr( 0, pos )] = inqval.substr( pos+1 ); } else { diff --git a/certmanager/lib/tests/test_gnupgprocessbase.cpp b/certmanager/lib/tests/test_gnupgprocessbase.cpp index c3ec0c33..c3aba82d 100644 --- a/certmanager/lib/tests/test_gnupgprocessbase.cpp +++ b/certmanager/lib/tests/test_gnupgprocessbase.cpp @@ -88,7 +88,7 @@ static TQStringList split( char * buffer, int buflen, TQString & old ) { } static TQString escape( TQString str ) { - return str.tqreplace( '&', "&" ).tqreplace( '<', "<" ).tqreplace( '>', ">" ); + return str.replace( '&', "&" ).replace( '<', "<" ).replace( '>', ">" ); } void GnuPGViewer::slotStdout( KProcess *, char * buffer, int buflen ) { diff --git a/certmanager/lib/ui/cryptoconfigmodule.cpp b/certmanager/lib/ui/cryptoconfigmodule.cpp index cd486a86..9fa55e96 100644 --- a/certmanager/lib/ui/cryptoconfigmodule.cpp +++ b/certmanager/lib/ui/cryptoconfigmodule.cpp @@ -59,7 +59,7 @@ using namespace Kleo; static inline TQPixmap loadIcon( TQString s ) { return KGlobal::instance()->iconLoader() - ->loadIcon( s.tqreplace( TQRegExp( "[^a-zA-Z0-9_]" ), "_" ), KIcon::NoGroup, KIcon::SizeMedium ); + ->loadIcon( s.replace( TQRegExp( "[^a-zA-Z0-9_]" ), "_" ), KIcon::NoGroup, KIcon::SizeMedium ); } static unsigned int num_components_with_options( const Kleo::CryptoConfig * config ) { diff --git a/certmanager/lib/ui/dnattributeorderconfigwidget.cpp b/certmanager/lib/ui/dnattributeorderconfigwidget.cpp index 6f42393f..46adfe3b 100644 --- a/certmanager/lib/ui/dnattributeorderconfigwidget.cpp +++ b/certmanager/lib/ui/dnattributeorderconfigwidget.cpp @@ -173,7 +173,7 @@ void Kleo::DNAttributeOrderConfigWidget::load() { const TQStringList all = Kleo::DNAttributeMapper::instance()->names(); for ( TQStringList::const_iterator it = all.begin() ; it != all.end() ; ++it ) - if ( order.tqfind( *it ) == order.end() ) + if ( order.find( *it ) == order.end() ) (void)new TQListViewItem( d->availableLV, *it, d->mapper->name2label( *it ) ); if ( !d->placeHolderItem->listView() ) diff --git a/doc/api/Doxyfile.pim b/doc/api/Doxyfile.pim index 6ecb6dd8..a2bc9336 100644 --- a/doc/api/Doxyfile.pim +++ b/doc/api/Doxyfile.pim @@ -74,7 +74,7 @@ REPEAT_BRIEF = YES # as the annotated text. Otherwise, the brief description is used as-is. If left # blank, the following values are used ("$name" is automatically replaced with the # name of the entity): "The $name class" "The $name widget" "The $name file" -# "is" "provides" "specifies" "tqcontains" "represents" "a" "an" "the" +# "is" "provides" "specifies" "contains" "represents" "a" "an" "the" ABBREVIATE_BRIEF = diff --git a/indexlib/GPL_V2 b/indexlib/GPL_V2 index 07dec1a9..cfa6e1a8 100644 --- a/indexlib/GPL_V2 +++ b/indexlib/GPL_V2 @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which tqcontains + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following: The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source -code means all the source code for all modules it tqcontains, plus any +code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/indexlib/boost-compat/config/suffix.hpp b/indexlib/boost-compat/config/suffix.hpp index 3d60d718..77d9deca 100644 --- a/indexlib/boost-compat/config/suffix.hpp +++ b/indexlib/boost-compat/config/suffix.hpp @@ -332,7 +332,7 @@ namespace std { // The same problem occurs with has_facet. // These macros provide a consistent way to access a locale's facets. // Usage: -// tqreplace +// replace // std::use_facet<Type>(loc); // with // BOOST_USE_FACET(Type, loc); @@ -357,7 +357,7 @@ namespace std { // BOOST_NESTED_TEMPLATE workaround ------------------------------------------// // Member templates are supported by some compilers even though they can't use -// the A::template member<U> syntax, as a workaround tqreplace: +// the A::template member<U> syntax, as a workaround replace: // // typedef typename A::template rebind<U> binder; // diff --git a/indexlib/stringset.h b/indexlib/stringset.h index 3daa5d60..4761718b 100644 --- a/indexlib/stringset.h +++ b/indexlib/stringset.h @@ -129,7 +129,7 @@ struct stringset { void clear(); /** - * Returns std::make_pair( tqfind( word ), tqfind( word + 'Z' ) ) which makes it easy + * Returns std::make_pair( find( word ), find( word + 'Z' ) ) which makes it easy * to implement word* searches */ std::pair<const_iterator, const_iterator> upper_lower( const char* ) const; diff --git a/kabc/frontend/mainWindow.ui.h b/kabc/frontend/mainWindow.ui.h index 0740d9cf..421c0d33 100644 --- a/kabc/frontend/mainWindow.ui.h +++ b/kabc/frontend/mainWindow.ui.h @@ -139,8 +139,8 @@ void MainWindow::readAddressee( const KABC::Addressee &a ) TQStringList customs = a.customs(); TQStringList::ConstIterator it5; for( it5 = customs.begin(); it5 != customs.end(); ++it5 ) { - int posDash = (*it5).tqfind( "-" ); - int posColon = (*it5).tqfind( ":" ); + int posDash = (*it5).find( "-" ); + int posColon = (*it5).find( ":" ); TQString app = (*it5).left( posDash ); TQString cname = (*it5).mid( posDash + 1, posColon - posDash - 1 ); @@ -583,8 +583,8 @@ void MainWindow::editCustom() this ); if ( !ok || name.isEmpty() ) return; - int posDash = name.tqfind( "-" ); - int posColon = name.tqfind( ":" ); + int posDash = name.find( "-" ); + int posColon = name.find( ":" ); TQString app = name.left( posDash ); TQString cname = name.mid( posDash + 1, posColon - posDash - 1 ); @@ -610,8 +610,8 @@ void MainWindow::newCustom() this ); if ( !ok || name.isEmpty() ) return; - int posDash = name.tqfind( "-" ); - int posColon = name.tqfind( ":" ); + int posDash = name.find( "-" ); + int posColon = name.find( ":" ); TQString app = name.left( posDash ); TQString cname = name.mid( posDash + 1, posColon - posDash - 1 ); diff --git a/kabc/kabc2mutt/kabc2mutt.cpp b/kabc/kabc2mutt/kabc2mutt.cpp index 7e10dc32..c1296786 100644 --- a/kabc/kabc2mutt/kabc2mutt.cpp +++ b/kabc/kabc2mutt/kabc2mutt.cpp @@ -53,8 +53,8 @@ void KABC2Mutt::loadingFinished() for ( iaddr = mAddressBook->begin(); iaddr != mAddressBook->end(); ++iaddr ) { const TQString name = (*iaddr).givenName() + ' ' + (*iaddr).familyName(); if ( !mQuery.isEmpty() ) { - bool match = (name.tqfind(mQuery, 0, mIgnoreCase) > -1) || - ((*iaddr).preferredEmail().tqfind( mQuery, 0, mIgnoreCase ) > -1 ); + bool match = (name.find(mQuery, 0, mIgnoreCase) > -1) || + ((*iaddr).preferredEmail().find( mQuery, 0, mIgnoreCase ) > -1 ); if ( !match ) continue; } @@ -86,9 +86,9 @@ void KABC2Mutt::loadingFinished() else if ( !(*iaddr).familyName().isEmpty() ) key = (*iaddr).givenName().left( 1 ).lower() + - (*iaddr).familyName().lower().tqreplace( space, underscore ); + (*iaddr).familyName().lower().replace( space, underscore ); else - key = (*iaddr).givenName().lower().tqreplace( space, underscore ); + key = (*iaddr).givenName().lower().replace( space, underscore ); while ( from != to ) { std::cout << "alias " << key; @@ -101,7 +101,7 @@ void KABC2Mutt::loadingFinished() if ( !(*iaddr).nickName().isEmpty() ) { std::cout << "alias " - << (*iaddr).nickName().lower().tqreplace( space, underscore ) + << (*iaddr).nickName().lower().replace( space, underscore ) << '\t' << name << " <" << (*iaddr).preferredEmail() << '>' << std::endl; } @@ -130,7 +130,7 @@ void KABC2Mutt::loadingFinished() KABC::DistributionList *list = manager.list( *iaddr ); if ( list ) { if ( !mQuery.isEmpty() ) { - bool match = ((*iaddr).tqfind(mQuery) > -1); + bool match = ((*iaddr).find(mQuery) > -1); if ( !match ) continue; } @@ -140,7 +140,7 @@ void KABC2Mutt::loadingFinished() continue; if ( mFormat == Aliases ) { - std::cout << "alias " << (*iaddr).tqreplace( TQRegExp( " " ), "_" ) + std::cout << "alias " << (*iaddr).replace( TQRegExp( " " ), "_" ) << '\t' << emails.join( "," ) << std::endl; } else { std::cout << emails.join( "," ) << '\t' << (*iaddr) << '\t' << std::endl; diff --git a/kaddressbook/addresseditwidget.cpp b/kaddressbook/addresseditwidget.cpp index 60c1f2a6..61b8ec90 100644 --- a/kaddressbook/addresseditwidget.cpp +++ b/kaddressbook/addresseditwidget.cpp @@ -617,7 +617,7 @@ AddressTypeDialog::AddressTypeDialog( int type, TQWidget *tqparent ) new TQCheckBox( KABC::Address::typeLabel( *it ), mGroup ); for ( int i = 0; i < mGroup->count(); ++i ) { - TQCheckBox *box = (TQCheckBox*)mGroup->tqfind( i ); + TQCheckBox *box = (TQCheckBox*)mGroup->find( i ); box->setChecked( type & mTypeList[ i ] ); } } @@ -630,7 +630,7 @@ int AddressTypeDialog::type() const { int type = 0; for ( int i = 0; i < mGroup->count(); ++i ) { - TQCheckBox *box = (TQCheckBox*)mGroup->tqfind( i ); + TQCheckBox *box = (TQCheckBox*)mGroup->find( i ); if ( box->isChecked() ) type += mTypeList[ i ]; } diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp index 1ea2e77f..da551648 100644 --- a/kaddressbook/addresseeeditorwidget.cpp +++ b/kaddressbook/addresseeeditorwidget.cpp @@ -486,7 +486,7 @@ void AddresseeEditorWidget::setupCustomFieldsTabs() const TQStringList list = KGlobal::dirs()->findAllResources( "data", "kaddressbook/contacteditorpages/*.ui", true, true ); for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { - if ( activePages.tqfind( (*it).mid( (*it).tqfindRev('/') + 1 ) ) == activePages.end() ) + if ( activePages.find( (*it).mid( (*it).findRev('/') + 1 ) ) == activePages.end() ) continue; ContactEditorTabPage *page = new ContactEditorTabPage( mTabWidget ); diff --git a/kaddressbook/addviewdialog.cpp b/kaddressbook/addviewdialog.cpp index 548990d1..15bfe7a0 100644 --- a/kaddressbook/addviewdialog.cpp +++ b/kaddressbook/addviewdialog.cpp @@ -94,7 +94,7 @@ TQString AddViewDialog::viewName()const TQString AddViewDialog::viewType()const { // we missuse the name property for storing the type - return mTypeGroup->tqfind( mTypeId )->name(); + return mTypeGroup->find( mTypeId )->name(); } void AddViewDialog::clicked( int id ) diff --git a/kaddressbook/common/locationmap.cpp b/kaddressbook/common/locationmap.cpp index c5de16ad..f4f08fe5 100644 --- a/kaddressbook/common/locationmap.cpp +++ b/kaddressbook/common/locationmap.cpp @@ -79,17 +79,17 @@ TQString LocationMap::createUrl( const KABC::Address &addr ) } #if KDE_VERSION >= 319 - return urlTemplate.tqreplace( "%s", addr.street() ). - tqreplace( "%r", addr.region() ). - tqreplace( "%l", addr.locality() ). - tqreplace( "%z", addr.postalCode() ). - tqreplace( "%c", addr.countryToISO( addr.country() ) ); + return urlTemplate.replace( "%s", addr.street() ). + replace( "%r", addr.region() ). + replace( "%l", addr.locality() ). + replace( "%z", addr.postalCode() ). + replace( "%c", addr.countryToISO( addr.country() ) ); #else - return urlTemplate.tqreplace( "%s", addr.street() ). - tqreplace( "%r", addr.region() ). - tqreplace( "%l", addr.locality() ). - tqreplace( "%z", addr.postalCode() ). - tqreplace( "%c", "" ); + return urlTemplate.replace( "%s", addr.street() ). + replace( "%r", addr.region() ). + replace( "%l", addr.locality() ). + replace( "%z", addr.postalCode() ). + replace( "%c", "" ); #endif } diff --git a/kaddressbook/customfieldswidget.cpp b/kaddressbook/customfieldswidget.cpp index f22160d7..d78c48c6 100644 --- a/kaddressbook/customfieldswidget.cpp +++ b/kaddressbook/customfieldswidget.cpp @@ -103,7 +103,7 @@ TQString AddFieldDialog::title() const TQString AddFieldDialog::identifier() const { TQString id = mTitle->text().lower(); - return id.tqreplace( ",", "_" ).tqreplace( " ", "_" ); + return id.replace( ",", "_" ).replace( " ", "_" ); } TQString AddFieldDialog::type() const @@ -547,12 +547,12 @@ TQStringList CustomFieldsWidget::marshallFields( bool global ) const void splitField( const TQString &str, TQString &app, TQString &name, TQString &value ) { - int colon = str.tqfind( ':' ); + int colon = str.find( ':' ); if ( colon != -1 ) { TQString tmp = str.left( colon ); value = str.mid( colon + 1 ); - int dash = tmp.tqfind( '-' ); + int dash = tmp.find( '-' ); if ( dash != -1 ) { app = tmp.left( dash ); name = tmp.mid( dash + 1 ); diff --git a/kaddressbook/distributionlistpicker.cpp b/kaddressbook/distributionlistpicker.cpp index 5810276e..9b4d3f72 100644 --- a/kaddressbook/distributionlistpicker.cpp +++ b/kaddressbook/distributionlistpicker.cpp @@ -97,7 +97,7 @@ void KPIM::DistributionListPickerDialog::slotUser1() if ( name.isEmpty() ) return; - validName = !listNames.tqcontains( name ); + validName = !listNames.contains( name ); if ( validName ) { @@ -107,7 +107,7 @@ void KPIM::DistributionListPickerDialog::slotUser1() m_book->insertAddressee( list ); m_listBox->insertItem( name ); - TQListBoxItem* item = m_listBox->tqfindItem( name ); + TQListBoxItem* item = m_listBox->findItem( name ); m_listBox->setSelected( item, true ); } else diff --git a/kaddressbook/editors/imaddresswidget.cpp b/kaddressbook/editors/imaddresswidget.cpp index aa3a9a48..1d64c5b9 100644 --- a/kaddressbook/editors/imaddresswidget.cpp +++ b/kaddressbook/editors/imaddresswidget.cpp @@ -50,7 +50,7 @@ IMAddressWidget::IMAddressWidget( TQWidget *tqparent, TQValueList<KPluginInfo *> mProtocols = protocols; populateProtocols(); - cmbProtocol->setCurrentItem( mProtocols.tqfindIndex( protocol ) ); + cmbProtocol->setCurrentItem( mProtocols.findIndex( protocol ) ); edtAddress->setText( address.section( TQChar( 0xE120 ), 0, 0 ) ); edtNetwork->setText( address.section( TQChar( 0xE120 ), 1 ) ); diff --git a/kaddressbook/editors/imeditorwidget.cpp b/kaddressbook/editors/imeditorwidget.cpp index d74f51c1..0c4717b9 100644 --- a/kaddressbook/editors/imeditorwidget.cpp +++ b/kaddressbook/editors/imeditorwidget.cpp @@ -166,7 +166,7 @@ IMEditorWidget::IMEditorWidget( TQWidget *tqparent, const TQString &preferredIM, //mWidget->btnUp->setEnabled( false ); //mWidget->btnDown->setEnabled( false ); mPreferred = preferredIM; - mPreferred = mPreferred.tqreplace( " on ", TQString( TQChar( 0xE120 ) ), true ); + mPreferred = mPreferred.replace( " on ", TQString( TQChar( 0xE120 ) ), true ); mProtocols = KPluginInfo::fromServices( KTrader::self()->query( TQString::tqfromLatin1( "KABC/IMProtocol" ) ) ); // order the protocols by putting them in a qmap, then sorting the set of keys and recreating the list @@ -351,7 +351,7 @@ void IMEditorWidget::slotAdd() mPreferred = addressWid->address(); } - if ( mChangedProtocols.tqfind( addressWid->protocol() ) == mChangedProtocols.end() ) + if ( mChangedProtocols.find( addressWid->protocol() ) == mChangedProtocols.end() ) mChangedProtocols.append( addressWid->protocol() ); mWidget->lvAddresses->sort(); @@ -388,7 +388,7 @@ void IMEditorWidget::slotEdit() } // the entry for the protocol of the current address has changed - if ( mChangedProtocols.tqfind( current->protocol() ) == mChangedProtocols.end() ) { + if ( mChangedProtocols.find( current->protocol() ) == mChangedProtocols.end() ) { mChangedProtocols.append( current->protocol() ); } // update protocol - has another protocol gained an address? @@ -396,7 +396,7 @@ void IMEditorWidget::slotEdit() modified = true; // this proto is losing an entry current->setProtocol( addressWid->protocol() ); - if ( mChangedProtocols.tqfind( current->protocol() ) == mChangedProtocols.end() ) + if ( mChangedProtocols.find( current->protocol() ) == mChangedProtocols.end() ) mChangedProtocols.append( current->protocol() ); } @@ -431,7 +431,7 @@ void IMEditorWidget::slotDelete() while( it.current() ) { if ( it.current()->isSelected() ) { IMAddressLVI * current = static_cast<IMAddressLVI*>( *it ); - if ( mChangedProtocols.tqfind( current->protocol() ) == mChangedProtocols.end() ) + if ( mChangedProtocols.find( current->protocol() ) == mChangedProtocols.end() ) mChangedProtocols.append( current->protocol() ); if ( current->preferred() ) @@ -457,7 +457,7 @@ void IMEditorWidget::slotDelete() TQString IMEditorWidget::preferred() const { TQString retval( mPreferred ); - return retval.tqreplace( TQChar( 0xE120 ), " on " ); + return retval.replace( TQChar( 0xE120 ), " on " ); } @@ -477,12 +477,12 @@ KPluginInfo * IMEditorWidget::protocolFromString( const TQString &fieldValue ) c void IMEditorWidget::splitField( const TQString &str, TQString &app, TQString &name, TQString &value ) { - int colon = str.tqfind( ':' ); + int colon = str.find( ':' ); if ( colon != -1 ) { TQString tmp = str.left( colon ); value = str.mid( colon + 1 ); - int dash = tmp.tqfind( '-' ); + int dash = tmp.find( '-' ); if ( dash != -1 ) { app = tmp.left( dash ); name = tmp.mid( dash + 1 ); diff --git a/kaddressbook/extensionmanager.cpp b/kaddressbook/extensionmanager.cpp index 1496be51..77f53a97 100644 --- a/kaddressbook/extensionmanager.cpp +++ b/kaddressbook/extensionmanager.cpp @@ -74,7 +74,7 @@ void ExtensionManager::restoreSettings() typedef TQMap<TQString, ExtensionData>::ConstIterator ConstIterator; for ( ConstIterator it = mExtensionMap.begin(), end = mExtensionMap.end(); it != end; ++it ) { - if ( activeExtensions.tqcontains( it.data().identifier ) ) { + if ( activeExtensions.contains( it.data().identifier ) ) { KToggleAction *action = static_cast<KToggleAction*>( it.data().action ); if ( action ) action->setChecked( true ); @@ -102,20 +102,20 @@ void ExtensionManager::reconfigure() bool ExtensionManager::isQuickEditVisible() const { - return mActiveExtensions.tqcontains( "contact_editor" ); + return mActiveExtensions.contains( "contact_editor" ); } void ExtensionManager::setSelectionChanged() { for ( TQStringList::ConstIterator it = mActiveExtensions.begin(), end = mActiveExtensions.end(); it != end; ++it ) { - if ( mExtensionMap.tqcontains( *it ) && mExtensionMap[*it].widget ) + if ( mExtensionMap.contains( *it ) && mExtensionMap[*it].widget ) mExtensionMap[*it].widget->contactsSelectionChanged(); } } void ExtensionManager::activationToggled( const TQString &extid ) { - if ( !mExtensionMap.tqcontains( extid ) ) + if ( !mExtensionMap.contains( extid ) ) return; const ExtensionData data = mExtensionMap[ extid ]; const bool activated = data.action->isChecked(); @@ -124,9 +124,9 @@ void ExtensionManager::activationToggled( const TQString &extid ) void ExtensionManager::setExtensionActive( const TQString& extid, bool active ) { - if ( !mExtensionMap.tqcontains( extid ) ) + if ( !mExtensionMap.contains( extid ) ) return; - if ( mActiveExtensions.tqcontains( extid ) == active ) + if ( mActiveExtensions.contains( extid ) == active ) return; const ExtensionData data = mExtensionMap[ extid ]; if ( active ) { @@ -174,7 +174,7 @@ void ExtensionManager::createActions() mMapper->setMapping( data.action, data.identifier ); mActionList.append( data.action ); - if ( mActiveExtensions.tqcontains( data.identifier ) ) + if ( mActiveExtensions.contains( data.identifier ) ) data.action->setChecked( true ); } diff --git a/kaddressbook/features/distributionlistwidget.cpp b/kaddressbook/features/distributionlistwidget.cpp index 7ce25beb..fc8af3ab 100644 --- a/kaddressbook/features/distributionlistwidget.cpp +++ b/kaddressbook/features/distributionlistwidget.cpp @@ -255,9 +255,9 @@ void DistributionListWidget::selectionContactViewChanged() bool DistributionListWidget::alreadyExists( const TQString& distrListName ) const { #ifdef KDEPIM_NEW_DISTRLISTS - return core()->distributionListNames().tqcontains( distrListName ); + return core()->distributionListNames().contains( distrListName ); #else - return mManager->listNames().tqcontains( distrListName ); + return mManager->listNames().contains( distrListName ); #endif } diff --git a/kaddressbook/features/resourceselection.cpp b/kaddressbook/features/resourceselection.cpp index edbb37a0..0629052a 100644 --- a/kaddressbook/features/resourceselection.cpp +++ b/kaddressbook/features/resourceselection.cpp @@ -241,7 +241,7 @@ void ResourceSelection::add() if ( !ok ) return; - TQString type = types[ descs.tqfindIndex( desc ) ]; + TQString type = types[ descs.findIndex( desc ) ]; // Create new resource KABC::Resource *resource = mManager->createResource( type ); @@ -410,7 +410,7 @@ void ResourceSelection::slotSubresourceAdded( KPIM::ResourceABC *resource, const TQString& subResource ) { kdDebug(5720) << k_funcinfo << resource->resourceName() << " " << subResource << endl; - TQListViewItem *i = mListView->tqfindItem( resource->resourceName(), 0 ); + TQListViewItem *i = mListView->findItem( resource->resourceName(), 0 ); if ( !i ) // Not found return; diff --git a/kaddressbook/filtereditdialog.cpp b/kaddressbook/filtereditdialog.cpp index 7428b363..bb9e255b 100644 --- a/kaddressbook/filtereditdialog.cpp +++ b/kaddressbook/filtereditdialog.cpp @@ -71,7 +71,7 @@ void FilterEditDialog::setFilter( const Filter &filter ) TQStringList categories = filter.categories(); TQListViewItem *item = mCategoriesView->firstChild(); while ( item != 0 ) { - if ( categories.tqcontains( item->text( 0 ) ) ) { + if ( categories.contains( item->text( 0 ) ) ) { TQCheckListItem *checkItem = static_cast<TQCheckListItem*>( item ); checkItem->setOn( true ); } @@ -102,7 +102,7 @@ Filter FilterEditDialog::filter() } filter.setCategories( categories ); - if ( mMatchRuleGroup->tqfind( 0 )->isOn() ) + if ( mMatchRuleGroup->find( 0 )->isOn() ) filter.setMatchRule( Filter::Matching ); else filter.setMatchRule( Filter::NotMatching ); diff --git a/kaddressbook/geowidget.cpp b/kaddressbook/geowidget.cpp index 5dc43286..2b9b32c9 100644 --- a/kaddressbook/geowidget.cpp +++ b/kaddressbook/geowidget.cpp @@ -404,13 +404,13 @@ void GeoDialog::loadCityList() pos = name.search(line, pos); if ( pos > 0 ) { n = line.mid( pos, name.matchedLength() ).stripWhiteSpace(); - n.tqreplace( '_', " " ); + n.replace( '_', " " ); } if ( !c.isEmpty() && !n.isEmpty() ) { - pos = c.tqfind( "+", 1 ); + pos = c.find( "+", 1 ); if ( pos < 0 ) - pos = c.tqfind( "-", 1 ); + pos = c.find( "-", 1 ); if ( pos > 0 ) { GeoData data; data.latitude = calculateCoordinate( c.left( pos ) ); diff --git a/kaddressbook/jumpbuttonbar.cpp b/kaddressbook/jumpbuttonbar.cpp index 1af942b2..e4a712a9 100644 --- a/kaddressbook/jumpbuttonbar.cpp +++ b/kaddressbook/jumpbuttonbar.cpp @@ -121,7 +121,7 @@ void JumpButtonBar::updateButtons() return; } - if ( !character.isEmpty() && !characters.tqcontains( character ) ) + if ( !character.isEmpty() && !characters.contains( character ) ) characters.append( character ); } diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 23ebc277..db10f8f9 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -778,7 +778,7 @@ void KABCore::addEmail( const TQString &aStr ) const KABC::AddressBook::Iterator endIt( mAddressBook->end() ); for ( it = mAddressBook->begin(); !found && (it != endIt); ++it ) { emailList = (*it).emails(); - if ( emailList.tqcontains( email ) > 0 ) { + if ( emailList.contains( email ) > 0 ) { found = true; (*it).setNameFromString( fullName ); editContact( (*it).uid() ); @@ -831,7 +831,7 @@ void KABCore::editContact( const TQString &uid ) KABC::Addressee addr = mAddressBook->findByUid( localUID ); if ( !addr.isEmpty() ) { - AddresseeEditorDialog *dialog = mEditorDict.tqfind( addr.uid() ); + AddresseeEditorDialog *dialog = mEditorDict.find( addr.uid() ); if ( !dialog ) { if ( !addr.resource()->readOnly() ) @@ -1005,7 +1005,7 @@ TQString KABCore::getNameByPhone( const TQString &phone ) const KABC::PhoneNumber::List::Iterator phoneEndIter( phoneList.end() ); for ( ; !found && ( phoneIter != phoneEndIter ); ++phoneIter) { // Get rid of separator chars so just the numbers are compared. - if ( (*phoneIter).number().tqreplace( r, "" ) == localPhone.tqreplace( r, "" ) ) { + if ( (*phoneIter).number().replace( r, "" ) == localPhone.replace( r, "" ) ) { ownerName = (*iter).realName(); found = true; } @@ -1406,7 +1406,7 @@ void KABCore::initActions() action->setWhatsThis( i18n( "You will be presented with a dialog, that offers you all possibilities to configure KAddressBook." ) ); // misc - action = new KAction( i18n( "&Lookup Addresses in LDAP Directory..." ), "tqfind", 0, + action = new KAction( i18n( "&Lookup Addresses in LDAP Directory..." ), "find", 0, this, TQT_SLOT( openLDAPDialog() ), actionCollection(), "ldap_lookup" ); action->setWhatsThis( i18n( "Search for contacts on a LDAP server<p>You will be presented with a dialog, where you can search for contacts and select the ones you want to add to your local address book." ) ); @@ -1449,7 +1449,7 @@ void KABCore::updateCategories() TQStringList::ConstIterator it; const TQStringList::ConstIterator endIt( customCategories.end() ); for ( it = customCategories.begin(); it != endIt; ++it ) { - if ( categories.tqfind( *it ) == categories.end() ) { + if ( categories.find( *it ) == categories.end() ) { categories.append( *it ); } } @@ -1477,7 +1477,7 @@ TQStringList KABCore::allCategories() const categories = (*it).categories(); const TQStringList::ConstIterator catEndIt( categories.end() ); for ( catIt = categories.begin(); catIt != catEndIt; ++catIt ) { - if ( !allCategories.tqcontains( *catIt ) ) + if ( !allCategories.contains( *catIt ) ) allCategories.append( *catIt ); } } @@ -1519,7 +1519,7 @@ void KABCore::categoriesSelected( const TQStringList &categories ) TQStringList::ConstIterator catIt; const TQStringList::ConstIterator catEndIt( categories.end() ); for ( catIt = categories.begin(); catIt != catEndIt; ++catIt ) { - if ( !addrCategories.tqcontains( *catIt ) ) + if ( !addrCategories.contains( *catIt ) ) addrCategories.append( *catIt ); } addr.setCategories( addrCategories ); diff --git a/kaddressbook/kablock.cpp b/kaddressbook/kablock.cpp index 259ee70d..9444df47 100644 --- a/kaddressbook/kablock.cpp +++ b/kaddressbook/kablock.cpp @@ -65,7 +65,7 @@ KABLock *KABLock::self( KABC::AddressBook *ab ) bool KABLock::lock( KABC::Resource *resource ) { - if ( mLocks.tqfind( resource ) == mLocks.end() ) { // not locked yet + if ( mLocks.find( resource ) == mLocks.end() ) { // not locked yet KABC::Ticket *ticket = mAddressBook->requestSaveTicket( resource ); if ( !ticket ) { return false; @@ -89,7 +89,7 @@ bool KABLock::unlock( KABC::Resource *resource ) if ( resource == 0 ) resource = wrapper->getStandardResource(); - if ( mLocks.tqfind( resource ) == mLocks.end() ) { // hmm, not good... + if ( mLocks.find( resource ) == mLocks.end() ) { // hmm, not good... return false; } else { LockEntry &entry = mLocks[ resource ]; diff --git a/kaddressbook/kabtools.cpp b/kaddressbook/kabtools.cpp index 31d7f368..3efa4277 100644 --- a/kaddressbook/kabtools.cpp +++ b/kaddressbook/kabtools.cpp @@ -39,12 +39,12 @@ static TQString uniqueFileName( const KABC::Addressee &addressee, TQStringList & uint number = 0; do { name = addressee.givenName() + "_" + addressee.familyName() + uniquePart + ".vcf"; - name.tqreplace( ' ', '_' ); - name.tqreplace( '/', '_' ); + name.replace( ' ', '_' ); + name.replace( '/', '_' ); ++number; uniquePart = TQString( "_%1" ).tqarg( number ); - } while ( existingFiles.tqcontains( name ) ); + } while ( existingFiles.contains( name ) ); existingFiles.append( name ); @@ -141,7 +141,7 @@ KABC::Addressee KABTools::mergeContacts( const KABC::Addressee::List &list ) KABC::Address::List::ConstIterator addrIt( addresses.begin() ); const KABC::Address::List::ConstIterator addrEndIt( addresses.end() ); for ( ; addrIt != addrEndIt; ++addrIt ) { - if ( !masterAddresses.tqcontains( *addrIt ) ) + if ( !masterAddresses.contains( *addrIt ) ) masterAddressee.insertAddress( *addrIt ); } @@ -156,7 +156,7 @@ KABC::Addressee KABTools::mergeContacts( const KABC::Addressee::List &list ) TQStringList::ConstIterator it( categories.begin() ); TQStringList::ConstIterator endIt( categories.end() ); for ( it = categories.begin(); it != endIt; ++it ) - if ( !masterCategories.tqcontains( *it ) ) + if ( !masterCategories.contains( *it ) ) newCategories.append( *it ); masterAddressee.setCategories( newCategories ); @@ -169,7 +169,7 @@ KABC::Addressee KABTools::mergeContacts( const KABC::Addressee::List &list ) const TQStringList masterEmails = masterAddressee.emails(); endIt = emails.end(); for ( it = emails.begin(); it != endIt; ++it ) - if ( !masterEmails.tqcontains( *it ) ) + if ( !masterEmails.contains( *it ) ) masterAddressee.insertEmail( *it, false ); // FN @@ -239,7 +239,7 @@ KABC::Addressee KABTools::mergeContacts( const KABC::Addressee::List &list ) KABC::PhoneNumber::List::ConstIterator phoneIt( phones.begin() ); const KABC::PhoneNumber::List::ConstIterator phoneEndIt( phones.end() ); for ( ; phoneIt != phoneEndIt; ++phoneIt ) - if ( !masterPhones.tqcontains( *phoneIt ) ) + if ( !masterPhones.contains( *phoneIt ) ) masterAddressee.insertPhoneNumber( *phoneIt ); // TITLE @@ -262,7 +262,7 @@ KABC::Addressee KABTools::mergeContacts( const KABC::Addressee::List &list ) TQStringList newCustoms( masterCustoms ); endIt = customs.end(); for ( it = customs.begin(); it != endIt; ++it ) - if ( !masterCustoms.tqcontains( *it ) ) + if ( !masterCustoms.contains( *it ) ) newCustoms.append( *it ); masterAddressee.setCustoms( newCustoms ); } diff --git a/kaddressbook/kcmconfigs/kabldapconfig.desktop b/kaddressbook/kcmconfigs/kabldapconfig.desktop index e007f2b5..2d29acdf 100644 --- a/kaddressbook/kcmconfigs/kabldapconfig.desktop +++ b/kaddressbook/kcmconfigs/kabldapconfig.desktop @@ -1,5 +1,5 @@ [Desktop Entry] -Icon=tqfind +Icon=find Type=Service ServiceTypes=KCModule DocPath=kaddressbook/preferences.html#preferences-ldap-lookup diff --git a/kaddressbook/keywidget.cpp b/kaddressbook/keywidget.cpp index 3541ddf1..1b6e7744 100644 --- a/kaddressbook/keywidget.cpp +++ b/kaddressbook/keywidget.cpp @@ -98,7 +98,7 @@ void KeyWidget::addKey() KABC::Key::TypeList::ConstIterator it; for ( it = typeList.begin(); it != typeList.end(); ++it ) { if ( (*it) != KABC::Key::Custom && - !existingKeyTypes.tqcontains( KABC::Key::typeLabel( *it ) ) ) { + !existingKeyTypes.contains( KABC::Key::typeLabel( *it ) ) ) { keyMap.insert( KABC::Key::typeLabel( *it ), *it ); keyTypeNames.append( KABC::Key::typeLabel( *it ) ); } @@ -110,7 +110,7 @@ void KeyWidget::addKey() return; int type = keyMap[ name ]; - if ( !keyTypeNames.tqcontains( name ) ) + if ( !keyTypeNames.contains( name ) ) type = KABC::Key::Custom; KURL url = KFileDialog::getOpenURL(); diff --git a/kaddressbook/phoneeditwidget.cpp b/kaddressbook/phoneeditwidget.cpp index fc05df18..4a394621 100644 --- a/kaddressbook/phoneeditwidget.cpp +++ b/kaddressbook/phoneeditwidget.cpp @@ -68,7 +68,7 @@ PhoneTypeCombo::~PhoneTypeCombo() void PhoneTypeCombo::setType( int type ) { - if ( !mTypeList.tqcontains( type ) ) + if ( !mTypeList.contains( type ) ) mTypeList.insert( mTypeList.at( mTypeList.count() - 1 ), type ); mType = type; @@ -97,7 +97,7 @@ void PhoneTypeCombo::update() } } - setCurrentItem( mLastSelected = mTypeList.tqfindIndex( mType ) ); + setCurrentItem( mLastSelected = mTypeList.findIndex( mType ) ); blockSignals( blocked ); } @@ -117,7 +117,7 @@ void PhoneTypeCombo::otherSelected() PhoneTypeDialog dlg( mType, this ); if ( dlg.exec() ) { mType = dlg.type(); - if ( !mTypeList.tqcontains( mType ) ) + if ( !mTypeList.contains( mType ) ) mTypeList.insert( mTypeList.at( mTypeList.count() - 1 ), mType ); } else { setType( mTypeList[ mLastSelected ] ); @@ -315,7 +315,7 @@ PhoneTypeDialog::PhoneTypeDialog( int type, TQWidget *tqparent ) new TQCheckBox( KABC::PhoneNumber::typeLabel( *it ), mGroup ); for ( int i = 0; i < mGroup->count(); ++i ) { - TQCheckBox *box = (TQCheckBox*)mGroup->tqfind( i ); + TQCheckBox *box = (TQCheckBox*)mGroup->find( i ); box->setChecked( mType & mTypeList[ i ] ); } @@ -327,7 +327,7 @@ int PhoneTypeDialog::type() const int type = 0; for ( int i = 0; i < mGroup->count(); ++i ) { - TQCheckBox *box = (TQCheckBox*)mGroup->tqfind( i ); + TQCheckBox *box = (TQCheckBox*)mGroup->find( i ); if ( box->isChecked() ) type += mTypeList[ i ]; } diff --git a/kaddressbook/printing/kabentrypainter.cpp b/kaddressbook/printing/kabentrypainter.cpp index 356b53df..91bf9f34 100644 --- a/kaddressbook/printing/kabentrypainter.cpp +++ b/kaddressbook/printing/kabentrypainter.cpp @@ -139,7 +139,7 @@ int KABEntryPainter::hits( const TQRectList& list, const TQPoint &p ) int count = 0; for ( pos = list.begin(); pos != list.end(); ++pos ) { - if ( (*pos).tqcontains( p ) ) + if ( (*pos).contains( p ) ) return count; ++count; @@ -241,7 +241,7 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr, if ( !( addr.prefix().isEmpty() ) ) y += fmBody.lineSpacing() / 2; - // fill the parts stringlist, it tqcontains "parts" (printable areas) + // fill the parts stringlist, it contains "parts" (printable areas) // that will be combined to fill the page as effectively as possible: // Email addresses: if ( !addr.emails().isEmpty() && mShowEmails ) { diff --git a/kaddressbook/printing/mikesstyle.cpp b/kaddressbook/printing/mikesstyle.cpp index 63cfdcfd..2301bb16 100644 --- a/kaddressbook/printing/mikesstyle.cpp +++ b/kaddressbook/printing/mikesstyle.cpp @@ -226,14 +226,14 @@ int MikesStyle::calcHeight( const KABC::Addressee &addr, // Determine which half of the fields is higher for ( int i = 0; i < numFields / 2; i++ ) - halfHeight += fm.height() * (fieldList[ i ]->value( addr ).tqcontains( '\n' ) + 1); + halfHeight += fm.height() * (fieldList[ i ]->value( addr ).contains( '\n' ) + 1); height = halfHeight; // now the second half halfHeight = 0; for ( int i = numFields / 2; i < numFields; i++ ) - halfHeight += fm.height() * (fieldList[ i ]->value( addr ).tqcontains( '\n' ) + 1); + halfHeight += fm.height() * (fieldList[ i ]->value( addr ).contains( '\n' ) + 1); height = TQMAX( height, halfHeight ); diff --git a/kaddressbook/printing/printingwizard.cpp b/kaddressbook/printing/printingwizard.cpp index 949ebd51..e42621de 100644 --- a/kaddressbook/printing/printingwizard.cpp +++ b/kaddressbook/printing/printingwizard.cpp @@ -186,7 +186,7 @@ void PrintingWizard::print() const TQStringList tmp( (*it).categories() ); TQStringList::ConstIterator tmpIt; for ( tmpIt = tmp.begin(); tmpIt != tmp.end(); ++tmpIt ) - if ( categories.tqcontains( *tmpIt ) ) { + if ( categories.contains( *tmpIt ) ) { list.append( *it ); break; } diff --git a/kaddressbook/printing/printstyle.cpp b/kaddressbook/printing/printstyle.cpp index 02e563ee..1c0c7971 100644 --- a/kaddressbook/printing/printstyle.cpp +++ b/kaddressbook/printing/printstyle.cpp @@ -76,7 +76,7 @@ PrintingWizard *PrintStyle::wizard() void PrintStyle::addPage( TQWidget *page, const TQString &title ) { - if ( mPageList.tqfind( page ) == -1 ) { // not yet in the list + if ( mPageList.find( page ) == -1 ) { // not yet in the list mPageList.append( page ); mPageTitles.append( title ); } diff --git a/kaddressbook/searchmanager.cpp b/kaddressbook/searchmanager.cpp index 32b898cd..7a24e1b9 100644 --- a/kaddressbook/searchmanager.cpp +++ b/kaddressbook/searchmanager.cpp @@ -117,7 +117,7 @@ void SearchManager::search( const TQString &pattern, const KABC::Field::List &fi mContacts.append( *it ); found = true; break; - } else if ( type == Contains && (*fieldIt)->value( *it ).tqfind( pattern, 0, false ) != -1 ) { + } else if ( type == Contains && (*fieldIt)->value( *it ).find( pattern, 0, false ) != -1 ) { mContacts.append( *it ); found = true; break; @@ -135,7 +135,7 @@ void SearchManager::search( const TQString &pattern, const KABC::Field::List &fi TQStringList::ConstIterator customIt( customs.begin() ); const TQStringList::ConstIterator customEndIt( customs.end() ); for ( ; customIt != customEndIt; ++customIt ) { - int pos = (*customIt).tqfind( ':' ); + int pos = (*customIt).find( ':' ); if ( pos != -1 ) { const TQString value = (*customIt).mid( pos + 1 ); if ( type == StartsWith && value.tqstartsWith( pattern, false ) ) { @@ -144,7 +144,7 @@ void SearchManager::search( const TQString &pattern, const KABC::Field::List &fi } else if ( type == EndsWith && value.tqendsWith( pattern, false ) ) { mContacts.append( *it ); break; - } else if ( type == Contains && value.tqfind( pattern, 0, false ) != -1 ) { + } else if ( type == Contains && value.find( pattern, 0, false ) != -1 ) { mContacts.append( *it ); break; } else if ( type == Equals && value.localeAwareCompare( pattern ) == 0 ) { diff --git a/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp b/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp index eb6b7670..3216ea73 100644 --- a/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp +++ b/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp @@ -130,7 +130,7 @@ bool VCard_LDIFCreator::readContents( const TQString &path ) TQStringList phoneNumbers; for (unsigned int no=0; no<pnList.count(); ++no) { TQString pn = pnList[no].number().simplifyWhiteSpace(); - if (!pn.isEmpty() && !phoneNumbers.tqcontains(pn)) + if (!pn.isEmpty() && !phoneNumbers.contains(pn)) phoneNumbers.append(pn); } if ( !phoneNumbers.isEmpty() ) @@ -207,7 +207,7 @@ bool VCard_LDIFCreator::createImageSmall() // after starting a new line, we also jump to the next // physical newline in the file if we don't come from one if ( !newLine ) { - int pos = text.tqfind( '\n', i ); + int pos = text.find( '\n', i ); if ( pos > (int) i ) i = pos +1; } diff --git a/kaddressbook/typecombo.h b/kaddressbook/typecombo.h index 7280b5c7..29266fa8 100644 --- a/kaddressbook/typecombo.h +++ b/kaddressbook/typecombo.h @@ -86,7 +86,7 @@ void TypeCombo<T>::updateTypes() int type = ( mTypeList[ i ].type() & ~( T::Pref ) ); TQString label = mTypeList[ i ].typeLabel( type ); int count = 1; - if ( labelCount.tqcontains( type ) ) { + if ( labelCount.contains( type ) ) { count = labelCount[ type ] + 1; } labelCount[ type ] = count; diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index 23b1a4cc..646fbbae 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp @@ -195,7 +195,7 @@ void ViewManager::setActiveView( const TQString &name ) // we can't find it, it means it hasn't been instantiated, so we will // create it on demand. - view = mViewDict.tqfind( name ); + view = mViewDict.find( name ); // Check if we found the view. If we didn't, then we need to create it if ( view == 0 ) { @@ -205,7 +205,7 @@ void ViewManager::setActiveView( const TQString &name ) kdDebug(5720) << "ViewManager::setActiveView: creating view - " << name << endl; - ViewFactory *factory = mViewFactoryDict.tqfind( type ); + ViewFactory *factory = mViewFactoryDict.find( type ); if ( factory ) view = factory->view( mCore, mViewWidgetStack ); @@ -265,7 +265,7 @@ void ViewManager::editView() if ( !mActiveView ) return; - ViewFactory *factory = mViewFactoryDict.tqfind( mActiveView->type() ); + ViewFactory *factory = mViewFactoryDict.find( mActiveView->type() ); ViewConfigureWidget *wdg = 0; if ( factory ) { @@ -342,7 +342,7 @@ void ViewManager::addView() // Check for name conflicts bool firstConflict = true; int numTries = 1; - while ( mViewNameList.tqcontains( newName ) > 0 ) { + while ( mViewNameList.contains( newName ) > 0 ) { if ( !firstConflict ) { newName = newName.left( newName.length() - 4 ); firstConflict = false; @@ -363,7 +363,7 @@ void ViewManager::addView() // try to set the active view mActionSelectView->setItems( mViewNameList ); - mActionSelectView->setCurrentItem( mViewNameList.tqfindIndex( newName ) ); + mActionSelectView->setCurrentItem( mViewNameList.findIndex( newName ) ); setActiveView( newName ); editView(); diff --git a/kaddressbook/views/cardview.cpp b/kaddressbook/views/cardview.cpp index 9b0784d8..b790b0c3 100644 --- a/kaddressbook/views/cardview.cpp +++ b/kaddressbook/views/cardview.cpp @@ -61,7 +61,7 @@ class CardViewTip : public TQLabel }; // -// Warning: make sure you use tqfindRef() instead of tqfind() to find an +// Warning: make sure you use findRef() instead of find() to find an // item! Only the pointer value is unique in the list. // class CardViewItemList : public TQPtrList<CardViewItem> @@ -355,7 +355,7 @@ int CardViewItem::height( bool allowCache ) const for ( iter.toFirst(); iter.current(); ++iter ) { if ( !sef && (*iter)->second.isEmpty() ) continue; - lines = TQMIN( (*iter)->second.tqcontains( '\n' ) + 1, maxLines ); + lines = TQMIN( (*iter)->second.contains( '\n' ) + 1, maxLines ); fieldHeight += ( lines * fh ) + 2; } @@ -507,7 +507,7 @@ void CardViewItem::showFullString( const TQPoint &itempos, CardViewTip *tip ) Field *_f; for ( _f = d->mFieldList.first(); _f != f; _f = d->mFieldList.next() ) if ( se || ! _f->second.isEmpty() ) - y += ( TQMIN( _f->second.tqcontains( '\n' ) + 1, maxLines ) * fh ) + 2; + y += ( TQMIN( _f->second.contains( '\n' ) + 1, maxLines ) * fh ) + 2; if ( isLabel && itempos.y() > y + fh ) return; @@ -521,7 +521,7 @@ void CardViewItem::showFullString( const TQPoint &itempos, CardViewTip *tip ) trimmed = mView->d->mFm->width( s ) > mw - colonWidth; } else { TQRect r( mView->d->mFm->boundingRect( 0, 0, INT_MAX, INT_MAX, TQt::AlignTop|TQt::AlignLeft, s ) ); - trimmed = r.width() > mw || r.height() / fh > TQMIN( s.tqcontains( '\n' ) + 1, maxLines ); + trimmed = r.width() > mw || r.height() / fh > TQMIN( s.contains( '\n' ) + 1, maxLines ); } } @@ -560,7 +560,7 @@ CardViewItem::Field *CardViewItem::fieldAt( const TQPoint & itempos ) const Field *f; for ( f = d->mFieldList.first(); f; f = d->mFieldList.next() ) { if ( showEmpty || !f->second.isEmpty() ) - ypos += (TQMIN( f->second.tqcontains( '\n' )+1, maxLines ) * fh) + 2; + ypos += (TQMIN( f->second.contains( '\n' )+1, maxLines ) * fh) + 2; if ( iy <= ypos ) break; } @@ -616,7 +616,7 @@ void CardView::takeItem( CardViewItem *item ) { if ( d->mCurrentItem == item ) d->mCurrentItem = item->nextItem(); - d->mItemList.take( d->mItemList.tqfindRef( item ) ); + d->mItemList.take( d->mItemList.findRef( item ) ); setLayoutDirty( true ); } @@ -671,7 +671,7 @@ CardViewItem *CardView::itemAt( const TQPoint &viewPos ) const bool found = false; for ( iter.toFirst(); iter.current() && !found; ++iter ) { item = *iter; - if ( TQRect( item->d->x, item->d->y, d->mItemWidth, item->height() ).tqcontains( viewPos ) ) + if ( TQRect( item->d->x, item->d->y, d->mItemWidth, item->height() ).contains( viewPos ) ) found = true; } @@ -860,7 +860,7 @@ void CardView::drawContents( TQPainter *p, int clipx, int clipy, item = *iter; cardRect.setRect( item->d->x, item->d->y, d->mItemWidth, item->height() ); - if ( clipRect.intersects( cardRect ) || clipRect.tqcontains( cardRect ) ) { + if ( clipRect.intersects( cardRect ) || clipRect.contains( cardRect ) ) { // Tell the card to paint p->save(); p->translate( cardRect.x(), cardRect.y() ); @@ -875,7 +875,7 @@ void CardView::drawContents( TQPainter *p, int clipx, int clipy, sep = *sepIter; sepRect = sep->mRect; - if ( clipRect.intersects( sepRect ) || clipRect.tqcontains( sepRect ) ) { + if ( clipRect.intersects( sepRect ) || clipRect.contains( sepRect ) ) { p->save(); p->translate( sepRect.x(), sepRect.y() ); sep->paintSeparator( p, cg ); @@ -953,7 +953,7 @@ void CardView::calcLayout() CardViewItem *CardView::itemAfter( const CardViewItem *item ) const { - d->mItemList.tqfindRef( item ); + d->mItemList.findRef( item ); return d->mItemList.next(); } @@ -1070,8 +1070,8 @@ void CardView::contentsMousePressEvent( TQMouseEvent *e ) } int from, to, a, b; - a = d->mItemList.tqfindRef( item ); - b = d->mItemList.tqfindRef( other ); + a = d->mItemList.findRef( item ); + b = d->mItemList.findRef( other ); from = a < b ? a : b; to = a > b ? a : b; @@ -1218,7 +1218,7 @@ void CardView::keyPressEvent( TQKeyEvent *e ) return; } - uint pos = d->mItemList.tqfindRef( d->mCurrentItem ); + uint pos = d->mItemList.findRef( d->mCurrentItem ); CardViewItem *aItem = 0; CardViewItem *old = d->mCurrentItem; @@ -1347,8 +1347,8 @@ void CardView::keyPressEvent( TQKeyEvent *e ) // otherwise, ?????? bool s = ! aItem->isSelected(); int from, to, a, b; - a = d->mItemList.tqfindRef( aItem ); - b = d->mItemList.tqfindRef( old ); + a = d->mItemList.findRef( aItem ); + b = d->mItemList.findRef( old ); from = a < b ? a : b; to = a > b ? a : b; diff --git a/kaddressbook/xxport/csv_xxport.cpp b/kaddressbook/xxport/csv_xxport.cpp index 03962d3a..aa2d7653 100644 --- a/kaddressbook/xxport/csv_xxport.cpp +++ b/kaddressbook/xxport/csv_xxport.cpp @@ -123,7 +123,7 @@ void CSVXXPort::doExport( TQFile *fp, const KABC::AddresseeList &list ) if ( !first ) t << ","; - t << "\"" << (*fieldIter)->value( addr ).tqreplace( "\n", "\\n" ) << "\""; + t << "\"" << (*fieldIter)->value( addr ).replace( "\n", "\\n" ) << "\""; first = false; } diff --git a/kaddressbook/xxport/csvimportdialog.cpp b/kaddressbook/xxport/csvimportdialog.cpp index 1120e4f0..9e2b8d6f 100644 --- a/kaddressbook/xxport/csvimportdialog.cpp +++ b/kaddressbook/xxport/csvimportdialog.cpp @@ -854,7 +854,7 @@ void CSVImportDialog::saveTemplate() if ( fileName.isEmpty() ) return; - if ( !fileName.tqcontains( ".desktop" ) ) + if ( !fileName.contains( ".desktop" ) ) fileName += ".desktop"; if( TQFileInfo(fileName).exists() ) { diff --git a/kaddressbook/xxport/eudora_xxport.cpp b/kaddressbook/xxport/eudora_xxport.cpp index 9844b550..bed37433 100644 --- a/kaddressbook/xxport/eudora_xxport.cpp +++ b/kaddressbook/xxport/eudora_xxport.cpp @@ -124,22 +124,22 @@ TQString EudoraXXPort::key( const TQString& line) const { int e; TQString result; - int b = line.tqfind( '\"', 0 ); + int b = line.find( '\"', 0 ); if ( b == -1 ) { - b = line.tqfind( ' ' ); + b = line.find( ' ' ); if ( b == -1 ) return result; b++; - e = line.tqfind( ' ', b ); + e = line.find( ' ', b ); result = line.mid( b, e - b ); return result; } b++; - e = line.tqfind( '\"', b ); + e = line.find( '\"', b ); if ( e == -1 ) return result; @@ -152,9 +152,9 @@ TQString EudoraXXPort::email( const TQString& line ) const { int b; TQString result; - b = line.tqfindRev( '\"' ); + b = line.findRev( '\"' ); if ( b == -1 ) { - b = line.tqfindRev( ' ' ); + b = line.findRev( ' ' ); if ( b == -1 ) return result; } @@ -168,9 +168,9 @@ TQString EudoraXXPort::comment( const TQString& line ) const int b; TQString result; uint i; - b = line.tqfindRev( '>' ); + b = line.findRev( '>' ); if ( b == -1 ) { - b = line.tqfindRev( '\"' ); + b = line.findRev( '\"' ); if ( b == -1 ) return result; } @@ -191,12 +191,12 @@ TQString EudoraXXPort::get( const TQString& line, const TQString& key ) const uint i; // Find formatted key, return on error - b = line.tqfind( fd ); + b = line.find( fd ); if ( b == -1 ) return TQString(); b += fd.length(); - e = line.tqfind( '>', b ); + e = line.find( '>', b ); if ( e == -1 ) return TQString(); diff --git a/kaddressbook/xxport/eudora_xxport.h b/kaddressbook/xxport/eudora_xxport.h index e8dcf939..de2b4784 100644 --- a/kaddressbook/xxport/eudora_xxport.h +++ b/kaddressbook/xxport/eudora_xxport.h @@ -44,7 +44,7 @@ class EudoraXXPort : public KAB::XXPort TQString comment( const TQString& line ) const; TQString email( const TQString& line ) const; TQString key( const TQString& line ) const; - int tqfind( const TQString& key ) const; + int find( const TQString& key ) const; }; #endif diff --git a/kaddressbook/xxport/gnokii_xxport.cpp b/kaddressbook/xxport/gnokii_xxport.cpp index 564fcf5f..2d18cef7 100644 --- a/kaddressbook/xxport/gnokii_xxport.cpp +++ b/kaddressbook/xxport/gnokii_xxport.cpp @@ -94,7 +94,7 @@ static TQString makeValidPhone( const TQString &number ) TQString num = number.simplifyWhiteSpace(); TQString allowed("0123456789*+#pw"); for (unsigned int i=num.length(); i>=1; i--) - if (allowed.tqfind(num[i-1])==-1) + if (allowed.find(num[i-1])==-1) num.remove(i-1,1); if (num.isEmpty()) num = "0"; @@ -242,7 +242,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty // try to split Name into FamilyName and GivenName s = GN_FROM(name).simplifyWhiteSpace(); a->setFormattedName(s); // set formatted name as in Phone - if (s.tqfind(',') == -1) { + if (s.find(',') == -1) { // assumed format: "givenname [... familyname]" addrlist = TQStringList::split(' ', s); if (addrlist.count() == 1) { @@ -482,13 +482,13 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem TQStringList a; TQChar sem(';'); TQString sem_repl(TQString::tqfromLatin1(",")); - a.append( Addr->postOfficeBox().tqreplace( sem, sem_repl ) ); - a.append( Addr->extended() .tqreplace( sem, sem_repl ) ); - a.append( Addr->street() .tqreplace( sem, sem_repl ) ); - a.append( Addr->locality() .tqreplace( sem, sem_repl ) ); - a.append( Addr->region() .tqreplace( sem, sem_repl ) ); - a.append( Addr->postalCode() .tqreplace( sem, sem_repl ) ); - a.append( Addr->country() .tqreplace( sem, sem_repl ) ); + a.append( Addr->postOfficeBox().replace( sem, sem_repl ) ); + a.append( Addr->extended() .replace( sem, sem_repl ) ); + a.append( Addr->street() .replace( sem, sem_repl ) ); + a.append( Addr->locality() .replace( sem, sem_repl ) ); + a.append( Addr->region() .replace( sem, sem_repl ) ); + a.append( Addr->postalCode() .replace( sem, sem_repl ) ); + a.append( Addr->country() .replace( sem, sem_repl ) ); s = a.join(sem); gn_lib_set_pb_subentry(state, -1 /* index to append entry */, GN_PHONEBOOK_ENTRY_Postal, GN_PHONEBOOK_NUMBER_General, GN_TO(s)); @@ -639,7 +639,7 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQStri if (memstat.free >= (int) list.count()) { if (KMessageBox::No == KMessageBox::questionYesNo(parentWidget(), i18n("<qt>Do you want the selected contacts to be <b>appended</b> to " - "the current mobile phonebook or should they <b>tqreplace</b> all " + "the current mobile phonebook or should they <b>replace</b> all " "currently existing phonebook entries ?<br><br>" "Please note, that in case you choose to replace the phonebook " "entries, every contact in your phone will be deleted and only " @@ -1015,7 +1015,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty // try to split Name into FamilyName and GivenName s = GN_FROM(entry.name).simplifyWhiteSpace(); a->setFormattedName(s); // set formatted name as in Phone - if (s.tqfind(',') == -1) { + if (s.find(',') == -1) { // assumed format: "givenname [... familyname]" addrlist = TQStringList::split(' ', s); if (addrlist.count() == 1) { @@ -1264,13 +1264,13 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem TQStringList a; TQChar sem(';'); TQString sem_repl(TQString::tqfromLatin1(",")); - a.append( Addr->postOfficeBox().tqreplace( sem, sem_repl ) ); - a.append( Addr->extended() .tqreplace( sem, sem_repl ) ); - a.append( Addr->street() .tqreplace( sem, sem_repl ) ); - a.append( Addr->locality() .tqreplace( sem, sem_repl ) ); - a.append( Addr->region() .tqreplace( sem, sem_repl ) ); - a.append( Addr->postalCode() .tqreplace( sem, sem_repl ) ); - a.append( Addr->country() .tqreplace( sem, sem_repl ) ); + a.append( Addr->postOfficeBox().replace( sem, sem_repl ) ); + a.append( Addr->extended() .replace( sem, sem_repl ) ); + a.append( Addr->street() .replace( sem, sem_repl ) ); + a.append( Addr->locality() .replace( sem, sem_repl ) ); + a.append( Addr->region() .replace( sem, sem_repl ) ); + a.append( Addr->postalCode() .replace( sem, sem_repl ) ); + a.append( Addr->country() .replace( sem, sem_repl ) ); s = a.join(sem); strncpy(subentry->data.number, GN_TO(s), sizeof(subentry->data.number)-1); entry.subentries_count++; @@ -1430,7 +1430,7 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQStri if (memstat.free >= (int) list.count()) { if (KMessageBox::No == KMessageBox::questionYesNo(parentWidget(), i18n("<qt>Do you want the selected contacts to be <b>appended</b> to " - "the current mobile phonebook or should they <b>tqreplace</b> all " + "the current mobile phonebook or should they <b>replace</b> all " "currently existing phonebook entries ?<br><br>" "Please note, that in case you choose to replace the phonebook " "entries, every contact in your phone will be deleted and only " diff --git a/kaddressbook/xxport/opera_xxport.cpp b/kaddressbook/xxport/opera_xxport.cpp index 59fd52ea..593960e8 100644 --- a/kaddressbook/xxport/opera_xxport.cpp +++ b/kaddressbook/xxport/opera_xxport.cpp @@ -84,7 +84,7 @@ KABC::AddresseeList OperaXXPort::importContacts( const TQString& ) const } if ( parseContact == true ) { - int sep = line.tqfind( '=' ); + int sep = line.find( '=' ); key = line.left( sep ).lower(); value = line.mid( sep + 1 ); if ( key == TQString::tqfromLatin1( "name" ) ) @@ -105,10 +105,10 @@ KABC::AddresseeList OperaXXPort::importContacts( const TQString& ) const KABC::PhoneNumber::Fax | KABC::PhoneNumber::Home ) ); else if ( key == TQString::tqfromLatin1( "postaladdress" ) ) { KABC::Address address( KABC::Address::Home ); - address.setLabel( value.tqreplace( separator, "\n" ) ); + address.setLabel( value.replace( separator, "\n" ) ); addr.insertAddress( address ); } else if ( key == TQString::tqfromLatin1( "description" ) ) - addr.setNote( value.tqreplace( separator, "\n" ) ); + addr.setNote( value.replace( separator, "\n" ) ); else if ( key == TQString::tqfromLatin1( "url" ) ) addr.setUrl( KURL( value ) ); else if ( key == TQString::tqfromLatin1( "pictureurl" ) ) { diff --git a/kaddressbook/xxport/vcard_xxport.cpp b/kaddressbook/xxport/vcard_xxport.cpp index d917292f..9dedae79 100644 --- a/kaddressbook/xxport/vcard_xxport.cpp +++ b/kaddressbook/xxport/vcard_xxport.cpp @@ -239,7 +239,7 @@ KABC::AddresseeList VCardXXPort::importContacts( const TQString& ) const // With version 3.0, vCards are encoded with UTF-8 by default. Otherwise, use tqfromLatin1() // and hope that are fields are encoded correctly. - if ( TQString::tqfromLatin1( rawData ).lower().tqcontains( "version:3.0" ) ) { + if ( TQString::tqfromLatin1( rawData ).lower().contains( "version:3.0" ) ) { vCardText = TQString::fromUtf8( rawData ); } else { vCardText = TQString::tqfromLatin1( rawData ); diff --git a/kaddressbook/xxportselectdialog.cpp b/kaddressbook/xxportselectdialog.cpp index f65348cf..c90de6ca 100644 --- a/kaddressbook/xxportselectdialog.cpp +++ b/kaddressbook/xxportselectdialog.cpp @@ -119,7 +119,7 @@ KABC::AddresseeList XXPortSelectDialog::contacts() const TQStringList tmp( (*it).categories() ); TQStringList::ConstIterator tmpIt; for ( tmpIt = tmp.begin(); tmpIt != tmp.end(); ++tmpIt ) - if ( categorieList.tqcontains( *tmpIt ) ) { + if ( categorieList.contains( *tmpIt ) ) { list.append( *it ); break; } diff --git a/kalarm/COPYING b/kalarm/COPYING index b55fa146..54754ab4 100644 --- a/kalarm/COPYING +++ b/kalarm/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which tqcontains + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following: The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source -code means all the source code for all modules it tqcontains, plus any +code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/kalarm/alarmcalendar.cpp b/kalarm/alarmcalendar.cpp index 8cbc7ceb..7bdd767a 100644 --- a/kalarm/alarmcalendar.cpp +++ b/kalarm/alarmcalendar.cpp @@ -164,7 +164,7 @@ AlarmCalendar* AlarmCalendar::createCalendar(CalID type, KConfig* config, TQStri { TQString readPath = config->readPathEntry(configKey, locateLocal("appdata", calendarNames[type])); writePath = readPath; - writePath.tqreplace(vcsRegExp, ical); + writePath.replace(vcsRegExp, ical); return new AlarmCalendar(readPath, type, writePath, configKey); } } diff --git a/kalarm/alarmevent.cpp b/kalarm/alarmevent.cpp index 54f60a3c..c5e487ca 100644 --- a/kalarm/alarmevent.cpp +++ b/kalarm/alarmevent.cpp @@ -890,22 +890,22 @@ TQString KAEvent::uid(const TQString& id, tqStatus status) TQString result = id; tqStatus oldtqStatus; int i, len; - if ((i = result.tqfind(EXPIRED_UID)) > 0) + if ((i = result.find(EXPIRED_UID)) > 0) { oldtqStatus = EXPIRED; len = EXPIRED_UID.length(); } - else if ((i = result.tqfind(DISPLAYING_UID)) > 0) + else if ((i = result.find(DISPLAYING_UID)) > 0) { oldtqStatus = DISPLAYING; len = DISPLAYING_UID.length(); } - else if ((i = result.tqfind(TEMPLATE_UID)) > 0) + else if ((i = result.find(TEMPLATE_UID)) > 0) { oldtqStatus = TEMPLATE; len = TEMPLATE_UID.length(); } - else if ((i = result.tqfind(KORGANIZER_UID)) > 0) + else if ((i = result.find(KORGANIZER_UID)) > 0) { oldtqStatus = KORGANIZER; len = KORGANIZER_UID.length(); @@ -913,7 +913,7 @@ TQString KAEvent::uid(const TQString& id, tqStatus status) else { oldtqStatus = ACTIVE; - i = result.tqfindRev('-'); + i = result.findRev('-'); len = 1; } if (status != oldtqStatus && i > 0) @@ -927,7 +927,7 @@ TQString KAEvent::uid(const TQString& id, tqStatus status) case TEMPLATE: part = TEMPLATE_UID; break; case KORGANIZER: part = KORGANIZER_UID; break; } - result.tqreplace(i, len, part); + result.replace(i, len, part); } return result; } @@ -937,13 +937,13 @@ TQString KAEvent::uid(const TQString& id, tqStatus status) */ KAEvent::tqStatus KAEvent::uidtqStatus(const TQString& uid) { - if (uid.tqfind(EXPIRED_UID) > 0) + if (uid.find(EXPIRED_UID) > 0) return EXPIRED; - if (uid.tqfind(DISPLAYING_UID) > 0) + if (uid.find(DISPLAYING_UID) > 0) return DISPLAYING; - if (uid.tqfind(TEMPLATE_UID) > 0) + if (uid.find(TEMPLATE_UID) > 0) return TEMPLATE; - if (uid.tqfind(KORGANIZER_UID) > 0) + if (uid.find(KORGANIZER_UID) > 0) return KORGANIZER; return ACTIVE; } @@ -2551,7 +2551,7 @@ bool KAEvent::adjustStartOfDay(const Event::List& events) { Event* event = *evit; const TQStringList cats = event->categories(); - if (cats.tqfind(DATE_ONLY_CATEGORY) != cats.end()) + if (cats.find(DATE_ONLY_CATEGORY) != cats.end()) { // It's an untimed event, so fix it TQTime oldTime = event->dtStart().time(); @@ -2732,14 +2732,14 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju else i = 0; // invalid prefix } - if (txt.tqfind(TEXT_PREFIX, i) == i) + if (txt.find(TEXT_PREFIX, i) == i) i += TEXT_PREFIX.length(); - else if (txt.tqfind(FILE_PREFIX, i) == i) + else if (txt.find(FILE_PREFIX, i) == i) { action = T_FILE; i += FILE_PREFIX.length(); } - else if (txt.tqfind(COMMAND_PREFIX, i) == i) + else if (txt.find(COMMAND_PREFIX, i) == i) { action = T_COMMAND; i += COMMAND_PREFIX.length(); @@ -2882,7 +2882,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju * Convert simple LATECANCEL category to LATECANCEL:n where n = minutes late. */ TQStringList::Iterator it; - while ((it = cats.tqfind(LATE_CANCEL_CAT)) != cats.end()) + while ((it = cats.find(LATE_CANCEL_CAT)) != cats.end()) { cats.remove(it); addLateCancel = true; @@ -2915,7 +2915,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju * Convert simple TMPLDEFTIME category to TMPLAFTTIME:n where n = minutes after. */ TQStringList::Iterator it; - while ((it = cats.tqfind(TEMPL_DEF_TIME_CAT)) != cats.end()) + while ((it = cats.find(TEMPL_DEF_TIME_CAT)) != cats.end()) { cats.remove(it); cats.append(TQString("%1%2").tqarg(TEMPL_AFTER_TIME_CATEGORY).tqarg(0)); @@ -2929,7 +2929,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju * Convert simple XTERM category to LOG:xterm: */ TQStringList::Iterator it; - while ((it = cats.tqfind(EXEC_IN_XTERM_CAT)) != cats.end()) + while ((it = cats.find(EXEC_IN_XTERM_CAT)) != cats.end()) { cats.remove(it); cats.append(LOG_CATEGORY + xtermURL); @@ -2952,7 +2952,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju * alarm offsets to zero and deferral alarm offsets to be relative to * the next recurrence. */ - bool dateOnly = (cats.tqfind(DATE_ONLY_CATEGORY) != cats.end()); + bool dateOnly = (cats.find(DATE_ONLY_CATEGORY) != cats.end()); DateTime startDateTime(event->dtStart(), dateOnly); // Convert the main alarm and get the next main trigger time from it DateTime nextMainDateTime; diff --git a/kalarm/alarmlistview.cpp b/kalarm/alarmlistview.cpp index 3bbe042f..546752ea 100644 --- a/kalarm/alarmlistview.cpp +++ b/kalarm/alarmlistview.cpp @@ -507,8 +507,8 @@ TQString AlarmListViewItem::alarmTimeText(const DateTime& dateTime) const if (!TQApplication::reverseLayout()) // don't try to align right-to-left languages { TQString fmt = locale->timeFormat(); - int i = fmt.tqfind(TQRegExp("%[kl]")); // check if leading zeroes are omitted - if (i >= 0 && i == fmt.tqfind('%')) // and whether the hour is first + int i = fmt.find(TQRegExp("%[kl]")); // check if leading zeroes are omitted + if (i >= 0 && i == fmt.find('%')) // and whether the hour is first mTimeHourPos = i; // yes, so need to align } } @@ -593,7 +593,7 @@ void AlarmListViewItem::paintCell(TQPainter* painter, const TQColorGroup& cg, in if (mTimeHourPos >= 0) { // Need to pad out spacing to align times without leading zeroes - i = str.tqfind(" ~"); + i = str.find(" ~"); if (i >= 0) { if (mDigitWidth < 0) diff --git a/kalarm/alarmtext.cpp b/kalarm/alarmtext.cpp index 6cf07c34..8bd1d684 100644 --- a/kalarm/alarmtext.cpp +++ b/kalarm/alarmtext.cpp @@ -184,8 +184,8 @@ TQString AlarmText::fromCalendarText(const TQString& text, bool& email) dispText += mCcPrefix + lines[2].mid(mCcPrefixEn.length()) + '\n'; dispText += mDatePrefix + lines[n].mid(mDatePrefixEn.length()) + '\n'; dispText += mSubjectPrefix + lines[n+1].mid(mSubjectPrefixEn.length()); - int i = text.tqfind(mSubjectPrefixEn); - i = text.tqfind('\n', i); + int i = text.find(mSubjectPrefixEn); + i = text.find('\n', i); if (i > 0) dispText += text.mid(i); email = true; @@ -224,8 +224,8 @@ TQString AlarmText::toCalendarText(const TQString& text) calText += mCcPrefixEn + lines[2].mid(mCcPrefix.length()) + '\n'; calText += mDatePrefixEn + lines[n].mid(mDatePrefix.length()) + '\n'; calText += mSubjectPrefixEn + lines[n+1].mid(mSubjectPrefix.length()); - int i = text.tqfind(mSubjectPrefix); - i = text.tqfind('\n', i); + int i = text.find(mSubjectPrefix); + i = text.find('\n', i); if (i > 0) calText += text.mid(i); return calText; @@ -271,12 +271,12 @@ TQString AlarmText::summary(const KAEvent& event, int maxLines, bool* truncated) } if (truncated) *truncated = false; - if (text.tqcontains('\n') < maxLines) + if (text.contains('\n') < maxLines) return text; int newline = -1; for (int i = 0; i < maxLines; ++i) { - newline = text.tqfind('\n', newline + 1); + newline = text.find('\n', newline + 1); if (newline < 0) return text; // not truncated after all !?! } diff --git a/kalarm/birthdaydlg.cpp b/kalarm/birthdaydlg.cpp index 16e8a4ac..71ab8692 100644 --- a/kalarm/birthdaydlg.cpp +++ b/kalarm/birthdaydlg.cpp @@ -256,7 +256,7 @@ void BirthdayDlg::updateSelectionList() name = addressee.realName(); // Check if the birthday already has an alarm TQString text = mPrefixText + name + mSuffixText; - bool alarmExists = (messageList.tqfind(text) != messageList.end()); + bool alarmExists = (messageList.find(text) != messageList.end()); // Check if the birthday is already in the selection list bool inSelectionList = false; AddresseeItem* item = 0; diff --git a/kalarm/calendarcompat.cpp b/kalarm/calendarcompat.cpp index 134436a2..0d049fed 100644 --- a/kalarm/calendarcompat.cpp +++ b/kalarm/calendarcompat.cpp @@ -81,21 +81,21 @@ int CalendarCompat::readKAlarmVersion(KCal::Calendar& calendar, TQString& subVer // Find the KAlarm identifier TQString progname = TQString::tqfromLatin1(" KAlarm "); - int i = prodid.tqfind(progname, 0, false); + int i = prodid.find(progname, 0, false); if (i < 0) { // Older versions used KAlarm's translated name in the product ID, which // could have created problems using a calendar in different locales. progname = TQString(" ") + kapp->aboutData()->programName() + ' '; - i = prodid.tqfind(progname, 0, false); + i = prodid.find(progname, 0, false); if (i < 0) return 0; // calendar wasn't created by KAlarm } // Extract the KAlarm version string TQString ver = prodid.mid(i + progname.length()).stripWhiteSpace(); - i = ver.tqfind('/'); - int j = ver.tqfind(' '); + i = ver.find('/'); + int j = ver.find(' '); if (j >= 0 && j < i) i = j; if (i <= 0) diff --git a/kalarm/dcophandler.cpp b/kalarm/dcophandler.cpp index 7f49ca57..f1a08df8 100644 --- a/kalarm/dcophandler.cpp +++ b/kalarm/dcophandler.cpp @@ -417,7 +417,7 @@ bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence, c if (!start.isValid()) return false; TQDateTime end; - if (endDateTime.tqfind('T') < 0) + if (endDateTime.find('T') < 0) { if (!start.isDateOnly()) { diff --git a/kalarm/editdlg.cpp b/kalarm/editdlg.cpp index 08262726..93b6bc5a 100644 --- a/kalarm/editdlg.cpp +++ b/kalarm/editdlg.cpp @@ -894,7 +894,7 @@ void EditAlarmDlg::setReadOnly() mCmdCommandEdit->setReadOnly(mReadOnly); mCmdScriptEdit->setReadOnly(mReadOnly); for (int id = DISCARD_OUTPUT; id < EXEC_IN_TERMINAL; ++id) - ((RadioButton*)mCmdOutputGroup->tqfind(id))->setReadOnly(mReadOnly); + ((RadioButton*)mCmdOutputGroup->find(id))->setReadOnly(mReadOnly); // Email alarm controls mEmailToEdit->setReadOnly(mReadOnly); @@ -1948,7 +1948,7 @@ bool EditAlarmDlg::checkText(TQString& result, bool showErrorMessage) const enum Err { NONE = 0, BLANK, NONEXISTENT, DIRECTORY, UNREADABLE, NOT_TEXT_IMAGE }; Err err = NONE; KURL url; - int i = alarmtext.tqfind(TQString::tqfromLatin1("/")); + int i = alarmtext.find(TQString::tqfromLatin1("/")); if (i > 0 && alarmtext[i - 1] == ':') { url = alarmtext; diff --git a/kalarm/eventlistviewbase.cpp b/kalarm/eventlistviewbase.cpp index ce025730..c463c8ad 100644 --- a/kalarm/eventlistviewbase.cpp +++ b/kalarm/eventlistviewbase.cpp @@ -458,8 +458,8 @@ TQString EventListWhatsThisBase::text(const TQPoint& pt) int column = -1; TQPoint viewportPt = mListView->viewport()->mapFrom(mListView, pt); TQRect frame = mListView->header()->frameGeometry(); - if (frame.tqcontains(pt) - || mListView->itemAt(TQPoint(mListView->itemMargin(), viewportPt.y())) && frame.tqcontains(TQPoint(pt.x(), frame.y()))) + if (frame.contains(pt) + || mListView->itemAt(TQPoint(mListView->itemMargin(), viewportPt.y())) && frame.contains(TQPoint(pt.x(), frame.y()))) column = mListView->header()->sectionAt(pt.x()); return mListView->whatsThisText(column); } diff --git a/kalarm/functions.cpp b/kalarm/functions.cpp index 26b16d22..2c44e161 100644 --- a/kalarm/functions.cpp +++ b/kalarm/functions.cpp @@ -793,7 +793,7 @@ int getVersionNumber(const TQString& version, TQString* subVersion) // if the representation returned by this method changes. if (subVersion) *subVersion = TQString(); - int count = version.tqcontains('.') + 1; + int count = version.contains('.') + 1; if (count < 2) return 0; bool ok; @@ -836,7 +836,7 @@ FileType fileType(const TQString& mimetype) if (mimetype.startsWith(TQString::tqfromLatin1("image/"))) return Image; - int slash = mimetype.tqfind('/'); + int slash = mimetype.find('/'); if (slash < 0) return Unknown; TQString type = mimetype.mid(slash + 1); diff --git a/kalarm/kalarmapp.cpp b/kalarm/kalarmapp.cpp index d37e0dcd..775821c5 100644 --- a/kalarm/kalarmapp.cpp +++ b/kalarm/kalarmapp.cpp @@ -475,7 +475,7 @@ int KAlarmApp::newInstance() TQCString colourText = args->getOption("color"); if (static_cast<const char*>(colourText)[0] == '0' && tolower(static_cast<const char*>(colourText)[1]) == 'x') - colourText.tqreplace(0, 2, "#"); + colourText.replace(0, 2, "#"); bgColour.setNamedColor(colourText); if (!bgColour.isValid()) USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("--color"))) @@ -486,7 +486,7 @@ int KAlarmApp::newInstance() TQCString colourText = args->getOption("colorfg"); if (static_cast<const char*>(colourText)[0] == '0' && tolower(static_cast<const char*>(colourText)[1]) == 'x') - colourText.tqreplace(0, 2, "#"); + colourText.replace(0, 2, "#"); fgColour.setNamedColor(colourText); if (!fgColour.isValid()) USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("--colorfg"))) @@ -1704,43 +1704,43 @@ ShellProcess* KAlarmApp::doShellCommand(const TQString& command, const KAEvent& { // Execute the command in a terminal window. cmd = Preferences::cmdXTermCommand(); - cmd.tqreplace("%t", aboutData()->programName()); // set the terminal window title - if (cmd.tqfind("%C") >= 0) + cmd.replace("%t", aboutData()->programName()); // set the terminal window title + if (cmd.find("%C") >= 0) { // Execute the command from a temporary script file if (flags & ProcData::TEMP_FILE) - cmd.tqreplace("%C", command); // the command is already calling a temporary file + cmd.replace("%C", command); // the command is already calling a temporary file else { tmpXtermFile = createTempScriptFile(command, true, event, *alarm); if (tmpXtermFile.isEmpty()) return 0; - cmd.tqreplace("%C", tmpXtermFile); // %C indicates where to insert the command + cmd.replace("%C", tmpXtermFile); // %C indicates where to insert the command } } - else if (cmd.tqfind("%W") >= 0) + else if (cmd.find("%W") >= 0) { // Execute the command from a temporary script file, // with a sleep after the command is executed tmpXtermFile = createTempScriptFile(command + TQString::tqfromLatin1("\nsleep 86400\n"), true, event, *alarm); if (tmpXtermFile.isEmpty()) return 0; - cmd.tqreplace("%W", tmpXtermFile); // %w indicates where to insert the command + cmd.replace("%W", tmpXtermFile); // %w indicates where to insert the command } - else if (cmd.tqfind("%w") >= 0) + else if (cmd.find("%w") >= 0) { // Append a sleep to the command. // Quote the command in case it contains characters such as [>|;]. TQString exec = KShellProcess::quote(command + TQString::tqfromLatin1("; sleep 86400")); - cmd.tqreplace("%w", exec); // %w indicates where to insert the command string + cmd.replace("%w", exec); // %w indicates where to insert the command string } else { // Set the command to execute. // Put it in quotes in case it contains characters such as [>|;]. TQString exec = KShellProcess::quote(command); - if (cmd.tqfind("%c") >= 0) - cmd.tqreplace("%c", exec); // %c indicates where to insert the command string + if (cmd.find("%c") >= 0) + cmd.replace("%c", exec); // %c indicates where to insert the command string else cmd.append(exec); // otherwise, simply append the command string } @@ -2118,7 +2118,7 @@ static bool convInterval(const TQCString& timeParam, KARecurrence::Type& recurTy break; case 'M': { - int i = timeString.tqfind('H'); + int i = timeString.find('H'); if (i < 0) { if (!allowMonthYear) diff --git a/kalarm/kalarmd/adcalendar.cpp b/kalarm/kalarmd/adcalendar.cpp index e1f0823a..409ab88f 100644 --- a/kalarm/kalarmd/adcalendar.cpp +++ b/kalarm/kalarmd/adcalendar.cpp @@ -51,7 +51,7 @@ ADCalendar::ADCalendar(const TQString& url, const TQCString& appname) kdError(5900) << "ADCalendar::ADCalendar(" << url << "): calendar already exists" << endl; assert(0); } - mUrlIndex = mCalendarUrls.tqfindIndex(url); // get unique index for this URL + mUrlIndex = mCalendarUrls.findIndex(url); // get unique index for this URL if (mUrlIndex < 0) { mUrlIndex = static_cast<int>(mCalendarUrls.count()); @@ -142,7 +142,7 @@ bool ADCalendar::setLoadedConnected() */ bool ADCalendar::eventHandled(const KCal::Event* event, const TQValueList<TQDateTime>& alarmtimes) { - EventsMap::ConstIterator it = mEventsHandled.tqfind(EventKey(event->uid(), mUrlIndex)); + EventsMap::ConstIterator it = mEventsHandled.find(EventKey(event->uid(), mUrlIndex)); if (it == mEventsHandled.end()) return false; @@ -170,7 +170,7 @@ void ADCalendar::setEventHandled(const TQString& eventID) EventKey key(eventID, mUrlIndex); // Remove it from the pending list, and add it to the handled list - EventsMap::Iterator it = mEventsPending.tqfind(key); + EventsMap::Iterator it = mEventsPending.find(key); if (it != mEventsPending.end()) { setEventInMap(mEventsHandled, key, it.data().alarmTimes, it.data().eventSequence); @@ -197,7 +197,7 @@ void ADCalendar::setEventPending(const KCal::Event* event, const TQValueList<TQD */ void ADCalendar::setEventInMap(EventsMap& map, const EventKey& key, const TQValueList<TQDateTime>& alarmtimes, int sequence) { - EventsMap::Iterator it = map.tqfind(key); + EventsMap::Iterator it = map.find(key); if (it != map.end()) { // Update the existing entry for the event diff --git a/kalarm/kalarmd/alarmdaemon.cpp b/kalarm/kalarmd/alarmdaemon.cpp index c14a1bf5..a8460167 100644 --- a/kalarm/kalarmd/alarmdaemon.cpp +++ b/kalarm/kalarmd/alarmdaemon.cpp @@ -374,7 +374,7 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal) for (TQValueList<KCal::Alarm*>::ConstIterator it = alarms.begin(); it != alarms.end(); ++it) { KCal::Event* event = dynamic_cast<KCal::Event*>((*it)->tqparent()); - if (!event || eventsDone.tqfind(event) != eventsDone.end()) + if (!event || eventsDone.find(event) != eventsDone.end()) continue; // either not an event, or the event has already been processed eventsDone += event; const TQString& eventID = event->uid(); @@ -385,7 +385,7 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal) // The times for non-due alarms are set invalid in 'alarmtimes'. bool recurs = event->doesRecur(); const TQStringList cats = event->categories(); - bool floats = (cats.tqfind(TQString::tqfromLatin1("DATE")) != cats.end()); + bool floats = (cats.find(TQString::tqfromLatin1("DATE")) != cats.end()); TQDateTime nextDateTime = event->dtStart(); if (recurs) { @@ -487,7 +487,7 @@ bool AlarmDaemon::notifyEvent(ADCalendar* calendar, const TQString& eventID) { // It's running, but check if it has created our DCOP interface yet QCStringList objects = kapp->dcopClient()->remoteObjects(appname); - if (objects.tqfind(client->dcopObject()) == objects.end()) + if (objects.find(client->dcopObject()) == objects.end()) ready = false; } if (!ready) diff --git a/kalarm/kalarmd/clientinfo.cpp b/kalarm/kalarmd/clientinfo.cpp index 5475cce5..e8c5ea6c 100644 --- a/kalarm/kalarmd/clientinfo.cpp +++ b/kalarm/kalarmd/clientinfo.cpp @@ -72,7 +72,7 @@ ClientInfo* ClientInfo::get(const TQCString& appName) { if (appName.isEmpty()) return 0; - TQMap<TQCString, ClientInfo*>::ConstIterator it = mClients.tqfind(appName); + TQMap<TQCString, ClientInfo*>::ConstIterator it = mClients.find(appName); if (it == mClients.end()) return 0; return it.data(); @@ -104,7 +104,7 @@ void ClientInfo::clear() */ void ClientInfo::remove(const TQCString& appName) { - TQMap<TQCString, ClientInfo*>::Iterator it = mClients.tqfind(appName); + TQMap<TQCString, ClientInfo*>::Iterator it = mClients.find(appName); if (it != mClients.end()) delete it.data(); } diff --git a/kalarm/kalarmui.rc b/kalarm/kalarmui.rc index 97d05056..68627170 100644 --- a/kalarm/kalarmui.rc +++ b/kalarm/kalarmui.rc @@ -11,7 +11,7 @@ <Action name="edit_undo" /> <Action name="edit_redo" /> <Separator /> - <Action name="edit_tqfind"/> + <Action name="edit_find"/> </ToolBar> <MenuBar> <Menu name="file" > diff --git a/kalarm/kamail.cpp b/kalarm/kamail.cpp index 55840662..261e3865 100644 --- a/kalarm/kamail.cpp +++ b/kalarm/kamail.cpp @@ -249,7 +249,7 @@ TQString KAMail::sendKMail(const KAMailData& data) if (func.left(5) == "bool ") { func = func.mid(5); - func.tqreplace(TQRegExp(" [0-9A-Za-z_:]+"), ""); + func.replace(TQRegExp(" [0-9A-Za-z_:]+"), ""); useSend = (func == sendFunction); } } @@ -341,13 +341,13 @@ bool KAMail::callKMail(const TQByteArray& callData, const TQCString& iface, cons || replyType != funcType) { TQCString funcname = function; - funcname.tqreplace(TQRegExp("(.+$"), "()"); + funcname.replace(TQRegExp("(.+$"), "()"); kdError(5950) << "KAMail::callKMail(): kmail " << funcname << " call failed\n";; return false; } TQDataStream replyStream(replyData, IO_ReadOnly); TQCString funcname = function; - funcname.tqreplace(TQRegExp("(.+$"), "()"); + funcname.replace(TQRegExp("(.+$"), "()"); if (replyType == "int") { int result; @@ -385,7 +385,7 @@ TQString KAMail::initHeaders(const KAMailData& data, bool dateId) char buff[64]; strftime(buff, sizeof(buff), "Date: %a, %d %b %Y %H:%M:%S %z", localtime(&timenow)); TQString from = data.from; - from.tqreplace(TQRegExp("^.*<"), TQString()).tqreplace(TQRegExp(">.*$"), TQString()); + from.replace(TQRegExp("^.*<"), TQString()).replace(TQRegExp(">.*$"), TQString()); message = TQString::tqfromLatin1(buff); message += TQString::tqfromLatin1("\nMessage-Id: <%1.%2.%3>\n").tqarg(timenow).tqarg(tod.tv_usec).tqarg(from); } @@ -691,7 +691,7 @@ int KAMail::checkAddress(TQString& address) { address = address.stripWhiteSpace(); // Check that there are no list separator characters present - if (address.tqfind(',') >= 0 || address.tqfind(';') >= 0) + if (address.find(',') >= 0 || address.find(';') >= 0) return -1; int n = address.length(); if (!n) @@ -701,16 +701,16 @@ int KAMail::checkAddress(TQString& address) if (address[end] == '>') { // The email address is in <...> - if ((start = address.tqfind('<')) < 0) + if ((start = address.find('<')) < 0) return -1; ++start; --end; } - int i = address.tqfind('@', start); + int i = address.find('@', start); if (i >= 0) { if (i == start || i == end) // check @ isn't the first or last character -// || address.tqfind('@', i + 1) >= 0) // check for multiple @ characters +// || address.find('@', i + 1) >= 0) // check for multiple @ characters return -1; } /* else @@ -744,10 +744,10 @@ TQString KAMail::convertAttachments(const TQString& items, TQStringList& list) for (int next = 0; next < length; ) { // Find the first delimiter character (, or ;) - int i = items.tqfind(',', next); + int i = items.find(',', next); if (i < 0) i = items.length(); - int sc = items.tqfind(';', next); + int sc = items.find(';', next); if (sc < 0) sc = items.length(); if (sc < i) @@ -780,10 +780,10 @@ TQString KAMail::convertAttachments(const TQString& items, KURL::List& list) for (int next = 0; next < length; ) { // Find the first delimiter character (, or ;) - int i = items.tqfind(',', next); + int i = items.find(',', next); if (i < 0) i = items.length(); - int sc = items.tqfind(';', next); + int sc = items.find(';', next); if (sc < 0) sc = items.length(); if (sc < i) diff --git a/kalarm/karecurrence.cpp b/kalarm/karecurrence.cpp index 4221a5ad..a14d5675 100644 --- a/kalarm/karecurrence.cpp +++ b/kalarm/karecurrence.cpp @@ -606,7 +606,7 @@ bool KARecurrence::recursOn(const TQDate& dt) const return true; // We know now that it isn't in EXDATES or EXRULES, // so we just need to check if it's in RDATES or RRULES - if (rDates().tqcontains(dt)) + if (rDates().contains(dt)) return true; RecurrenceRule::List rulelist = rRules(); for (RecurrenceRule::List::ConstIterator rr = rulelist.begin(); rr != rulelist.end(); ++rr) diff --git a/kalarm/lib/colourcombo.cpp b/kalarm/lib/colourcombo.cpp index 5cea7fb8..cd078a34 100644 --- a/kalarm/lib/colourcombo.cpp +++ b/kalarm/lib/colourcombo.cpp @@ -57,7 +57,7 @@ void ColourCombo::setColours(const ColourList& colours) { mColourList = colours; if (mSelectedColour != mCustomColour - && !mColourList.tqcontains(mSelectedColour)) + && !mColourList.contains(mSelectedColour)) { // The current colour has been deleted mSelectedColour = mColourList.count() ? mColourList.first() : mCustomColour; diff --git a/kalarm/lib/colourlist.h b/kalarm/lib/colourlist.h index 91fabaf9..485bba6d 100644 --- a/kalarm/lib/colourlist.h +++ b/kalarm/lib/colourlist.h @@ -83,19 +83,19 @@ class ColourList /** Returns an iterator pointing to the colour at position @p i in the list. */ const_iterator at(size_type i) const { return mList.at(i); } /** Returns true if the list contains the colour @p c. */ - size_type tqcontains(const TQColor& c) const { return mList.tqcontains(c.rgb()); } + size_type contains(const TQColor& c) const { return mList.contains(c.rgb()); } /** Returns an iterator pointing to the first occurrence of colour @p c in the list. * Returns end() if colour @p c is not in the list. */ - const_iterator tqfind(const TQColor& c) const { return mList.tqfind(c.rgb()); } + const_iterator find(const TQColor& c) const { return mList.find(c.rgb()); } /** Returns an iterator pointing to the first occurrence of colour @p c in the list, starting. * from position @p it. Returns end() if colour @p c is not in the list. */ - const_iterator tqfind(const_iterator it, const TQColor& c) const { return mList.tqfind(it, c.rgb()); } + const_iterator find(const_iterator it, const TQColor& c) const { return mList.find(it, c.rgb()); } /** Returns the index to the first occurrence of colour @p c in the list. * Returns -1 if colour @p c is not in the list. */ - int findIndex(const TQColor& c) const { return mList.tqfindIndex(c.rgb()); } + int findIndex(const TQColor& c) const { return mList.findIndex(c.rgb()); } /** Returns the first colour in the list. If the list is empty, the result is undefined. */ TQColor first() const { return TQColor(mList.first()); } /** Returns the last colour in the list. If the list is empty, the result is undefined. */ diff --git a/kalarm/lib/lineedit.cpp b/kalarm/lib/lineedit.cpp index f19ed806..28d94fb2 100644 --- a/kalarm/lib/lineedit.cpp +++ b/kalarm/lib/lineedit.cpp @@ -181,7 +181,7 @@ void LineEdit::dropEvent(TQDropEvent* e) } else { - int newline = txt.tqfind('\n'); + int newline = txt.find('\n'); newText = (newline >= 0) ? txt.left(newline) : txt; } } diff --git a/kalarm/lib/messagebox.cpp b/kalarm/lib/messagebox.cpp index dced4ce6..2f7480df 100644 --- a/kalarm/lib/messagebox.cpp +++ b/kalarm/lib/messagebox.cpp @@ -45,7 +45,7 @@ KMessageBox::ButtonCode MessageBox::getContinueDefault(const TQString& dontAskAg ButtonCode defaultButton = Continue; if (!dontAskAgainName.isEmpty()) { - TQMap<TQString, ButtonCode>::ConstIterator it = mContinueDefaults.tqfind(dontAskAgainName); + TQMap<TQString, ButtonCode>::ConstIterator it = mContinueDefaults.find(dontAskAgainName); if (it != mContinueDefaults.end()) defaultButton = it.data(); } diff --git a/kalarm/lib/shellprocess.cpp b/kalarm/lib/shellprocess.cpp index c2f2e11b..09daf91d 100644 --- a/kalarm/lib/shellprocess.cpp +++ b/kalarm/lib/shellprocess.cpp @@ -185,7 +185,7 @@ const TQCString& ShellProcess::shellPath() } // Get the shell filename with the path stripped off - int i = mShellPath.tqfindRev('/'); + int i = mShellPath.findRev('/'); if (i >= 0) mShellName = mShellPath.mid(i + 1); else diff --git a/kalarm/lib/spinbox.cpp b/kalarm/lib/spinbox.cpp index fc8e6b7c..10f3f591 100644 --- a/kalarm/lib/spinbox.cpp +++ b/kalarm/lib/spinbox.cpp @@ -468,9 +468,9 @@ int SpinBox::shiftStepAdjustment(int oldValue, int shiftStep) */ int SpinBox::whichButton(const TQPoint& pos) { - if (upRect().tqcontains(pos)) + if (upRect().contains(pos)) return UP; - if (downRect().tqcontains(pos)) + if (downRect().contains(pos)) return DOWN; return NO_BUTTON; } diff --git a/kalarm/lib/synchtimer.cpp b/kalarm/lib/synchtimer.cpp index 7be3c17c..caed93d7 100644 --- a/kalarm/lib/synchtimer.cpp +++ b/kalarm/lib/synchtimer.cpp @@ -46,7 +46,7 @@ SynchTimer::~SynchTimer() void SynchTimer::connecT(TQObject* receiver, const char* member) { Connection connection(receiver, member); - if (mConnections.tqfind(connection) != mConnections.end()) + if (mConnections.find(connection) != mConnections.end()) return; // the slot is already connected, so ignore request connect(mTimer, TQT_SIGNAL(timeout()), receiver, member); mConnections.append(connection); diff --git a/kalarm/lib/timespinbox.cpp b/kalarm/lib/timespinbox.cpp index 1a2a6500..ccf0c449 100644 --- a/kalarm/lib/timespinbox.cpp +++ b/kalarm/lib/timespinbox.cpp @@ -124,7 +124,7 @@ TQString TimeSpinBox::mapValueToText(int v) int TimeSpinBox::mapTextToValue(bool* ok) { TQString text = cleanText(); - int colon = text.tqfind(':'); + int colon = text.find(':'); if (colon >= 0) { // [h]:m format for any time value @@ -309,7 +309,7 @@ TQValidator::State TimeSpinBox::TimeValidator::validate(TQString& text, int& /*c bool ok; int hr = 0; int mn = 0; - int colon = cleanText.tqfind(':'); + int colon = cleanText.find(':'); if (colon >= 0) { TQString minute = cleanText.mid(colon + 1); diff --git a/kalarm/mainwindow.cpp b/kalarm/mainwindow.cpp index 34b13e5f..aa334c67 100644 --- a/kalarm/mainwindow.cpp +++ b/kalarm/mainwindow.cpp @@ -1397,7 +1397,7 @@ void MainWindow::setEnableText(bool enable) */ MainWindow* MainWindow::toggleWindow(MainWindow* win) { - if (win && mWindowList.tqfind(win) != mWindowList.end()) + if (win && mWindowList.find(win) != mWindowList.end()) { // A window is specified (and it exists) if (win->isVisible()) diff --git a/kalarm/messagewin.cpp b/kalarm/messagewin.cpp index ca7dd824..6f0878c0 100644 --- a/kalarm/messagewin.cpp +++ b/kalarm/messagewin.cpp @@ -1622,7 +1622,7 @@ void MessageWin::displayMainWindow() */ bool MessageWin::haveErrorMessage(unsigned msg) const { - if (!mErrorMessages.tqcontains(mEventID)) + if (!mErrorMessages.contains(mEventID)) mErrorMessages.insert(mEventID, 0); bool result = (mErrorMessages[mEventID] & msg); mErrorMessages[mEventID] |= msg; @@ -1631,7 +1631,7 @@ bool MessageWin::haveErrorMessage(unsigned msg) const void MessageWin::clearErrorMessage(unsigned msg) const { - if (mErrorMessages.tqcontains(mEventID)) + if (mErrorMessages.contains(mEventID)) { if (mErrorMessages[mEventID] == msg) mErrorMessages.remove(mEventID); diff --git a/kalarm/prefdlg.cpp b/kalarm/prefdlg.cpp index 24a444b9..860d6819 100644 --- a/kalarm/prefdlg.cpp +++ b/kalarm/prefdlg.cpp @@ -399,11 +399,11 @@ MiscPrefTab::MiscPrefTab(TQVBox* frame) mXtermType->insert(radio, mXtermCount); if (mXtermFirst < 0) mXtermFirst = mXtermCount; // note the id of the first button - cmd.tqreplace("%t", kapp->aboutData()->programName()); - cmd.tqreplace("%c", "<command>"); - cmd.tqreplace("%w", "<command; sleep>"); - cmd.tqreplace("%C", "[command]"); - cmd.tqreplace("%W", "[command; sleep]"); + cmd.replace("%t", kapp->aboutData()->programName()); + cmd.replace("%c", "<command>"); + cmd.replace("%w", "<command; sleep>"); + cmd.replace("%C", "[command]"); + cmd.replace("%W", "[command; sleep]"); TQWhatsThis::add(radio, whatsThis.tqarg(cmd)); grid->addWidget(radio, (row = index/3 + 1), index % 3, TQt::AlignAuto); ++index; @@ -444,7 +444,7 @@ void MiscPrefTab::restore() { for ( ; id < mXtermCount; ++id) { - if (mXtermType->tqfind(id) && xtermCmd == xtermCommands[id]) + if (mXtermType->find(id) && xtermCmd == xtermCommands[id]) break; } } diff --git a/kalarm/preferences.cpp b/kalarm/preferences.cpp index be1e5e6a..95b1b5a6 100644 --- a/kalarm/preferences.cpp +++ b/kalarm/preferences.cpp @@ -607,8 +607,8 @@ void Preferences::convertOldPrefs() static const TQString EMAIL_USE_CTRL_CENTRE = TQString::tqfromLatin1("EmailUseControlCenter"); static const TQString EMAIL_BCC_USE_CTRL_CENTRE = TQString::tqfromLatin1("EmailBccUseControlCenter"); TQMap<TQString, TQString> entries = config->entryMap(GENERAL_SECTION); - if (entries.tqfind(EMAIL_FROM) == entries.end() - && entries.tqfind(EMAIL_USE_CTRL_CENTRE) != entries.end()) + if (entries.find(EMAIL_FROM) == entries.end() + && entries.find(EMAIL_USE_CTRL_CENTRE) != entries.end()) { // Preferences were written by KAlarm pre-1.2.1 config->setGroup(GENERAL_SECTION); diff --git a/kalarm/undo.cpp b/kalarm/undo.cpp index 81d101c3..4d951c17 100644 --- a/kalarm/undo.cpp +++ b/kalarm/undo.cpp @@ -68,7 +68,7 @@ class UndoItem UndoItem(Undo::Type); static TQString addDeleteActionText(KAEvent::tqStatus, bool add); TQString description(const KAEvent&) const; - void replaceWith(UndoItem* item) { Undo::tqreplace(this, item); } + void replaceWith(UndoItem* item) { Undo::replace(this, item); } int mId; // unique identifier (only for mType = UNDO, REDO) Undo::Type mType; // which list (if any) the object is in @@ -398,13 +398,13 @@ void Undo::remove(UndoItem* item, bool undo) /****************************************************************************** * Replace an undo item in one of the lists. */ -void Undo::tqreplace(UndoItem* old, UndoItem* New) +void Undo::replace(UndoItem* old, UndoItem* New) { Type type = old->type(); List* list = (type == UNDO) ? &mUndoList : (type == REDO) ? &mRedoList : 0; if (!list) return; - Iterator it = list->tqfind(old); + Iterator it = list->find(old); if (it != list->end()) { New->setType(type); // ensure the item points to the correct list @@ -468,7 +468,7 @@ TQValueList<int> Undo::ids(Undo::Type type) for (Undo::List::ConstIterator u = undos.begin(); u != undos.end(); ++u) { TQString evid = (*u)->eventID(); - if (ignoreIDs.tqfind(evid) != ignoreIDs.end()) + if (ignoreIDs.find(evid) != ignoreIDs.end()) omit = true; else if (omit) ignoreIDs.append(evid); @@ -483,7 +483,7 @@ TQValueList<int> Undo::ids(Undo::Type type) } else { - omit = (ignoreIDs.tqfind(item->eventID()) != ignoreIDs.end()); + omit = (ignoreIDs.find(item->eventID()) != ignoreIDs.end()); if (!omit) ignoreIDs.append(item->eventID()); if (item->operation() == UndoItem::EDIT) diff --git a/kalarm/undo.h b/kalarm/undo.h index 0f65cb9f..2bc2ca1e 100644 --- a/kalarm/undo.h +++ b/kalarm/undo.h @@ -71,7 +71,7 @@ class Undo : public TQObject // Methods for use by UndoItem class static void add(UndoItem*, bool undo); static void remove(UndoItem*, bool undo); - static void tqreplace(UndoItem* old, UndoItem* New); + static void replace(UndoItem* old, UndoItem* New); private: typedef TQValueList<UndoItem*>::Iterator Iterator; diff --git a/kandy/COPYING b/kandy/COPYING index 0a56ad07..0b84a43f 100644 --- a/kandy/COPYING +++ b/kandy/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which tqcontains + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following: The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source -code means all the source code for all modules it tqcontains, plus any +code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/kandy/src/atcommand.cpp b/kandy/src/atcommand.cpp index d010bb0b..f03bb679 100644 --- a/kandy/src/atcommand.cpp +++ b/kandy/src/atcommand.cpp @@ -112,7 +112,7 @@ TQString ATCommand::cmdString() TQString ATCommand::cmd() { if (mParameters.count() > 0) { - TQString cmd = cmdString().left(cmdString().tqfind("=") + 1); + TQString cmd = cmdString().left(cmdString().find("=") + 1); // kdDebug() << "--1-cmd: " << cmd << endl; for(uint i=0;i<mParameters.count();++i) { cmd += mParameters.at(i)->value(); @@ -157,7 +157,7 @@ void ATCommand::setResultString(const TQString &resultString) void ATCommand::setResultFields( TQString fieldsString ) { - TQString id = mId.upper().left( mId.tqfind( '=' ) ); + TQString id = mId.upper().left( mId.find( '=' ) ); // Truncate the command name prepended to the output by the modem. @@ -267,7 +267,7 @@ void ATCommand::setParameter(int index,int value) TQString ATCommand::processOutput(const TQString &output) { if (hexOutput()) { - TQString hexString = output.mid(output.tqfind('\n')+1); + TQString hexString = output.mid(output.find('\n')+1); int i=0; TQString aChar = hexString.mid(i,2); TQString result; @@ -295,7 +295,7 @@ void ATCommand::extractParameters() { // kdDebug() << "Arg String: " << cmdString() << endl; - int pos = cmdString().tqfind("="); + int pos = cmdString().find("="); if (pos < 0) return; TQString paraString = cmdString().mid(pos+1); diff --git a/karm/desktoptracker.cpp b/karm/desktoptracker.cpp index 773f6aea..deab8754 100644 --- a/karm/desktoptracker.cpp +++ b/karm/desktoptracker.cpp @@ -1,4 +1,4 @@ -#include <algorithm> // std::tqfind +#include <algorithm> // std::find #include <tqtimer.h> #include <kdebug.h> diff --git a/karm/kaccelmenuwatch.cpp b/karm/kaccelmenuwatch.cpp index 18a0f511..75e4854e 100644 --- a/karm/kaccelmenuwatch.cpp +++ b/karm/kaccelmenuwatch.cpp @@ -25,7 +25,7 @@ void KAccelMenuWatch::setMenu( TQPopupMenu *menu ) // we use _menuList to ensure that the signal is // connected only once per menu. - if ( !_menuList.tqfindRef( menu ) ) { + if ( !_menuList.findRef( menu ) ) { _menuList.append( menu ); connect( menu, TQT_SIGNAL(destroyed()), this, TQT_SLOT(removeDeadMenu()) ); } @@ -74,7 +74,7 @@ void KAccelMenuWatch::removeDeadMenu() TQPopupMenu *sdr = (TQPopupMenu *) sender(); assert( sdr ); - if ( !_menuList.tqfindRef( sdr ) ) + if ( !_menuList.findRef( sdr ) ) return; // remove all accels diff --git a/karm/karmstorage.cpp b/karm/karmstorage.cpp index 6211deb8..1231113b 100644 --- a/karm/karmstorage.cpp +++ b/karm/karmstorage.cpp @@ -189,12 +189,12 @@ TQString KarmStorage::load (TaskView* view, const Preferences* preferences, TQSt // Load each task under it's tqparent task. for( todo = todoList.begin(); todo != todoList.end(); ++todo ) { - Task* task = map.tqfind( (*todo)->uid() ); + Task* task = map.find( (*todo)->uid() ); // No relatedTo incident just means this is a top-level task. if ( (*todo)->relatedTo() ) { - Task* newParent = map.tqfind( (*todo)->relatedToUid() ); + Task* newParent = map.find( (*todo)->relatedToUid() ); // Complete the loading but return a message if ( !newParent ) @@ -258,12 +258,12 @@ TQString KarmStorage::buildTaskView(KCal::ResourceCalendar *rc, TaskView *view) // 1.1. Load each task under it's tqparent task. for( todo = todoList.begin(); todo != todoList.end(); ++todo ) { - Task* task = map.tqfind( (*todo)->uid() ); + Task* task = map.find( (*todo)->uid() ); // No relatedTo incident just means this is a top-level task. if ( (*todo)->relatedTo() ) { - Task* newParent = map.tqfind( (*todo)->relatedToUid() ); + Task* newParent = map.find( (*todo)->relatedToUid() ); // Complete the loading but return a message if ( !newParent ) @@ -482,12 +482,12 @@ TQString KarmStorage::loadFromFlatFileCumulative(TaskView* taskview, bool KarmStorage::parseLine(TQString line, long *time, TQString *name, int *level, DesktopList* desktopList) { - if (line.tqfind('#') == 0) { + if (line.find('#') == 0) { // A comment line return false; } - int index = line.tqfind('\t'); + int index = line.find('\t'); if (index == -1) { // This doesn't seem like a valid record return false; @@ -496,7 +496,7 @@ bool KarmStorage::parseLine(TQString line, long *time, TQString *name, TQString levelStr = line.left(index); TQString rest = line.remove(0,index+1); - index = rest.tqfind('\t'); + index = rest.find('\t'); if (index == -1) { // This doesn't seem like a valid record return false; @@ -507,7 +507,7 @@ bool KarmStorage::parseLine(TQString line, long *time, TQString *name, bool ok; - index = rest.tqfind('\t'); // check for optional desktops string + index = rest.find('\t'); // check for optional desktops string if (index >= 0) { *name = rest.left(index); TQString deskLine = rest.remove(0,index+1); @@ -516,7 +516,7 @@ bool KarmStorage::parseLine(TQString line, long *time, TQString *name, // an DesktopList TQString ds; int d; - int commaIdx = deskLine.tqfind(','); + int commaIdx = deskLine.find(','); while (commaIdx >= 0) { ds = deskLine.left(commaIdx); d = ds.toInt(&ok); @@ -525,7 +525,7 @@ bool KarmStorage::parseLine(TQString line, long *time, TQString *name, desktopList->push_back(d); deskLine.remove(0,commaIdx+1); - commaIdx = deskLine.tqfind(','); + commaIdx = deskLine.find(','); } d = deskLine.toInt(&ok); @@ -627,9 +627,9 @@ TQString KarmStorage::exportcsvFile( TaskView *taskview, /* // CSV compliance - // Surround the field with quotes if the field tqcontains + // Surround the field with quotes if the field contains // a comma (delim) or a double quote - if (task->name().tqcontains(delim) || task->name().tqcontains(dquote)) + if (task->name().contains(delim) || task->name().contains(dquote)) to_quote = true; else to_quote = false; @@ -640,7 +640,7 @@ TQString KarmStorage::exportcsvFile( TaskView *taskview, retval += dquote; // Double quotes replaced by a pair of consecutive double quotes - retval += task->name().tqreplace( dquote, double_dquote ); + retval += task->name().replace( dquote, double_dquote ); if (to_quote) retval += dquote; @@ -661,7 +661,7 @@ TQString KarmStorage::exportcsvFile( TaskView *taskview, } // save, either locally or remote - if ((rc.url.isLocalFile()) || (!rc.url.url().tqcontains("/"))) + if ((rc.url.isLocalFile()) || (!rc.url.url().contains("/"))) { TQString filename=rc.url.path(); if (filename.isEmpty()) filename=rc.url.url(); @@ -812,14 +812,14 @@ long KarmStorage::printTaskHistory ( .tqarg(daykey) .tqarg(task->uid()); - if (taskdaytotals.tqcontains(daytaskkey)) + if (taskdaytotals.contains(daytaskkey)) { cell.push_back(TQString::tqfromLatin1("%1") .tqarg(formatTime(taskdaytotals[daytaskkey]/60, rc.decimalMinutes))); sum += taskdaytotals[daytaskkey]; // in seconds - if (daytotals.tqcontains(daykey)) - daytotals.tqreplace(daykey, daytotals[daykey]+taskdaytotals[daytaskkey]); + if (daytotals.contains(daykey)) + daytotals.replace(daykey, daytotals[daykey]+taskdaytotals[daytaskkey]); else daytotals.insert(daykey, taskdaytotals[daytaskkey]); } @@ -842,16 +842,16 @@ long KarmStorage::printTaskHistory ( /* // CSV compliance - // Surround the field with quotes if the field tqcontains + // Surround the field with quotes if the field contains // a comma (delim) or a double quote - to_quote = task->name().tqcontains(delim) || task->name().tqcontains(dquote); + to_quote = task->name().contains(delim) || task->name().contains(dquote); */ to_quote = true; if ( to_quote) cell.push_back(dquote); // Double quotes replaced by a pair of consecutive double quotes - cell.push_back(task->name().tqreplace( dquote, double_dquote )); + cell.push_back(task->name().replace( dquote, double_dquote )); if ( to_quote) cell.push_back(dquote); @@ -941,8 +941,8 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview, .tqarg(daykey) .tqarg((*event).todoUid()); - if (taskdaytotals.tqcontains(daytaskkey)) - taskdaytotals.tqreplace(daytaskkey, + if (taskdaytotals.contains(daytaskkey)) + taskdaytotals.replace(daytaskkey, taskdaytotals[daytaskkey] + (*event).duration()); else taskdaytotals.insert(daytaskkey, (*event).duration()); @@ -995,7 +995,7 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview, { daykey = day.toString(TQString::tqfromLatin1("yyyyMMdd")); - if (daytotals.tqcontains(daykey)) + if (daytotals.contains(daykey)) { retval += TQString::tqfromLatin1("%1") .tqarg(formatTime(daytotals[daykey]/60, rc.decimalMinutes)); @@ -1015,7 +1015,7 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview, // save, either locally or remote - if ((rc.url.isLocalFile()) || (!rc.url.url().tqcontains("/"))) + if ((rc.url.isLocalFile()) || (!rc.url.url().contains("/"))) { TQString filename=rc.url.path(); if (filename.isEmpty()) filename=rc.url.url(); @@ -1166,7 +1166,7 @@ TQValueList<HistoryEvent> KarmStorage::getHistory(const TQDate& from, { // KArm events have the custom property X-KDE-Karm-duration - if (! processed.tqcontains( (*event)->uid())) + if (! processed.contains( (*event)->uid())) { // If an event spans multiple days, CalendarLocal::rawEventsForDate // will return the same event on both days. To avoid double-counting diff --git a/karm/karmutility.cpp b/karm/karmutility.cpp index d13a3f6e..8a2de530 100644 --- a/karm/karmutility.cpp +++ b/karm/karmutility.cpp @@ -12,7 +12,7 @@ TQString formatTime( long minutes, bool decimal ) TQString time; if ( decimal ) { time.sprintf("%.2f", minutes / 60.0); - time.tqreplace( '.', KGlobal::locale()->decimalSymbol() ); + time.replace( '.', KGlobal::locale()->decimalSymbol() ); } else time.sprintf("%s%ld:%02ld", (minutes < 0) ? KGlobal::locale()->negativeSign().utf8().data() : "", diff --git a/karm/taskview.cpp b/karm/taskview.cpp index 6a8f6e05..95dfc856 100644 --- a/karm/taskview.cpp +++ b/karm/taskview.cpp @@ -154,7 +154,7 @@ void TaskView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) if ( e->pos().y() >= task->itemPos() && // doubleclick was onto current_item() e->pos().y() < task->itemPos()+task->height() ) { - if ( activeTasks.tqfindRef(task) == -1 ) // task is active + if ( activeTasks.findRef(task) == -1 ) // task is active { stopAllTimers(); startCurrentTimer(); @@ -388,7 +388,7 @@ void TaskView::startTimerFor(Task* task, TQDateTime startTime ) kdDebug(5970) << "Entering TaskView::startTimerFor" << endl; if (save()==TQString()) { - if (task != 0 && activeTasks.tqfindRef(task) == -1) + if (task != 0 && activeTasks.findRef(task) == -1) { _idleTimeDetector->startIdleDetection(); if (!task->isComplete()) @@ -462,7 +462,7 @@ void TaskView::resetTimeForAllTasks() void TaskView::stopTimerFor(Task* task) { kdDebug(5970) << "Entering stopTimerFor. task = " << task->name() << endl; - if ( task != 0 && activeTasks.tqfindRef(task) != -1 ) { + if ( task != 0 && activeTasks.findRef(task) != -1 ) { activeTasks.removeRef(task); task->setRunning(false, _storage); if ( activeTasks.count() == 0 ) { diff --git a/karm/timekard.cpp b/karm/timekard.cpp index c5016857..d9b8d4a7 100644 --- a/karm/timekard.cpp +++ b/karm/timekard.cpp @@ -139,7 +139,7 @@ void TimeKard::printTaskHistory(const Task *task, .tqarg(daykey) .tqarg(task->uid()); - if (taskdaytotals.tqcontains(daytaskkey)) + if (taskdaytotals.contains(daytaskkey)) { if ( !totalsOnly ) { @@ -148,8 +148,8 @@ void TimeKard::printTaskHistory(const Task *task, } sectionsum += taskdaytotals[daytaskkey]; // in seconds - if (daytotals.tqcontains(daykey)) - daytotals.tqreplace(daykey, daytotals[daykey] + taskdaytotals[daytaskkey]); + if (daytotals.contains(daykey)) + daytotals.replace(daykey, daytotals[daykey] + taskdaytotals[daytaskkey]); else daytotals.insert(daykey, taskdaytotals[daytaskkey]); } @@ -226,8 +226,8 @@ TQString TimeKard::sectionHistoryAsText( .tqarg(daykey) .tqarg((*event).todoUid()); - if (taskdaytotals.tqcontains(daytaskkey)) - taskdaytotals.tqreplace(daytaskkey, + if (taskdaytotals.contains(daytaskkey)) + taskdaytotals.replace(daytaskkey, taskdaytotals[daytaskkey] + (*event).duration()); else taskdaytotals.insert(daytaskkey, (*event).duration()); @@ -282,7 +282,7 @@ TQString TimeKard::sectionHistoryAsText( { TQString daykey = day.toString(TQString::tqfromLatin1("yyyyMMdd")); - if (daytotals.tqcontains(daykey)) + if (daytotals.contains(daykey)) { if ( !totalsOnly ) { diff --git a/kdgantt/KDGanttMinimizeSplitter.cpp b/kdgantt/KDGanttMinimizeSplitter.cpp index 10ef3373..b863e4e6 100644 --- a/kdgantt/KDGanttMinimizeSplitter.cpp +++ b/kdgantt/KDGanttMinimizeSplitter.cpp @@ -178,7 +178,7 @@ int KDGanttSplitterHandle::onButton( const TQPoint& p ) rect.setRight( rect.right() + 4); rect.setTop( rect.top()- 4 ); rect.setBottom( rect.bottom() + 4); - if ( rect.tqcontains( p ) ) { + if ( rect.contains( p ) ) { return index; } index++; diff --git a/kdgantt/KDGanttView.cpp b/kdgantt/KDGanttView.cpp index 6624a4c2..749e5306 100644 --- a/kdgantt/KDGanttView.cpp +++ b/kdgantt/KDGanttView.cpp @@ -3727,7 +3727,7 @@ void KDGanttView::addTaskLinkGroup(KDGanttViewTaskLinkGroup* group) myTaskLinkGroupList.append(group); return; } - if (myTaskLinkGroupList.tqfind(group) == -1) + if (myTaskLinkGroupList.find(group) == -1) myTaskLinkGroupList.append(group); } diff --git a/kdgantt/KDGanttViewItem.cpp b/kdgantt/KDGanttViewItem.cpp index ba6ad343..68761813 100644 --- a/kdgantt/KDGanttViewItem.cpp +++ b/kdgantt/KDGanttViewItem.cpp @@ -292,10 +292,10 @@ void KDGanttViewItem::generateAndInsertName( const TQString& name ) sItemDict.remove( _name ); TQString newName; - if ( name.isEmpty() || sItemDict.tqfind( name ) ) { + if ( name.isEmpty() || sItemDict.find( name ) ) { // create unique name newName.sprintf( "%p", (void* )this ); - while( sItemDict.tqfind( newName ) ) { + while( sItemDict.find( newName ) ) { newName += "_0"; } } else { @@ -325,11 +325,11 @@ TQString KDGanttViewItem::name() const with that name exists */ -KDGanttViewItem* KDGanttViewItem::tqfind( const TQString& name ) +KDGanttViewItem* KDGanttViewItem::find( const TQString& name ) { if (name.isEmpty()) // avoid error msg from TQDict return 0; - return sItemDict.tqfind( name ); + return sItemDict.find( name ); } @@ -2294,7 +2294,7 @@ void KDGanttViewItem::resetSubitemVisibility() In calendar mode, only those items can be opened which have subitems which have subitems. An item which has subitems which have no subitems is called a calendar. - I.e., an item that tqcontains + I.e., an item that contains multiple calendars can be opened, while a calendar item itself cannot. But if all calendars of an item do not have any subitem (e.g at startup), the program cannot detect automatically that it should be possible to open diff --git a/kdgantt/KDGanttViewItem.h b/kdgantt/KDGanttViewItem.h index 88713fb3..e08630b8 100644 --- a/kdgantt/KDGanttViewItem.h +++ b/kdgantt/KDGanttViewItem.h @@ -171,7 +171,7 @@ public: KDGanttViewItem* itemBelow( bool includeDisabled = true ); KDGanttViewItem* getChildByName( const TQString& name ); TQString name() const; - static KDGanttViewItem* tqfind( const TQString& name ); + static KDGanttViewItem* find( const TQString& name ); void createNode( TQDomDocument& doc, TQDomElement& parentElement ); diff --git a/kdgantt/KDGanttViewTaskLink.cpp b/kdgantt/KDGanttViewTaskLink.cpp index 51ed43f5..bc6047fd 100644 --- a/kdgantt/KDGanttViewTaskLink.cpp +++ b/kdgantt/KDGanttViewTaskLink.cpp @@ -870,13 +870,13 @@ KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( TQDomElement& el TQPtrList<KDGanttViewItem> toItemList; for( TQStringList::const_iterator fromIt = fromList.begin(); fromIt != fromList.end(); ++fromIt ) { - KDGanttViewItem* item = KDGanttViewItem::tqfind( *fromIt ); + KDGanttViewItem* item = KDGanttViewItem::find( *fromIt ); if( item ) fromItemList.append( item ); } for( TQStringList::const_iterator toIt = toList.begin(); toIt != toList.end(); ++toIt ) { - KDGanttViewItem* item = KDGanttViewItem::tqfind( *toIt ); + KDGanttViewItem* item = KDGanttViewItem::find( *toIt ); if( item ) toItemList.append( item ); } @@ -898,7 +898,7 @@ KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( TQDomElement& el tl->setHighlightColor( highlightColor ); tl->setTooltipText( tooltipText ); tl->setWhatsThisText( whatsThisText ); - KDGanttViewTaskLinkGroup* gr = KDGanttViewTaskLinkGroup::tqfind( group ); + KDGanttViewTaskLinkGroup* gr = KDGanttViewTaskLinkGroup::find( group ); if( gr ) tl->setGroup( gr ); diff --git a/kdgantt/KDGanttViewTaskLinkGroup.cpp b/kdgantt/KDGanttViewTaskLinkGroup.cpp index c6e56c0b..34b5bb81 100644 --- a/kdgantt/KDGanttViewTaskLinkGroup.cpp +++ b/kdgantt/KDGanttViewTaskLinkGroup.cpp @@ -70,7 +70,7 @@ KDGanttViewTaskLinkGroup::~KDGanttViewTaskLinkGroup() /*! Constructs an empty task link group and records it under the name \a name so that it can later be found again with - KDGanttViewTaskLinkGroup::tqfind(). + KDGanttViewTaskLinkGroup::find(). \param name the search name of this task link group */ @@ -268,11 +268,11 @@ void KDGanttViewTaskLinkGroup::removeItem (KDGanttViewTaskLink* link) \return the task link group with the specified name; 0 if no group with that name exists */ -KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::tqfind( const TQString& name ) +KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::find( const TQString& name ) { if (name.isEmpty()) // avoid error msg from TQDict return 0; - return sGroupDict.tqfind( name ); + return sGroupDict.find( name ); } @@ -371,10 +371,10 @@ void KDGanttViewTaskLinkGroup::generateAndInsertName( const TQString& name ) sGroupDict.remove( _name ); TQString newName; - if ( name.isEmpty() || sGroupDict.tqfind( name ) ) { + if ( name.isEmpty() || sGroupDict.find( name ) ) { // create unique name newName.sprintf( "%p", (void* )this ); - while( sGroupDict.tqfind( newName ) ) { + while( sGroupDict.find( newName ) ) { newName += "_0"; } } else { diff --git a/kdgantt/KDGanttViewTaskLinkGroup.h b/kdgantt/KDGanttViewTaskLinkGroup.h index e3959089..b155b8b4 100644 --- a/kdgantt/KDGanttViewTaskLinkGroup.h +++ b/kdgantt/KDGanttViewTaskLinkGroup.h @@ -62,7 +62,7 @@ public: void setHighlightColor( const TQColor& color ); TQColor highlightColor() const; - static KDGanttViewTaskLinkGroup* tqfind( const TQString& name ); + static KDGanttViewTaskLinkGroup* find( const TQString& name ); void createNode( TQDomDocument& doc, TQDomElement& parentElement ); diff --git a/kfile-plugins/vcf/kfile_vcf.cpp b/kfile-plugins/vcf/kfile_vcf.cpp index 6edc1655..7297179d 100644 --- a/kfile-plugins/vcf/kfile_vcf.cpp +++ b/kfile-plugins/vcf/kfile_vcf.cpp @@ -91,7 +91,7 @@ bool KVcfPlugin::readInfo( KFileMetaInfo& info, uint /*what*/ ) TQStringList phoneNumbers; for (unsigned int no=0; no<pnList.count(); ++no) { TQString pn = pnList[no].number().simplifyWhiteSpace(); - if (!pn.isEmpty() && !phoneNumbers.tqcontains(pn)) + if (!pn.isEmpty() && !phoneNumbers.contains(pn)) phoneNumbers.append(pn); } if ( !phoneNumbers.isEmpty() ) diff --git a/kgantt/COPYING b/kgantt/COPYING index b55fa146..54754ab4 100644 --- a/kgantt/COPYING +++ b/kgantt/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which tqcontains + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following: The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source -code means all the source code for all modules it tqcontains, plus any +code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/kgantt/kgantt/KGanttItem.cpp b/kgantt/kgantt/KGanttItem.cpp index 3b152515..f032ede0 100644 --- a/kgantt/kgantt/KGanttItem.cpp +++ b/kgantt/kgantt/KGanttItem.cpp @@ -90,7 +90,7 @@ KGanttRelation* KGanttItem::addRelation(KGanttItem* from, KGanttItem* to, const TQString& text) { - if(_subitems.tqcontainsRef(from) > 0 && _subitems.tqcontainsRef(to) >0) { + if(_subitems.containsRef(from) > 0 && _subitems.containsRef(to) >0) { KGanttRelation* rel = new KGanttRelation(from,to,text); _relations.append(rel); diff --git a/kgantt/kgantt/KGanttItem.h b/kgantt/kgantt/KGanttItem.h index b64c7339..a01763a5 100644 --- a/kgantt/kgantt/KGanttItem.h +++ b/kgantt/kgantt/KGanttItem.h @@ -343,7 +343,7 @@ public: /// Get date of starting. /*! - * If mode == ´Rubberband´ and this item tqcontains + * If mode == ´Rubberband´ and this item contains * subitems, start of the item is determined by the start of the * earliest subitem. <br> */ diff --git a/kgantt/kgantt/KGanttRelation.h b/kgantt/kgantt/KGanttRelation.h index a75cec9b..42323026 100644 --- a/kgantt/kgantt/KGanttRelation.h +++ b/kgantt/kgantt/KGanttRelation.h @@ -176,7 +176,7 @@ public: /// Get date of starting. /*! - * If mode == ´Rubberband´ and this item tqcontains + * If mode == ´Rubberband´ and this item contains * subitems, start of the item is determined by the start of the * earliest subitem. <br> */ diff --git a/kgantt/kgantt/xQGanttBarViewPort.cpp b/kgantt/kgantt/xQGanttBarViewPort.cpp index d4be3761..6ac4daae 100644 --- a/kgantt/kgantt/xQGanttBarViewPort.cpp +++ b/kgantt/kgantt/xQGanttBarViewPort.cpp @@ -424,7 +424,7 @@ xQGanttBarViewPort::recalc(KGanttItem* item, int xPos, int yPos, new xTQTaskPosition(nr, xPos, yPos, _screenW, _screenH, _screenHS, _textPosX, _textPosY, depth); - _gItemList.tqreplace(item, tpos ); + _gItemList.replace(item, tpos ); tpos->_screenHandleX = xPos + dd; tpos->_screenHandleW = 2 * dd; diff --git a/kgantt/kgantt/xQGanttBarViewPort_Events.cpp b/kgantt/kgantt/xQGanttBarViewPort_Events.cpp index d7542d1c..ffd85d30 100644 --- a/kgantt/kgantt/xQGanttBarViewPort_Events.cpp +++ b/kgantt/kgantt/xQGanttBarViewPort_Events.cpp @@ -66,7 +66,7 @@ xQGanttBarViewPort::mousePressEvent(TQMouseEvent* e) */ if(e->button() == Qt::MidButton && _mode == Select) { - xTQTaskPosition* tp = _gItemList.tqfind(_currentItem); + xTQTaskPosition* tp = _gItemList.find(_currentItem); TQPainter p(this); TQRect rect = p.boundingRect(tp->_textPosX, @@ -118,7 +118,7 @@ xQGanttBarViewPort::mousePressEvent(TQMouseEvent* e) _itemInfo->setText( tmp ); _itemInfo->adjustSize(); - _itemInfo->move(e->x() + 25, _gItemList.tqfind(_currentItem)->_screenY - 50 ); + _itemInfo->move(e->x() + 25, _gItemList.find(_currentItem)->_screenY - 50 ); _itemInfo->show(); } else @@ -366,15 +366,15 @@ xQGanttBarViewPort::mouseMoveEvent(TQMouseEvent* e) _itemInfo->setText( stmp ); _itemInfo->adjustSize(); - _itemInfo->move(e->x() + 25, _gItemList.tqfind(_currentItem)->_screenY - 50); + _itemInfo->move(e->x() + 25, _gItemList.find(_currentItem)->_screenY - 50); _itemInfo->show(); if(oldx > 0) { - p.fillRect(oldx, _gItemList.tqfind(_currentItem)->_screenY, - oldw, _gItemList.tqfind(_currentItem)->_screenH, + p.fillRect(oldx, _gItemList.find(_currentItem)->_screenY, + oldw, _gItemList.find(_currentItem)->_screenH, TQBrush(TQColor(50,50,50), Dense4Pattern)); - p.drawRect(oldx, _gItemList.tqfind(_currentItem)->_screenY, - oldw, _gItemList.tqfind(_currentItem)->_screenH); + p.drawRect(oldx, _gItemList.find(_currentItem)->_screenY, + oldw, _gItemList.find(_currentItem)->_screenH); p.setPen(_solidPen); if(_changeStart) @@ -386,11 +386,11 @@ xQGanttBarViewPort::mouseMoveEvent(TQMouseEvent* e) } p.setPen(_dashPen); - p.fillRect(x, _gItemList.tqfind(_currentItem)->_screenY, - w, _gItemList.tqfind(_currentItem)->_screenH, + p.fillRect(x, _gItemList.find(_currentItem)->_screenY, + w, _gItemList.find(_currentItem)->_screenH, TQBrush(TQColor(50,50,50), Dense4Pattern) ); - p.drawRect(x, _gItemList.tqfind(_currentItem)->_screenY, - w, _gItemList.tqfind(_currentItem)->_screenH); + p.drawRect(x, _gItemList.find(_currentItem)->_screenY, + w, _gItemList.find(_currentItem)->_screenH); p.setPen(_solidPen); if(_changeStart) diff --git a/kioslaves/imap4/imap4.cc b/kioslaves/imap4/imap4.cc index b04b5b60..12cf93e1 100644 --- a/kioslaves/imap4/imap4.cc +++ b/kioslaves/imap4/imap4.cc @@ -228,11 +228,11 @@ IMAP4Protocol::get (const KURL & _url) // the logic is in the app. TQString aUpper = aSection.upper(); - if (aUpper.tqfind ("STRUCTURE") != -1) + if (aUpper.find ("STRUCTURE") != -1) { aSection = "BODYSTRUCTURE"; } - else if (aUpper.tqfind ("ENVELOPE") != -1) + else if (aUpper.find ("ENVELOPE") != -1) { aSection = "UID RFC822.SIZE FLAGS ENVELOPE"; if (hasCapability("IMAP4rev1")) { @@ -246,12 +246,12 @@ IMAP4Protocol::get (const KURL & _url) { aSection = "UID RFC822.HEADER RFC822.SIZE FLAGS"; } - else if (aUpper.tqfind ("BODY.PEEK[") != -1) + else if (aUpper.find ("BODY.PEEK[") != -1) { - if (aUpper.tqfind ("BODY.PEEK[]") != -1) + if (aUpper.find ("BODY.PEEK[]") != -1) { if (!hasCapability("IMAP4rev1")) // imap4 does not know BODY.PEEK[] - aSection.tqreplace("BODY.PEEK[]", "RFC822.PEEK"); + aSection.replace("BODY.PEEK[]", "RFC822.PEEK"); } aSection.prepend("UID RFC822.SIZE FLAGS "); } @@ -309,7 +309,7 @@ IMAP4Protocol::get (const KURL & _url) { // get the MIME header and fill getLastHandled() TQString mySection = aSection; - mySection.tqreplace("]", ".MIME]"); + mySection.replace("]", ".MIME]"); cmd = sendCommand (imapCommand::clientFetch (aSequence, mySection)); do { @@ -342,11 +342,11 @@ IMAP4Protocol::get (const KURL & _url) if (cmd && !cmd->isComplete ()) { - if ((aUpper.tqfind ("BODYSTRUCTURE") != -1) - || (aUpper.tqfind ("FLAGS") != -1) - || (aUpper.tqfind ("UID") != -1) - || (aUpper.tqfind ("ENVELOPE") != -1) - || (aUpper.tqfind ("BODY.PEEK[0]") != -1 + if ((aUpper.find ("BODYSTRUCTURE") != -1) + || (aUpper.find ("FLAGS") != -1) + || (aUpper.find ("UID") != -1) + || (aUpper.find ("ENVELOPE") != -1) + || (aUpper.find ("BODY.PEEK[0]") != -1 && (aEnum == ITYPE_BOX || aEnum == ITYPE_DIR_AND_BOX))) { if (aEnum == ITYPE_BOX || aEnum == ITYPE_DIR_AND_BOX) @@ -440,8 +440,8 @@ IMAP4Protocol::listDir (const KURL & _url) UDSEntry entry; UDSAtom atom; KURL aURL = _url; - if (aURL.path().tqfind(';') != -1) - aURL.setPath(aURL.path().left(aURL.path().tqfind(';'))); + if (aURL.path().find(';') != -1) + aURL.setPath(aURL.path().left(aURL.path().find(';'))); kdDebug(7116) << "IMAP4Protocol::listDir - got " << listResponses.count () << endl; @@ -588,7 +588,7 @@ IMAP4Protocol::listDir (const KURL & _url) bool withSubject = mySection.isEmpty(); if (mySection.isEmpty()) mySection = "UID RFC822.SIZE ENVELOPE"; - bool withFlags = mySection.upper().tqfind("FLAGS") != -1; + bool withFlags = mySection.upper().find("FLAGS") != -1; imapCommand *fetch = sendCommand (imapCommand:: clientFetch (mySequence, mySection)); @@ -875,7 +875,7 @@ IMAP4Protocol::put (const KURL & _url, int, bool, bool) if (hasCapability("UIDPLUS")) { TQString uid = cmd->resultInfo(); - if (uid.tqfind("APPENDUID") != -1) + if (uid.find("APPENDUID") != -1) { uid = uid.section(" ", 2, 2); uid.truncate(uid.length()-1); @@ -930,7 +930,7 @@ IMAP4Protocol::mkdir (const KURL & _url, int) parseURL(_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo); if (type == ITYPE_BOX) { - bool ask = ( aInfo.tqfind( "ASKUSER" ) != -1 ); + bool ask = ( aInfo.find( "ASKUSER" ) != -1 ); if ( ask && messageBox(QuestionYesNo, i18n("The following folder will be created on the server: %1 " @@ -972,14 +972,14 @@ IMAP4Protocol::copy (const KURL & src, const KURL & dest, int, bool overwrite) if (dType != ITYPE_BOX && dType != ITYPE_DIR_AND_BOX) { // this might be konqueror - int sub = dBox.tqfind (sBox); + int sub = dBox.find (sBox); // might be moving to upper folder if (sub > 0) { KURL testDir = dest; - TQString subDir = dBox.right (dBox.length () - dBox.tqfindRev ('/')); + TQString subDir = dBox.right (dBox.length () - dBox.findRev ('/')); TQString topDir = dBox.left (sub); testDir.setPath ("/" + topDir); dType = @@ -1049,7 +1049,7 @@ IMAP4Protocol::copy (const KURL & src, const KURL & dest, int, bool overwrite) if (hasCapability("UIDPLUS")) { TQString uid = cmd->resultInfo(); - if (uid.tqfind("COPYUID") != -1) + if (uid.find("COPYUID") != -1) { uid = uid.section(" ", 2, 3); uid.truncate(uid.length()-1); @@ -2108,7 +2108,7 @@ bool IMAP4Protocol::makeLogin () } } - if ( greeting.tqcontains( TQRegExp( "Cyrus IMAP4 v2.1" ) ) ) { + if ( greeting.contains( TQRegExp( "Cyrus IMAP4 v2.1" ) ) ) { removeCapability( "ANNOTATEMORE" ); } @@ -2349,7 +2349,7 @@ IMAP4Protocol::doListEntry (const KURL & _url, const TQString & myBox, TQString mailboxName = item.name (); // some beautification - if (mailboxName.tqfind (myBox) == 0 && mailboxName.length() > myBox.length()) + if (mailboxName.find (myBox) == 0 && mailboxName.length() > myBox.length()) { mailboxName = mailboxName.right (mailboxName.length () - myBox.length ()); @@ -2363,7 +2363,7 @@ IMAP4Protocol::doListEntry (const KURL & _url, const TQString & myBox, atom.m_uds = UDS_NAME; if (!item.hierarchyDelimiter().isEmpty() && - mailboxName.tqfind(item.hierarchyDelimiter()) != -1) + mailboxName.find(item.hierarchyDelimiter()) != -1) atom.m_str = mailboxName.section(item.hierarchyDelimiter(), -1); else atom.m_str = mailboxName; @@ -2473,7 +2473,7 @@ IMAP4Protocol::parseURL (const KURL & _url, TQString & _box, // get the delimiter TQString myNamespace = namespaceForBox( _box ); kdDebug(7116) << "IMAP4::parseURL - namespace=" << myNamespace << endl; - if ( namespaceToDelimiter.tqcontains(myNamespace) ) + if ( namespaceToDelimiter.contains(myNamespace) ) { _hierarchyDelimiter = namespaceToDelimiter[myNamespace]; kdDebug(7116) << "IMAP4::parseURL - delimiter=" << _hierarchyDelimiter << endl; @@ -2524,7 +2524,7 @@ IMAP4Protocol::parseURL (const KURL & _url, TQString & _box, } // if we got no list response for the box see if it's a prefix if ( retVal == ITYPE_UNKNOWN && - namespaceToDelimiter.tqcontains(_box) ) { + namespaceToDelimiter.contains(_box) ) { retVal = ITYPE_DIR; } } else { @@ -2554,17 +2554,17 @@ IMAP4Protocol::parseURL (const KURL & _url, TQString & _box, { if (!_uid.isEmpty ()) { - if (_uid.tqfind (':') == -1 && _uid.tqfind (',') == -1 - && _uid.tqfind ('*') == -1) + if (_uid.find (':') == -1 && _uid.find (',') == -1 + && _uid.find ('*') == -1) retVal = ITYPE_MSG; } } if (retVal == ITYPE_MSG) { - if ( (_section.tqfind ("BODY.PEEK[", 0, false) != -1 || - _section.tqfind ("BODY[", 0, false) != -1) && - _section.tqfind(".MIME") == -1 && - _section.tqfind(".HEADER") == -1 ) + if ( (_section.find ("BODY.PEEK[", 0, false) != -1 || + _section.find ("BODY[", 0, false) != -1) && + _section.find(".MIME") == -1 && + _section.find(".HEADER") == -1 ) retVal = ITYPE_ATTACH; } if ( _hierarchyDelimiter.isEmpty() && @@ -2574,7 +2574,7 @@ IMAP4Protocol::parseURL (const KURL & _url, TQString & _box, // we try to reconstruct it from the URL if (!_box.isEmpty()) { - int start = _url.path().tqfindRev(_box); + int start = _url.path().findRev(_box); if (start != -1) _hierarchyDelimiter = _url.path().mid(start-1, start); kdDebug(7116) << "IMAP4::parseURL - reconstructed delimiter:" << _hierarchyDelimiter @@ -2629,9 +2629,9 @@ void IMAP4Protocol::flushOutput(TQString contentEncoding) { // get the coding from the MIME header TQByteArray decoded; - if (contentEncoding.tqfind("quoted-printable", 0, false) == 0) + if (contentEncoding.find("quoted-printable", 0, false) == 0) decoded = KCodecs::quotedPrintableDecode(outputCache); - else if (contentEncoding.tqfind("base64", 0, false) == 0) + else if (contentEncoding.find("base64", 0, false) == 0) KCodecs::base64Decode(outputCache, decoded); else decoded = outputCache; @@ -2697,7 +2697,7 @@ IMAP4Protocol::assureBox (const TQString & aBox, bool readonly) } completeQueue.removeRef (cmd); if (found) { - if (cmdInfo.tqfind("permission", 0, false) != -1) { + if (cmdInfo.find("permission", 0, false) != -1) { // not allowed to enter this folder error(ERR_ACCESS_DENIED, cmdInfo); } else { diff --git a/kioslaves/imap4/imapinfo.cc b/kioslaves/imap4/imapinfo.cc index be955c23..4d1fc805 100644 --- a/kioslaves/imap4/imapinfo.cc +++ b/kioslaves/imap4/imapinfo.cc @@ -147,8 +147,8 @@ permanentFlagsAvailable_ (false), readWriteAvailable_ (false) else if (tokens[2] == "[PERMANENTFLAGS") { - int flagsStart = line.tqfind('('); - int flagsEnd = line.tqfind(')'); + int flagsStart = line.find('('); + int flagsEnd = line.find(')'); kdDebug(7116) << "Checking permFlags from " << flagsStart << " to " << flagsEnd << endl; if ((-1 != flagsStart) && (-1 != flagsEnd) && flagsStart < flagsEnd) @@ -170,8 +170,8 @@ permanentFlagsAvailable_ (false), readWriteAvailable_ (false) } else if (tokens[1] == "FLAGS") { - int flagsStart = line.tqfind ('('); - int flagsEnd = line.tqfind (')'); + int flagsStart = line.find ('('); + int flagsEnd = line.find (')'); if ((-1 != flagsStart) && (-1 != flagsEnd) && flagsStart < flagsEnd) setFlags (_flags (line.mid (flagsStart, flagsEnd).latin1() )); @@ -206,29 +206,29 @@ ulong imapInfo::_flags (const TQCString & inFlags) if (entry.isEmpty ()) flagsString.clear(); - else if (0 != entry.tqcontains ("\\SEEN")) + else if (0 != entry.contains ("\\SEEN")) flags ^= Seen; - else if (0 != entry.tqcontains ("\\ANSWERED")) + else if (0 != entry.contains ("\\ANSWERED")) flags ^= Answered; - else if (0 != entry.tqcontains ("\\FLAGGED")) + else if (0 != entry.contains ("\\FLAGGED")) flags ^= Flagged; - else if (0 != entry.tqcontains ("\\DELETED")) + else if (0 != entry.contains ("\\DELETED")) flags ^= Deleted; - else if (0 != entry.tqcontains ("\\DRAFT")) + else if (0 != entry.contains ("\\DRAFT")) flags ^= Draft; - else if (0 != entry.tqcontains ("\\RECENT")) + else if (0 != entry.contains ("\\RECENT")) flags ^= Recent; - else if (0 != entry.tqcontains ("\\*")) + else if (0 != entry.contains ("\\*")) flags ^= User; // non standard kmail falgs - else if ( entry.tqcontains( "KMAILFORWARDED" ) || entry.tqcontains( "$FORWARDED" ) ) + else if ( entry.contains( "KMAILFORWARDED" ) || entry.contains( "$FORWARDED" ) ) flags = flags | Forwarded; - else if ( entry.tqcontains( "KMAILTODO" ) || entry.tqcontains( "$TODO" ) ) + else if ( entry.contains( "KMAILTODO" ) || entry.contains( "$TODO" ) ) flags = flags | Todo; - else if ( entry.tqcontains( "KMAILWATCHED" ) || entry.tqcontains( "$WATCHED" ) ) + else if ( entry.contains( "KMAILWATCHED" ) || entry.contains( "$WATCHED" ) ) flags = flags | Watched; - else if ( entry.tqcontains( "KMAILIGNORED" ) || entry.tqcontains( "$IGNORED" ) ) + else if ( entry.contains( "KMAILIGNORED" ) || entry.contains( "$IGNORED" ) ) flags = flags | Ignored; } diff --git a/kioslaves/imap4/imaplist.cc b/kioslaves/imap4/imaplist.cc index 6c9dad64..13309089 100644 --- a/kioslaves/imap4/imaplist.cc +++ b/kioslaves/imap4/imaplist.cc @@ -116,17 +116,17 @@ void imapList::parseAttributes( parseString & str ) orig = parser_->parseOneWordC(str); attributes_ << orig; attribute = orig.lower(); - if (-1 != attribute.tqfind ("\\noinferiors")) + if (-1 != attribute.find ("\\noinferiors")) noInferiors_ = true; - else if (-1 != attribute.tqfind ("\\noselect")) + else if (-1 != attribute.find ("\\noselect")) noSelect_ = true; - else if (-1 != attribute.tqfind ("\\marked")) + else if (-1 != attribute.find ("\\marked")) marked_ = true; - else if (-1 != attribute.tqfind ("\\unmarked")) + else if (-1 != attribute.find ("\\unmarked")) unmarked_ = true; - else if (-1 != attribute.tqfind ("\\hastqchildren")) + else if (-1 != attribute.find ("\\hastqchildren")) hasChildren_ = true; - else if (-1 != attribute.tqfind ("\\hasnotqchildren")) + else if (-1 != attribute.find ("\\hasnotqchildren")) hasNoChildren_ = true; else kdDebug(7116) << "imapList::imapList: bogus attribute " << attribute << endl; diff --git a/kioslaves/imap4/imapparser.cc b/kioslaves/imap4/imapparser.cc index 37ae46ca..3e16e262 100644 --- a/kioslaves/imap4/imapparser.cc +++ b/kioslaves/imap4/imapparser.cc @@ -122,7 +122,7 @@ imapParser::sendCommand (imapCommand * aCmd) // we no longer have a box open currentBox = TQString(); } - else if (command.tqfind ("SEARCH") != -1 + else if (command.find ("SEARCH") != -1 || command == "GETACL" || command == "LISTRIGHTS" || command == "MYRIGHTS" @@ -544,7 +544,7 @@ imapParser::parseResult (TQByteArray & result, parseString & rest, case 'A': // ALERT if (option == "ALERT") { - rest.pos = rest.data.tqfind(']', rest.pos) + 1; + rest.pos = rest.data.find(']', rest.pos) + 1; // The alert text is after [ALERT]. // Is this correct or do we need to care about litterals? selectInfo.setAlert( rest.cstr() ); @@ -563,7 +563,7 @@ imapParser::parseResult (TQByteArray & result, parseString & rest, } else if (option == "PERMANENTFLAGS") { - uint end = rest.data.tqfind(']', rest.pos); + uint end = rest.data.find(']', rest.pos); TQCString flags(rest.data.data() + rest.pos, end - rest.pos); selectInfo.setPermanentFlags (flags); rest.pos = end; @@ -1406,8 +1406,8 @@ void imapParser::parseBody (parseString & inWords) else { TQCString references = parseLiteralC(inWords, true); - int start = references.tqfind ('<'); - int end = references.tqfindRev ('>'); + int start = references.find ('<'); + int end = references.findRev ('>'); if (start < end) references = references.mid (start, end - start + 1); envelope->setReferences(references.simplifyWhiteSpace()); @@ -1420,7 +1420,7 @@ void imapParser::parseBody (parseString & inWords) } else { - if (specifier.tqfind(".MIME") != -1) + if (specifier.find(".MIME") != -1) { mailHeader *envelope = new mailHeader; TQString theHeader = parseLiteralC(inWords, false); @@ -1573,7 +1573,7 @@ void imapParser::parseFetch (ulong /* value */, parseString & inWords) if (!lastHandled) lastHandled = new imapCache(); lastHandled->setSize (size); } - else if (word.tqfind ("RFC822") == 0) + else if (word.find ("RFC822") == 0) { // might be RFC822 RFC822.TEXT RFC822.HEADER parseLiteralC(inWords, true); @@ -1675,7 +1675,7 @@ void imapParser::parseNamespace (parseString & result) return; TQString delimEmpty; - if ( namespaceToDelimiter.tqcontains( TQString() ) ) + if ( namespaceToDelimiter.contains( TQString() ) ) delimEmpty = namespaceToDelimiter[TQString()]; namespaceToDelimiter.clear(); @@ -1855,7 +1855,7 @@ imapParser::parseURL (const KURL & _url, TQString & _box, TQString & _section, _box = _url.path (); kdDebug(7116) << "imapParser::parseURL " << _box << endl; - int paramStart = _box.tqfind("/;"); + int paramStart = _box.find("/;"); if ( paramStart > -1 ) { TQString paramString = _box.right( _box.length() - paramStart-2 ); @@ -1868,24 +1868,24 @@ imapParser::parseURL (const KURL & _url, TQString & _box, TQString & _section, { TQString temp = (*it); - int pt = temp.tqfind ('/'); + int pt = temp.find ('/'); if (pt > 0) { - if (temp.tqfindRev ('"', pt) == -1 || temp.tqfind('"', pt) == -1) + if (temp.findRev ('"', pt) == -1 || temp.find('"', pt) == -1) { // if we have non-quoted '/' separator we'll just nuke it temp.truncate(pt); } } - if (temp.tqfind ("section=", 0, false) == 0) + if (temp.find ("section=", 0, false) == 0) _section = temp.right (temp.length () - 8); - else if (temp.tqfind ("type=", 0, false) == 0) + else if (temp.find ("type=", 0, false) == 0) _type = temp.right (temp.length () - 5); - else if (temp.tqfind ("uid=", 0, false) == 0) + else if (temp.find ("uid=", 0, false) == 0) _uid = temp.right (temp.length () - 4); - else if (temp.tqfind ("uidvalidity=", 0, false) == 0) + else if (temp.find ("uidvalidity=", 0, false) == 0) _validity = temp.right (temp.length () - 12); - else if (temp.tqfind ("info=", 0, false) == 0) + else if (temp.find ("info=", 0, false) == 0) _info = temp.right (temp.length () - 5); } // kdDebug(7116) << "URL: section= " << _section << ", type= " << _type << ", uid= " << _uid << endl; @@ -1911,7 +1911,7 @@ TQCString imapParser::parseLiteralC(parseString & inWords, bool relay, bool stop if (!inWords.isEmpty() && inWords[0] == '{') { TQCString retVal; - ulong runLen = inWords.tqfind ('}', 1); + ulong runLen = inWords.find ('}', 1); if (runLen > 0) { bool proper; @@ -2076,7 +2076,7 @@ TQString imapParser::namespaceForBox( const TQString & box ) TQString cleanPrefix; for ( TQValueList<TQString>::Iterator it = list.begin(); it != list.end(); ++it ) { - if ( !(*it).isEmpty() && box.tqfind( *it ) != -1 ) + if ( !(*it).isEmpty() && box.find( *it ) != -1 ) return (*it); } } diff --git a/kioslaves/imap4/imapparser.h b/kioslaves/imap4/imapparser.h index 8d57cee1..9902534c 100644 --- a/kioslaves/imap4/imapparser.h +++ b/kioslaves/imap4/imapparser.h @@ -60,9 +60,9 @@ public: if (pos >= data.size()) return TQCString(); return TQCString(data.data() + pos, data.size() - pos + 1); } - int tqfind(char c, int index = 0) + int find(char c, int index = 0) { - int res = data.tqfind(c, index + pos); + int res = data.find(c, index + pos); return (res == -1) ? res : (res - pos); } // Warning: does not check for going past end of "data" diff --git a/kioslaves/imap4/mailaddress.cc b/kioslaves/imap4/mailaddress.cc index 0775d0f3..0ddd2ff0 100644 --- a/kioslaves/imap4/mailaddress.cc +++ b/kioslaves/imap4/mailaddress.cc @@ -105,7 +105,7 @@ mailAddress::parseAddress (char *aCStr) len = advance; user = user.mid (1, len - 2); // strip <> len -= 2; - pt = user.tqfind('@'); + pt = user.find('@'); host = user.right (len - pt - 1); // split it into host user.truncate(pt); // and user break; @@ -161,7 +161,7 @@ mailAddress::parseAddress (char *aCStr) } else if (user.isEmpty ()) { - pt = rawFullName.tqfind ('@'); + pt = rawFullName.find ('@'); if (pt >= 0) { user = rawFullName; diff --git a/kioslaves/imap4/mailheader.cc b/kioslaves/imap4/mailheader.cc index 76e03ace..8ae36f4c 100644 --- a/kioslaves/imap4/mailheader.cc +++ b/kioslaves/imap4/mailheader.cc @@ -76,8 +76,8 @@ mailHeader::addHdrLine (mimeHdrLine * inLine) goto out; } if (!qstricmp (label.data (), "Message-ID")) { - int start = value.tqfindRev ('<'); - int end = value.tqfindRev ('>'); + int start = value.findRev ('<'); + int end = value.findRev ('>'); if (start < end) messageID = value.mid (start, end - start + 1); else { @@ -87,8 +87,8 @@ mailHeader::addHdrLine (mimeHdrLine * inLine) goto out; } if (!qstricmp (label.data (), "In-Reply-To")) { - int start = value.tqfindRev ('<'); - int end = value.tqfindRev ('>'); + int start = value.findRev ('<'); + int end = value.findRev ('>'); if (start < end) inReplyTo = value.mid (start, end - start + 1); goto out; diff --git a/kioslaves/imap4/mimehdrline.cc b/kioslaves/imap4/mimehdrline.cc index 4158e59d..9646ed26 100644 --- a/kioslaves/imap4/mimehdrline.cc +++ b/kioslaves/imap4/mimehdrline.cc @@ -489,18 +489,18 @@ mimeHdrLine::truncateLine(TQCString aLine, unsigned int truncate) // see if we have a line of the form "key: value" (like "Subject: bla") // then we do not want to truncate between key and value - int validStart = aLine.tqfind(": "); + int validStart = aLine.find(": "); if (validStart > -1) { validStart += 2; } while (len > truncate) { - cutHere = aLine.tqfindRev(' ', truncate); + cutHere = aLine.findRev(' ', truncate); if (cutHere < 1 || cutHere < validStart) { - cutHere = aLine.tqfindRev('\t', truncate); + cutHere = aLine.findRev('\t', truncate); if (cutHere < 1) { - cutHere = aLine.tqfind(' ', 1); + cutHere = aLine.find(' ', 1); if (cutHere < 1) { - cutHere = aLine.tqfind('\t', 1); + cutHere = aLine.find('\t', 1); if (cutHere < 1) { // simply truncate return aLine.left(truncate); diff --git a/kioslaves/imap4/mimeheader.cc b/kioslaves/imap4/mimeheader.cc index d32f7eac..048eba7a 100644 --- a/kioslaves/imap4/mimeheader.cc +++ b/kioslaves/imap4/mimeheader.cc @@ -168,7 +168,7 @@ mimeHeader::addParameter (const TQCString& aParameter, TQDict < TQString > *aLis TQString *aValue; TQCString aLabel; - int pos = aParameter.tqfind ('='); + int pos = aParameter.find ('='); // cout << aParameter.left(pos).data(); aValue = new TQString (); aValue->setLatin1 (aParameter.right (aParameter.length () - pos - 1)); @@ -268,11 +268,11 @@ mimeHeader::getParameter (const TQCString& aStr, TQDict < TQString > *aDict) if (aDict) { //see if it is a normal parameter - found = aDict->tqfind (aStr); + found = aDict->find (aStr); if (!found) { //might be a continuated or encoded parameter - found = aDict->tqfind (aStr + "*"); + found = aDict->find (aStr + "*"); if (!found) { //continuated parameter @@ -284,10 +284,10 @@ mimeHeader::getParameter (const TQCString& aStr, TQDict < TQString > *aDict) TQCString search; search.setNum (part); search = aStr + "*" + search; - found = aDict->tqfind (search); + found = aDict->find (search); if (!found) { - found = aDict->tqfind (search + "*"); + found = aDict->find (search + "*"); if (found) encoded += rfcDecoder::encodeRFC2231String (*found); } @@ -298,7 +298,7 @@ mimeHeader::getParameter (const TQCString& aStr, TQDict < TQString > *aDict) part++; } while (found); - if (encoded.tqfind ('\'') >= 0) + if (encoded.find ('\'') >= 0) { retVal = rfcDecoder::decodeRFC2231String (encoded.local8Bit ()); } @@ -335,7 +335,7 @@ mimeHeader::setParameter (const TQCString& aLabel, const TQString& aValue, { //see if it needs to get encoded - if (encoded && aLabel.tqfind ('*') == -1) + if (encoded && aLabel.find ('*') == -1) { val = rfcDecoder::encodeRFC2231String (aValue); } @@ -412,7 +412,7 @@ mimeHeader::outputParameter (TQDict < TQString > *aDict) while (it.current ()) { retVal += (";\n\t" + it.currentKey () + "=").latin1 (); - if (it.current ()->tqfind (' ') > 0 || it.current ()->tqfind (';') > 0) + if (it.current ()->find (' ') > 0 || it.current ()->find (';') > 0) { retVal += '"' + it.current ()->utf8 () + '"'; } @@ -527,7 +527,7 @@ mimeHeader::parseBody (mimeIO & useIO, TQCString & messageBody, retVal = 1; //continue with next part break; } - else if (mbox && inputStr.tqfind ("From ") == 0) + else if (mbox && inputStr.find ("From ") == 0) { retVal = 0; // end of mbox break; @@ -556,7 +556,7 @@ mimeHeader::parseHeader (mimeIO & useIO) while (useIO.inputLine (inputStr)) { int appended; - if (inputStr.tqfind ("From ") != 0 || !first) + if (inputStr.find ("From ") != 0 || !first) { first = false; appended = my_line.appendStr (inputStr); @@ -584,7 +584,7 @@ mimeHeader * mimeHeader::bodyPart (const TQString & _str) { // see if it is nested a little deeper - int pt = _str.tqfind('.'); + int pt = _str.find('.'); if (pt != -1) { TQString tempStr = _str; @@ -658,9 +658,9 @@ mimeHeader::bodyDecodedBinary () { TQByteArray retVal; - if (contentEncoding.tqfind ("quoted-printable", 0, false) == 0) + if (contentEncoding.find ("quoted-printable", 0, false) == 0) retVal = KCodecs::quotedPrintableDecode(postMultipartBody); - else if (contentEncoding.tqfind ("base64", 0, false) == 0) + else if (contentEncoding.find ("base64", 0, false) == 0) KCodecs::base64Decode(postMultipartBody, retVal); else retVal = postMultipartBody; @@ -680,9 +680,9 @@ mimeHeader::setBodyEncoded (const TQByteArray & _arr) TQByteArray setVal; kdDebug(7116) << "mimeHeader::setBodyEncoded - in size " << _arr.size () << endl; - if (contentEncoding.tqfind ("quoted-printable", 0, false) == 0) + if (contentEncoding.find ("quoted-printable", 0, false) == 0) setVal = KCodecs::quotedPrintableEncode(_arr); - else if (contentEncoding.tqfind ("base64", 0, false) == 0) + else if (contentEncoding.find ("base64", 0, false) == 0) KCodecs::base64Encode(_arr, setVal); else setVal.duplicate (_arr); diff --git a/kioslaves/imap4/mimeheader.h b/kioslaves/imap4/mimeheader.h index 14d86e9d..bc2fd2bc 100644 --- a/kioslaves/imap4/mimeheader.h +++ b/kioslaves/imap4/mimeheader.h @@ -227,7 +227,7 @@ public: } TQString typeStr () { - return TQString (contentType.left (contentType.tqfind ('/'))); + return TQString (contentType.left (contentType.find ('/'))); } void setTypeStr (const TQString & _str) { @@ -236,7 +236,7 @@ public: TQString subtypeStr () { return TQString (contentType. - right (contentType.length () - contentType.tqfind ('/') - + right (contentType.length () - contentType.find ('/') - 1)); } void setSubtypeStr (const TQString & _str) diff --git a/kioslaves/imap4/mimeio.cc b/kioslaves/imap4/mimeio.cc index 9325df13..757c11a4 100644 --- a/kioslaves/imap4/mimeio.cc +++ b/kioslaves/imap4/mimeio.cc @@ -68,7 +68,7 @@ mimeIO::outputMimeLine (const TQCString & inLine) TQCString aLine = inLine; int len = inLine.length(); - int theLF = aLine.tqfindRev ('\n'); + int theLF = aLine.findRev ('\n'); if (theLF == len - 1 && theLF != -1) { //we have a trailing LF, now check for CR @@ -83,7 +83,7 @@ mimeIO::outputMimeLine (const TQCString & inLine) { int start, end, offset; start = 0; - end = aLine.tqfind ('\n', start); + end = aLine.find ('\n', start); while (end >= 0) { offset = 1; @@ -94,7 +94,7 @@ mimeIO::outputMimeLine (const TQCString & inLine) } outputLine (aLine.mid (start, end - start) + theCRLF, end - start + crlfLen); start = end + offset; - end = aLine.tqfind ('\n', start); + end = aLine.find ('\n', start); } outputLine (aLine.mid (start, len - start) + theCRLF, len - start + crlfLen); } @@ -178,7 +178,7 @@ mimeIOTQString::inputLine (TQCString & _str) if (theString.isEmpty ()) return 0; - int i = theString.tqfind ('\n'); + int i = theString.find ('\n'); if (i == -1) return 0; diff --git a/kioslaves/imap4/rfcdecoder.cc b/kioslaves/imap4/rfcdecoder.cc index 426911d0..4eeb207d 100644 --- a/kioslaves/imap4/rfcdecoder.cc +++ b/kioslaves/imap4/rfcdecoder.cc @@ -154,7 +154,7 @@ TQString rfcDecoder::fromIMAP (const TQString & inSrc) return TQString::fromUtf8 (dst.data ()); } -/* tqreplace " with \" and \ with \\ " and \ characters */ +/* replace " with \" and \ with \\ " and \ characters */ TQString rfcDecoder::quoteIMAP(const TQString &src) { uint len = src.length(); @@ -311,7 +311,7 @@ rfcDecoder::codecForName (const TQString & _str) if (_str.isEmpty ()) return NULL; return TQTextCodec::codecForName (_str.lower (). - tqreplace ("windows", "cp").latin1 ()); + replace ("windows", "cp").latin1 ()); } //----------------------------------------------------------------------------- @@ -338,7 +338,7 @@ rfcDecoder::decodeRFC2047String (const TQString & _str, TQString & charset, TQString & language) { //do we have a rfc string - if (_str.tqfind("=?") < 0) + if (_str.find("=?") < 0) return _str; TQCString aStr = _str.ascii (); // TQString.length() means Unicode chars @@ -371,7 +371,7 @@ rfcDecoder::decodeRFC2047String (const TQString & _str, TQString & charset, else { charset = TQCString (beg, i - 1); // -2 + 1 for the zero - int pt = charset.tqfindRev('*'); + int pt = charset.findRev('*'); if (pt != -1) { // save language for later usage @@ -628,13 +628,13 @@ rfcDecoder::encodeRFC2231String (const TQString & _str) const TQString rfcDecoder::decodeRFC2231String (const TQString & _str) { - int p = _str.tqfind ('\''); + int p = _str.find ('\''); //see if it is an rfc string if (p < 0) return _str; - int l = _str.tqfindRev ('\''); + int l = _str.findRev ('\''); //second is language if (p >= l) diff --git a/kioslaves/imap4/rfcdecoder.h b/kioslaves/imap4/rfcdecoder.h index 50ab948e..2095b2ed 100644 --- a/kioslaves/imap4/rfcdecoder.h +++ b/kioslaves/imap4/rfcdecoder.h @@ -44,7 +44,7 @@ public: /** Convert Unicode path to modified UTF-7 IMAP mailbox */ static TQString toIMAP (const TQString & inSrc); -/** tqreplace " with \" and \ with \\ " and \ characters */ +/** replace " with \" and \ with \\ " and \ characters */ static TQString quoteIMAP (const TQString & src); /** remove \ from a string diff --git a/kioslaves/mbox/readmbox.cc b/kioslaves/mbox/readmbox.cc index 32f52d5b..cc8503a5 100644 --- a/kioslaves/mbox/readmbox.cc +++ b/kioslaves/mbox/readmbox.cc @@ -104,7 +104,7 @@ bool ReadMBox::nextLine() } else if( m_only_new ) { if( m_header && m_current_line->left( 7 ) == "tqStatus:" && - ! m_current_line->tqcontains( "U" ) && ! m_current_line->tqcontains( "N" ) ) + ! m_current_line->contains( "U" ) && ! m_current_line->contains( "N" ) ) { m_status = false; } diff --git a/kioslaves/mbox/stat.cc b/kioslaves/mbox/stat.cc index 093701e0..6d5bf75a 100644 --- a/kioslaves/mbox/stat.cc +++ b/kioslaves/mbox/stat.cc @@ -86,7 +86,7 @@ KIO::UDSEntry Stat::statMessage( const UrlInfo& info ) Stat::addAtom( entry, KIO::UDS_MIME_TYPE, "message/rfc822" ); Stat::addAtom( entry, KIO::UDS_URL, url ); - url = url.right( url.length() - url.tqfindRev( "/" ) - 1 ); + url = url.right( url.length() - url.findRev( "/" ) - 1 ); Stat::addAtom( entry, KIO::UDS_NAME, url ); return entry; diff --git a/kioslaves/mbox/urlinfo.cc b/kioslaves/mbox/urlinfo.cc index 2a35ce2e..d59c77ac 100644 --- a/kioslaves/mbox/urlinfo.cc +++ b/kioslaves/mbox/urlinfo.cc @@ -111,7 +111,7 @@ bool UrlInfo::isMessage( const KURL& url ) { TQString path = url.path(); TQFileInfo info; - int cutindex = path.tqfindRev( '/' ); + int cutindex = path.findRev( '/' ); //Does it contain at least one /? if( cutindex < 0 ) diff --git a/kioslaves/opengroupware/webdavhandler.cpp b/kioslaves/opengroupware/webdavhandler.cpp index 61f2d6b5..1177624c 100644 --- a/kioslaves/opengroupware/webdavhandler.cpp +++ b/kioslaves/opengroupware/webdavhandler.cpp @@ -70,7 +70,7 @@ TQDomDocument WebdavHandler::createAllPropsRequest() { TQDomDocument doc; - TQDomElement root = WebdavHandler::addDavElement( doc, doc, "proptqfind" ); + TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" ); TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" ); WebdavHandler::addDavElement( doc, prop, "getcontentlength"); WebdavHandler::addDavElement( doc, prop, "getlastmodified" ); diff --git a/kioslaves/sieve/sieve.cpp b/kioslaves/sieve/sieve.cpp index 781e37ca..8e6a5bcd 100644 --- a/kioslaves/sieve/sieve.cpp +++ b/kioslaves/sieve/sieve.cpp @@ -245,14 +245,14 @@ bool kio_sieveProtocol::parseCapabilities(bool requestCapabilities/* = false*/) ksDebug() << "Looping receive" << endl; if (r.getType() == kio_sieveResponse::ACTION) { - if ( r.getAction().tqcontains("ok", false) != -1 ) { + if ( r.getAction().contains("ok", false) != -1 ) { ksDebug() << "Sieve server ready & awaiting authentication." << endl; break; } else ksDebug() << "Unknown action " << r.getAction() << "." << endl; } else if (r.getKey() == "IMPLEMENTATION") { - if (r.getVal().tqcontains("sieve", false) != -1) { + if (r.getVal().contains("sieve", false) != -1) { ksDebug() << "Connected to Sieve server: " << r.getVal() << endl; ret = true; setMetaData("implementation", r.getVal()); @@ -876,7 +876,7 @@ void kio_sieveProtocol::stat(const KURL& url) while(receiveData()) { if (r.getType() == kio_sieveResponse::ACTION) { - if (r.getAction().tqcontains("OK", false) == 1) + if (r.getAction().contains("OK", false) == 1) // Script list completed break; @@ -929,7 +929,7 @@ void kio_sieveProtocol::listDir(const KURL& url) while(receiveData()) { if (r.getType() == kio_sieveResponse::ACTION) { - if (r.getAction().tqcontains("OK", false) == 1) + if (r.getAction().contains("OK", false) == 1) // Script list completed. break; @@ -1237,10 +1237,10 @@ bool kio_sieveProtocol::receiveData(bool waitForData, TQCString *reparse) { // expecting {quantity} start = 0; - end = interpret.tqfind("+}", start + 1); + end = interpret.find("+}", start + 1); // some older versions of Cyrus enclose the literal size just in { } instead of { +} if ( end == -1 ) - end = interpret.tqfind('}', start + 1); + end = interpret.find('}', start + 1); bool ok = false; r.setQuantity(interpret.mid(start + 1, end - start - 1).toUInt( &ok )); @@ -1263,7 +1263,7 @@ bool kio_sieveProtocol::receiveData(bool waitForData, TQCString *reparse) start = 0; - end = interpret.tqfind(34, start + 1); + end = interpret.find(34, start + 1); if (end == -1) { ksDebug() << "Possible insufficient buffer size." << endl; r.setKey(interpret.right(interpret.length() - start)); @@ -1272,7 +1272,7 @@ bool kio_sieveProtocol::receiveData(bool waitForData, TQCString *reparse) r.setKey(interpret.mid(start + 1, end - start - 1)); - start = interpret.tqfind(34, end + 1); + start = interpret.find(34, end + 1); if (start == -1) { if ((int)interpret.length() > end) // skip " and space @@ -1281,7 +1281,7 @@ bool kio_sieveProtocol::receiveData(bool waitForData, TQCString *reparse) return true; } - end = interpret.tqfind(34, start + 1); + end = interpret.find(34, start + 1); if (end == -1) { ksDebug() << "Possible insufficient buffer size." << endl; r.setVal(interpret.right(interpret.length() - start)); diff --git a/kitchensync/src/addresseediffalgo.cpp b/kitchensync/src/addresseediffalgo.cpp index cba16ec8..fc73c367 100644 --- a/kitchensync/src/addresseediffalgo.cpp +++ b/kitchensync/src/addresseediffalgo.cpp @@ -146,12 +146,12 @@ void AddresseeDiffAlgo::diffList( const TQString &id, const TQValueList<L> &left, const TQValueList<L> &right ) { for ( uint i = 0; i < left.count(); ++i ) { - if ( right.tqfind( left[ i ] ) == right.end() ) + if ( right.find( left[ i ] ) == right.end() ) additionalLeftField( id, toString( left[ i ] ) ); } for ( uint i = 0; i < right.count(); ++i ) { - if ( left.tqfind( right[ i ] ) == left.end() ) + if ( left.find( right[ i ] ) == left.end() ) additionalRightField( id, toString( right[ i ] ) ); } } diff --git a/kitchensync/src/calendardiffalgo.cpp b/kitchensync/src/calendardiffalgo.cpp index fe376428..3c9ef292 100644 --- a/kitchensync/src/calendardiffalgo.cpp +++ b/kitchensync/src/calendardiffalgo.cpp @@ -206,12 +206,12 @@ void CalendarDiffAlgo::diffList( const TQString &id, const TQValueList<L> &left, const TQValueList<L> &right ) { for ( uint i = 0; i < left.count(); ++i ) { - if ( right.tqfind( left[ i ] ) == right.end() ) + if ( right.find( left[ i ] ) == right.end() ) additionalLeftField( id, toString( left[ i ] ) ); } for ( uint i = 0; i < right.count(); ++i ) { - if ( left.tqfind( right[ i ] ) == left.end() ) + if ( left.find( right[ i ] ) == left.end() ) additionalRightField( id, toString( right[ i ] ) ); } } diff --git a/kitchensync/src/configguisyncmlhttp.cpp b/kitchensync/src/configguisyncmlhttp.cpp index e81e92d4..3e1dac1a 100644 --- a/kitchensync/src/configguisyncmlhttp.cpp +++ b/kitchensync/src/configguisyncmlhttp.cpp @@ -174,7 +174,7 @@ void ConfigGuiSyncmlHttp::load( const TQString &xml ) mMaxObjSize->setValue( element.text().toInt() ); } else if ( element.tagName() == "usestringtable" ) { mUseStringTable->setChecked( element.text() == "1" ); - } else if ( element.tagName() == "onlytqreplace" ) { + } else if ( element.tagName() == "onlyreplace" ) { mOnlyReplace->setChecked( element.text() == "1" ); } else if ( element.tagName() == "contact_db" ) { mContactDb->setCurrentText( element.text() ); @@ -208,12 +208,12 @@ TQString ConfigGuiSyncmlHttp::save() const xml += "0"; xml += "</usestringtable>\n"; - xml += "<onlytqreplace>"; + xml += "<onlyreplace>"; if ( mOnlyReplace->isChecked() ) xml += "1"; else xml += "0"; - xml += "</onlytqreplace>\n"; + xml += "</onlyreplace>\n"; xml += "<contact_db>" + mContactDb->currentText() + "</contact_db>\n"; xml += "<calendar_db>" + mCalendarDb->currentText() + "</calendar_db>\n"; diff --git a/kitchensync/src/configguisyncmlobex.cpp b/kitchensync/src/configguisyncmlobex.cpp index 024e72ed..1bb4bdaf 100644 --- a/kitchensync/src/configguisyncmlobex.cpp +++ b/kitchensync/src/configguisyncmlobex.cpp @@ -225,7 +225,7 @@ void ConfigGuiSyncmlObex::load( const TQString &xml ) if ( mMaxObjSize ) mMaxObjSize->setValue( element.text().toInt() ); } else if ( element.tagName() == "usestringtable" ) { mUseStringTable->setChecked( element.text() == "1" ); - } else if ( element.tagName() == "onlytqreplace" ) { + } else if ( element.tagName() == "onlyreplace" ) { mOnlyReplace->setChecked( element.text() == "1" ); } else if ( element.tagName() == "contact_db" ) { mContactDb->setCurrentText( element.text() ); @@ -293,12 +293,12 @@ TQString ConfigGuiSyncmlObex::save() const xml += "0"; xml += "</usestringtable>\n"; - xml += "<onlytqreplace>"; + xml += "<onlyreplace>"; if ( mOnlyReplace->isChecked() ) xml += "1"; else xml += "0"; - xml += "</onlytqreplace>\n"; + xml += "</onlyreplace>\n"; xml += "<contact_db>" + mContactDb->currentText() + "</contact_db>\n"; xml += "<calendar_db>" + mCalendarDb->currentText() + "</calendar_db>\n"; diff --git a/kitchensync/src/groupconfigcommon.cpp b/kitchensync/src/groupconfigcommon.cpp index f2afe3c4..cda75c8c 100644 --- a/kitchensync/src/groupconfigcommon.cpp +++ b/kitchensync/src/groupconfigcommon.cpp @@ -103,7 +103,7 @@ void ObjectTypeSelector::load( const QSync::Group &group ) TQMap<TQString, TQCheckBox*>::ConstIterator it; for( it = mObjectTypeChecks.begin(); it != mObjectTypeChecks.end(); ++it ) { TQCheckBox *check = it.data(); - check->setChecked( objectTypes.tqcontains( it.key() ) || initialLoad ); + check->setChecked( objectTypes.contains( it.key() ) || initialLoad ); } } diff --git a/kitchensync/src/kwidgetlist.cpp b/kitchensync/src/kwidgetlist.cpp index a5f5a81e..89008f06 100644 --- a/kitchensync/src/kwidgetlist.cpp +++ b/kitchensync/src/kwidgetlist.cpp @@ -69,7 +69,7 @@ void KWidgetList::appendItem( KWidgetListItem *item ) if ( !item ) return; - if ( !d->mItems.tqcontains( item ) ) { + if ( !d->mItems.contains( item ) ) { d->mItems.append( item ); item->reparent( d->mBox, 0, TQPoint( 0, 0 ), true ); item->setSelected( false ); @@ -129,7 +129,7 @@ void KWidgetList::setSelected( KWidgetListItem *item ) if ( !item ) return; - if ( d->mItems.tqcontains( item ) == 0 ) + if ( d->mItems.contains( item ) == 0 ) return; if ( d->mSelectedItem ) @@ -169,7 +169,7 @@ KWidgetListItem *KWidgetList::item( int index ) const int KWidgetList::index( KWidgetListItem *item ) const { - return d->mItems.tqfindIndex( item ); + return d->mItems.findIndex( item ); } void KWidgetList::clear() diff --git a/kitchensync/src/syncprocess.cpp b/kitchensync/src/syncprocess.cpp index 1a70f877..672c789c 100644 --- a/kitchensync/src/syncprocess.cpp +++ b/kitchensync/src/syncprocess.cpp @@ -90,7 +90,7 @@ void SyncProcess::applyObjectTypeFilter() const TQStringList activeObjectTypes = mGroup.config().activeObjectTypes(); for ( uint i = 0; i < objectTypes.count(); ++i ) { - if ( activeObjectTypes.tqcontains( objectTypes[ i ] ) ) { + if ( activeObjectTypes.contains( objectTypes[ i ] ) ) { kdDebug() << "Enabled object type: " << objectTypes[ i ] << endl; /* * This is not required. Also this lead to filtering problems when sync with "file-sync". diff --git a/kmail/Mainpage.dox b/kmail/Mainpage.dox index b1355c12..ab239109 100644 --- a/kmail/Mainpage.dox +++ b/kmail/Mainpage.dox @@ -271,7 +271,7 @@ accessed via KMKernel ( the "kmkernel" construct ). Those methods are : folder manager. In dimap, both the headers and a copy of the full message are cached locally. 4) KMFolderMgr *searchFolderMgr() - which returns the folder manager - for search folders (folders created by using the "tqfind + for search folders (folders created by using the "find messages" tool). Other email clients call this type of folder "virtual folders". diff --git a/kmail/accountdialog.cpp b/kmail/accountdialog.cpp index 2782bfa9..de168ceb 100644 --- a/kmail/accountdialog.cpp +++ b/kmail/accountdialog.cpp @@ -133,7 +133,7 @@ ProcmailRCParser::ProcmailRCParser(TQString fname) int commentPos = -1; - if( (commentPos = s.tqfind('#')) > -1 ) { + if( (commentPos = s.find('#')) > -1 ) { // get rid of trailing comment s.truncate(commentPos); s = s.stripWhiteSpace(); @@ -143,7 +143,7 @@ ProcmailRCParser::ProcmailRCParser(TQString fname) processGlobalLock(s); } else if( lockFileLocal.search(s) != -1 ) { processLocalLock(s); - } else if( int i = s.tqfind('=') ) { + } else if( int i = s.find('=') ) { processVariableSetting(s,i); } } @@ -156,11 +156,11 @@ ProcmailRCParser::ProcmailRCParser(TQString fname) default_Location += '/'; default_Location += getenv("USER"); } - if ( !mSpoolFiles.tqcontains(default_Location) ) + if ( !mSpoolFiles.contains(default_Location) ) mSpoolFiles << default_Location; default_Location = default_Location + ".lock"; - if ( !mLockFiles.tqcontains(default_Location) ) + if ( !mLockFiles.contains(default_Location) ) mLockFiles << default_Location; } @@ -172,8 +172,8 @@ ProcmailRCParser::~ProcmailRCParser() void ProcmailRCParser::processGlobalLock(const TQString &s) { - TQString val = expandVars(s.mid(s.tqfind('=') + 1).stripWhiteSpace()); - if ( !mLockFiles.tqcontains(val) ) + TQString val = expandVars(s.mid(s.find('=') + 1).stripWhiteSpace()); + if ( !mLockFiles.contains(val) ) mLockFiles << val; } @@ -181,7 +181,7 @@ void ProcmailRCParser::processLocalLock(const TQString &s) { TQString val; - int colonPos = s.tqfindRev(':'); + int colonPos = s.findRev(':'); if (colonPos > 0) { // we don't care about the leading one val = s.mid(colonPos + 1).stripWhiteSpace(); @@ -190,7 +190,7 @@ ProcmailRCParser::processLocalLock(const TQString &s) // user specified a lockfile, so process it // val = expandVars(val); - if( val[0] != '/' && mVars.tqfind("MAILDIR") ) + if( val[0] != '/' && mVars.find("MAILDIR") ) val.insert(0, *(mVars["MAILDIR"]) + '/'); } // else we'll deduce the lockfile name one we // get the spoolfile name @@ -211,11 +211,11 @@ ProcmailRCParser::processLocalLock(const TQString &s) line = expandVars(line); // prepend default MAILDIR if needed - if( line[0] != '/' && mVars.tqfind("MAILDIR") ) + if( line[0] != '/' && mVars.find("MAILDIR") ) line.insert(0, *(mVars["MAILDIR"]) + '/'); // now we have the spoolfile name - if ( !mSpoolFiles.tqcontains(line) ) + if ( !mSpoolFiles.contains(line) ) mSpoolFiles << line; if( colonPos > 0 && (!val || val.isEmpty()) ) { @@ -224,13 +224,13 @@ ProcmailRCParser::processLocalLock(const TQString &s) val = line; // append lock extension - if( mVars.tqfind("LOCKEXT") ) + if( mVars.find("LOCKEXT") ) val += *(mVars["LOCKEXT"]); else val += ".lock"; } - if ( !val.isNull() && !mLockFiles.tqcontains(val) ) { + if ( !val.isNull() && !mLockFiles.contains(val) ) { mLockFiles << val; } } @@ -258,7 +258,7 @@ ProcmailRCParser::expandVars(const TQString &s) TQAsciiDictIterator<TQString> it( mVars ); // iterator for dict while ( it.current() ) { - expS.tqreplace(TQString::tqfromLatin1("$") + it.currentKey(), *it.current()); + expS.replace(TQString::tqfromLatin1("$") + it.currentKey(), *it.current()); ++it; } @@ -806,7 +806,7 @@ void AccountDialog::makePopAccountPage() mPop.authDigestMd5 = new TQRadioButton( i18n("&DIGEST-MD5"), mPop.authGroup, "auth digest-md5" ); mPop.authNTLM = new TQRadioButton( i18n("&NTLM"), mPop.authGroup, "auth ntlm" ); mPop.authGSSAPI = new TQRadioButton( i18n("&GSSAPI"), mPop.authGroup, "auth gssapi" ); - if ( KProtocolInfo::capabilities("pop3").tqcontains("SASL") == 0 ) + if ( KProtocolInfo::capabilities("pop3").contains("SASL") == 0 ) { mPop.authNTLM->hide(); mPop.authGSSAPI->hide(); @@ -1764,7 +1764,7 @@ void AccountDialog::checkHighest( TQButtonGroup *btnGroup ) { kdDebug(5006) << "checkHighest( " << btnGroup << " )" << endl; for ( int i = btnGroup->count() - 1; i >= 0 ; --i ) { - TQButton * btn = btnGroup->tqfind( i ); + TQButton * btn = btnGroup->find( i ); if ( btn && btn->isEnabled() ) { btn->animateClick(); return; @@ -1972,7 +1972,7 @@ void AccountDialog::saveSettings() // get the new account and register the new destination folder // this is the target folder for local or pop accounts and the root folder // of the account for (d)imap - KMAccount* newAcct = kmkernel->acctMgr()->tqfind(mAccount->id()); + KMAccount* newAcct = kmkernel->acctMgr()->find(mAccount->id()); if (newAcct) { if( accountType == "local" ) { @@ -2298,7 +2298,7 @@ NamespaceEditDialog::NamespaceEditDialog( TQWidget *tqparent, mBg = new TQButtonGroup( 0 ); connect( mBg, TQT_SIGNAL( clicked(int) ), this, TQT_SLOT( slotRemoveEntry(int) ) ); - mDelimMap = mNamespaceMap->tqfind( mType ).data(); + mDelimMap = mNamespaceMap->find( mType ).data(); ImapAccountBase::namespaceDelim::Iterator it; for ( it = mDelimMap.begin(); it != mDelimMap.end(); ++it ) { NamespaceLineEdit* edit = new NamespaceLineEdit( grid ); @@ -2315,7 +2315,7 @@ NamespaceEditDialog::NamespaceEditDialog( TQWidget *tqparent, void NamespaceEditDialog::slotRemoveEntry( int id ) { - if ( mLineEditMap.tqcontains( id ) ) { + if ( mLineEditMap.contains( id ) ) { // delete the lineedit and remove namespace from map NamespaceLineEdit* edit = mLineEditMap[id]; mDelimMap.remove( edit->text() ); @@ -2325,9 +2325,9 @@ void NamespaceEditDialog::slotRemoveEntry( int id ) mLineEditMap.remove( id ); delete edit; } - if ( mBg->tqfind( id ) ) { + if ( mBg->find( id ) ) { // delete the button - delete mBg->tqfind( id ); + delete mBg->find( id ); } adjustSize(); } @@ -2343,7 +2343,7 @@ void NamespaceEditDialog::slotOk() mDelimMap.remove( edit->lastText() ); } } - mNamespaceMap->tqreplace( mType, mDelimMap ); + mNamespaceMap->replace( mType, mDelimMap ); KDialogBase::slotOk(); } diff --git a/kmail/accountmanager.cpp b/kmail/accountmanager.cpp index 9340e774..21a9f8cd 100644 --- a/kmail/accountmanager.cpp +++ b/kmail/accountmanager.cpp @@ -293,7 +293,7 @@ KMAccount* AccountManager::findByName(const TQString &aName) const //----------------------------------------------------------------------------- -KMAccount* AccountManager::tqfind( const uint id ) const +KMAccount* AccountManager::find( const uint id ) const { if (id == 0) return 0; for ( AccountList::ConstIterator it( mAcctList.begin() ), end( mAcctList.end() ); it != end; ++it ) { @@ -397,7 +397,7 @@ void AccountManager::addToTotalNewMailCount( const TQMap<TQString, int> & newInF for ( TQMap<TQString, int>::const_iterator it = newInFolder.begin(); it != newInFolder.end(); ++it ) { mTotalNewMailsArrived += it.data(); - if ( mTotalNewInFolder.tqfind( it.key() ) == mTotalNewInFolder.end() ) + if ( mTotalNewInFolder.find( it.key() ) == mTotalNewInFolder.end() ) mTotalNewInFolder[it.key()] = it.data(); else mTotalNewInFolder[it.key()] += it.data(); @@ -417,7 +417,7 @@ uint AccountManager::createId() do { newId = kapp->random(); - } while ( usedIds.tqfind(newId) != usedIds.end() ); + } while ( usedIds.find(newId) != usedIds.end() ); return newId; } diff --git a/kmail/accountmanager.h b/kmail/accountmanager.h index 2fac30c3..f8a8079f 100644 --- a/kmail/accountmanager.h +++ b/kmail/accountmanager.h @@ -65,7 +65,7 @@ public: /** Find account by id. Returns 0 if account does not exist. */ - KMAccount* tqfind( const uint id ) const; + KMAccount* find( const uint id ) const; /** Physically remove account. Also deletes the given account object ! Returns FALSE and does nothing if the account cannot be removed. */ diff --git a/kmail/accountwizard.cpp b/kmail/accountwizard.cpp index 0ae07d6c..be69edd0 100644 --- a/kmail/accountwizard.cpp +++ b/kmail/accountwizard.cpp @@ -153,7 +153,7 @@ void AccountWizard::showPage( TQWidget *page ) if ( mLoginName->text().isEmpty() ) { // try to extract login from email address TQString email = mEMailAddress->text(); - int pos = email.tqfind( '@' ); + int pos = email.find( '@' ); if ( pos != -1 ) mLoginName->setText( email.left( pos ) ); @@ -329,7 +329,7 @@ TQString AccountWizard::accountName() const TQString name( i18n( "None" ) ); TQString email = mEMailAddress->text(); - int pos = email.tqfind( '@' ); + int pos = email.find( '@' ); if ( pos != -1 ) { name = email.mid( pos + 1 ); name[ 0 ] = name[ 0 ].upper(); @@ -652,7 +652,7 @@ void AccountWizard::smtpCapabilities( const TQStringList &capaNormal, if ( authNone.isEmpty() && authSSL.isEmpty() && authTLS.isEmpty() ) { // slave doesn't seem to support "* AUTH METHODS" metadata (or server can't do AUTH) authBitsNone = authMethodsFromStringList( capaNormal ); - if ( capaNormal.tqfindIndex( "STARTTLS" ) != -1 ) + if ( capaNormal.findIndex( "STARTTLS" ) != -1 ) authBitsTLS = authBitsNone; else authBitsTLS = 0; @@ -664,7 +664,7 @@ void AccountWizard::smtpCapabilities( const TQStringList &capaNormal, } uint authBits = 0; - if ( capaNormal.tqfindIndex( "STARTTLS" ) != -1 ) { + if ( capaNormal.findIndex( "STARTTLS" ) != -1 ) { mTransportInfo->encryption = "TLS"; authBits = authBitsTLS; } else if ( !capaSSL.isEmpty() ) { diff --git a/kmail/actionscheduler.cpp b/kmail/actionscheduler.cpp index 3d1c8688..913245e9 100644 --- a/kmail/actionscheduler.cpp +++ b/kmail/actionscheduler.cpp @@ -462,7 +462,7 @@ void ActionScheduler::messageFetched( KMMessage *msg ) fetchMessageTimer->start( 0, true ); } if (mFetchUnget && msg->tqparent()) - msg->tqparent()->unGetMsg( msg->tqparent()->tqfind( msg )); + msg->tqparent()->unGetMsg( msg->tqparent()->find( msg )); return; } @@ -667,7 +667,7 @@ void ActionScheduler::moveMessage() mResult = mOldReturnCode; // ignore errors in deleting original message if (!orgMsg || !orgMsg->tqparent()) { // Original message is gone, no point filtering it anymore - mSrcFolder->removeMsg( mSrcFolder->tqfind( msg ) ); + mSrcFolder->removeMsg( mSrcFolder->find( msg ) ); kdDebug(5006) << "The original serial number is missing. " << "Cannot complete the filtering." << endl; mExecutingLock = false; @@ -680,7 +680,7 @@ void ActionScheduler::moveMessage() mIgnore = true; assert( msg->tqparent() == mSrcFolder.operator->() ); - mSrcFolder->take( mSrcFolder->tqfind( msg ) ); + mSrcFolder->take( mSrcFolder->find( msg ) ); mSrcFolder->addMsg( msg ); mIgnore = false; @@ -790,7 +790,7 @@ TQString ActionScheduler::debug() if ((*it)->mAccount && kmkernel->find( (*it)->mAccountId )) { res.append( TQString( "Account %1, Name %2.\n" ) .tqarg( (*it)->mAccountId ) - .tqarg( kmkernel->acctMgr()->tqfind( (*it)->mAccountId )->name() ) ); + .tqarg( kmkernel->acctMgr()->find( (*it)->mAccountId )->name() ) ); } res.append( TQString( "mExecuting %1, " ).tqarg( (*it)->mExecuting ? "true" : "false" ) ); res.append( TQString( "mExecutingLock %1, " ).tqarg( (*it)->mExecutingLock ? "true" : "false" ) ); diff --git a/kmail/antispamconfig.cpp b/kmail/antispamconfig.cpp index 19198e11..50052995 100644 --- a/kmail/antispamconfig.cpp +++ b/kmail/antispamconfig.cpp @@ -89,7 +89,7 @@ const SpamAgents AntiSpamConfig::uniqueAgents() const SpamAgents::ConstIterator end( mAgents.end() ); for ( ; it != end ; ++it ) { const TQString agent( ( *it ).name() ); - if ( seenAgents.tqfind( agent ) == seenAgents.end() ) { + if ( seenAgents.find( agent ) == seenAgents.end() ) { agents.append( *it ); seenAgents.append( agent ); } diff --git a/kmail/antispamwizard.cpp b/kmail/antispamwizard.cpp index 1e5e912b..dccca6a8 100644 --- a/kmail/antispamwizard.cpp +++ b/kmail/antispamwizard.cpp @@ -505,9 +505,9 @@ void AntiSpamWizard::checkToolAvailability() AccountManager* mgr = kmkernel->acctMgr(); KMAccount* account = mgr->first(); while ( account ) { - if ( account->type() == "pop" || account->type().tqcontains( "imap" ) ) { + if ( account->type() == "pop" || account->type().contains( "imap" ) ) { const NetworkAccount * n = dynamic_cast<const NetworkAccount*>( account ); - if ( n && n->host().lower().tqcontains( pattern.lower() ) ) { + if ( n && n->host().lower().contains( pattern.lower() ) ) { mInfoPage->addAvailableTool( (*it).getVisibleName() ); found = true; } @@ -925,7 +925,7 @@ void ASWizInfoPage::addAvailableTool( const TQString &visibleName ) bool ASWizInfoPage::isProgramSelected( const TQString &visibleName ) { TQString listName = visibleName; - return mToolsList->isSelected( mToolsList->tqfindItem( listName ) ); + return mToolsList->isSelected( mToolsList->findItem( listName ) ); } diff --git a/kmail/archivefolderdialog.cpp b/kmail/archivefolderdialog.cpp index b1422f47..f6cfac62 100644 --- a/kmail/archivefolderdialog.cpp +++ b/kmail/archivefolderdialog.cpp @@ -194,7 +194,7 @@ void ArchiveFolderDialog::slotFixFileExtension() // First, try to find the extension of the file name and remove it for( int i = 0; i < numExtensions; i++ ) { - int index = fileName.lower().tqfindRev( sortedExtensions[i] ); + int index = fileName.lower().findRev( sortedExtensions[i] ); if ( index != -1 ) { fileName = fileName.left( fileName.length() - TQString( sortedExtensions[i] ).length() ); break; diff --git a/kmail/bodyvisitor.cpp b/kmail/bodyvisitor.cpp index a4520f3c..8a40d744 100644 --- a/kmail/bodyvisitor.cpp +++ b/kmail/bodyvisitor.cpp @@ -78,11 +78,11 @@ namespace KMail { ++it; // skip this part if the tqparent part is already loading if ( part->tqparent() && - selected.tqcontains( part->tqparent() ) && + selected.contains( part->tqparent() ) && part->loadPart() ) continue; - if ( part->originalContentTypeStr().tqcontains("SIGNED") ) + if ( part->originalContentTypeStr().contains("SIGNED") ) { // signed messages have to be loaded completely // so construct a new dummy part that loads the body @@ -115,7 +115,7 @@ namespace KMail { // check whether to load this part or not: // look at the basic list, ask the subclass and check the tqparent - if ( mBasicList.tqcontains( part->originalContentTypeStr() ) || + if ( mBasicList.contains( part->originalContentTypeStr() ) || parentNeedsLoading( part ) || addPartToList( part ) ) { diff --git a/kmail/cachedimapjob.cpp b/kmail/cachedimapjob.cpp index 968529be..d1338251 100644 --- a/kmail/cachedimapjob.cpp +++ b/kmail/cachedimapjob.cpp @@ -401,10 +401,10 @@ void CachedImapJob::slotPutNextMessage() mMsg->setUID( 0 ); // for the index TQCString cstr(mMsg->asString()); - int a = cstr.tqfind("\nX-UID: "); - int b = cstr.tqfind('\n', a); - if (a != -1 && b != -1 && cstr.tqfind("\n\n") > a) cstr.remove(a, b-a); - TQCString mData(cstr.length() + cstr.tqcontains('\n')); + int a = cstr.find("\nX-UID: "); + int b = cstr.find('\n', a); + if (a != -1 && b != -1 && cstr.find("\n\n") > a) cstr.remove(a, b-a); + TQCString mData(cstr.length() + cstr.contains('\n')); unsigned int i = 0; for( char *ch = cstr.data(); *ch; ch++ ) { if ( *ch == '\n' ) { @@ -462,7 +462,7 @@ void CachedImapJob::slotPutMessageInfoData( KIO::Job *job, const TQString &data return; } - if ( data.tqfind( "UID" ) != -1 && mMsg ) { + if ( data.find( "UID" ) != -1 && mMsg ) { int uid = ( data.right( data.length() - 4 ) ).toInt(); kdDebug( 5006 ) << k_funcinfo << "Server told us uid is: " << uid << endl; mMsg->setUID( uid ); @@ -498,7 +498,7 @@ void CachedImapJob::slotPutMessageResult(KIO::Job *job) emit progress( mSentBytes, mTotalBytes ); int i; - if( ( i = mFolder->tqfind(mMsg) ) != -1 ) { + if( ( i = mFolder->find(mMsg) ) != -1 ) { /* * If we have aquired a uid during upload the server supports the uidnext * extension and there is no need to redownload this mail, we already have @@ -686,7 +686,7 @@ void CachedImapJob::slotCheckUidValidityResult(KIO::Job * job) // Check the uidValidity TQCString cstr((*it).data.data(), (*it).data.size() + 1); - int a = cstr.tqfind("X-uidValidity: "); + int a = cstr.find("X-uidValidity: "); if (a < 0) { // Something is seriously rotten here! // TODO: Tell the user that he has a problem @@ -694,7 +694,7 @@ void CachedImapJob::slotCheckUidValidityResult(KIO::Job * job) << mFolder->name() << endl; } else { - int b = cstr.tqfind("\r\n", a); + int b = cstr.find("\r\n", a); if ( (b - a - 15) >= 0 ) { TQString uidv = cstr.mid(a + 15, b - a - 15); // kdDebug(5006) << "New uidv = " << uidv << ", old uidv = " @@ -711,11 +711,11 @@ void CachedImapJob::slotCheckUidValidityResult(KIO::Job * job) << mFolder->name() << endl; } - a = cstr.tqfind( "X-PermanentFlags: " ); + a = cstr.find( "X-PermanentFlags: " ); if ( a < 0 ) { kdDebug(5006) << "no PERMANENTFLAGS response? assumming custom flags are not available" << endl; } else { - int b = cstr.tqfind( "\r\n", a ); + int b = cstr.find( "\r\n", a ); if ( (b - a - 18) >= 0 ) { int flags = cstr.mid( a + 18, b - a - 18 ).toInt(); emit permanentFlags( flags ); @@ -767,7 +767,7 @@ static void renameChildFolders( KMFolderDir* dir, const TQString& oldPath, static_cast<KMFolderCachedImap*>(static_cast<KMFolder*>(node)->storage()); if ( !imapFolder->imapPath().isEmpty() ) // Only rename folders that have been accepted by the server - if( imapFolder->imapPath().tqfind( oldPath ) == 0 ) { + if( imapFolder->imapPath().find( oldPath ) == 0 ) { TQString p = imapFolder->imapPath(); p = p.mid( oldPath.length() ); p.prepend( newPath ); @@ -782,7 +782,7 @@ static void renameChildFolders( KMFolderDir* dir, const TQString& oldPath, void CachedImapJob::revertLabelChange() { - TQMap<TQString, KMAcctCachedImap::RenamedFolder>::ConstIterator renit = mAccount->renamedFolders().tqfind( mFolder->imapPath() ); + TQMap<TQString, KMAcctCachedImap::RenamedFolder>::ConstIterator renit = mAccount->renamedFolders().find( mFolder->imapPath() ); Q_ASSERT( renit != mAccount->renamedFolders().end() ); if ( renit != mAccount->renamedFolders().end() ) { mFolder->folder()->setLabel( (*renit).mOldLabel ); diff --git a/kmail/callback.cpp b/kmail/callback.cpp index 923ff6be..0b94a5d1 100644 --- a/kmail/callback.cpp +++ b/kmail/callback.cpp @@ -64,7 +64,7 @@ TQString Callback::askForTransport( bool nullIdentity ) const return transports.first(); const TQString defaultTransport = GlobalSettings::self()->defaultTransport(); - const int defaultIndex = TQMAX( 0, transports.tqfindIndex( defaultTransport ) ); + const int defaultIndex = TQMAX( 0, transports.findIndex( defaultTransport ) ); TQString text; if ( nullIdentity ) @@ -94,13 +94,13 @@ bool Callback::mailICal( const TQString& to, const TQString &iCal, msg->setSubject( subject ); if ( GlobalSettings::self()->exchangeCompatibleInvitations() ) { if ( status == TQString("cancel") ) - msg->setSubject( i18n( "Declined: %1" ).tqarg(subject).tqreplace("Answer: ","") ); + msg->setSubject( i18n( "Declined: %1" ).tqarg(subject).replace("Answer: ","") ); else if ( status == TQString("tentative") ) - msg->setSubject( i18n( "Tentative: %1" ).tqarg(subject).tqreplace("Answer: ","") ); + msg->setSubject( i18n( "Tentative: %1" ).tqarg(subject).replace("Answer: ","") ); else if ( status == TQString("accepted") ) - msg->setSubject( i18n( "Accepted: %1" ).tqarg(subject).tqreplace("Answer: ","") ); + msg->setSubject( i18n( "Accepted: %1" ).tqarg(subject).replace("Answer: ","") ); else if ( status == TQString("delegated") ) - msg->setSubject( i18n( "Delegated: %1" ).tqarg(subject).tqreplace("Answer: ","") ); + msg->setSubject( i18n( "Delegated: %1" ).tqarg(subject).replace("Answer: ","") ); } msg->setTo( to ); msg->setFrom( receiver() ); @@ -227,7 +227,7 @@ TQString Callback::receiver() const // select default identity by default const TQString defaultAddr = kmkernel->identityManager()->defaultIdentity().primaryEmailAddress(); - const int defaultIndex = TQMAX( 0, addrs.tqfindIndex( defaultAddr ) ); + const int defaultIndex = TQMAX( 0, addrs.findIndex( defaultAddr ) ); mReceiver = KInputDialog::getItem( i18n( "Select Address" ), diff --git a/kmail/chiasmuskeyselector.cpp b/kmail/chiasmuskeyselector.cpp index 9fde31bb..d88c3164 100644 --- a/kmail/chiasmuskeyselector.cpp +++ b/kmail/chiasmuskeyselector.cpp @@ -21,7 +21,7 @@ ChiasmusKeySelector::ChiasmusKeySelector( TQWidget* tqparent, const TQString& ca mListBox = new KListBox( page ); mListBox->insertStringList( keys ); - const int current = keys.tqfindIndex( currentKey ); + const int current = keys.findIndex( currentKey ); mListBox->setSelected( TQMAX( 0, current ), true ); mListBox->ensureCurrentVisible(); tqlayout->addWidget( mListBox, 1 ); diff --git a/kmail/configuredialog.cpp b/kmail/configuredialog.cpp index e1fa0898..c0d775cf 100644 --- a/kmail/configuredialog.cpp +++ b/kmail/configuredialog.cpp @@ -480,7 +480,7 @@ void IdentityPage::slotRenameIdentity( TQListViewItem * i, TQString newName = s.stripWhiteSpace(); if ( !newName.isEmpty() && - !kmkernel->identityManager()->shadowIdentities().tqcontains( newName ) ) { + !kmkernel->identityManager()->shadowIdentities().contains( newName ) ) { KPIM::Identity & ident = item->identity(); ident.setIdentityName( newName ); emit changed(true); @@ -739,7 +739,7 @@ static inline TQString uniqueName( const TQStringList & list, { int suffix = 1; TQString result = name; - while ( list.tqfind( result ) != list.end() ) { + while ( list.find( result ) != list.end() ) { result = i18n("%1: name; %2: number appended to it to make it unique " "among a list of names", "%1 %2") .tqarg( name ).tqarg( suffix ); @@ -2057,7 +2057,7 @@ AppearancePageHeadersTab::AppearancePageHeadersTab( TQWidget * tqparent, const c for ( int i = 0 ; i < numDateDisplayConfig ; i++ ) { TQString buttonLabel = i18n(dateDisplayConfig[i].displayName); - if ( buttonLabel.tqcontains("%1") ) + if ( buttonLabel.contains("%1") ) buttonLabel = buttonLabel.tqarg( DateFormatter::formatCurrentDate( dateDisplayConfig[i].dateDisplay ) ); radio = new TQRadioButton( buttonLabel, mDateDisplay ); mDateDisplay->insert( radio, i ); @@ -2367,7 +2367,7 @@ void AppearancePage::ReaderTab::readCurrentFallbackCodec() TQStringList::ConstIterator it( encodings.begin() ); TQStringList::ConstIterator end( encodings.end() ); TQString currentEncoding = GlobalSettings::self()->fallbackCharacterEncoding(); - currentEncoding = currentEncoding.tqreplace( "iso ", "iso-", false ); + currentEncoding = currentEncoding.replace( "iso ", "iso-", false ); ///kdDebug(5006) << "Looking for encoding: " << currentEncoding << endl; int i = 0; int indexOfLatin9 = 0; @@ -3203,7 +3203,7 @@ ComposerPageSubjectTab::ComposerPageSubjectTab( TQWidget * tqparent, const char connect( mReplyListEditor, TQT_SIGNAL( changed( void ) ), this, TQT_SLOT( slotEmitChanged( void ) ) ); - // row 2: "tqreplace [...]" check box: + // row 2: "replace [...]" check box: mReplaceReplyPrefixCheck = new TQCheckBox( GlobalSettings::self()->replaceReplyPrefixItem()->label(), group, "kcfg_ReplaceReplyPrefix" ); @@ -3231,7 +3231,7 @@ ComposerPageSubjectTab::ComposerPageSubjectTab( TQWidget * tqparent, const char connect( mForwardListEditor, TQT_SIGNAL( changed( void ) ), this, TQT_SLOT( slotEmitChanged( void ) ) ); - // row 3: "tqreplace [...]" check box: + // row 3: "replace [...]" check box: mReplaceForwardPrefixCheck = new TQCheckBox( GlobalSettings::self()->replaceForwardPrefixItem()->label(), group, "kcfg_ReplaceForwardPrefix" ); @@ -3855,7 +3855,7 @@ SecurityPageGeneralTab::SecurityPageGeneralTab( TQWidget * tqparent, const char mMDNGroup->insert( radio ); for ( int i = 0 ; i < mMDNGroup->count() ; ++i ) - TQWhatsThis::add( mMDNGroup->tqfind( i ), receiptWhatsThis ); + TQWhatsThis::add( mMDNGroup->find( i ), receiptWhatsThis ); w = new TQWidget( hbox ); // spacer hbox->setStretchFactor( w, 1 ); @@ -5051,7 +5051,7 @@ void MiscPage::GroupwareTab::doLoadFromGlobalSettings() { KMAccount* selectedAccount = 0; int accountId = GlobalSettings::self()->theIMAPResourceAccount(); if ( accountId ) - selectedAccount = kmkernel->acctMgr()->tqfind( accountId ); + selectedAccount = kmkernel->acctMgr()->find( accountId ); else { // Fallback: iterate over accounts to select folderId if found (as an inbox folder) for( KMAccount *a = kmkernel->acctMgr()->first(); a!=0; diff --git a/kmail/configuredialog_p.cpp b/kmail/configuredialog_p.cpp index a6705c76..7a882023 100644 --- a/kmail/configuredialog_p.cpp +++ b/kmail/configuredialog_p.cpp @@ -222,7 +222,7 @@ NewLanguageDialog::NewLanguageDialog( LanguageItemList & suppressedLangs, // we extract it from the path: "/prefix/de/entry.desktop" -> "de" TQString acronym = (*it).section( '/', -2, -2 ); - if ( suppressedAcronyms.tqfind( acronym ) == suppressedAcronyms.end() ) { + if ( suppressedAcronyms.find( acronym ) == suppressedAcronyms.end() ) { // not found: TQString displayname = TQString::tqfromLatin1("%1 (%2)") .tqarg( name ).tqarg( acronym ); @@ -239,7 +239,7 @@ NewLanguageDialog::NewLanguageDialog( LanguageItemList & suppressedLangs, TQString NewLanguageDialog::language() const { TQString s = mComboBox->currentText(); - int i = s.tqfindRev( '(' ); + int i = s.findRev( '(' ); return s.mid( i + 1, s.length() - i - 2 ); } @@ -257,13 +257,13 @@ int LanguageComboBox::insertLanguage( const TQString & language ) TQString name = entry.readEntry( "Name" ); TQString output = TQString::tqfromLatin1("%1 (%2)").tqarg( name ).tqarg( language ); insertItem( TQPixmap( locate("locale", language + flagPng ) ), output ); - return listBox()->index( listBox()->tqfindItem(output) ); + return listBox()->index( listBox()->findItem(output) ); } TQString LanguageComboBox::language() const { TQString s = currentText(); - int i = s.tqfindRev( '(' ); + int i = s.findRev( '(' ); return s.mid( i + 1, s.length() - i - 2 ); } @@ -272,7 +272,7 @@ void LanguageComboBox::setLanguage( const TQString & language ) TQString parenthizedLanguage = TQString::tqfromLatin1("(%1)").tqarg( language ); for (int i = 0; i < count(); i++) // ### FIXME: use .endWith(): - if ( text(i).tqfind( parenthizedLanguage ) >= 0 ) { + if ( text(i).find( parenthizedLanguage ) >= 0 ) { setCurrentItem(i); return; } diff --git a/kmail/encodingdetector.cpp b/kmail/encodingdetector.cpp index cc19e3b1..06537981 100644 --- a/kmail/encodingdetector.cpp +++ b/kmail/encodingdetector.cpp @@ -51,7 +51,7 @@ // Multiple scripts per language were removed and the entries were reordered so // that simple substring matching will work. For example, bam was put before ba // so that the first match will be likely the right match. Otherwise "ba" would -// match "bam" but we would have to search on to tqfind "bam" which is what we want. +// match "bam" but we would have to search on to find "bam" which is what we want. // The original file is called pango-script-lang-table.h /* pango-script-lang-table.h: @@ -824,7 +824,7 @@ EncodingDetector::EncodingChoiceSource EncodingDetector::encodingChoiceSource() const char* EncodingDetector::encoding() const { d->m_storeDecoderName = d->m_codec->name(); - d->m_storeDecoderName = d->m_storeDecoderName.lower().tqreplace( "iso ", "iso-" ); + d->m_storeDecoderName = d->m_storeDecoderName.lower().replace( "iso ", "iso-" ); return d->m_storeDecoderName.data(); } @@ -1059,13 +1059,13 @@ bool EncodingDetector::analyze(const char *data, int len) TQCString str( ptr, (end-ptr)+1); str = str.lower(); int pos=0; - //if( (pos = str.tqfind("http-equiv", pos)) == -1) break; - //if( (pos = str.tqfind("content-type", pos)) == -1) break; - if( (pos = str.tqfind("charset")) == -1) + //if( (pos = str.find("http-equiv", pos)) == -1) break; + //if( (pos = str.find("content-type", pos)) == -1) break; + if( (pos = str.find("charset")) == -1) continue; pos+=6; // skip to '=' - if( (pos = str.tqfind('=', pos)) == -1) + if( (pos = str.find('=', pos)) == -1) continue; // skip whitespace before encoding itself diff --git a/kmail/favoritefolderview.cpp b/kmail/favoritefolderview.cpp index 5c5cfa66..9de9271e 100644 --- a/kmail/favoritefolderview.cpp +++ b/kmail/favoritefolderview.cpp @@ -74,7 +74,7 @@ FavoriteFolderViewItem::FavoriteFolderViewItem(FavoriteFolderView * tqparent, co void FavoriteFolderViewItem::nameChanged() { TQString txt = text( 0 ); - txt.tqreplace( mOldName, folder()->label() ); + txt.replace( mOldName, folder()->label() ); setText( 0, txt ); mOldName = folder()->label(); } @@ -309,7 +309,7 @@ void FavoriteFolderView::dropped(TQDropEvent * e, TQListViewItem * after) KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>( it.current() ); if ( !fti->folder() ) continue; - if( !mFolderToItem.tqcontains( fti->folder() ) ) + if( !mFolderToItem.contains( fti->folder() ) ) afterItem = addFolder( fti->folder(), prettyName( fti ), afterItem ); } e->accept(); @@ -369,7 +369,7 @@ void FavoriteFolderView::initializeFavorites() assert( ft ); for ( TQListViewItemIterator it( ft ); it.current(); ++it ) { KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>( it.current() ); - if ( fti->type() == KFolderTreeItem::Inbox && fti->folder() && !seenInboxes.tqcontains( fti->folder()->id() ) ) { + if ( fti->type() == KFolderTreeItem::Inbox && fti->folder() && !seenInboxes.contains( fti->folder()->id() ) ) { seenInboxes.append( fti->folder()->id() ); if ( fti->folder() == kmkernel->inboxFolder() && hideLocalInbox() ) continue; @@ -457,7 +457,7 @@ void FavoriteFolderView::addFolder() KMFolder *folder = dlg.folder(); if ( !folder ) return; - if ( mFolderToItem.tqcontains( folder ) ) + if ( mFolderToItem.contains( folder ) ) return; KMFolderTreeItem *fti = findFolderTreeItem( folder ); @@ -468,7 +468,7 @@ void KMail::FavoriteFolderView::addFolder(KMFolderTreeItem * fti) { if ( !fti || !fti->folder() ) return; - if ( !mFolderToItem.tqcontains( fti->folder() ) ) + if ( !mFolderToItem.contains( fti->folder() ) ) addFolder( fti->folder(), prettyName( fti ) ); } diff --git a/kmail/folderIface.cpp b/kmail/folderIface.cpp index 4d1cb808..bcd4201f 100644 --- a/kmail/folderIface.cpp +++ b/kmail/folderIface.cpp @@ -136,7 +136,7 @@ FolderIface::messageRefs() for( int i = 0; i < messageCache.size(); ++i ) { KMMsgBase *msg = messageCache[i]; if ( msg ) { - KMMessage *fmsg = msg->tqparent()->getMsg( msg->tqparent()->tqfind( msg ) ); + KMMessage *fmsg = msg->tqparent()->getMsg( msg->tqparent()->find( msg ) ); refList.append( DCOPRef( new MessageIface( fmsg ) ) ); } } diff --git a/kmail/folderdiaacltab.cpp b/kmail/folderdiaacltab.cpp index 5237787e..3b64254c 100644 --- a/kmail/folderdiaacltab.cpp +++ b/kmail/folderdiaacltab.cpp @@ -139,7 +139,7 @@ static TQString addresseeToUserId( const KABC::Addressee& addr, IMAPUserIdFormat if ( userIdFormat == FullEmail ) return email; else { // mUserIdFormat == UserName - email.truncate( email.tqfind( '@' ) ); + email.truncate( email.find( '@' ) ); return email; } } @@ -259,7 +259,7 @@ void KMail::FolderDiaACLTab::ListViewItem::load( const ACLListEntry& entry ) // since it uses space as a separator (imap4.cc, look for GETACL) // It's ok in distribution list names though, that's why this check is only done here // and also why there's no validator on the lineedit. - if ( entry.userId.tqcontains( ' ' ) ) + if ( entry.userId.contains( ' ' ) ) kdWarning(5006) << "Userid contains a space!!! '" << entry.userId << "'" << endl; setUserId( entry.userId ); @@ -412,7 +412,7 @@ void KMail::FolderDiaACLTab::load() // but the default value is determined from the current user's own id. TQString defaultFormat = "fullemail"; // warning mImapAccount can be 0 if creating a subsubsubfolder with dimap... (bug?) - if ( mImapAccount && mImapAccount->login().tqfind('@') == -1 ) + if ( mImapAccount && mImapAccount->login().find('@') == -1 ) defaultFormat = "username"; // no @ found, so we assume it's just the username KConfigGroup configGroup( kmkernel->config(), "IMAP" ); TQString str = configGroup.readEntry( "UserIdFormat", defaultFormat ); @@ -699,7 +699,7 @@ bool KMail::FolderDiaACLTab::save() TQString uid = (*init).userId; for( ACLList::ConstIterator it = aclList.begin(); it != aclList.end() && !isInNewList; ++it ) isInNewList = uid == (*it).userId; - if ( !isInNewList && !mRemovedACLs.tqcontains(uid) ) + if ( !isInNewList && !mRemovedACLs.contains(uid) ) mRemovedACLs.append( uid ); } diff --git a/kmail/folderjob.h b/kmail/folderjob.h index 3d662e76..52778bb6 100644 --- a/kmail/folderjob.h +++ b/kmail/folderjob.h @@ -128,7 +128,7 @@ signals: /** * Emitted when a list of messages has been - * copied to the specified location. TQPtrList tqcontains + * copied to the specified location. TQPtrList contains * the list of the copied messages. */ void messageCopied( TQPtrList<KMMessage> ); diff --git a/kmail/foldersetselector.cpp b/kmail/foldersetselector.cpp index 45748b2f..8ae2618e 100644 --- a/kmail/foldersetselector.cpp +++ b/kmail/foldersetselector.cpp @@ -76,7 +76,7 @@ void FolderSetSelector::setSelectedFolders(const TQValueList< int > & folderIds) while ( it.current() ) { SimpleFolderTreeItem<TQCheckListItem> *item = dynamic_cast<SimpleFolderTreeItem<TQCheckListItem>*>( it.current() ); if ( item && item->folder() ) { - if ( folderIds.tqcontains( item->folder()->id() ) ) + if ( folderIds.contains( item->folder()->id() ) ) item->setOn( true ); else item->setOn( false ); diff --git a/kmail/folderstorage.cpp b/kmail/folderstorage.cpp index 469f03f1..25fc6c0f 100644 --- a/kmail/folderstorage.cpp +++ b/kmail/folderstorage.cpp @@ -113,7 +113,7 @@ void FolderStorage::close( const char* owner, bool aForced ) TQString FolderStorage::dotEscape(const TQString& aStr) { if (aStr[0] != '.') return aStr; - return aStr.left(aStr.tqfind(TQRegExp("[^\\.]"))) + aStr; + return aStr.left(aStr.find(TQRegExp("[^\\.]"))) + aStr; } void FolderStorage::addJob( FolderJob* job ) const @@ -350,8 +350,8 @@ void FolderStorage::reallyAddCopyOfMsg(KMMessage* aMsg) unGetMsg( count() - 1 ); } -int FolderStorage::tqfind( const KMMessage * msg ) const { - return tqfind( &msg->toMsgBase() ); +int FolderStorage::find( const KMMessage * msg ) const { + return find( &msg->toMsgBase() ); } //----------------------------------------------------------------------------- @@ -359,7 +359,7 @@ void FolderStorage::removeMsg(const TQPtrList<KMMsgBase>& msgList, bool imapQuie { for( TQPtrListIterator<KMMsgBase> it( msgList ); *it; ++it ) { - int idx = tqfind(it.current()); + int idx = find(it.current()); assert( idx != -1); removeMsg(idx, imapQuiet); } @@ -370,7 +370,7 @@ void FolderStorage::removeMsg(const TQPtrList<KMMessage>& msgList, bool imapQuie { for( TQPtrListIterator<KMMessage> it( msgList ); *it; ++it ) { - int idx = tqfind(it.current()); + int idx = find(it.current()); assert( idx != -1); removeMsg(idx, imapQuiet); } @@ -465,7 +465,7 @@ void FolderStorage::take(TQPtrList<KMMessage> msgList) { if (msg->tqparent()) { - int idx = msg->tqparent()->tqfind(msg); + int idx = msg->tqparent()->find(msg); if ( idx >= 0 ) take(idx); } @@ -725,11 +725,11 @@ int FolderStorage::rename(const TQString& newName, KMFolderDir *newParent) // if the folder is being moved then move its node and, if necessary, also // the associated subfolder directory node to the new tqparent if (newParent) { - if (oldParent->tqfindRef( folder() ) != -1) + if (oldParent->findRef( folder() ) != -1) oldParent->take(); newParent->inSort( folder() ); if ( child ) { - if ( child->tqparent()->tqfindRef( child ) != -1 ) + if ( child->tqparent()->findRef( child ) != -1 ) child->tqparent()->take(); newParent->inSort( child ); child->setParent( newParent ); @@ -898,7 +898,7 @@ void FolderStorage::msgStatusChanged(const KMMsgtqStatus oldtqStatus, void FolderStorage::headerOfMsgChanged(const KMMsgBase* aMsg, int idx) { if (idx < 0) - idx = aMsg->tqparent()->tqfind( aMsg ); + idx = aMsg->tqparent()->find( aMsg ); if (idx >= 0 ) { @@ -1025,7 +1025,7 @@ int FolderStorage::appendToFolderIdsFile( int idx ) void FolderStorage::replaceMsgSerNum( unsigned long sernum, KMMsgBase* msg, int idx ) { if ( !mExportsSernums ) return; - KMMsgDict::mutableInstance()->tqreplace( sernum, msg, idx ); + KMMsgDict::mutableInstance()->replace( sernum, msg, idx ); } void FolderStorage::setRDict( KMMsgDictREntry *rentry ) const diff --git a/kmail/folderstorage.h b/kmail/folderstorage.h index 9ff0b67f..45a40282 100644 --- a/kmail/folderstorage.h +++ b/kmail/folderstorage.h @@ -229,8 +229,8 @@ public: virtual int moveMsg(TQPtrList<KMMessage>, int* index_return = 0); /** Returns the index of the given message or -1 if not found. */ - virtual int tqfind(const KMMsgBase* msg) const = 0; - int tqfind( const KMMessage * msg ) const; + virtual int find(const KMMsgBase* msg) const = 0; + int find( const KMMessage * msg ) const; /** Number of messages in this folder. */ virtual int count(bool cache = false) const; diff --git a/kmail/foldertreebase.h b/kmail/foldertreebase.h index 71018663..b2c48c70 100644 --- a/kmail/foldertreebase.h +++ b/kmail/foldertreebase.h @@ -39,7 +39,7 @@ class FolderTreeBase : public KFolderTree /** Find index of given folder. Returns 0 if not found */ virtual TQListViewItem* indexOfFolder( const KMFolder* folder ) const { - if ( mFolderToItem.tqcontains( folder ) ) + if ( mFolderToItem.contains( folder ) ) return mFolderToItem[ folder ]; else return 0; diff --git a/kmail/folderviewtooltip.h b/kmail/folderviewtooltip.h index a60e60c6..5846cd82 100644 --- a/kmail/folderviewtooltip.h +++ b/kmail/folderviewtooltip.h @@ -32,7 +32,7 @@ class FolderViewToolTip : public TQToolTip item->updateCount(); TQString tipText = i18n("<qt><b>%1</b><br>Total: %2<br>Unread: %3<br>Size: %4" ) - .tqarg( item->folder()->prettyURL().tqreplace( " ", " " ) ) + .tqarg( item->folder()->prettyURL().replace( " ", " " ) ) .tqarg( item->totalCount() < 0 ? "-" : TQString::number( item->totalCount() ) ) .tqarg( item->unreadCount() < 0 ? "-" : TQString::number( item->unreadCount() ) ) .tqarg( KIO::convertSize( item->folderSize() ) ); diff --git a/kmail/headerlistquicksearch.cpp b/kmail/headerlistquicksearch.cpp index 67755eff..605e86f8 100644 --- a/kmail/headerlistquicksearch.cpp +++ b/kmail/headerlistquicksearch.cpp @@ -89,7 +89,7 @@ HeaderListQuickSearch::HeaderListQuickSearch( TQWidget *tqparent, label->setBuddy( mStatusCombo ); - KToolBarButton * btn = new KToolBarButton( "mail_tqfind", 0, tqparent, + KToolBarButton * btn = new KToolBarButton( "mail_find", 0, tqparent, 0, i18n( "Open Full Search" ) ); connect( btn, TQT_SIGNAL( clicked() ), TQT_SIGNAL( requestFullSearch() ) ); @@ -155,10 +155,10 @@ bool HeaderListQuickSearch::itemMatches(const TQListViewItem *item, const TQStri // The full email address is not visible, but we still want it to be searchable. // KListViewSearchLine::itemMatches() only searches in visible columns. const HeaderItem *headerItem = static_cast<const HeaderItem*>( item ); - if ( headerItem->from().lower().tqcontains( s.lower() ) ) { + if ( headerItem->from().lower().contains( s.lower() ) ) { return true; } - if ( headerItem->to().lower().tqcontains( s.lower() ) ) { + if ( headerItem->to().lower().contains( s.lower() ) ) { return true; } diff --git a/kmail/headerstrategy.cpp b/kmail/headerstrategy.cpp index 99cc4f5f..239525d3 100644 --- a/kmail/headerstrategy.cpp +++ b/kmail/headerstrategy.cpp @@ -243,8 +243,8 @@ namespace KMail { } bool HeaderStrategy::showHeader( const TQString & header ) const { - if ( headersToDisplay().tqcontains( header.lower() ) ) return true; - if ( headersToHide().tqcontains( header.lower() ) ) return false; + if ( headersToDisplay().contains( header.lower() ) ) return true; + if ( headersToHide().contains( header.lower() ) ) return false; return defaultPolicy() == Display; } diff --git a/kmail/imapaccountbase.cpp b/kmail/imapaccountbase.cpp index d82ba5cc..a0616379 100644 --- a/kmail/imapaccountbase.cpp +++ b/kmail/imapaccountbase.cpp @@ -669,7 +669,7 @@ namespace KMail { // split, allow empty parts as we can get empty namespaces TQStringList parts = TQStringList::split( "=", *it, true ); imapNamespace section = imapNamespace( parts[0].toInt() ); - if ( map.tqcontains( section ) ) { + if ( map.contains( section ) ) { nsDelim = map[section]; } else { nsDelim.clear(); @@ -736,12 +736,12 @@ namespace KMail { TQString msg = i18n("KMail has detected a prefix entry in the " "configuration of the account \"%1\" which is obsolete with the " "support of IMAP namespaces.").tqarg( name() ); - if ( list.tqcontains( "" ) ) { + if ( list.contains( "" ) ) { // replace empty entry with the old prefix list.remove( "" ); list += mOldPrefix; mNamespaces[PersonalNS] = list; - if ( mNamespaceToDelimiter.tqcontains( "" ) ) { + if ( mNamespaceToDelimiter.contains( "" ) ) { TQString delim = mNamespaceToDelimiter[""]; mNamespaceToDelimiter.remove( "" ); mNamespaceToDelimiter[mOldPrefix] = delim; @@ -755,7 +755,7 @@ namespace KMail { list.clear(); list += mOldPrefix; mNamespaces[PersonalNS] = list; - if ( mNamespaceToDelimiter.tqcontains( old ) ) { + if ( mNamespaceToDelimiter.contains( old ) ) { TQString delim = mNamespaceToDelimiter[old]; mNamespaceToDelimiter.remove( old ); mNamespaceToDelimiter[mOldPrefix] = delim; @@ -799,7 +799,7 @@ namespace KMail { ns = ns.left( ns.length()-1 ); } // first ignore an empty prefix as it would match always - if ( !ns.isEmpty() && path.tqfind( ns ) != -1 ) { + if ( !ns.isEmpty() && path.find( ns ) != -1 ) { return (*strit); } } @@ -812,7 +812,7 @@ namespace KMail { { //kdDebug(5006) << "delimiterForNamespace " << prefix << endl; // try to match exactly - if ( mNamespaceToDelimiter.tqcontains(prefix) ) { + if ( mNamespaceToDelimiter.contains(prefix) ) { return mNamespaceToDelimiter[prefix]; } @@ -824,13 +824,13 @@ namespace KMail { // make sure we also match this version TQString stripped = it.key().left( it.key().length() - 1 ); if ( !it.key().isEmpty() && - ( prefix.tqcontains( it.key() ) || prefix.tqcontains( stripped ) ) ) { + ( prefix.contains( it.key() ) || prefix.contains( stripped ) ) ) { return it.data(); } } // see if we have an empty namespace // this should always be the case - if ( mNamespaceToDelimiter.tqcontains( "" ) ) { + if ( mNamespaceToDelimiter.contains( "" ) ) { return mNamespaceToDelimiter[""]; } // well, we tried @@ -894,7 +894,7 @@ namespace KMail { TQString ImapAccountBase::prettifyQuotaError( const TQString& _error, KIO::Job * job ) { TQString error = _error; - if ( error.tqfind( "quota", 0, false ) == -1 ) return error; + if ( error.find( "quota", 0, false ) == -1 ) return error; // this is a quota error, prettify it a bit JobIterator it = findJob( job ); TQString quotaAsString( i18n("No detailed quota information available.") ); @@ -1025,7 +1025,7 @@ namespace KMail { //----------------------------------------------------------------------------- void ImapAccountBase::processNewMailInFolder( KMFolder* folder, FolderListType type /*= Single*/ ) { - if ( mFoldersQueuedForChecking.tqcontains( folder ) ) + if ( mFoldersQueuedForChecking.contains( folder ) ) return; mFoldersQueuedForChecking.append( folder ); mCheckingSingleFolder = ( type == Single ); @@ -1057,7 +1057,7 @@ namespace KMail { //----------------------------------------------------------------------------- bool ImapAccountBase::checkingMail( KMFolder *folder ) { - if (checkingMail() && mFoldersQueuedForChecking.tqcontains(folder)) + if (checkingMail() && mFoldersQueuedForChecking.contains(folder)) return true; return false; } diff --git a/kmail/imapaccountbase.h b/kmail/imapaccountbase.h index 4b5cda92..c533171d 100644 --- a/kmail/imapaccountbase.h +++ b/kmail/imapaccountbase.h @@ -174,7 +174,7 @@ namespace KMail { /** * Look for the jobData related to a given job. Compare with end() */ - JobIterator findJob( KIO::Job* job ) { return mapJobData.tqfind( job ); } + JobIterator findJob( KIO::Job* job ) { return mapJobData.find( job ); } JobIterator jobsEnd() { return mapJobData.end(); } /** * Call this when a job is finished. @@ -398,7 +398,7 @@ namespace KMail { * Returns true if the account has the given capability */ bool hasCapability( const TQString& capa ) { - return mCapabilities.tqcontains( capa ); } + return mCapabilities.contains( capa ); } /** * Create an IMAP path for a tqparent folder and a foldername diff --git a/kmail/imapjob.cpp b/kmail/imapjob.cpp index be94557d..c25b2909 100644 --- a/kmail/imapjob.cpp +++ b/kmail/imapjob.cpp @@ -118,7 +118,7 @@ void ImapJob::init( JobType jt, TQString sets, KMFolderImap* folder, ++it; if ( mSrcFolder && !curMsg->isMessage() ) { - int idx = mSrcFolder->tqfind( curMsg ); + int idx = mSrcFolder->find( curMsg ); curMsg = mSrcFolder->getMsg( idx ); } KURL url = account->getUrl(); @@ -130,10 +130,10 @@ void ImapJob::init( JobType jt, TQString sets, KMFolderImap* folder, curMsg->msgSizeServer() : curMsg->msgSize(); jd.msgList.append( curMsg ); TQCString cstr( curMsg->asString() ); - int a = cstr.tqfind("\nX-UID: "); - int b = cstr.tqfind('\n', a); - if (a != -1 && b != -1 && cstr.tqfind("\n\n") > a) cstr.remove(a, b-a); - jd.data.resize( cstr.length() + cstr.tqcontains( "\n" ) - cstr.tqcontains( "\r\n" ) ); + int a = cstr.find("\nX-UID: "); + int b = cstr.find('\n', a); + if (a != -1 && b != -1 && cstr.find("\n\n") > a) cstr.remove(a, b-a); + jd.data.resize( cstr.length() + cstr.contains( "\n" ) - cstr.contains( "\r\n" ) ); unsigned int i = 0; char prevChar = '\0'; // according to RFC 2060 we need CRLF @@ -290,7 +290,7 @@ void ImapJob::slotGetNextMessage() jd.msgList.append( msg ); if ( !mPartSpecifier.isEmpty() ) { - if ( mPartSpecifier.tqfind ("STRUCTURE", 0, false) != -1 ) { + if ( mPartSpecifier.find ("STRUCTURE", 0, false) != -1 ) { path += ";SECTION=STRUCTURE"; } else if ( mPartSpecifier == "HEADER" ) { path += ";SECTION=HEADER"; @@ -325,7 +325,7 @@ void ImapJob::slotGetNextMessage() KIO::Scheduler::assignJobToSlave( account->slave(), simpleJob ); mJob = simpleJob; account->insertJob( mJob, jd ); - if ( mPartSpecifier.tqfind( "STRUCTURE", 0, false ) != -1 ) + if ( mPartSpecifier.find( "STRUCTURE", 0, false ) != -1 ) { connect( mJob, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotGetBodyStructureResult(KIO::Job *)) ); @@ -448,7 +448,7 @@ void ImapJob::slotGetMessageResult( KIO::Job * job ) * this means that the msg is not on the server anymore so delete it */ emit messageRetrieved( 0 ); tqparent->ignoreJobsForMessage( msg ); - int idx = tqparent->tqfind( msg ); + int idx = tqparent->find( msg ); if (idx != -1) tqparent->removeMsg( idx, true ); // the removeMsg will unGet the message, which will delete all // jobs, including this one @@ -583,7 +583,7 @@ void ImapJob::slotCopyMessageInfoData(KIO::Job * job, const TQString & data) ImapAccountBase::JobIterator it = account->findJob( job ); if ( it == account->jobsEnd() ) return; - if (data.tqfind("UID") != -1) + if (data.find("UID") != -1) { // split TQString oldUid = data.section(' ', 1, 1); @@ -598,7 +598,7 @@ void ImapJob::slotCopyMessageInfoData(KIO::Job * job, const TQString & data) for ( msg = (*it).msgList.first(); msg; msg = (*it).msgList.next() ) { ulong uid = msg->UID(); - index = olduids.tqfindIndex(uid); + index = olduids.findIndex(uid); if (index > -1) { // found, get the new uid @@ -622,7 +622,7 @@ void ImapJob::slotPutMessageInfoData(KIO::Job *job, const TQString &data) ImapAccountBase::JobIterator it = account->findJob( job ); if ( it == account->jobsEnd() ) return; - if ( data.tqfind("UID") != -1 ) + if ( data.find("UID") != -1 ) { ulong uid = ( data.right(data.length()-4) ).toInt(); if ( !(*it).msgList.isEmpty() ) diff --git a/kmail/importjob.cpp b/kmail/importjob.cpp index a84ecf51..fc41a46b 100644 --- a/kmail/importjob.cpp +++ b/kmail/importjob.cpp @@ -273,7 +273,7 @@ static TQString folderNameForDirectoryName( const TQString &dirName ) Q_ASSERT( dirName.startsWith( "." ) ); const TQString end = ".directory"; const int expectedIndex = dirName.length() - end.length(); - if ( dirName.lower().tqfind( end ) != expectedIndex ) + if ( dirName.lower().find( end ) != expectedIndex ) return TQString(); TQString returnName = dirName.left( dirName.length() - end.length() ); returnName = returnName.right( returnName.length() - 1 ); diff --git a/kmail/keyresolver.cpp b/kmail/keyresolver.cpp index 2135a9e7..5d156f8e 100644 --- a/kmail/keyresolver.cpp +++ b/kmail/keyresolver.cpp @@ -555,7 +555,7 @@ namespace { static TQString canonicalAddress( const TQString & _address ) { const TQString address = KPIM::getEmailAddress( _address ); - if ( address.tqfind('@') == -1 ) { + if ( address.find('@') == -1 ) { // local address //char hostname[1024]; //gethostname(hostname,1024); diff --git a/kmail/khtmlparthtmlwriter.cpp b/kmail/khtmlparthtmlwriter.cpp index 64f085f9..174c2c3a 100644 --- a/kmail/khtmlparthtmlwriter.cpp +++ b/kmail/khtmlparthtmlwriter.cpp @@ -140,7 +140,7 @@ namespace KMail { DOM::HTMLImageElement image( node ); KURL url( image.src().string() ); if ( url.protocol() == "cid" ) { - EmbeddedPartMap::const_iterator it = mEmbeddedPartMap.tqfind( url.path() ); + EmbeddedPartMap::const_iterator it = mEmbeddedPartMap.find( url.path() ); if ( it != mEmbeddedPartMap.end() ) { kdDebug(5006) << "Replacing " << url.prettyURL() << " by " << it.data() << endl; image.setSrc( it.data() ); diff --git a/kmail/kmaccount.cpp b/kmail/kmaccount.cpp index 796ac382..20105acd 100644 --- a/kmail/kmaccount.cpp +++ b/kmail/kmaccount.cpp @@ -493,7 +493,7 @@ void KMAccount::checkDone( bool newmail, ChecktqStatus status ) //----------------------------------------------------------------------------- void KMAccount::addToNewInFolder( TQString folderId, int num ) { - if ( mNewInFolder.tqfind( folderId ) == mNewInFolder.end() ) + if ( mNewInFolder.find( folderId ) == mNewInFolder.end() ) mNewInFolder[folderId] = num; else mNewInFolder[folderId] += num; diff --git a/kmail/kmacctcachedimap.cpp b/kmail/kmacctcachedimap.cpp index 0c89e6b1..76339dd6 100644 --- a/kmail/kmacctcachedimap.cpp +++ b/kmail/kmacctcachedimap.cpp @@ -287,7 +287,7 @@ void KMAcctCachedImap::addUnreadMsgCount( const KMFolderCachedImap *folder, // therefore doesn't need to be counted here const TQString folderId = folder->folder()->idString(); int newInFolder = countUnread; - if ( mUnreadBeforeCheck.tqfind( folderId ) != mUnreadBeforeCheck.end() ) + if ( mUnreadBeforeCheck.find( folderId ) != mUnreadBeforeCheck.end() ) newInFolder -= mUnreadBeforeCheck[folderId]; if ( newInFolder > 0 ) addToNewInFolder( folderId, newInFolder ); @@ -417,12 +417,12 @@ TQStringList KMAcctCachedImap::deletedFolderPaths( const TQString& subFolderPath bool KMAcctCachedImap::isDeletedFolder( const TQString& subFolderPath ) const { - return mDeletedFolders.tqfind( subFolderPath ) != mDeletedFolders.end(); + return mDeletedFolders.find( subFolderPath ) != mDeletedFolders.end(); } bool KMAcctCachedImap::isPreviouslyDeletedFolder( const TQString& subFolderPath ) const { - return mPreviouslyDeletedFolders.tqfind( subFolderPath ) != mPreviouslyDeletedFolders.end(); + return mPreviouslyDeletedFolders.find( subFolderPath ) != mPreviouslyDeletedFolders.end(); } void KMAcctCachedImap::removeDeletedFolder( const TQString& subFolderPath ) @@ -459,7 +459,7 @@ FolderStorage* KMAcctCachedImap::rootFolder() const TQString KMAcctCachedImap::renamedFolder( const TQString& imapPath ) const { - TQMap<TQString, RenamedFolder>::ConstIterator renit = mRenamedFolders.tqfind( imapPath ); + TQMap<TQString, RenamedFolder>::ConstIterator renit = mRenamedFolders.find( imapPath ); if ( renit != mRenamedFolders.end() ) return (*renit).mNewName; return TQString(); diff --git a/kmail/kmacctimap.cpp b/kmail/kmacctimap.cpp index bb09d692..d889b65b 100644 --- a/kmail/kmacctimap.cpp +++ b/kmail/kmacctimap.cpp @@ -402,7 +402,7 @@ void KMAcctImap::postProcessNewMail( KMFolder * folder ) // count the unread messages const TQString folderId = folder->idString(); int newInFolder = folder->countUnread(); - if ( mUnreadBeforeCheck.tqfind( folderId ) != mUnreadBeforeCheck.end() ) + if ( mUnreadBeforeCheck.find( folderId ) != mUnreadBeforeCheck.end() ) newInFolder -= mUnreadBeforeCheck[folderId]; if ( newInFolder > 0 ) { addToNewInFolder( folderId, newInFolder ); @@ -580,7 +580,7 @@ void KMAcctImap::slotFolderSelected( KMFolderImap* folder, bool ) void KMAcctImap::execFilters(TQ_UINT32 serNum) { if ( !kmkernel->filterMgr()->atLeastOneFilterAppliesTo( id() ) ) return; - TQValueListIterator<TQ_UINT32> findIt = mFilterSerNums.tqfind( serNum ); + TQValueListIterator<TQ_UINT32> findIt = mFilterSerNums.find( serNum ); if ( findIt != mFilterSerNums.end() ) return; mFilterSerNums.append( serNum ); diff --git a/kmail/kmaddrbook.cpp b/kmail/kmaddrbook.cpp index 8fdc5554..adc888a4 100644 --- a/kmail/kmaddrbook.cpp +++ b/kmail/kmaddrbook.cpp @@ -56,18 +56,18 @@ void KabcBridge::addresses(TQStringList& result) // includes lists for ( mit = emails.begin(); mit != emails.end(); ++mit ) { email = *mit; if (!email.isEmpty()) { - if (n.isEmpty() || (email.tqfind( '<' ) != -1)) + if (n.isEmpty() || (email.find( '<' ) != -1)) addr = TQString(); else { // do we really need quotes around this name ? - if (n.tqfind(needQuotes) != -1) + if (n.find(needQuotes) != -1) addr = '"' + n + endQuote; else addr = n + ' '; } - if (!addr.isEmpty() && (email.tqfind( '<' ) == -1) - && (email.tqfind( '>' ) == -1) - && (email.tqfind( ',' ) == -1)) + if (!addr.isEmpty() && (email.find( '<' ) == -1) + && (email.find( '>' ) == -1) + && (email.find( ',' ) == -1)) addr += '<' + email + '>'; else addr += email; @@ -126,7 +126,7 @@ TQStringList KabcBridge::categories() for ( TQStringList::ConstIterator itAux = aux.begin(); itAux != aux.end(); ++itAux ) { // don't have duplicates in allcategories - if ( allcategories.tqfind( *itAux ) == allcategories.end() ) + if ( allcategories.find( *itAux ) == allcategories.end() ) allcategories += *itAux; } } diff --git a/kmail/kmail.kcfg b/kmail/kmail.kcfg index 52a30a4d..8054b9d8 100644 --- a/kmail/kmail.kcfg +++ b/kmail/kmail.kcfg @@ -451,14 +451,14 @@ <entry name="ReplyPrefixes" type="StringList" key="reply-prefixes"> <default>Re\\s*:,Re\\[\\d+\\]:,Re\\d+:</default> </entry> - <entry name="ReplaceReplyPrefix" type="Bool" key="tqreplace-reply-prefix"> + <entry name="ReplaceReplyPrefix" type="Bool" key="replace-reply-prefix"> <label>Replace recognized prefi&x with "Re:"</label> <default>true</default> </entry> <entry name="ForwardPrefixes" type="StringList" key="forward-prefixes"> <default>Fwd:,FW:</default> </entry> - <entry name="ReplaceForwardPrefix" type="Bool" key="tqreplace-forward-prefix"> + <entry name="ReplaceForwardPrefix" type="Bool" key="replace-forward-prefix"> <label>Replace recognized prefix with "&Fwd:"</label> <default>true</default> </entry> diff --git a/kmail/kmailicalifaceimpl.cpp b/kmail/kmailicalifaceimpl.cpp index bf0e5b8c..82084b13 100644 --- a/kmail/kmailicalifaceimpl.cpp +++ b/kmail/kmailicalifaceimpl.cpp @@ -260,7 +260,7 @@ bool KMailICalIfaceImpl::updateAttachment( KMMessage& msg, KMMessagePart msgPart; msgPart.setName( attachmentName ); - const int iSlash = attachmentMimetype.tqfind('/'); + const int iSlash = attachmentMimetype.find('/'); const TQCString sType = attachmentMimetype.left( iSlash ).latin1(); const TQCString sSubtype = attachmentMimetype.mid( iSlash+1 ).latin1(); msgPart.setTypeStr( sType ); @@ -309,7 +309,7 @@ bool KMailICalIfaceImpl::updateAttachment( KMMessage& msg, // Look for the attachment with the right mimetype bool KMailICalIfaceImpl::kolabXMLFoundAndDecoded( const KMMessage& msg, const TQString& mimetype, TQString& s ) { - const int iSlash = mimetype.tqfind('/'); + const int iSlash = mimetype.find('/'); const TQCString sType = mimetype.left( iSlash ).latin1(); const TQCString sSubtype = mimetype.mid( iSlash+1 ).latin1(); DwBodyPart* part = findBodyPartByMimeType( msg, sType, sSubtype, true /* starts with sSubtype, to accept application/x-vnd.kolab.contact.distlist */ ); @@ -325,7 +325,7 @@ bool KMailICalIfaceImpl::kolabXMLFoundAndDecoded( const KMMessage& msg, const TQ // Delete an attachment in an existing mail. // return value: wrong if attachment could not be deleted // -// This code could be optimized: for now we just tqreplace +// This code could be optimized: for now we just replace // the attachment by an empty dummy attachment since Mimelib // does not provide an option for deleting attachments yet. bool KMailICalIfaceImpl::deleteAttachment( KMMessage& msg, @@ -566,7 +566,7 @@ TQMap<TQ_UINT32, TQString> KMailICalIfaceImpl::incidencesKolab( const TQString& KMMessage* msg = f->storage()->readTemporaryMsg(i); #endif if ( msg ) { - const int iSlash = mimetype.tqfind('/'); + const int iSlash = mimetype.find('/'); const TQCString sType = mimetype.left( iSlash ).latin1(); const TQCString sSubtype = mimetype.mid( iSlash+1 ).latin1(); if ( sType.isEmpty() || sSubtype.isEmpty() ) { @@ -616,7 +616,7 @@ void KMailICalIfaceImpl::slotMessageRetrieved( KMMessage* msg ) TQ_UINT32 sernum = msg->getMsgSerNum(); // do we have an accumulator for this folder? - Accumulator *ac = mAccumulators.tqfind( tqparent->location() ); + Accumulator *ac = mAccumulators.find( tqparent->location() ); if( ac ) { TQString s; if ( !vPartFoundAndDecoded( msg, s ) ) return; @@ -637,7 +637,7 @@ void KMailICalIfaceImpl::slotMessageRetrieved( KMMessage* msg ) slotIncidenceAdded( msg->tqparent(), msg->getMsgSerNum() ); } - if ( mTheUnGetMes.tqcontains( sernum ) ) { + if ( mTheUnGetMes.contains( sernum ) ) { mTheUnGetMes.remove( sernum ); int i = 0; KMFolder* folder = 0; @@ -666,7 +666,7 @@ int KMailICalIfaceImpl::dimapAccounts() static TQString subresourceLabelForPresentation( const KMFolder * folder ) { - if( KMailICalIfaceImpl::getResourceMap()->tqcontains( folder->location() ) ) { + if( KMailICalIfaceImpl::getResourceMap()->contains( folder->location() ) ) { return folder->label(); } @@ -1044,7 +1044,7 @@ TQStringList KMailICalIfaceImpl::listAttachments(const TQString & resource, TQ_U TQString name; DwMediaType& contentType = part->Headers().ContentType(); if ( TQString( contentType.SubtypeStr().c_str() ).startsWith( "x-vnd.kolab." ) - || TQString( contentType.SubtypeStr().c_str() ).tqcontains( "tnef" ) ) + || TQString( contentType.SubtypeStr().c_str() ).contains( "tnef" ) ) continue; if ( !part->Headers().ContentDisposition().Filename().empty() ) name = part->Headers().ContentDisposition().Filename().c_str(); @@ -1131,7 +1131,7 @@ void KMailICalIfaceImpl::slotIncidenceAdded( KMFolder* folder, mUIDToSerNum.insert( uid, sernum ); // tell the resource if we didn't trigger this ourselves - if ( mInTransit.tqcontains( uid ) ) { + if ( mInTransit.contains( uid ) ) { mInTransit.remove( uid ); } incidenceAdded( type, folder->location(), sernum, format, s ); @@ -1213,7 +1213,7 @@ void KMailICalIfaceImpl::slotRefreshFolder( KMFolder* folder) if( mUseResourceIMAP && folder ) { if( folder == mCalendar || folder == mContacts || folder == mNotes || folder == mTasks - || folder == mJournals || mExtraFolders.tqfind( folder->location() ) ) { + || folder == mJournals || mExtraFolders.find( folder->location() ) ) { // Refresh the folder of this type KMail::FolderContentsType ct = folder->storage()->contentsType(); slotRefresh( s_folderContentsType[ct].contentsTypeStr ); @@ -1257,7 +1257,7 @@ KMFolder* KMailICalIfaceImpl::folderFromType( const TQString& type, bool KMailICalIfaceImpl::isResourceFolder( KMFolder* folder ) const { return mUseResourceIMAP && folder && - ( isStandardResourceFolder( folder ) || mExtraFolders.tqfind( folder->location() )!=0 ); + ( isStandardResourceFolder( folder ) || mExtraFolders.find( folder->location() )!=0 ); } bool KMailICalIfaceImpl::isStandardResourceFolder( KMFolder* folder ) const @@ -1286,7 +1286,7 @@ KFolderTreeItem::Type KMailICalIfaceImpl::folderType( KMFolder* folder ) const if( mUseResourceIMAP && folder ) { if( folder == mCalendar || folder == mContacts || folder == mNotes || folder == mTasks - || folder == mJournals || mExtraFolders.tqfind( folder->location() ) ) { + || folder == mJournals || mExtraFolders.find( folder->location() ) ) { KMail::FolderContentsType ct = folder->storage()->contentsType(); return s_folderContentsType[ct].treeItemType; } @@ -1352,7 +1352,7 @@ TQString KMailICalIfaceImpl::folderName( KFolderTreeItem::Type type, int languag // Find message matching a given UID KMMessage *KMailICalIfaceImpl::findMessageByUID( const TQString& uid, KMFolder* folder ) { - if( !folder || !mUIDToSerNum.tqcontains( uid ) ) return 0; + if( !folder || !mUIDToSerNum.contains( uid ) ) return 0; int i; KMFolder *aFolder; KMMsgDict::instance()->getLocation( mUIDToSerNum[uid], &aFolder, &i ); @@ -1387,7 +1387,7 @@ void KMailICalIfaceImpl::deleteMsg( KMMessage *msg ) // Commands are now delayed; can't use that anymore, we need immediate deletion //( new KMDeleteMsgCommand( msg->tqparent(), msg ) )->start(); KMFolder *srcFolder = msg->tqparent(); - int idx = srcFolder->tqfind(msg); + int idx = srcFolder->find(msg); assert(idx != -1); // kill existing jobs since we are about to delete the message srcFolder->ignoreJobsForMessage( msg ); @@ -1415,7 +1415,7 @@ void KMailICalIfaceImpl::folderContentsTypeChanged( KMFolder* folder, // Check if already know that 'extra folder' const TQString location = folder->location(); - ExtraFolder* ef = mExtraFolders.tqfind( location ); + ExtraFolder* ef = mExtraFolders.find( location ); if ( ef && ef->folder ) { // Notify that the old folder resource is no longer available subresourceDeleted(folderContentsType( folder->storage()->contentsType() ), location ); @@ -1469,7 +1469,7 @@ KMFolder* KMailICalIfaceImpl::extraFolder( const TQString& type, if ( t < 1 || t > 5 ) return 0; - ExtraFolder* ef = mExtraFolders.tqfind( folder ); + ExtraFolder* ef = mExtraFolders.find( folder ); if ( ef && ef->folder && ef->folder->storage()->contentsType() == t ) return ef->folder; @@ -1478,7 +1478,7 @@ KMFolder* KMailICalIfaceImpl::extraFolder( const TQString& type, KMailICalIfaceImpl::StorageFormat KMailICalIfaceImpl::storageFormat( KMFolder* folder ) const { - FolderInfoMap::ConstIterator it = mFolderInfoMap.tqfind( folder ); + FolderInfoMap::ConstIterator it = mFolderInfoMap.find( folder ); if ( it != mFolderInfoMap.end() ) return (*it).mStorageFormat; return globalStorageFormat(); @@ -1486,7 +1486,7 @@ KMailICalIfaceImpl::StorageFormat KMailICalIfaceImpl::storageFormat( KMFolder* f void KMailICalIfaceImpl::setStorageFormat( KMFolder* folder, StorageFormat format ) { - FolderInfoMap::Iterator it = mFolderInfoMap.tqfind( folder ); + FolderInfoMap::Iterator it = mFolderInfoMap.find( folder ); if ( it != mFolderInfoMap.end() ) { (*it).mStorageFormat = format; } else { @@ -1500,7 +1500,7 @@ void KMailICalIfaceImpl::setStorageFormat( KMFolder* folder, StorageFormat forma void KMailICalIfaceImpl::addFolderChange( KMFolder* folder, FolderChanges changes ) { - FolderInfoMap::Iterator it = mFolderInfoMap.tqfind( folder ); + FolderInfoMap::Iterator it = mFolderInfoMap.find( folder ); if ( it != mFolderInfoMap.end() ) { (*it).mChanges = static_cast<FolderChanges>( (*it).mChanges | changes ); } else { // Otherwise, well, it's a folder we don't care about. @@ -1529,7 +1529,7 @@ KMailICalIfaceImpl::FolderInfo KMailICalIfaceImpl::readFolderInfo( const KMFolde void KMailICalIfaceImpl::folderSynced( KMFolder* folder, const KURL& folderURL ) { - FolderInfoMap::Iterator it = mFolderInfoMap.tqfind( folder ); + FolderInfoMap::Iterator it = mFolderInfoMap.find( folder ); if ( it != mFolderInfoMap.end() && (*it).mChanges ) { handleFolderSynced( folder, folderURL, (*it).mChanges ); (*it).mChanges = NoChange; @@ -1560,7 +1560,7 @@ void KMailICalIfaceImpl::triggerKolabFreeBusy( const KURL& folderURL ) { /* Steffen said: you must issue an authenticated HTTP GET request to https://kolabserver/freebusy/trigger/user@domain/Folder/NestedFolder.pfb - (tqreplace .pfb with .xpfb for extended fb lists). */ + (replace .pfb with .xpfb for extended fb lists). */ KURL httpURL( folderURL ); // Keep username ("user@domain"), pass, and host from the imap url httpURL.setProtocol( "https" ); @@ -1569,7 +1569,7 @@ void KMailICalIfaceImpl::triggerKolabFreeBusy( const KURL& folderURL ) // IMAP path is either /INBOX/<path> or /user/someone/<path> TQString path = folderURL.path( -1 ); Q_ASSERT( path.startsWith( "/" ) ); - int secondSlash = path.tqfind( '/', 1 ); + int secondSlash = path.find( '/', 1 ); if ( secondSlash == -1 ) { kdWarning() << "KCal::ResourceKolab::fromKMailFolderSynced path is too short: " << path << endl; return; @@ -1617,7 +1617,7 @@ void KMailICalIfaceImpl::slotFolderLocationChanged( const TQString &oldLocation, const TQString &newLocation ) { KMFolder *folder = findResourceFolder( oldLocation ); - ExtraFolder* ef = mExtraFolders.tqfind( oldLocation ); + ExtraFolder* ef = mExtraFolders.find( oldLocation ); if ( ef ) { // reuse the ExtraFolder entry, but adjust the key mExtraFolders.setAutoDelete( false ); @@ -1645,7 +1645,7 @@ KMFolder* KMailICalIfaceImpl::findResourceFolder( const TQString& resource ) return mJournals; // No luck. Try the extrafolders - ExtraFolder* ef = mExtraFolders.tqfind( resource ); + ExtraFolder* ef = mExtraFolders.find( resource ); if ( ef ) return ef->folder; @@ -1713,7 +1713,7 @@ void KMailICalIfaceImpl::readConfig() // configure things again. kdDebug(5006) << "Groupware folder " << parentName << " not found. Groupware functionality disabled" << endl; // Or maybe the inbox simply wasn't created on the first startup - KMAccount* account = kmkernel->acctMgr()->tqfind( GlobalSettings::self()->theIMAPResourceAccount() ); + KMAccount* account = kmkernel->acctMgr()->find( GlobalSettings::self()->theIMAPResourceAccount() ); Q_ASSERT( account ); if ( account ) { // just in case we were connected already @@ -1922,8 +1922,8 @@ void KMailICalIfaceImpl::readConfig() KMFolderCachedImap *imapFolder = static_cast<KMFolderCachedImap*>( storage ); const TQString attributes = imapFolder->folderAttributes(); - if ( attributes.tqcontains( "X-FolderClass" ) ) { - if ( !attributes.tqcontains( "X-SpecialFolder" ) || (*it)->location().tqcontains( "@" ) ) { + if ( attributes.contains( "X-FolderClass" ) ) { + if ( !attributes.contains( "X-SpecialFolder" ) || (*it)->location().contains( "@" ) ) { const Scalix::FolderAttributeParser parser( attributes ); if ( !parser.folderClass().isEmpty() ) { FolderContentsType type = Scalix::Utils::scalixIdToContentsType( parser.folderClass() ); @@ -1964,7 +1964,7 @@ void KMailICalIfaceImpl::slotCheckDone() //kdDebug(5006) << k_funcinfo << " folderParent=" << folderParent << endl; if ( folderParent ) // cool it exists now { - KMAccount* account = kmkernel->acctMgr()->tqfind( GlobalSettings::self()->theIMAPResourceAccount() ); + KMAccount* account = kmkernel->acctMgr()->find( GlobalSettings::self()->theIMAPResourceAccount() ); if ( account ) disconnect( account, TQT_SIGNAL( finishedCheck( bool, ChecktqStatus ) ), this, TQT_SLOT( slotCheckDone() ) ); @@ -1993,7 +1993,7 @@ KMFolder* KMailICalIfaceImpl::initFolder( KMail::FolderContentsType contentsType i18n("There are multiple %1 default folders, please choose one:") .tqarg( localizedDefaultFolderName( contentsType ) ), labels ); if ( !selected.isEmpty() ) - result.folder = result.folders[ labels.tqfindIndex( selected ) ]; + result.folder = result.folders[ labels.findIndex( selected ) ]; } KMFolder* folder = result.folder; @@ -2051,7 +2051,7 @@ KMFolder* KMailICalIfaceImpl::initScalixFolder( KMail::FolderContentsType conten KMFolderCachedImap *imapFolder = static_cast<KMFolderCachedImap*>( storage ); const TQString attributes = imapFolder->folderAttributes(); - if ( attributes.tqcontains( "X-SpecialFolder" ) ) { + if ( attributes.contains( "X-SpecialFolder" ) ) { const Scalix::FolderAttributeParser parser( attributes ); if ( contentsType == Scalix::Utils::scalixIdToContentsType( parser.folderClass() ) ) { folder = *it; diff --git a/kmail/kmcommands.cpp b/kmail/kmcommands.cpp index 3f83fad6..bdd700bf 100644 --- a/kmail/kmcommands.cpp +++ b/kmail/kmcommands.cpp @@ -229,7 +229,7 @@ void KMCommand::slotStart() this, TQT_SLOT( slotPostTransfer( KMCommand::Result ) ) ); kmkernel->filterMgr()->ref(); - if (mMsgList.tqfind(0) != -1) { + if (mMsgList.find(0) != -1) { emit messagesTransfered( Failed ); return; } @@ -316,7 +316,7 @@ void KMCommand::transferSelectedMsgs() else { KMFolder *folder = mb->tqparent(); - int idx = folder->tqfind(mb); + int idx = folder->find(mb); if (idx < 0) continue; thisMsg = folder->getMsg(idx); } @@ -441,7 +441,7 @@ void KMCommand::slotTransferCancelled() if (!folder) continue; msg->setTransferInProgress(false); - int idx = folder->tqfind(msg); + int idx = folder->find(msg); if (idx > 0) folder->unGetMsg(idx); } mRetrievedMsgs.clear(); @@ -682,7 +682,7 @@ KMCommand::Result KMEditMsgCommand::execute() // edit is discarded, for n > 1. KMFolder *tqparent = msg->tqparent(); if ( tqparent ) - tqparent->take( tqparent->tqfind( msg ) ); + tqparent->take( tqparent->find( msg ) ); KMail::Composer * win = KMail::makeComposer(); msg->setTransferInProgress(false); // From here on on, the composer owns the message. @@ -774,11 +774,11 @@ static KURL subjectToUrl( const TQString & subject ) // https://issues.kolab.org/issue3805 const TQString filter = i18n( "*.mbox|email messages (*.mbox)\n*|all files (*)" ); TQString cleanSubject = subject.stripWhiteSpace() - .tqreplace( TQDir::separator(), '_' ) - .tqreplace( ": ", "_" ) - .tqreplace( ':', '_' ) - .tqreplace( '.', '_' ) - .tqreplace( '~', '_' ); + .replace( TQDir::separator(), '_' ) + .replace( ": ", "_" ) + .replace( ':', '_' ) + .replace( '.', '_' ) + .replace( '~', '_' ); return KFileDialog::getSaveURL( cleanSubject, filter ); } @@ -945,7 +945,7 @@ void KMSaveMsgCommand::slotMessageRetrievedForSaving(KMMessage *msg) ++mMsgListIndex; // Get rid of the message. if ( msg && msg->tqparent() && msg->getMsgSerNum() && - mUngetMsgs.tqcontains( msg ) ) { + mUngetMsgs.contains( msg ) ) { int idx = -1; KMFolder * p = 0; KMMsgDict::instance()->getLocation( msg, &p, &idx ); @@ -1041,7 +1041,7 @@ void KMOpenMsgCommand::slotResult( KIO::Job *job ) else { int startOfMessage = 0; if ( mMsgString.compare( 0, 5, "From ", 5 ) == 0 ) { - startOfMessage = mMsgString.tqfind( '\n' ); + startOfMessage = mMsgString.find( '\n' ); if ( startOfMessage == -1 ) { KMessageBox::sorry( parentWidget(), i18n( "The file does not contain a message." ) ); @@ -1060,7 +1060,7 @@ void KMOpenMsgCommand::slotResult( KIO::Job *job ) } // check for multiple messages in the file bool multipleMessages = true; - int endOfMessage = mMsgString.tqfind( "\nFrom " ); + int endOfMessage = mMsgString.find( "\nFrom " ); if ( endOfMessage == -1 ) { endOfMessage = mMsgString.length(); multipleMessages = false; @@ -1403,7 +1403,7 @@ KMCommand::Result KMForwardDigestCommand::execute() dwh.MessageId().CreateDefault(); msgPartText += TQString( "Content-ID: %1\n" ).tqarg( dwh.MessageId().AsString().c_str() ); msgPartText += TQString( "Content-Description: %1" ).tqarg( msg->subject() ); - if ( !msg->subject().tqcontains( "(fwd)" ) ) + if ( !msg->subject().contains( "(fwd)" ) ) msgPartText += " (fwd)"; msgPartText += "\n\n"; // remove headers that shouldn't be forwarded @@ -1849,7 +1849,7 @@ void KMMenuCommand::folderToPopupMenu(bool move, { while ( menu->count() ) { - TQPopupMenu *popup = menu->tqfindItem( menu->idAt( 0 ) )->popup(); + TQPopupMenu *popup = menu->findItem( menu->idAt( 0 ) )->popup(); if (popup) delete popup; else @@ -1932,7 +1932,7 @@ void KMMenuCommand::makeFolderMenu(KMFolderNode* node, bool move, continue; KMFolder *child = static_cast<KMFolder*>(it); TQString label = child->label(); - label.tqreplace("&","&&"); + label.replace("&","&&"); if (child->child() && child->child()->first()) { // descend TQPopupMenu *subMenu = new TQPopupMenu(menu, "subMenu"); @@ -1989,7 +1989,7 @@ KMCommand::Result KMCopyCommand::execute() { msg = static_cast<KMMessage*>(msgBase); } else { - idx = srcFolder->tqfind(msgBase); + idx = srcFolder->find(msgBase); assert(idx != -1); msg = srcFolder->getMsg(idx); // corrupt IMAP cache, see FolderStorage::getMsg() @@ -2307,7 +2307,7 @@ void KMMoveCommand::slotImapFolderCompleted(KMFolderImap* imapFolder, bool succe void KMMoveCommand::slotMsgAddedToDestFolder(KMFolder *folder, TQ_UINT32 serNum) { - if ( folder != mDestFolder || mLostBoys.tqfind( serNum ) == mLostBoys.end() ) { + if ( folder != mDestFolder || mLostBoys.find( serNum ) == mLostBoys.end() ) { //kdDebug(5006) << "KMMoveCommand::msgAddedToDestFolder different " // "folder or invalid serial number." << endl; return; @@ -2421,7 +2421,7 @@ KMCommand::Result KMUrlClickedCommand::execute() TQString query=mUrl.query(); while (!query.isEmpty()) { TQString queryPart; - int secondQuery = query.tqfind('?',1); + int secondQuery = query.find('?',1); if (secondQuery != -1) queryPart = query.left(secondQuery); else @@ -2572,9 +2572,9 @@ void KMSaveAttachmentsCommand::slotSaveAll() partNode *node = mAttachmentMap.begin().key(); // replace all ':' with '_' because ':' isn't allowed on FAT volumes TQString s = - node->msgPart().fileName().stripWhiteSpace().tqreplace( ':', '_' ); + node->msgPart().fileName().stripWhiteSpace().replace( ':', '_' ); if ( s.isEmpty() ) - s = node->msgPart().name().stripWhiteSpace().tqreplace( ':', '_' ); + s = node->msgPart().name().stripWhiteSpace().replace( ':', '_' ); if ( s.isEmpty() ) s = i18n("filename for an unnamed attachment", "attachment.1"); url = KFileDialog::getSaveURL( s, TQString(), parentWidget(), @@ -2598,9 +2598,9 @@ void KMSaveAttachmentsCommand::slotSaveAll() if ( !dirUrl.isEmpty() ) { curUrl = dirUrl; TQString s = - it.key()->msgPart().fileName().stripWhiteSpace().tqreplace( ':', '_' ); + it.key()->msgPart().fileName().stripWhiteSpace().replace( ':', '_' ); if ( s.isEmpty() ) - s = it.key()->msgPart().name().stripWhiteSpace().tqreplace( ':', '_' ); + s = it.key()->msgPart().name().stripWhiteSpace().replace( ':', '_' ); if ( s.isEmpty() ) { ++unnamedAtmCount; s = i18n("filename for the %1-th unnamed attachment", @@ -2619,22 +2619,22 @@ void KMSaveAttachmentsCommand::slotSaveAll() TQString origFile = curUrl.fileName(); TQString file = origFile; - while ( renameNumbering.tqcontains(file) ) { + while ( renameNumbering.contains(file) ) { file = origFile; int num = renameNumbering[file] + 1; - int dotIdx = file.tqfindRev('.'); + int dotIdx = file.findRev('.'); file = file.insert( (dotIdx>=0) ? dotIdx : file.length(), TQString("_") + TQString::number(num) ); } curUrl.setFileName(file); // Increment the counter for both the old and the new filename - if ( !renameNumbering.tqcontains(origFile)) + if ( !renameNumbering.contains(origFile)) renameNumbering[origFile] = 1; else renameNumbering[origFile]++; if ( file != origFile ) { - if ( !renameNumbering.tqcontains(file)) + if ( !renameNumbering.contains(file)) renameNumbering[file] = 1; else renameNumbering[file]++; diff --git a/kmail/kmcomposewin.cpp b/kmail/kmcomposewin.cpp index 328bbe02..45daa0c3 100644 --- a/kmail/kmcomposewin.cpp +++ b/kmail/kmcomposewin.cpp @@ -557,7 +557,7 @@ void KMComposeWin::addAttachmentsAndSend(const KURL::List &urls, const TQString connect(this, TQT_SIGNAL(attachmentAdded(const KURL&, bool)), TQT_SLOT(slotAttachedFile(const KURL&))); for( KURL::List::ConstIterator itr = urls.begin(); itr != urls.end(); ++itr ) { if (!addAttach( *itr )) - mAttachFilesPending.remove(mAttachFilesPending.tqfind(*itr)); // only remove one copy of the url + mAttachFilesPending.remove(mAttachFilesPending.find(*itr)); // only remove one copy of the url } if (mAttachFilesPending.isEmpty() && mAttachFilesSend == how) @@ -571,7 +571,7 @@ void KMComposeWin::slotAttachedFile(const KURL &url) { if (mAttachFilesPending.isEmpty()) return; - mAttachFilesPending.remove(mAttachFilesPending.tqfind(url)); // only remove one copy of url + mAttachFilesPending.remove(mAttachFilesPending.find(url)); // only remove one copy of url if (mAttachFilesPending.isEmpty()) { send(mAttachFilesSend); @@ -787,7 +787,7 @@ void KMComposeWin::writeConfig(void) mAutoSpellCheckingAction->isChecked() ); TQStringList transportHistory = GlobalSettings::self()->transportHistory(); transportHistory.remove(mTransport->currentText()); - if (KMTransportInfo::availableTransports().tqfindIndex(mTransport + if (KMTransportInfo::availableTransports().findIndex(mTransport ->currentText()) == -1) { transportHistory.prepend(mTransport->currentText()); } @@ -1219,8 +1219,8 @@ void KMComposeWin::getTransportMenu() int id = 0; for(it = availTransports.begin(); it != availTransports.end() ; ++it, id++) { - mActNowMenu->insertItem((*it).tqreplace("&", "&&"), id); - mActLaterMenu->insertItem((*it).tqreplace("&", "&&"), id); + mActNowMenu->insertItem((*it).replace("&", "&&"), id); + mActLaterMenu->insertItem((*it).replace("&", "&&"), id); } } @@ -1695,8 +1695,8 @@ static TQString cleanedUpHeaderString( const TQString & s ) { // remove invalid characters from the header strings TQString res( s ); - res.tqreplace( '\r', "" ); - res.tqreplace( '\n', " " ); + res.replace( '\r', "" ); + res.replace( '\n', " " ); return res.stripWhiteSpace(); } @@ -2773,7 +2773,7 @@ void KMComposeWin::slotAttachFile() //----------------------------------------------------------------------------- void KMComposeWin::slotAttachFileData(KIO::Job *job, const TQByteArray &data) { - TQMap<KIO::Job*, atmLoadData>::Iterator it = mMapAtmLoadData.tqfind(job); + TQMap<KIO::Job*, atmLoadData>::Iterator it = mMapAtmLoadData.find(job); assert(it != mMapAtmLoadData.end()); TQBuffer buff((*it).data); buff.open(IO_WriteOnly | IO_Append); @@ -2785,10 +2785,10 @@ void KMComposeWin::slotAttachFileData(KIO::Job *job, const TQByteArray &data) //----------------------------------------------------------------------------- void KMComposeWin::slotAttachFileResult(KIO::Job *job) { - TQMap<KIO::Job*, atmLoadData>::Iterator it = mMapAtmLoadData.tqfind(job); + TQMap<KIO::Job*, atmLoadData>::Iterator it = mMapAtmLoadData.find(job); assert(it != mMapAtmLoadData.end()); KURL attachURL; - TQMap<KIO::Job*, KURL>::iterator jit = mAttachJobs.tqfind(job); + TQMap<KIO::Job*, KURL>::iterator jit = mAttachJobs.find(job); bool attachURLfound = (jit != mAttachJobs.end()); if (attachURLfound) { @@ -2847,7 +2847,7 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job) TQString ext; if( !patterns.isEmpty() ) { ext = patterns[0]; - int i = ext.tqfindRev( '.' ); + int i = ext.findRev( '.' ); if( i == -1 ) ext.prepend( '.' ); else if( i > 0 ) @@ -2886,7 +2886,7 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job) !kmkernel->msgSender()->sendQuotedPrintable()); kdDebug(5006) << "autodetected cte: " << msgPart->cteStr() << endl; } - int slash = mimeType.tqfind( '/' ); + int slash = mimeType.find( '/' ); if( slash == -1 ) slash = mimeType.length(); msgPart->setTypeStr( mimeType.left( slash ).latin1() ); @@ -2998,7 +2998,7 @@ void KMComposeWin::slotInsertRecentFile(const KURL& u) KConfigGroupSaver saver( config, "Composer" ); TQStringList urls = config->readListEntry( "recent-urls" ); TQStringList encodings = config->readListEntry( "recent-encodings" ); - int index = urls.tqfindIndex( u.prettyURL() ); + int index = urls.findIndex( u.prettyURL() ); if (index != -1) { TQString encoding = encodings[ index ]; ld.encoding = encoding.latin1(); @@ -3725,7 +3725,7 @@ TQString KMComposeWin::addQuotesToText(const TQString &inputText) { TQString answer = TQString( inputText ); TQString indentStr = quotePrefixName(); - answer.tqreplace( '\n', '\n' + indentStr); + answer.replace( '\n', '\n' + indentStr); answer.prepend( indentStr ); answer += '\n'; return KMMessage::smartQuote( answer, GlobalSettings::self()->lineWrapWidth() ); @@ -3743,7 +3743,7 @@ TQString KMComposeWin::removeQuotesFromText(const TQString &inputText) // now remove all remaining leading quotes quotePrefix = '\n' + quotePrefixName(); rx = quotePrefix; - s.tqreplace(rx, "\n"); + s.replace(rx, "\n"); return s; } @@ -3918,7 +3918,7 @@ void KMComposeWin::slotUpdWinTitle(const TQString& text) // newlines tend to become boxes. if (text.isEmpty()) setCaption("("+i18n("unnamed")+")"); - else setCaption( s.tqreplace( TQChar('\n'), ' ' ) ); + else setCaption( s.replace( TQChar('\n'), ' ' ) ); } @@ -4605,15 +4605,15 @@ void KMComposeWin::slotCleanSpace() // Squeeze tabs and spaces TQRegExp squeeze( "[\t ]+" ); - s.tqreplace( squeeze, TQChar( ' ' ) ); + s.replace( squeeze, TQChar( ' ' ) ); // Remove trailing whitespace TQRegExp trailing( "\\s+$" ); - s.tqreplace( trailing, TQChar( '\n' ) ); + s.replace( trailing, TQChar( '\n' ) ); // Single space lines TQRegExp singleSpace( "[\n]{2,}" ); - s.tqreplace( singleSpace, TQChar( '\n' ) ); + s.replace( singleSpace, TQChar( '\n' ) ); // Restore the signature if ( restore ) @@ -4931,11 +4931,11 @@ void KMComposeWin::slotIdentityChanged( uint uoid ) } mEditor->setText( edtText ); } else { - const int pos = edtText.tqfind( mOldSigText ); + const int pos = edtText.find( mOldSigText ); if ( pos >= 0 && !mOldSigText.isEmpty() ) { const int oldLength = mOldSigText.length(); mOldSigText = "\n\n"+ ident.signature().rawText() + "\n"; // see insertSignature() - edtText = edtText.tqreplace( pos, oldLength, mOldSigText ); + edtText = edtText.replace( pos, oldLength, mOldSigText ); mEditor->setText( edtText ); } else { insertSignature( Append ); diff --git a/kmail/kmdict.cpp b/kmail/kmdict.cpp index 0ba60ed5..0ad9367b 100644 --- a/kmail/kmdict.cpp +++ b/kmail/kmdict.cpp @@ -54,7 +54,7 @@ void KMDict::clear() //----------------------------------------------------------------------------- -void KMDict::tqreplace( long key, KMDictItem *item ) +void KMDict::replace( long key, KMDictItem *item ) { insert( key, item ); removeFollowing( item, key ); // remove other items with same key @@ -104,7 +104,7 @@ void KMDict::removeFollowing(KMDictItem *item, long key) //----------------------------------------------------------------------------- -KMDictItem *KMDict::tqfind(long key) +KMDictItem *KMDict::find(long key) { int idx = (unsigned long)key % mSize; KMDictItem *item = mVecs[idx]; diff --git a/kmail/kmdict.h b/kmail/kmdict.h index 0b365acb..6cbbefd5 100644 --- a/kmail/kmdict.h +++ b/kmail/kmdict.h @@ -40,7 +40,7 @@ public: int size() { return mSize; } /** Inserts an item, replacing old ones with the same key. */ - void tqreplace(long key, KMDictItem *item); + void replace(long key, KMDictItem *item); /** Inserts an item without replacing ones with the same key. */ void insert(long key, KMDictItem *item); @@ -49,7 +49,7 @@ public: void remove(long key); /** Find an item by key. Returns pointer to it, or 0 if not found. */ - KMDictItem *tqfind(long key); + KMDictItem *find(long key); private: /** Removes all items _following_ @p item with key @p key. */ diff --git a/kmail/kmedit.cpp b/kmail/kmedit.cpp index dbbb5380..336901b3 100644 --- a/kmail/kmedit.cpp +++ b/kmail/kmedit.cpp @@ -122,7 +122,7 @@ void KMEdit::keyPressEvent( TQKeyEvent* e ) && newLine[leadingWhiteSpaceCount].isSpace() ) { ++leadingWhiteSpaceCount; } - newLine = newLine.tqreplace( 0, leadingWhiteSpaceCount, + newLine = newLine.replace( 0, leadingWhiteSpaceCount, lineText.left( bot ) ); removeParagraph( line ); insertParagraph( newLine, line ); @@ -383,7 +383,7 @@ KMSyntaxHighter::KMSyntaxHighter( TQTextEdit *textEdit, bool KMSyntaxHighter::isMisspelled( const TQString &word ) { - if ( mIgnoredWords.tqcontains( word ) ) { + if ( mIgnoredWords.contains( word ) ) { return false; } else { @@ -440,15 +440,15 @@ bool KMEdit::eventFilter(TQObject*o, TQEvent* e) (*mExtEditorTempFile->textStream()) << text(); mExtEditorTempFile->close(); - // tqreplace %f in the system line - sysLine.tqreplace( "%f", mExtEditorTempFile->name() ); + // replace %f in the system line + sysLine.replace( "%f", mExtEditorTempFile->name() ); mExtEditorProcess = new KProcess(); mExtEditorProcess->setUseShell( true ); sysLine += " "; while (!sysLine.isEmpty()) { - *mExtEditorProcess << sysLine.left(sysLine.tqfind(" ")).local8Bit(); - sysLine.remove(0, sysLine.tqfind(" ") + 1); + *mExtEditorProcess << sysLine.left(sysLine.find(" ")).local8Bit(); + sysLine.remove(0, sysLine.find(" ") + 1); } connect(mExtEditorProcess, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotExternalEditorDone(KProcess*))); @@ -497,13 +497,13 @@ bool KMEdit::eventFilter(TQObject*o, TQEvent* e) { //Get word right clicked on const TQRegExp wordBoundary( "[\\s\\W]" ); - firstSpace = paraText.tqfindRev( wordBoundary, charPos ) + 1; - lastSpace = paraText.tqfind( wordBoundary, charPos ); + firstSpace = paraText.findRev( wordBoundary, charPos ) + 1; + lastSpace = paraText.find( wordBoundary, charPos ); if( lastSpace == -1 ) lastSpace = paraText.length(); TQString word = paraText.mid( firstSpace, lastSpace - firstSpace ); //Continue if this word was misspelled - if( !word.isEmpty() && mReplacements.tqcontains( word ) ) + if( !word.isEmpty() && mReplacements.contains( word ) ) { KPopupMenu p; diff --git a/kmail/kmfilter.cpp b/kmail/kmfilter.cpp index 2f6bbbd7..4441b861 100644 --- a/kmail/kmfilter.cpp +++ b/kmail/kmfilter.cpp @@ -186,9 +186,9 @@ bool KMFilter::folderRemoved( KMFolder* aFolder, KMFolder* aNewFolder ) void KMFilter::setApplyOnAccount( uint id, bool aApply ) { - if (aApply && !mAccounts.tqcontains( id )) { + if (aApply && !mAccounts.contains( id )) { mAccounts.append( id ); - } else if (!aApply && mAccounts.tqcontains( id )) { + } else if (!aApply && mAccounts.contains( id )) { mAccounts.remove( id ); } } @@ -198,12 +198,12 @@ bool KMFilter::applyOnAccount( uint id ) const if ( applicability() == All ) return true; if ( applicability() == ButImap ) { - KMAccount *account = kmkernel->acctMgr()->tqfind( id ); + KMAccount *account = kmkernel->acctMgr()->find( id ); bool result = account && !dynamic_cast<KMAcctImap*>(account); return result; } if ( applicability() == Checked ) - return mAccounts.tqcontains( id ); + return mAccounts.contains( id ); return false; } @@ -236,9 +236,9 @@ void KMFilter::readConfig(KConfig* config) bApplyOnExplicit = true; mApplicability = ButImap; } else { - bApplyOnInbound = bool(sets.tqcontains("check-mail")); - bApplyOnOutbound = bool(sets.tqcontains("send-mail")); - bApplyOnExplicit = bool(sets.tqcontains("manual-filtering")); + bApplyOnInbound = bool(sets.contains("check-mail")); + bApplyOnOutbound = bool(sets.contains("send-mail")); + bApplyOnExplicit = bool(sets.contains("manual-filtering")); mApplicability = (AccountType)config->readNumEntry( "Applicability", ButImap ); } @@ -363,7 +363,7 @@ void KMFilter::purify() // Remove invalid accounts from mAccounts - just to be tidy TQValueListIterator<int> it2 = mAccounts.begin(); while ( it2 != mAccounts.end() ) { - if ( !kmkernel->acctMgr()->tqfind( *it2 ) ) + if ( !kmkernel->acctMgr()->find( *it2 ) ) it2 = mAccounts.remove( it2 ); else ++it2; @@ -418,8 +418,8 @@ const TQString KMFilter::asString() const if ( mAccounts.isEmpty() ) result += " None"; else for ( it2 = mAccounts.begin() ; it2 != mAccounts.end() ; ++it2 ) - if ( kmkernel->acctMgr()->tqfind( *it2 ) ) - result += " " + kmkernel->acctMgr()->tqfind( *it2 )->name(); + if ( kmkernel->acctMgr()->find( *it2 ) ) + result += " " + kmkernel->acctMgr()->find( *it2 )->name(); result += "\n"; } if ( bStopProcessingHere ) diff --git a/kmail/kmfilteraction.cpp b/kmail/kmfilteraction.cpp index ceef636e..49378e9d 100644 --- a/kmail/kmfilteraction.cpp +++ b/kmail/kmfilteraction.cpp @@ -266,7 +266,7 @@ void KMFilterActionWithStringList::applyParamWidgetValue( TQWidget* paramWidget void KMFilterActionWithStringList::setParamWidgetValue( TQWidget* paramWidget ) const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); ((TQComboBox*)paramWidget)->setCurrentItem( idx >= 0 ? idx : 0 ); } @@ -277,7 +277,7 @@ void KMFilterActionWithStringList::clearParamWidget( TQWidget* paramWidget ) con void KMFilterActionWithStringList::argsFromString( const TQString argsStr ) { - int idx = mParameterList.tqfindIndex( argsStr ); + int idx = mParameterList.findIndex( argsStr ); if ( idx < 0 ) { mParameterList.append( argsStr ); idx = mParameterList.count() - 1; @@ -486,7 +486,7 @@ TQString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMs // TQString( "%0 and %1 and %1" ).tqarg( 0 ).tqarg( 1 ) // returns "0 and 1 and %1", so we must call .arg as // many times as there are %n's, regardless of their multiplicity. - if ((*it) == -1) result.tqreplace( "%-1", tempFileName ); + if ((*it) == -1) result.replace( "%-1", tempFileName ); else result = result.tqarg( tempFileName ); } @@ -496,7 +496,7 @@ TQString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMs int idx = 0; while ( ( idx = header_rx.search( result, idx ) ) != -1 ) { TQString replacement = KProcess::quote( aMsg->headerField( TQString(header_rx.cap(1)).latin1() ) ); - result.tqreplace( idx, header_rx.matchedLength(), replacement ); + result.replace( idx, header_rx.matchedLength(), replacement ); idx += replacement.length(); } @@ -806,7 +806,7 @@ KMFilterActionSetqStatus::KMFilterActionSetqStatus() KMFilterAction::ReturnCode KMFilterActionSetqStatus::process(KMMessage* msg) const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); if ( idx < 1 ) return ErrorButGoOn; KMMsgtqStatus status = stati[idx-1] ; @@ -833,7 +833,7 @@ void KMFilterActionSetqStatus::argsFromString( const TQString argsStr ) const TQString KMFilterActionSetqStatus::argsAsString() const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); if ( idx < 1 ) return TQString(); KMMsgtqStatus status = stati[idx-1]; @@ -901,7 +901,7 @@ KMFilterActionFakeDisposition::KMFilterActionFakeDisposition() KMFilterAction::ReturnCode KMFilterActionFakeDisposition::process(KMMessage* msg) const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); if ( idx < 1 ) return ErrorButGoOn; if ( idx == 1 ) // ignore @@ -929,7 +929,7 @@ void KMFilterActionFakeDisposition::argsFromString( const TQString argsStr ) const TQString KMFilterActionFakeDisposition::argsAsString() const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); if ( idx < 1 ) return TQString(); return TQString( TQChar( idx < 2 ? 'I' : char(mdns[idx-2]) ) ); @@ -996,7 +996,7 @@ void KMFilterActionRemoveHeader::setParamWidgetValue( TQWidget* paramWidget ) co TQComboBox * cb = dynamic_cast<TQComboBox*>(paramWidget); Q_ASSERT( cb ); - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); cb->clear(); cb->insertStringList( mParameterList ); if ( idx < 0 ) { @@ -1074,7 +1074,7 @@ TQWidget* KMFilterActionAddHeader::createParamWidget( TQWidget* tqparent ) const void KMFilterActionAddHeader::setParamWidgetValue( TQWidget* paramWidget ) const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); TQComboBox *cb = (TQComboBox*)paramWidget->child("combo"); Q_ASSERT( cb ); cb->clear(); @@ -1139,7 +1139,7 @@ void KMFilterActionAddHeader::argsFromString( const TQString argsStr ) mValue = l[1]; } - int idx = mParameterList.tqfindIndex( s ); + int idx = mParameterList.findIndex( s ); if ( idx < 0 ) { mParameterList.append( s ); idx = mParameterList.count() - 1; @@ -1196,7 +1196,7 @@ KMFilterAction::ReturnCode KMFilterActionRewriteHeader::process(KMMessage* msg) KRegExp3 rx = mRegExp; // KRegExp3::replace is not const. - TQString newValue = rx.tqreplace( msg->headerField( mParameter.latin1() ), + TQString newValue = rx.replace( msg->headerField( mParameter.latin1() ), mReplacementString ); msg->setHeaderField( mParameter.latin1(), newValue ); @@ -1224,7 +1224,7 @@ TQWidget* KMFilterActionRewriteHeader::createParamWidget( TQWidget* tqparent ) c l->setFixedWidth( l->tqsizeHint().width() ); hbl->addWidget( l, 0 ); - TQLineEdit *le = new KLineEdit( w, "tqreplace" ); + TQLineEdit *le = new KLineEdit( w, "replace" ); hbl->addWidget( le, 1 ); setParamWidgetValue( w ); @@ -1233,7 +1233,7 @@ TQWidget* KMFilterActionRewriteHeader::createParamWidget( TQWidget* tqparent ) c void KMFilterActionRewriteHeader::setParamWidgetValue( TQWidget* paramWidget ) const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); TQComboBox *cb = (TQComboBox*)paramWidget->child("combo"); Q_ASSERT( cb ); @@ -1250,7 +1250,7 @@ void KMFilterActionRewriteHeader::setParamWidgetValue( TQWidget* paramWidget ) c Q_ASSERT( rele ); rele->setText( mRegExp.pattern() ); - TQLineEdit *le = (TQLineEdit*)paramWidget->child("tqreplace"); + TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace"); Q_ASSERT( le ); le->setText( mReplacementString ); } @@ -1265,7 +1265,7 @@ void KMFilterActionRewriteHeader::applyParamWidgetValue( TQWidget* paramWidget ) Q_ASSERT( rele ); mRegExp.setPattern( rele->text() ); - TQLineEdit *le = (TQLineEdit*)paramWidget->child("tqreplace"); + TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace"); Q_ASSERT( le ); mReplacementString = le->text(); } @@ -1280,7 +1280,7 @@ void KMFilterActionRewriteHeader::clearParamWidget( TQWidget* paramWidget ) cons Q_ASSERT( rele ); rele->clear(); - TQLineEdit *le = (TQLineEdit*)paramWidget->child("tqreplace"); + TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace"); Q_ASSERT( le ); le->clear(); } @@ -1312,7 +1312,7 @@ void KMFilterActionRewriteHeader::argsFromString( const TQString argsStr ) mRegExp.setPattern( l[1] ); mReplacementString = l[2]; - int idx = mParameterList.tqfindIndex( s ); + int idx = mParameterList.findIndex( s ); if ( idx < 0 ) { mParameterList.append( s ); idx = mParameterList.count() - 1; @@ -1596,7 +1596,7 @@ static const TQString forwardFilterArgsSeperator = "@$$@"; void KMFilterActionForward::argsFromString( const TQString argsStr ) { - int seperatorPos = argsStr.tqfind( forwardFilterArgsSeperator ); + int seperatorPos = argsStr.find( forwardFilterArgsSeperator ); if ( seperatorPos == - 1 ) { // Old config, assume that the whole string is the addressee @@ -1745,7 +1745,7 @@ class PipeJob : public KPIM::ThreadWeaver::Job mMsg->setHeaderField( "X-KMail-Filtered", origSerNum ); if ( filterFolder && handler ) { bool oldtqStatus = handler->ignoreChanges( true ); - filterFolder->take( filterFolder->tqfind( mMsg ) ); + filterFolder->take( filterFolder->find( mMsg ) ); filterFolder->addMsg( mMsg ); handler->ignoreChanges( oldtqStatus ); } else { diff --git a/kmail/kmfiltermgr.cpp b/kmail/kmfiltermgr.cpp index b16769c5..565bbcc0 100644 --- a/kmail/kmfiltermgr.cpp +++ b/kmail/kmfiltermgr.cpp @@ -128,10 +128,10 @@ void KMFilterMgr::endFiltering(KMMsgBase *msgBase) const KMFolder *tqparent = msgBase->tqparent(); if ( tqparent ) { if ( tqparent == MessageProperty::filterFolder( msgBase ) ) { - tqparent->take( tqparent->tqfind( msgBase ) ); + tqparent->take( tqparent->find( msgBase ) ); } else if ( ! MessageProperty::filterFolder( msgBase ) ) { - int index = tqparent->tqfind( msgBase ); + int index = tqparent->find( msgBase ); KMMessage *msg = tqparent->getMsg( index ); tqparent->take( index ); tqparent->addMsgKeepUID( msg ); diff --git a/kmail/kmfolder.cpp b/kmail/kmfolder.cpp index e8fa8a3d..08fe43e0 100644 --- a/kmail/kmfolder.cpp +++ b/kmail/kmfolder.cpp @@ -432,14 +432,14 @@ int KMFolder::moveMsg(TQPtrList<KMMessage> q, int* index_return ) return mStorage->moveMsg( q, index_return ); } -int KMFolder::tqfind( const KMMsgBase* msg ) const +int KMFolder::find( const KMMsgBase* msg ) const { - return mStorage ? mStorage->tqfind( msg ) : -1; + return mStorage ? mStorage->find( msg ) : -1; } -int KMFolder::tqfind( const KMMessage* msg ) const +int KMFolder::find( const KMMessage* msg ) const { - return mStorage ? mStorage->tqfind( msg ) : -1; + return mStorage ? mStorage->find( msg ) : -1; } int KMFolder::count( bool cache ) const @@ -717,8 +717,8 @@ TQString KMFolder::idString() const TQString escapedName = name(); /* Escape [ and ] as they are disallowed for kconfig sections and that is what the idString is primarily used for. */ - escapedName.tqreplace( "[", "%(" ); - escapedName.tqreplace( "]", "%)" ); + escapedName.replace( "[", "%(" ); + escapedName.replace( "]", "%)" ); return relativePath + escapedName; } @@ -901,7 +901,7 @@ bool KMFolder::isValidName( const TQString &folderName, TQString &message ) KMFolderType fldType = folderType(); // names of local folders must not contain a '/' - if ( folderName.tqfind( '/' ) != -1 && + if ( folderName.find( '/' ) != -1 && fldType != KMFolderTypeImap && fldType != KMFolderTypeCachedImap ) { message = i18n( "Folder names cannot contain the / (slash) character; please choose another folder name." ); @@ -928,7 +928,7 @@ bool KMFolder::isValidName( const TQString &folderName, TQString &message ) delimiter = ai->delimiterForFolder( mStorage ); } } - if ( !delimiter.isEmpty() && folderName.tqfind( delimiter ) != -1 ) { + if ( !delimiter.isEmpty() && folderName.find( delimiter ) != -1 ) { message = i18n( "Your IMAP server does not allow the character '%1'; please choose another folder name." ).tqarg( delimiter ); return false; } diff --git a/kmail/kmfolder.h b/kmail/kmfolder.h index 83a4a7a2..67e77665 100644 --- a/kmail/kmfolder.h +++ b/kmail/kmfolder.h @@ -260,8 +260,8 @@ public: int moveMsg(TQPtrList<KMMessage>, int* index_return = 0); /** Returns the index of the given message or -1 if not found. */ - int tqfind(const KMMsgBase* msg) const; - int tqfind( const KMMessage * msg ) const; + int find(const KMMsgBase* msg) const; + int find( const KMMessage * msg ) const; /** Number of messages in this folder. */ int count(bool cache = false) const; diff --git a/kmail/kmfoldercachedimap.cpp b/kmail/kmfoldercachedimap.cpp index de9f4e00..d23a6ea5 100644 --- a/kmail/kmfoldercachedimap.cpp +++ b/kmail/kmfoldercachedimap.cpp @@ -549,7 +549,7 @@ int KMFolderCachedImap::addMsgInternal( KMMessage* msg, bool newMail, if ( imapPath() == "/INBOX/" ) filter = true; } else { - if ( GlobalSettings::filterSourceFolders().tqcontains( folder()->id() ) ) + if ( GlobalSettings::filterSourceFolders().contains( folder()->id() ) ) filter = true; } if ( filter ) @@ -674,7 +674,7 @@ KMMsgBase* KMFolderCachedImap::findByUID( ulong uid ) mapReloaded = true; } - TQMap<ulong,int>::Iterator it = uidMap.tqfind( uid ); + TQMap<ulong,int>::Iterator it = uidMap.find( uid ); if( it != uidMap.end() ) { KMMsgBase *msg = getMsgBase( *it ); #if MAIL_LOSS_DEBUGGING @@ -701,7 +701,7 @@ KMMsgBase* KMFolderCachedImap::findByUID( ulong uid ) return 0; // There could be a problem in the maps. Rebuild them and try again reloadUidMap(); - it = uidMap.tqfind( uid ); + it = uidMap.find( uid ); if( it != uidMap.end() ) // Since the uid map is just rebuilt, no need for the sanity check return getMsgBase( *it ); @@ -1394,11 +1394,11 @@ void KMFolderCachedImap::buildSubFolderList() while( node ) { if( !node->isDir() ) { KMFolderCachedImap* storage = static_cast<KMFolderCachedImap*>(static_cast<KMFolder*>(node)->storage()); - const bool folderIsNew = mNewlyCreatedSubfolders.tqcontains( TQGuardedPtr<KMFolderCachedImap>( storage ) ); + const bool folderIsNew = mNewlyCreatedSubfolders.contains( TQGuardedPtr<KMFolderCachedImap>( storage ) ); // Only sync folders that have been accepted by the server if ( !storage->imapPath().isEmpty() // and that were not just deleted from it - && !foldersForDeletionOnServer.tqcontains( storage->imapPath() ) ) { + && !foldersForDeletionOnServer.contains( storage->imapPath() ) ) { if ( mRecurse || folderIsNew ) { mSubfoldersForSync << storage; } @@ -1691,7 +1691,7 @@ bool KMFolderCachedImap::deleteMessages() TQMap<ulong,int>::const_iterator it = uidMap.constBegin(); for( ; it != uidMap.end(); it++ ) { ulong uid ( it.key() ); - if( uid!=0 && !uidsOnServer.tqfind( uid ) ) { + if( uid!=0 && !uidsOnServer.find( uid ) ) { uids << TQString::number( uid ); msgsForDeletion.append( getMsgBase( *it ) ); } @@ -1832,28 +1832,28 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & return; } (*it).cdata += TQCString(data, data.size() + 1); - int pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST"); + int pos = (*it).cdata.find("\r\n--IMAPDIGEST"); if (pos > 0) { - int a = (*it).cdata.tqfind("\r\nX-uidValidity:"); + int a = (*it).cdata.find("\r\nX-uidValidity:"); if (a != -1) { - int b = (*it).cdata.tqfind("\r\n", a + 17); + int b = (*it).cdata.find("\r\n", a + 17); setUidValidity((*it).cdata.mid(a + 17, b - a - 17)); } - a = (*it).cdata.tqfind("\r\nX-Access:"); + a = (*it).cdata.find("\r\nX-Access:"); // Only trust X-Access (i.e. the imap select info) if we don't know mUserRights. // The latter is more accurate (checked on every sync) whereas X-Access is only // updated when selecting the folder again, which might not happen if using // RMB / Check Mail in this folder. We don't need two (potentially conflicting) // sources for the readonly setting, in any case. if (a != -1 && mUserRightsState != KMail::ACLJobs::Ok ) { - int b = (*it).cdata.tqfind("\r\n", a + 12); + int b = (*it).cdata.find("\r\n", a + 12); const TQString access = (*it).cdata.mid(a + 12, b - a - 12); setReadOnly( access == "Read only" ); } (*it).cdata.remove(0, pos); mFoundAnIMAPDigest = true; } - pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST", 1); + pos = (*it).cdata.find("\r\n--IMAPDIGEST", 1); // Start with something largish when rebuilding the cache if ( uidsOnServer.size() == 0 ) uidsOnServer.resize( KMail::nextPrime( 2000 ) ); @@ -1869,16 +1869,16 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & // The below is optimized for speed, not prettiness. The commented out chunk // above was the solution copied from kmfolderimap, and it's 15-20% slower. const TQCString& entry( (*it).cdata ); - const int indexOfUID = entry.tqfind("X-UID", 16); + const int indexOfUID = entry.find("X-UID", 16); const int startOfUIDValue = indexOfUID + 7; - const int indexOfLength = entry.tqfind("X-Length", startOfUIDValue ); // we know length comes after UID + const int indexOfLength = entry.find("X-Length", startOfUIDValue ); // we know length comes after UID const int startOfLengthValue = indexOfLength + 10; - const int indexOfFlags = entry.tqfind("X-Flags", startOfLengthValue ); // we know flags comes last + const int indexOfFlags = entry.find("X-Flags", startOfLengthValue ); // we know flags comes last const int startOfFlagsValue = indexOfFlags + 9; - const int flags = entry.mid( startOfFlagsValue, entry.tqfind( '\r', startOfFlagsValue ) - startOfFlagsValue ).toInt(); - const ulong size = entry.mid( startOfLengthValue, entry.tqfind( '\r', startOfLengthValue ) - startOfLengthValue ).toULong(); - const ulong uid = entry.mid( startOfUIDValue, entry.tqfind( '\r', startOfUIDValue ) - startOfUIDValue ).toULong(); + const int flags = entry.mid( startOfFlagsValue, entry.find( '\r', startOfFlagsValue ) - startOfFlagsValue ).toInt(); + const ulong size = entry.mid( startOfLengthValue, entry.find( '\r', startOfLengthValue ) - startOfLengthValue ).toULong(); + const ulong uid = entry.mid( startOfUIDValue, entry.find( '\r', startOfUIDValue ) - startOfUIDValue ).toULong(); const bool deleted = ( flags & 8 ); if ( !deleted ) { @@ -1907,7 +1907,7 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & kdDebug(5006) << "Looking at uid " << uid << " high water is: " << lastUid() << " we should delete it" << endl; #endif // double check we deleted it since the last sync - if ( mDeletedUIDsSinceLastSync.tqcontains(uid) ) { + if ( mDeletedUIDsSinceLastSync.contains(uid) ) { if ( mUserRightsState != KMail::ACLJobs::Ok || ( mUserRights & KMail::ACLJobs::Delete ) ) { #if MAIL_LOSS_DEBUGGING kdDebug(5006) << "message with uid " << uid << " is gone from local cache. Must be deleted on server!!!" << endl; @@ -1942,7 +1942,7 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & #endif // The message is new since the last sync, but we might have just uploaded it, in which case // the uid map already contains it. - if ( !uidMap.tqcontains( uid ) ) { + if ( !uidMap.contains( uid ) ) { mMsgsForDownload << KMail::CachedImapJob::MsgForDownload(uid, flags, size); if( imapPath() == "/INBOX/" ) mUidsForDownload << uid; @@ -1958,7 +1958,7 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & } (*it).cdata.remove(0, pos); (*it).done++; - pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST", 1); + pos = (*it).cdata.find("\r\n--IMAPDIGEST", 1); } } @@ -2184,7 +2184,7 @@ void KMFolderCachedImap::slotListResult( const TQStringList& folderNames, if (!node->isDir() ) { KMFolderCachedImap *f = static_cast<KMFolderCachedImap*>(static_cast<KMFolder*>(node)->storage()); - if ( mSubfolderNames.tqfindIndex(node->name()) == -1 ) { + if ( mSubfolderNames.findIndex(node->name()) == -1 ) { TQString name = node->name(); // as more than one namespace can be listed in the root folder we need to make sure // that the folder is within the current namespace @@ -2207,7 +2207,7 @@ void KMFolderCachedImap::slotListResult( const TQStringList& folderNames, /** * Store the folder attributes for every subfolder. */ - int index = mSubfolderNames.tqfindIndex( node->name() ); + int index = mSubfolderNames.findIndex( node->name() ); f->mFolderAttributes = folderAttributes[ index ]; } } else { @@ -2669,7 +2669,7 @@ void KMFolderCachedImap::updateAnnotationFolderType() { TQString oldType = mAnnotationFolderType; TQString oldSubType; - int dot = oldType.tqfind( '.' ); + int dot = oldType.find( '.' ); if ( dot != -1 ) { oldType.truncate( dot ); oldSubType = mAnnotationFolderType.mid( dot + 1 ); @@ -2728,7 +2728,7 @@ void KMFolderCachedImap::slotAnnotationResult(const TQString& entry, const TQStr if ( found ) { TQString type = value; TQString subtype; - int dot = value.tqfind( '.' ); + int dot = value.find( '.' ); if ( dot != -1 ) { type.truncate( dot ); subtype = value.mid( dot + 1 ); @@ -2852,11 +2852,11 @@ void KMFolderCachedImap::slotMultiUrlGetAnnotationResult( KIO::Job* job ) kdDebug(5006) << k_funcinfo << "Folder: " << folderPath << " has type: " << annotation << endl; // we're only interested in the main type TQString type(annotation); - int dot = annotation.tqfind( '.' ); + int dot = annotation.find( '.' ); if ( dot != -1 ) type.truncate( dot ); type = type.simplifyWhiteSpace(); - const int idx = mSubfolderPaths.tqfindIndex( folderPath ); + const int idx = mSubfolderPaths.findIndex( folderPath ); const bool isNoContent = mSubfolderMimeTypes[idx] == "inode/directory"; if ( ( isNoContent && type.isEmpty() ) || ( !type.isEmpty() && type != KMailICalIfaceImpl::annotationForContentsType( ContentsTypeMail ) ) ) { diff --git a/kmail/kmfoldercombobox.cpp b/kmail/kmfoldercombobox.cpp index e85144f0..1135b25b 100644 --- a/kmail/kmfoldercombobox.cpp +++ b/kmail/kmfoldercombobox.cpp @@ -114,9 +114,9 @@ void KMFolderComboBox::setFolder( KMFolder *aFolder ) TQValueList<TQGuardedPtr<KMFolder> > folders; createFolderList( &names, &folders ); - int idx = folders.tqfindIndex( aFolder ); + int idx = folders.findIndex( aFolder ); if (idx == -1) - idx = folders.tqfindIndex( kmkernel->draftsFolder() ); + idx = folders.findIndex( kmkernel->draftsFolder() ); setCurrentItem( idx >= 0 ? idx : 0 ); mFolder = aFolder; diff --git a/kmail/kmfolderdir.cpp b/kmail/kmfolderdir.cpp index 32eb5834..1fd5dcd5 100644 --- a/kmail/kmfolderdir.cpp +++ b/kmail/kmfolderdir.cpp @@ -320,8 +320,8 @@ bool KMFolderDir::reload(void) // .foo.directory => foo TQString folderName = *it; - int right = folderName.tqfind( ".directory" ); - int left = folderName.tqfind( "." ); + int right = folderName.find( ".directory" ); + int left = folderName.find( "." ); Q_ASSERT( left != -1 && right != -1 ); folderName = folderName.mid( left + 1, right - 1 ); diff --git a/kmail/kmfolderimap.cpp b/kmail/kmfolderimap.cpp index 303b7b01..21fb82d1 100644 --- a/kmail/kmfolderimap.cpp +++ b/kmail/kmfolderimap.cpp @@ -302,7 +302,7 @@ void KMFolderImap::removeMsg( const TQPtrList<KMMessage>& msgList, bool quiet ) KMMessage *msg; while ( (msg = it.current()) != 0 ) { ++it; - int idx = tqfind(msg); + int idx = find(msg); assert( idx != -1); // ATTENTION port me to maildir KMFolderMbox::removeMsg(idx, quiet); @@ -327,7 +327,7 @@ void KMFolderImap::addMsgQuiet(KMMessage* aMsg) if (aFolder) { serNum = aMsg->getMsgSerNum(); kmkernel->undoStack()->pushSingleAction( serNum, aFolder, folder() ); - int idx = aFolder->tqfind( aMsg ); + int idx = aFolder->find( aMsg ); assert( idx != -1 ); aFolder->take( idx ); } @@ -412,7 +412,7 @@ int KMFolderImap::addMsg(TQPtrList<KMMessage>& msgList, TQValueList<int>& aIndex { if (!msg->isComplete()) { - int idx = msgParent->tqfind(msg); + int idx = msgParent->find(msg); assert(idx != -1); msg = msgParent->getMsg(idx); } @@ -544,8 +544,8 @@ void KMFolderImap::copyMsg(TQPtrList<KMMessage>& msgList) TQPtrList<KMMessage> KMFolderImap::splitMessageList(const TQString& set, TQPtrList<KMMessage>& msgList) { - int lastcomma = set.tqfindRev(","); - int lastdub = set.tqfindRev(":"); + int lastcomma = set.findRev(","); + int lastdub = set.findRev(":"); int last = 0; if (lastdub > lastcomma) last = lastdub; else last = lastcomma; @@ -946,7 +946,7 @@ void KMFolderImap::checkFolders( const TQStringList& subfolderNames, KMFolderNode *node = folder()->child()->first(); while ( node ) { - if ( !node->isDir() && subfolderNames.tqfindIndex(node->name()) == -1 ) + if ( !node->isDir() && subfolderNames.findIndex(node->name()) == -1 ) { KMFolder* fld = static_cast<KMFolder*>(node); KMFolderImap* imapFld = static_cast<KMFolderImap*>( fld->storage() ); @@ -1004,11 +1004,11 @@ bool KMFolderImap::mailCheckInProgress() const void KMFolderImap::setChildrenState( TQString attributes ) { // update tqchildren state - if ( attributes.tqfind( "hastqchildren", 0, false ) != -1 ) + if ( attributes.find( "hastqchildren", 0, false ) != -1 ) { setHasChildren( FolderStorage::HasChildren ); - } else if ( attributes.tqfind( "hasnotqchildren", 0, false ) != -1 || - attributes.tqfind( "noinferiors", 0, false ) != -1 ) + } else if ( attributes.find( "hasnotqchildren", 0, false ) != -1 || + attributes.find( "noinferiors", 0, false ) != -1 ) { setHasChildren( FolderStorage::HasNoChildren ); } else @@ -1123,26 +1123,26 @@ void KMFolderImap::slotCheckValidityResult(KIO::Job * job) close("checkvalidity"); } else { TQCString cstr((*it).data.data(), (*it).data.size() + 1); - int a = cstr.tqfind("X-uidValidity: "); - int b = cstr.tqfind("\r\n", a); + int a = cstr.find("X-uidValidity: "); + int b = cstr.find("\r\n", a); TQString uidv; if ( (b - a - 15) >= 0 ) uidv = cstr.mid(a + 15, b - a - 15); - a = cstr.tqfind("X-Access: "); - b = cstr.tqfind("\r\n", a); + a = cstr.find("X-Access: "); + b = cstr.find("\r\n", a); TQString access; if ( (b - a - 10) >= 0 ) access = cstr.mid(a + 10, b - a - 10); mReadOnly = access == "Read only"; - a = cstr.tqfind("X-Count: "); - b = cstr.tqfind("\r\n", a); + a = cstr.find("X-Count: "); + b = cstr.find("\r\n", a); int exists = -1; bool ok = false; if ( (b - a - 9) >= 0 ) exists = cstr.mid(a + 9, b - a - 9).toInt(&ok); if ( !ok ) exists = -1; - a = cstr.tqfind( "X-PermanentFlags: " ); - b = cstr.tqfind( "\r\n", a ); + a = cstr.find( "X-PermanentFlags: " ); + b = cstr.find( "\r\n", a ); if ( a >= 0 && (b - a - 18) >= 0 ) mPermanentFlags = cstr.mid( a + 18, b - a - 18 ).toInt(&ok); if ( !ok ) mPermanentFlags = 0; @@ -1296,7 +1296,7 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job) mailUid = msgBase->UID(); // parse the uid from the server and the flags out of the list from // the server. Format: 1234, 1 - c = (*uid).tqfind(","); + c = (*uid).find(","); serverUid = (*uid).left( c ).toLong(); serverFlags = (*uid).mid( c+1 ).toInt(); if ( mailUid < serverUid ) { @@ -1326,7 +1326,7 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job) } // strip the flags from the list of uids, so it can be reused for (uid = (*it).items.begin(); uid != (*it).items.end(); ++uid) - (*uid).truncate((*uid).tqfind(",")); + (*uid).truncate((*uid).find(",")); ImapAccountBase::jobData jd( TQString(), (*it).tqparent ); jd.total = (*it).items.count(); if (jd.total == 0) @@ -1525,23 +1525,23 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data) ImapAccountBase::JobIterator it = account()->findJob(job); if ( it == account()->jobsEnd() ) return; (*it).cdata += TQCString(data, data.size() + 1); - int pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST"); + int pos = (*it).cdata.find("\r\n--IMAPDIGEST"); if ( pos == -1 ) { - // if we do not find the pattern in the complete string we will not tqfind + // if we do not find the pattern in the complete string we will not find // it in a substring. return; } if (pos > 0) { - int p = (*it).cdata.tqfind("\r\nX-uidValidity:"); + int p = (*it).cdata.find("\r\nX-uidValidity:"); if (p != -1) setUidValidity((*it).cdata - .mid(p + 17, (*it).cdata.tqfind("\r\n", p+1) - p - 17)); - int c = (*it).cdata.tqfind("\r\nX-Count:"); + .mid(p + 17, (*it).cdata.find("\r\n", p+1) - p - 17)); + int c = (*it).cdata.find("\r\nX-Count:"); if ( c != -1 ) { bool ok; int exists = (*it).cdata.mid( c+10, - (*it).cdata.tqfind("\r\n", c+1) - c-10 ).toInt(&ok); + (*it).cdata.find("\r\n", c+1) - c-10 ).toInt(&ok); if ( ok && exists < count() ) { kdDebug(5006) << "KMFolderImap::slotGetMessagesData - server has less messages (" << exists << ") then folder (" << count() << "), so reload" << endl; @@ -1558,7 +1558,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data) } (*it).cdata.remove(0, pos); } - pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST", 1); + pos = (*it).cdata.find("\r\n--IMAPDIGEST", 1); int flags; while (pos >= 0) { @@ -1571,7 +1571,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data) flags = msg->headerField("X-Flags").toInt(); ulong uid = msg->UID(); KMMsgMetaData *md = 0; - if ( mUidMetaDataMap.tqfind( uid ) ) { + if ( mUidMetaDataMap.find( uid ) ) { md = mUidMetaDataMap[uid]; } ulong serNum = 0; @@ -1601,7 +1601,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data) // see if we have cached the msgIdMD5 and get the status + // serial number from there TQString id = msg->msgIdMD5(); - if ( mMetaDataMap.tqfind( id ) ) { + if ( mMetaDataMap.find( id ) ) { md = mMetaDataMap[id]; msg->setqStatus( md->status() ); if ( md->serNum() != 0 && serNum == 0 ) { @@ -1637,7 +1637,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data) } (*it).cdata.remove(0, pos); (*it).done++; - pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST", 1); + pos = (*it).cdata.find("\r\n--IMAPDIGEST", 1); } // while } @@ -2395,7 +2395,7 @@ bool KMFolderImap::isMoveable() const //----------------------------------------------------------------------------- ulong KMFolderImap::serNumForUID( ulong uid ) { - if ( mUidMetaDataMap.tqfind( uid ) ) { + if ( mUidMetaDataMap.find( uid ) ) { KMMsgMetaData *md = mUidMetaDataMap[uid]; return md->serNum(); } else { @@ -2411,7 +2411,7 @@ void KMFolderImap::saveMsgMetaData( KMMessage* msg, ulong uid ) uid = msg->UID(); } ulong serNum = msg->getMsgSerNum(); - mUidMetaDataMap.tqreplace( uid, new KMMsgMetaData(msg->status(), serNum) ); + mUidMetaDataMap.replace( uid, new KMMsgMetaData(msg->status(), serNum) ); } //----------------------------------------------------------------------------- diff --git a/kmail/kmfolderindex.h b/kmail/kmfolderindex.h index e8ef5e7b..28743c49 100644 --- a/kmail/kmfolderindex.h +++ b/kmail/kmfolderindex.h @@ -68,8 +68,8 @@ public: virtual const KMMsgBase* getMsgBase(int idx) const { return mMsgList[idx]; } virtual KMMsgBase* getMsgBase(int idx) { return mMsgList[idx]; } - virtual int tqfind(const KMMsgBase* msg) const { return mMsgList.tqfind((KMMsgBase*)msg); } - int tqfind( const KMMessage * msg ) const { return FolderStorage::tqfind( msg ); } + virtual int find(const KMMsgBase* msg) const { return mMsgList.find((KMMsgBase*)msg); } + int find( const KMMessage * msg ) const { return FolderStorage::find( msg ); } /** Registered unique serial number for the index file */ int serialIndexId() const { return mIndexId; } diff --git a/kmail/kmfoldermaildir.cpp b/kmail/kmfoldermaildir.cpp index fe19131f..8c54e3c2 100644 --- a/kmail/kmfoldermaildir.cpp +++ b/kmail/kmfoldermaildir.cpp @@ -291,7 +291,7 @@ int KMFolderMaildir::compact( unsigned int startIndex, int nbMessages, const TQS continue; // first, make sure this isn't in the 'new' subdir - if ( entryList.tqcontains( filename ) ) + if ( entryList.contains( filename ) ) moveInternal(subdirNew + filename, subdirCur + filename, mi); // construct a valid filename. if it's already valid, then @@ -381,7 +381,7 @@ if( fileD0.open( IO_WriteOnly ) ) { if (msgParent==folder() && !kmkernel->folderIsDraftOrOutbox(folder())) return 0; - idx = msgParent->tqfind(aMsg); + idx = msgParent->find(aMsg); msgParent->getMsg( idx ); } @@ -596,7 +596,7 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& // actually be some other state (but not New) if (status == KMMsgStatusRead) { - if (file.tqfind(":2,") == -1) + if (file.find(":2,") == -1) status = KMMsgStatusUnread; else if (file.right(5) == ":2,RS") status |= KMMsgStatusReplied; @@ -636,7 +636,7 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& msgIdStr = msgIdStr.stripWhiteSpace(); if( !msgIdStr.isEmpty() ) { int rightAngle; - rightAngle = msgIdStr.tqfind( '>' ); + rightAngle = msgIdStr.find( '>' ); if( rightAngle != -1 ) msgIdStr.truncate( rightAngle + 1 ); } @@ -644,7 +644,7 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& replyToIdStr = replyToIdStr.stripWhiteSpace(); if( !replyToIdStr.isEmpty() ) { int rightAngle; - rightAngle = replyToIdStr.tqfind( '>' ); + rightAngle = replyToIdStr.find( '>' ); if( rightAngle != -1 ) replyToIdStr.truncate( rightAngle + 1 ); } @@ -652,7 +652,7 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& referencesStr = referencesStr.stripWhiteSpace(); if( !referencesStr.isEmpty() ) { int leftAngle, rightAngle; - leftAngle = referencesStr.tqfindRev( '<' ); + leftAngle = referencesStr.findRev( '<' ); if( ( leftAngle != -1 ) && ( replyToIdStr.isEmpty() || ( replyToIdStr[0] != '<' ) ) ) { // use the last reference, instead of missing In-Reply-To @@ -660,10 +660,10 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& } // find second last reference - leftAngle = referencesStr.tqfindRev( '<', leftAngle - 1 ); + leftAngle = referencesStr.findRev( '<', leftAngle - 1 ); if( leftAngle != -1 ) referencesStr = referencesStr.mid( leftAngle ); - rightAngle = referencesStr.tqfindRev( '>' ); + rightAngle = referencesStr.findRev( '>' ); if( rightAngle != -1 ) referencesStr.truncate( rightAngle + 1 ); @@ -672,7 +672,7 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& // message In-Reply-To points to is not kept in this folder, // but e.g. in an Outbox replyToAuxIdStr = referencesStr; - rightAngle = referencesStr.tqfind( '>' ); + rightAngle = referencesStr.find( '>' ); if( rightAngle != -1 ) replyToAuxIdStr.truncate( rightAngle + 1 ); } @@ -697,7 +697,7 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& charset = ""; if ( !contentTypeStr.isEmpty() ) { - int cidx = contentTypeStr.tqfind( "charset=" ); + int cidx = contentTypeStr.find( "charset=" ); if ( cidx != -1 ) { charset = contentTypeStr.mid( cidx + 8 ); if ( !charset.isEmpty() && ( charset[0] == '"' ) ) { @@ -1046,7 +1046,7 @@ TQString KMFolderMaildir::constructValidFileName( const TQString & filename, if (!suffix_regex) suffix_regex_sd.setObject(suffix_regex, new TQRegExp(":2,?R?S?$")); - aFileName.truncate(aFileName.tqfindRev(*suffix_regex)); + aFileName.truncate(aFileName.findRev(*suffix_regex)); // only add status suffix if the message is neither new nor unread if (! ((status & KMMsgStatusNew) || (status & KMMsgStatusUnread)) ) diff --git a/kmail/kmfoldermbox.cpp b/kmail/kmfoldermbox.cpp index 75a58455..d77a8ae4 100644 --- a/kmail/kmfoldermbox.cpp +++ b/kmail/kmfoldermbox.cpp @@ -609,7 +609,7 @@ int KMFolderMbox::createIndexFromContents() msgIdStr = msgIdStr.stripWhiteSpace(); if( !msgIdStr.isEmpty() ) { int rightAngle; - rightAngle = msgIdStr.tqfind( '>' ); + rightAngle = msgIdStr.find( '>' ); if( rightAngle != -1 ) msgIdStr.truncate( rightAngle + 1 ); } @@ -617,7 +617,7 @@ int KMFolderMbox::createIndexFromContents() replyToIdStr = replyToIdStr.stripWhiteSpace(); if( !replyToIdStr.isEmpty() ) { int rightAngle; - rightAngle = replyToIdStr.tqfind( '>' ); + rightAngle = replyToIdStr.find( '>' ); if( rightAngle != -1 ) replyToIdStr.truncate( rightAngle + 1 ); } @@ -625,7 +625,7 @@ int KMFolderMbox::createIndexFromContents() referencesStr = referencesStr.stripWhiteSpace(); if( !referencesStr.isEmpty() ) { int leftAngle, rightAngle; - leftAngle = referencesStr.tqfindRev( '<' ); + leftAngle = referencesStr.findRev( '<' ); if( ( leftAngle != -1 ) && ( replyToIdStr.isEmpty() || ( replyToIdStr[0] != '<' ) ) ) { // use the last reference, instead of missing In-Reply-To @@ -633,10 +633,10 @@ int KMFolderMbox::createIndexFromContents() } // find second last reference - leftAngle = referencesStr.tqfindRev( '<', leftAngle - 1 ); + leftAngle = referencesStr.findRev( '<', leftAngle - 1 ); if( leftAngle != -1 ) referencesStr = referencesStr.mid( leftAngle ); - rightAngle = referencesStr.tqfindRev( '>' ); + rightAngle = referencesStr.findRev( '>' ); if( rightAngle != -1 ) referencesStr.truncate( rightAngle + 1 ); @@ -645,7 +645,7 @@ int KMFolderMbox::createIndexFromContents() // message In-Reply-To points to is not kept in this folder, // but e.g. in an Outbox replyToAuxIdStr = referencesStr; - rightAngle = referencesStr.tqfind( '>' ); + rightAngle = referencesStr.find( '>' ); if( rightAngle != -1 ) replyToAuxIdStr.truncate( rightAngle + 1 ); } @@ -654,7 +654,7 @@ int KMFolderMbox::createIndexFromContents() charset = ""; if ( !contentTypeStr.isEmpty() ) { - int cidx = contentTypeStr.tqfind( "charset=" ); + int cidx = contentTypeStr.find( "charset=" ); if ( cidx != -1 ) { charset = contentTypeStr.mid( cidx + 8 ); if ( !charset.isEmpty() && ( charset[0] == '"' ) ) { @@ -965,7 +965,7 @@ int KMFolderMbox::addMsg( KMMessage* aMsg, int* aIndex_ret ) return 0; } - idx = msgParent->tqfind(aMsg); + idx = msgParent->find(aMsg); msgParent->getMsg( idx ); } @@ -1175,7 +1175,7 @@ int KMFolderMbox::compact( unsigned int startIndex, int nbMessages, FILE* tmpfil mtext.resize(20); fread(mtext.data(), 20, 1, mStream); if(i <= 0) { //woops we've reached the top of the file, last try.. - if ( mtext.tqcontains( "from ", false ) ) { + if ( mtext.contains( "from ", false ) ) { if (mtext.size() < (size_t)folder_offset) mtext.resize(folder_offset); if(fseek(mStream, chunk_offset, SEEK_SET) == -1 || diff --git a/kmail/kmfoldermgr.cpp b/kmail/kmfoldermgr.cpp index 383f562a..e66e7776 100644 --- a/kmail/kmfoldermgr.cpp +++ b/kmail/kmfoldermgr.cpp @@ -219,7 +219,7 @@ KMFolder* KMFolderMgr::createFolder(const TQString& fName, bool sysFldr, //----------------------------------------------------------------------------- -KMFolder* KMFolderMgr::tqfind(const TQString& folderName, bool foldersOnly) +KMFolder* KMFolderMgr::find(const TQString& folderName, bool foldersOnly) { KMFolderNode* node; @@ -303,7 +303,7 @@ KMFolder* KMFolderMgr::findOrCreate(const TQString& aFolderName, bool sysFldr, { KMFolder* folder = 0; if ( id == 0 ) - folder = tqfind(aFolderName); + folder = find(aFolderName); else folder = findById(id); diff --git a/kmail/kmfoldermgr.h b/kmail/kmfoldermgr.h index 0565157a..01009347 100644 --- a/kmail/kmfoldermgr.h +++ b/kmail/kmfoldermgr.h @@ -33,13 +33,13 @@ public: /** Searches folder and returns it. Skips directories (objects of type KMFolderDir) if foldersOnly is TRUE. */ - virtual KMFolder* tqfind(const TQString& folderName, bool foldersOnly=TRUE); + virtual KMFolder* find(const TQString& folderName, bool foldersOnly=TRUE); /** Searches for a folder with the given id, recurses into directories */ virtual KMFolder* findIdString(const TQString& folderId, const uint id = 0, KMFolderDir *dir = 0); - /** Uses tqfind() to find given folder. If not found the folder is + /** Uses find() to find given folder. If not found the folder is * created. Directories are skipped. * If an id is passed this searches for it */ diff --git a/kmail/kmfoldersearch.cpp b/kmail/kmfoldersearch.cpp index e7fd1d26..d2345dce 100644 --- a/kmail/kmfoldersearch.cpp +++ b/kmail/kmfoldersearch.cpp @@ -452,7 +452,7 @@ void KMFolderSearch::addSerNum(TQ_UINT32 serNum) << ": folder is " << aFolder << ", index is " << idx << endl; return; } - if(mFolders.tqfindIndex(aFolder) == -1) { + if(mFolders.findIndex(aFolder) == -1) { aFolder->open("foldersearch"); mFolders.append(aFolder); } @@ -698,7 +698,7 @@ KMFolderSearch::ignoreJobsForMessage( KMMessage* msg ) } -int KMFolderSearch::tqfind(const KMMsgBase* msg) const +int KMFolderSearch::find(const KMMsgBase* msg) const { int pos = 0; TQ_UINT32 serNum = msg->getMsgSerNum(); @@ -856,7 +856,7 @@ bool KMFolderSearch::readIndex() return false; } mSerNums.push_back(serNum); - if(mFolders.tqfindIndex(folder) == -1) { + if(mFolders.findIndex(folder) == -1) { if (mInvalid) //exceptional case for when folder has invalid ids return false; folder->open("foldersearch"); @@ -910,7 +910,7 @@ KMMsgInfo* KMFolderSearch::setIndexEntry(int idx, KMMessage *msg) { assert(idx >= 0 && idx < (int)mSerNums.count()); Q_UNUSED( idx ); - return msg->storage()->setIndexEntry(msg->tqparent()->tqfind(msg), msg); + return msg->storage()->setIndexEntry(msg->tqparent()->find(msg), msg); } void KMFolderSearch::clearIndex(bool, bool) @@ -954,9 +954,9 @@ void KMFolderSearch::examineAddedMessage(KMFolder *aFolder, TQ_UINT32 serNum) KMFolderOpener openFolder(folder, "foldersearch"); // if we are already checking this folder, refcount - if ( mFoldersCurrentlyBeingSearched.tqcontains( folder ) ) { + if ( mFoldersCurrentlyBeingSearched.contains( folder ) ) { unsigned int count = mFoldersCurrentlyBeingSearched[folder]; - mFoldersCurrentlyBeingSearched.tqreplace( folder, count+1 ); + mFoldersCurrentlyBeingSearched.replace( folder, count+1 ); } else { connect( folder->storage(), TQT_SIGNAL( searchDone( KMFolder*, TQ_UINT32, const KMSearchPattern*, bool ) ), @@ -978,7 +978,7 @@ void KMFolderSearch::slotSearchExamineMsgDone( KMFolder* folder, << " matches?" << matches << endl; KMFolderOpener openFolder(folder, "foldersearch"); - Q_ASSERT( mFoldersCurrentlyBeingSearched.tqcontains( folder ) ); + Q_ASSERT( mFoldersCurrentlyBeingSearched.contains( folder ) ); unsigned int count = mFoldersCurrentlyBeingSearched[folder]; if ( count == 1 ) { @@ -990,7 +990,7 @@ void KMFolderSearch::slotSearchExamineMsgDone( KMFolder* folder, const KMSearchPattern*, bool ) ) ); mFoldersCurrentlyBeingSearched.remove( folder ); } else { - mFoldersCurrentlyBeingSearched.tqreplace( folder, count-1 ); + mFoldersCurrentlyBeingSearched.replace( folder, count-1 ); } if ( !matches ) { @@ -1115,9 +1115,9 @@ void KMFolderSearch::propagateHeaderChanged(KMFolder *aFolder, int idx) KMFolderOpener openAFolder(aFolder, "foldersearch"); // if we are already checking this folder, refcount - if ( mFoldersCurrentlyBeingSearched.tqcontains( aFolder ) ) { + if ( mFoldersCurrentlyBeingSearched.contains( aFolder ) ) { unsigned int count = mFoldersCurrentlyBeingSearched[aFolder]; - mFoldersCurrentlyBeingSearched.tqreplace( aFolder, count+1 ); + mFoldersCurrentlyBeingSearched.replace( aFolder, count+1 ); } else { connect( aFolder->storage(), TQT_SIGNAL( searchDone( KMFolder*, TQ_UINT32, const KMSearchPattern*, bool ) ), diff --git a/kmail/kmfoldersearch.h b/kmail/kmfoldersearch.h index 88e34994..728eb684 100644 --- a/kmail/kmfoldersearch.h +++ b/kmail/kmfoldersearch.h @@ -181,7 +181,7 @@ public: virtual bool isReadOnly() const; virtual const KMMsgBase* getMsgBase(int idx) const; virtual KMMsgBase* getMsgBase(int idx); - virtual int tqfind(const KMMsgBase* msg) const; + virtual int find(const KMMsgBase* msg) const; virtual TQString indexLocation() const; virtual int writeIndex( bool createEmptyIndex = false ); DwString getDwString(int idx); diff --git a/kmail/kmfoldertree.cpp b/kmail/kmfoldertree.cpp index 32f6e3c4..6a280856 100644 --- a/kmail/kmfoldertree.cpp +++ b/kmail/kmfoldertree.cpp @@ -136,7 +136,7 @@ TQPixmap KMFolderTreeItem::normalIcon(int size) const } // non-root search folders if ( protocol() == KMFolderTreeItem::Search ) { - icon = "mail_tqfind"; + icon = "mail_find"; } if ( mFolder && mFolder->noContent() ) { icon = "folder_grey"; @@ -1392,7 +1392,7 @@ void KMFolderTree::cleanupConfigFile() { if ((*grpIt).left(7) != "Folder-") continue; name = (*grpIt).mid(7); - if (folderMap.tqfind(name) == folderMap.end()) + if (folderMap.find(name) == folderMap.end()) { KMFolder* folder = kmkernel->findFolderById( name ); if ( folder ) { @@ -1634,8 +1634,8 @@ void KMFolderTree::slotRenameFolder(TQListViewItem *item, int col, else fldName = oldFldName; - fldName.tqreplace("/", ""); - fldName.tqreplace(TQRegExp("^\\."), ""); + fldName.replace("/", ""); + fldName.replace(TQRegExp("^\\."), ""); if (fldName.isEmpty()) fldName = i18n("unnamed"); @@ -1648,7 +1648,7 @@ void KMFolderTree::slotRenameFolder(TQListViewItem *item, int col, void KMFolderTree::slotUpdateCountsDelayed(KMFolder * folder) { // kdDebug(5006) << "KMFolderTree::slotUpdateCountsDelayed()" << endl; - if ( !mFolderToUpdateCount.tqcontains( folder->idString() ) ) + if ( !mFolderToUpdateCount.contains( folder->idString() ) ) { // kdDebug( 5006 )<< "adding " << folder->idString() << " to updateCountList " << endl; mFolderToUpdateCount.insert( folder->idString(),folder ); @@ -1851,7 +1851,7 @@ void KMFolderTree::folderToPopupMenu( MenuAction action, TQObject *receiver, { while ( menu->count() ) { - TQPopupMenu *popup = menu->tqfindItem( menu->idAt( 0 ) )->popup(); + TQPopupMenu *popup = menu->findItem( menu->idAt( 0 ) )->popup(); if ( popup ) delete popup; else @@ -1897,7 +1897,7 @@ void KMFolderTree::folderToPopupMenu( MenuAction action, TQObject *receiver, continue; } TQString label = fti->text( 0 ); - label.tqreplace( "&","&&" ); + label.replace( "&","&&" ); if ( fti->firstChild() ) { // new level @@ -1985,7 +1985,7 @@ void KMFolderTree::moveOrCopyFolder( TQValueList<TQGuardedPtr<KMFolder> > source if ( source ) sourceFolderName = source->label(); - if ( tqparent->hasNamedFolder( sourceFolderName ) || sourceFolderNames.tqcontains( sourceFolderName ) ) { + if ( tqparent->hasNamedFolder( sourceFolderName ) || sourceFolderNames.contains( sourceFolderName ) ) { KMessageBox::error( this, i18n("<qt>Cannot move or copy folder <b>%1</b> here because a folder with the same name already exists.</qt>") .tqarg( sourceFolderName ) ); setDragEnabled( true ); @@ -2016,7 +2016,7 @@ void KMFolderTree::moveOrCopyFolder( TQValueList<TQGuardedPtr<KMFolder> > source while ( folderDir && ( folderDir != &kmkernel->folderMgr()->dir() ) && ( folderDir != source->tqparent() ) ) { - if ( folderDir->tqfindRef( source ) != -1 ) + if ( folderDir->findRef( source ) != -1 ) { KMessageBox::error( this, message ); setDragEnabled( true ); @@ -2027,7 +2027,7 @@ void KMFolderTree::moveOrCopyFolder( TQValueList<TQGuardedPtr<KMFolder> > source } if( source && source->child() && tqparent && - ( tqparent->path().tqfind( source->child()->path() + "/" ) == 0 ) ) { + ( tqparent->path().find( source->child()->path() + "/" ) == 0 ) ) { KMessageBox::error( this, message ); setDragEnabled( true ); return; @@ -2051,7 +2051,7 @@ void KMFolderTree::moveOrCopyFolder( TQValueList<TQGuardedPtr<KMFolder> > source continue; KMFolderDir *childDir = (*it2)->tqparent(); do { - if ( parentDir == childDir || parentDir->tqfindRef( childDir->owner() ) != -1 ) { + if ( parentDir == childDir || parentDir->findRef( childDir->owner() ) != -1 ) { KMessageBox::error( this, i18n("Moving the selected folders is not possible") ); setDragEnabled( true ); return; @@ -2118,7 +2118,7 @@ void KMFolderTree::cutFolder() void KMFolderTree::pasteFolder() { KMFolderTreeItem *item = static_cast<KMFolderTreeItem*>( currentItem() ); - if ( !mCopySourceFolders.isEmpty() && item && !mCopySourceFolders.tqcontains( item->folder() ) ) { + if ( !mCopySourceFolders.isEmpty() && item && !mCopySourceFolders.contains( item->folder() ) ) { moveOrCopyFolder( mCopySourceFolders, item->folder(), mCutFolder ); if ( mCutFolder ) mCopySourceFolders.clear(); diff --git a/kmail/kmheaders.cpp b/kmail/kmheaders.cpp index f8e8fff8..d8c30d07 100644 --- a/kmail/kmheaders.cpp +++ b/kmail/kmheaders.cpp @@ -952,7 +952,7 @@ void KMHeaders::msgAdded(int id) mItems[id] = hi; if ( !msgId.isEmpty() ) - mSortCacheItems.tqreplace(msgId, sci); + mSortCacheItems.replace(msgId, sci); /* Add to the list of potential parents for subject threading. But only if * we are top level. */ if (mSubjThreading && tqparent) { @@ -962,7 +962,7 @@ void KMHeaders::msgAdded(int id) subjMD5 = mFolder->getMsgBase(id)->strippedSubjectMD5(); } if( !subjMD5.isEmpty()) { - if ( !mSubjectLists.tqfind(subjMD5) ) + if ( !mSubjectLists.find(subjMD5) ) mSubjectLists.insert(subjMD5, new TQPtrList<SortCacheItem>()); // insertion sort by date. See buildThreadTrees for details. int p=0; @@ -1006,7 +1006,7 @@ void KMHeaders::msgAdded(int id) if (msgId != otherMsg->replyToAuxIdMD5()) continue; else { - if (!otherId.isEmpty() && mSortCacheItems.tqfind(otherId)) + if (!otherId.isEmpty() && mSortCacheItems.find(otherId)) continue; else // Thread below us by aux id, but keep on the list of @@ -1163,11 +1163,11 @@ void KMHeaders::msgRemoved(int id, TQString msgId ) } if ((!tqparent || sci->isImperfectlyThreaded()) - && !mImperfectlyThreadedList.tqcontainsRef(item)) + && !mImperfectlyThreadedList.containsRef(item)) mImperfectlyThreadedList.append(item); if (tqparent && !sci->isImperfectlyThreaded() - && mImperfectlyThreadedList.tqcontainsRef(item)) + && mImperfectlyThreadedList.containsRef(item)) mImperfectlyThreadedList.removeRef(item); } } @@ -1178,7 +1178,7 @@ void KMHeaders::msgRemoved(int id, TQString msgId ) mImperfectlyThreadedList.removeRef( removedItem ); #ifdef DEBUG // This should never happen, in this case the folders are inconsistent. - while ( mImperfectlyThreadedList.tqfindRef( removedItem ) != -1 ) { + while ( mImperfectlyThreadedList.findRef( removedItem ) != -1 ) { mImperfectlyThreadedList.remove(); kdDebug(5006) << "Remove doubled item from mImperfectlyThreadedList: " << removedItem << endl; } @@ -1268,7 +1268,7 @@ void KMHeaders::setThreadtqStatus(KMMsgtqStatus status, bool toggle) TQListViewItem *top = item; while ( top->tqparent() ) top = top->tqparent(); - if (!topOfThreads.tqcontains(top)) { + if (!topOfThreads.contains(top)) { topOfThreads.append(top); } } @@ -2950,7 +2950,7 @@ void KMHeaders::buildThreadingTree( TQMemArray<SortCacheItem *> sortCache ) KMMsgBase *mi = mFolder->getMsgBase(x); TQString md5 = mi->msgIdMD5(); if(!md5.isEmpty()) - mSortCacheItems.tqreplace(md5, sortCache[x]); + mSortCacheItems.replace(md5, sortCache[x]); } } @@ -2974,7 +2974,7 @@ void KMHeaders::buildSubjectThreadingTree( TQMemArray<SortCacheItem *> sortCache /* For each subject, keep a list of items with that subject * (stripped of prefixes) sorted by date. */ - if (!mSubjectLists.tqfind(subjMD5)) + if (!mSubjectLists.find(subjMD5)) mSubjectLists.insert(subjMD5, new TQPtrList<SortCacheItem>()); /* Insertion sort by date. These lists are expected to be very small. * Also, since the messages are roughly ordered by date in the store, @@ -3596,7 +3596,7 @@ void KMHeaders::setCopiedMessages(const TQValueList< TQ_UINT32 > & msgs, bool mo bool KMHeaders::isMessageCut(TQ_UINT32 serNum) const { - return mMoveMessages && mCopiedMessages.tqcontains( serNum ); + return mMoveMessages && mCopiedMessages.contains( serNum ); } TQValueList< TQ_UINT32 > KMHeaders::selectedSernums() diff --git a/kmail/kmkernel.cpp b/kmail/kmkernel.cpp index 931d15ea..7a05280e 100644 --- a/kmail/kmkernel.cpp +++ b/kmail/kmkernel.cpp @@ -425,7 +425,7 @@ int KMKernel::openComposer (const TQString &to, const TQString &cc, for ( QCStringList::ConstIterator it = customHeaders.begin() ; it != customHeaders.end() ; ++it ) if ( !(*it).isEmpty() ) { - const int pos = (*it).tqfind( ':' ); + const int pos = (*it).find( ':' ); if ( pos > 0 ) { TQCString header, value; @@ -606,7 +606,7 @@ int KMKernel::openComposer (const TQString &to, const TQString &cc, void KMKernel::setDefaultTransport( const TQString & transport ) { TQStringList availTransports = KMail::TransportManager::transportNames(); - TQStringList::const_iterator it = availTransports.tqfind( transport ); + TQStringList::const_iterator it = availTransports.find( transport ); if ( it == availTransports.end() ) { kdWarning() << "The transport you entered is not available" << endl; return; @@ -814,7 +814,7 @@ int KMKernel::dcopAddMessage( const TQString & foldername,const KURL & msgUrl, int retval; bool readFolderMsgIds = false; TQString _foldername = foldername.stripWhiteSpace(); - _foldername = _foldername.tqreplace('\\',""); //try to prevent ESCAPE Sequences + _foldername = _foldername.replace('\\',""); //try to prevent ESCAPE Sequences if ( foldername != mAddMessageLastFolder ) { mAddMessageMsgIds.clear(); @@ -840,7 +840,7 @@ int KMKernel::dcopAddMessage( const TQString & foldername,const KURL & msgUrl, msg->fromString( messageText ); if (readFolderMsgIds) { - if ( foldername.tqcontains("/")) { + if ( foldername.contains("/")) { TQString tmp_fname = ""; KMFolder *folder = NULL; KMFolderDir *subfolder; @@ -937,8 +937,8 @@ int KMKernel::dcopAddMessage( const TQString & foldername,const KURL & msgUrl, msgId += msg->dateStr(); } - int k = mAddMessageMsgIds.tqfindIndex( msgId ); - //fprintf(stderr,"tqfind %s = %d\n",(const char *) msgId,k); + int k = mAddMessageMsgIds.findIndex( msgId ); + //fprintf(stderr,"find %s = %d\n",(const char *) msgId,k); if ( k == -1 ) { if ( !msgId.isEmpty() ) { @@ -1000,7 +1000,7 @@ int KMKernel::dcopAddMessage_fastImport( const TQString & foldername, bool createNewFolder = false; TQString _foldername = foldername.stripWhiteSpace(); - _foldername = _foldername.tqreplace('\\',""); //try to prevent ESCAPE Sequences + _foldername = _foldername.replace('\\',""); //try to prevent ESCAPE Sequences if ( foldername != mAddMessageLastFolder ) { createNewFolder = true; @@ -1018,7 +1018,7 @@ int KMKernel::dcopAddMessage_fastImport( const TQString & foldername, msg->fromString( messageText ); if (createNewFolder) { - if ( foldername.tqcontains("/")) { + if ( foldername.contains("/")) { TQString tmp_fname = ""; KMFolder *folder = NULL; KMFolderDir *subfolder; @@ -1528,7 +1528,7 @@ void KMKernel::init() recreateCorruptIndexFiles(); the_searchFolderMgr = new KMFolderMgr(locateLocal("data","kmail/search"), KMSearchDir); - KMFolder *lsf = the_searchFolderMgr->tqfind( i18n("Last Search") ); + KMFolder *lsf = the_searchFolderMgr->find( i18n("Last Search") ); if (lsf) the_searchFolderMgr->remove( lsf ); @@ -1597,7 +1597,7 @@ void KMKernel::init() bool KMKernel::isCodecAsciiCompatible( const TQTextCodec *codec ) { - return !mNonAsciiCompatibleCodecs.tqcontains( codec ); + return !mNonAsciiCompatibleCodecs.contains( codec ); } void KMKernel::readConfig() @@ -1613,7 +1613,7 @@ void KMKernel::cleanupImapFolders() KMFolderNode *node = the_imapFolderMgr->dir().first(); while (node) { - if (node->isDir() || ((acct = the_acctMgr->tqfind(node->id())) + if (node->isDir() || ((acct = the_acctMgr->find(node->id())) && ( acct->type() == "imap" )) ) { node = the_imapFolderMgr->dir().next(); @@ -1629,7 +1629,7 @@ void KMKernel::cleanupImapFolders() node = the_dimapFolderMgr->dir().first(); while (node) { - if (node->isDir() || ((acct = the_acctMgr->tqfind(node->id())) + if (node->isDir() || ((acct = the_acctMgr->find(node->id())) && ( acct->type() == "cachedimap" )) ) { node = the_dimapFolderMgr->dir().next(); @@ -1665,7 +1665,7 @@ void KMKernel::cleanupImapFolders() if (acct->type() != "cachedimap" ) continue; - KMFolder* fld = the_dimapFolderMgr->tqfind(TQString::number(acct->id())); + KMFolder* fld = the_dimapFolderMgr->find(TQString::number(acct->id())); if( fld ) cfld = static_cast<KMFolderCachedImap*>( fld->storage() ); if (cfld == 0) { @@ -2016,7 +2016,7 @@ void KMKernel::slotDataReq(KIO::Job *job, TQByteArray &data) { // send the data in 64 KB chunks const int MAX_CHUNK_SIZE = 64*1024; - TQMap<KIO::Job*, putData>::Iterator it = mPutJobs.tqfind(job); + TQMap<KIO::Job*, putData>::Iterator it = mPutJobs.find(job); assert(it != mPutJobs.end()); int remainingBytes = (*it).data.size() - (*it).offset; if( remainingBytes > MAX_CHUNK_SIZE ) @@ -2039,7 +2039,7 @@ void KMKernel::slotDataReq(KIO::Job *job, TQByteArray &data) void KMKernel::slotResult(KIO::Job *job) { - TQMap<KIO::Job*, putData>::Iterator it = mPutJobs.tqfind(job); + TQMap<KIO::Job*, putData>::Iterator it = mPutJobs.find(job); assert(it != mPutJobs.end()); if (job->error()) { @@ -2108,7 +2108,7 @@ bool KMKernel::haveSystemTrayApplet() bool KMKernel::registerSystemTrayApplet( const KSystemTray* applet ) { - if ( systemTrayApplets.tqfindIndex( applet ) == -1 ) { + if ( systemTrayApplets.findIndex( applet ) == -1 ) { systemTrayApplets.append( applet ); return true; } @@ -2119,7 +2119,7 @@ bool KMKernel::registerSystemTrayApplet( const KSystemTray* applet ) bool KMKernel::unregisterSystemTrayApplet( const KSystemTray* applet ) { TQValueList<const KSystemTray*>::iterator it = - systemTrayApplets.tqfind( applet ); + systemTrayApplets.find( applet ); if ( it != systemTrayApplets.end() ) { systemTrayApplets.remove( it ); return true; diff --git a/kmail/kmmainwidget.cpp b/kmail/kmmainwidget.cpp index fd41d4a8..a32c61c9 100644 --- a/kmail/kmmainwidget.cpp +++ b/kmail/kmmainwidget.cpp @@ -939,7 +939,7 @@ void KMMainWidget::slotMailChecked( bool newMail, bool sendOnCheck, for ( TQStringList::const_iterator it = keys.begin(); it != keys.end(); ++it ) { - kdDebug(5006) << newInFolder.tqfind( *it ).data() << " new message(s) in " + kdDebug(5006) << newInFolder.find( *it ).data() << " new message(s) in " << *it << endl; KMFolder *folder = kmkernel->findFolderById( *it ); @@ -949,7 +949,7 @@ void KMMainWidget::slotMailChecked( bool newMail, bool sendOnCheck, if ( GlobalSettings::self()->verboseNewMailNotification() ) { summary += "<br>" + i18n( "1 new message in %1", "%n new messages in %1", - newInFolder.tqfind( *it ).data() ) + newInFolder.find( *it ).data() ) .tqarg( folder->prettyURL() ); } } @@ -1028,7 +1028,7 @@ void KMMainWidget::slotShowNewFromTemplate() TQString subj = mb->subject(); if ( subj.isEmpty() ) subj = i18n("No Subject"); mTemplateMenu->popupMenu()->insertItem( - KStringHandler::rsqueeze( subj.tqreplace( "&", "&&" ) ), idx ); + KStringHandler::rsqueeze( subj.replace( "&", "&&" ) ), idx ); } } @@ -2165,7 +2165,7 @@ void KMMainWidget::slotSelectFolder(KMFolder* folder) //----------------------------------------------------------------------------- void KMMainWidget::slotSelectMessage(KMMessage* msg) { - int idx = mFolder->tqfind(msg); + int idx = mFolder->find(msg); if (idx != -1) { mHeaders->setCurrentMsg(idx); if (mMsgView) @@ -2189,9 +2189,9 @@ void KMMainWidget::slotReplaceMsgByUnencryptedVersion() { TQString msgId( oldMsg->msgId() ); TQString prefix("DecryptedMsg."); - int oldIdx = msgId.tqfind(prefix, 0, false); + int oldIdx = msgId.find(prefix, 0, false); if( -1 == oldIdx ) { - int leftAngle = msgId.tqfindRev( '<' ); + int leftAngle = msgId.findRev( '<' ); msgId = msgId.insert( (-1 == leftAngle) ? 0 : ++leftAngle, prefix ); } else { @@ -2210,12 +2210,12 @@ void KMMainWidget::slotReplaceMsgByUnencryptedVersion() kdDebug(5006) << "KMMainWidget - adding unencrypted message to folder" << endl; mFolder->addMsg( newMsg ); /* Figure out its index in the folder for selecting. This must be count()-1, - * since we append. Be safe and do tqfind, though, just in case. */ - int newMsgIdx = mFolder->tqfind( newMsg ); + * since we append. Be safe and do find, though, just in case. */ + int newMsgIdx = mFolder->find( newMsg ); Q_ASSERT( newMsgIdx != -1 ); /* we need this unget, to have the message displayed correctly initially */ mFolder->unGetMsg( newMsgIdx ); - int idx = mFolder->tqfind( oldMsg ); + int idx = mFolder->find( oldMsg ); Q_ASSERT( idx != -1 ); /* only select here, so the old one is not un-Gotten before, which would * render the pointer we hold invalid so that find would fail */ @@ -2468,7 +2468,7 @@ void KMMainWidget::getAccountMenu() TQStringList::Iterator it; int id = 0; for(it = actList.begin(); it != actList.end() ; ++it, id++) - mActMenu->insertItem((*it).tqreplace("&", "&&"), id); + mActMenu->insertItem((*it).replace("&", "&&"), id); } //----------------------------------------------------------------------------- @@ -2481,7 +2481,7 @@ void KMMainWidget::getTransportMenu() TQStringList::Iterator it; int id = 0; for(it = availTransports.begin(); it != availTransports.end() ; ++it, id++) - mSendMenu->insertItem((*it).tqreplace("&", "&&"), id); + mSendMenu->insertItem((*it).replace("&", "&&"), id); } //----------------------------------------------------------------------------- @@ -2545,7 +2545,7 @@ void KMMainWidget::updateCustomTemplateMenus() KAction *action; switch ( t.type() ) { case CustomTemplates::TReply: - action = new KAction( (*it).tqreplace( "&", "&&" ), + action = new KAction( (*it).replace( "&", "&&" ), KShortcut( t.shortcut() ), mCustomReplyMapper, TQT_SLOT( map() ), @@ -2557,7 +2557,7 @@ void KMMainWidget::updateCustomTemplateMenus() ++replyc; break; case CustomTemplates::TReplyAll: - action = new KAction( (*it).tqreplace( "&", "&&" ), + action = new KAction( (*it).replace( "&", "&&" ), KShortcut( t.shortcut() ), mCustomReplyAllMapper, TQT_SLOT( map() ), @@ -2569,7 +2569,7 @@ void KMMainWidget::updateCustomTemplateMenus() ++replyallc; break; case CustomTemplates::TForward: - action = new KAction( (*it).tqreplace( "&", "&&" ), + action = new KAction( (*it).replace( "&", "&&" ), KShortcut( t.shortcut() ), mCustomForwardMapper, TQT_SLOT( map() ), @@ -2581,7 +2581,7 @@ void KMMainWidget::updateCustomTemplateMenus() ++forwardc; break; case CustomTemplates::TUniversal: - action = new KAction( (*it).tqreplace( "&", "&&" ), + action = new KAction( (*it).replace( "&", "&&" ), KShortcut::null(), mCustomReplyMapper, TQT_SLOT( map() ), @@ -2591,7 +2591,7 @@ void KMMainWidget::updateCustomTemplateMenus() mCustomReplyActionMenu->insert( action, idx ); mCustomTemplateActions.append( action ); ++replyc; - action = new KAction( (*it).tqreplace( "&", "&&" ), + action = new KAction( (*it).replace( "&", "&&" ), KShortcut::null(), mCustomReplyAllMapper, TQT_SLOT( map() ), @@ -2601,7 +2601,7 @@ void KMMainWidget::updateCustomTemplateMenus() mCustomReplyAllActionMenu->insert( action, idx ); mCustomTemplateActions.append( action ); ++replyallc; - action = new KAction( (*it).tqreplace( "&", "&&" ), + action = new KAction( (*it).replace( "&", "&&" ), KShortcut::null(), mCustomForwardMapper, TQT_SLOT( map() ), @@ -2767,10 +2767,10 @@ void KMMainWidget::setupActions() TQT_SLOT(slotDeleteThread()), actionCollection(), "delete_thread" ); - (void) new KAction( i18n("&Find Messages..."), "mail_tqfind", Key_S, TQT_TQOBJECT(this), + (void) new KAction( i18n("&Find Messages..."), "mail_find", Key_S, TQT_TQOBJECT(this), TQT_SLOT(slotRequestFullSearchFromQuickSearch()), actionCollection(), "search_messages" ); - mFindInMessageAction = new KAction( i18n("&Find in Message..."), "tqfind", KStdAccel::shortcut(KStdAccel::Find), TQT_TQOBJECT(this), + mFindInMessageAction = new KAction( i18n("&Find in Message..."), "find", KStdAccel::shortcut(KStdAccel::Find), TQT_TQOBJECT(this), TQT_SLOT(slotFind()), actionCollection(), "find_in_messages" ); (void) new KAction( i18n("Select &All Messages"), KStdAccel::selectAll(), TQT_TQOBJECT(this), @@ -3608,7 +3608,7 @@ void KMMainWidget::removeDuplicates() if ( !id.isEmpty() ) { TQString subjMD5 = (*mFolder)[i]->strippedSubjectMD5(); int other = -1; - if ( idMD5s.tqcontains(id) ) + if ( idMD5s.contains(id) ) other = idMD5s[id].first(); else idMD5s[id].append( i ); @@ -3713,7 +3713,7 @@ void KMMainWidget::initializeFilterActions() for ( ;it != kmkernel->filterMgr()->filters().constEnd(); ++it ) { if (!(*it)->isEmpty() && (*it)->configureShortcut()) { filterName = TQString("Filter %1").tqarg((*it)->name()); - normalizedName = filterName.tqreplace(" ", "_"); + normalizedName = filterName.replace(" ", "_"); if (action(normalizedName.utf8())) continue; filterCommand = new KMMetaFilterActionCommand(*it, mHeaders, this); @@ -3803,7 +3803,7 @@ void KMMainWidget::slotShortcutChanged( KMFolder *folder ) TQString actionlabel = TQString( "FolderShortcut %1").tqarg( folder->prettyURL() ); TQString actionname = TQString( "FolderShortcut %1").tqarg( folder->idString() ); - TQString normalizedName = actionname.tqreplace(" ", "_"); + TQString normalizedName = actionname.replace(" ", "_"); KAction* action = new KAction(actionlabel, folder->shortcut(), c, TQT_SLOT(start()), actionCollection(), normalizedName.local8Bit()); diff --git a/kmail/kmmainwin.cpp b/kmail/kmmainwin.cpp index c2cb135e..8e14e984 100644 --- a/kmail/kmmainwin.cpp +++ b/kmail/kmmainwin.cpp @@ -122,9 +122,9 @@ void KMMainWin::displayStatusMsg(const TQString& aText) // ### FIXME: We should disable richtext/HTML (to avoid possible denial of service attacks), // but this code would double the size of the satus bar if the user hovers // over an <foo@bar.com>-style email address :-( -// text.tqreplace("&", "&"); -// text.tqreplace("<", "<"); -// text.tqreplace(">", ">"); +// text.replace("&", "&"); +// text.replace("<", "<"); +// text.replace(">", ">"); statusBar()->changeItem(text, mMessageStatusId); } diff --git a/kmail/kmmessage.cpp b/kmail/kmmessage.cpp index c083638d..d4ef0ec4 100644 --- a/kmail/kmmessage.cpp +++ b/kmail/kmmessage.cpp @@ -246,10 +246,10 @@ bool KMMessage::transferInProgress() const void KMMessage::setTransferInProgress(bool value, bool force) { MessageProperty::setTransferInProgress( getMsgSerNum(), value, force ); - if ( !transferInProgress() && sPendingDeletes.tqcontains( this ) ) { + if ( !transferInProgress() && sPendingDeletes.contains( this ) ) { sPendingDeletes.remove( this ); if ( tqparent() ) { - int idx = tqparent()->tqfind( this ); + int idx = tqparent()->find( this ); if ( idx > 0 ) { tqparent()->removeMsg( idx ); } @@ -260,7 +260,7 @@ void KMMessage::setTransferInProgress(bool value, bool force) bool KMMessage::isUrgent() const { - return headerField( "Priority" ).tqcontains( "urgent", false ) + return headerField( "Priority" ).contains( "urgent", false ) || headerField( "X-Priority" ).startsWith( "2" ); } @@ -641,9 +641,9 @@ static bool flushPart(TQString &msg, TQStringList &part, static TQString stripSignature( const TQString & msg, bool clearSigned ) { if ( clearSigned ) - return msg.left( msg.tqfindRev( TQRegExp( "\n--\\s?\n" ) ) ); + return msg.left( msg.findRev( TQRegExp( "\n--\\s?\n" ) ) ); else - return msg.left( msg.tqfindRev( "\n-- \n" ) ); + return msg.left( msg.findRev( "\n-- \n" ) ); } TQString KMMessage::smartQuote( const TQString & msg, int maxLineLength ) @@ -845,14 +845,14 @@ TQString KMMessage::asQuotedString( const TQString& aHeaderStr, asPlainText( aStripSignature, allowDecryption ) : selection ; // Remove blank lines at the beginning: - const int firstNonWS = content.tqfind( TQRegExp( "\\S" ) ); - const int lineStart = content.tqfindRev( '\n', firstNonWS ); + const int firstNonWS = content.find( TQRegExp( "\\S" ) ); + const int lineStart = content.findRev( '\n', firstNonWS ); if ( lineStart >= 0 ) content.remove( 0, static_cast<unsigned int>( lineStart ) ); const TQString indentStr = formatString( aIndentStr ); - content.tqreplace( '\n', '\n' + indentStr ); + content.replace( '\n', '\n' + indentStr ); content.prepend( indentStr ); content += '\n'; @@ -887,7 +887,7 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy, !tqparent()->mailingListPostAddress().isEmpty() ) { mailingListAddresses << tqparent()->mailingListPostAddress(); } - if ( headerField("List-Post").tqfind( "mailto:", 0, false ) != -1 ) { + if ( headerField("List-Post").find( "mailto:", 0, false ) != -1 ) { TQString listPost = headerField("List-Post"); TQRegExp rx( "<mailto:([^@>]+)@([^>]+)>", false ); if ( rx.search( listPost, 0 ) != -1 ) // matched @@ -1108,14 +1108,14 @@ TQCString KMMessage::getRefStr() const if (refStr.isEmpty()) return headerField("Message-Id").latin1(); - i = refStr.tqfind('<'); - j = refStr.tqfind('>'); + i = refStr.find('<'); + j = refStr.find('>'); firstRef = refStr.mid(i, j-i+1); if (!firstRef.isEmpty()) retRefStr = firstRef + ' '; - i = refStr.tqfindRev('<'); - j = refStr.tqfindRev('>'); + i = refStr.findRev('<'); + j = refStr.findRev('>'); lastRef = refStr.mid(i, j-i+1); if (!lastRef.isEmpty() && lastRef != firstRef) @@ -1215,8 +1215,8 @@ void KMMessage::sanitizeHeaders( const TQStringList& whiteList ) while (field) { nextField = field->Next(); - if ( field->FieldNameStr().tqfind( "ontent" ) == DwString::npos - && !whiteList.tqcontains( TQString::tqfromLatin1( field->FieldNameStr().c_str() ) ) ) + if ( field->FieldNameStr().find( "ontent" ) == DwString::npos + && !whiteList.contains( TQString::tqfromLatin1( field->FieldNameStr().c_str() ) ) ) header.RemoveField(field); field = nextField; } @@ -1245,7 +1245,7 @@ KMMessage* KMMessage::createForward( const TQString &tmpl /* = TQString() */ ) TQStringList blacklist = GlobalSettings::self()->mimetypesToStripWhenInlineForwarding(); for ( TQStringList::Iterator it = blacklist.begin(); it != blacklist.end(); ++it ) { TQString entry = (*it); - int sep = entry.tqfind( '/' ); + int sep = entry.find( '/' ); TQCString type = entry.left( sep ).latin1(); TQCString subtype = entry.mid( sep+1 ).latin1(); kdDebug( 5006 ) << "Looking for blacklisted type: " << type << "/" << subtype << endl; @@ -1442,7 +1442,7 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a, // an MDN with any disposition type other than "failed" in response // to the request. TQString notificationOptions = headerField("Disposition-Notification-Options"); - if ( notificationOptions.tqcontains( "required", false ) ) { + if ( notificationOptions.contains( "required", false ) ) { // ### hacky; should parse... // There is a required option that we don't understand. We need to // ask the user what we should do: @@ -1476,7 +1476,7 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a, TQString returnPath = returnPathList.isEmpty() ? TQString() : returnPathList.front().localPart + '@' + returnPathList.front().domain ; kdDebug(5006) << "clean return path: " << returnPath << endl; - if ( returnPath.isEmpty() || !receiptTo.tqcontains( returnPath, false ) ) { + if ( returnPath.isEmpty() || !receiptTo.contains( returnPath, false ) ) { if ( !allowGUI ) return 0; // don't setMDNSentState here! mode = requestAdviceOnMDN( returnPath.isEmpty() ? "mdnReturnPathEmpty" : @@ -1618,13 +1618,13 @@ TQString KMMessage::replaceHeadersInString( const TQString & s ) const { int idx = 0; if( ( idx = rxDate.search( result, idx ) ) != -1 ) { - result.tqreplace( idx, rxDate.matchedLength(), sDate ); + result.replace( idx, rxDate.matchedLength(), sDate ); } idx = 0; while ( ( idx = rx.search( result, idx ) ) != -1 ) { TQString replacement = headerField( TQString(rx.cap(1)).latin1() ); - result.tqreplace( idx, rx.matchedLength(), replacement ); + result.replace( idx, rx.matchedLength(), replacement ); idx += replacement.length(); } return result; @@ -2081,11 +2081,11 @@ TQString KMMessage::replyToId() const replyTo = headerField("In-Reply-To"); // search the end of the (first) message id in the In-Reply-To header - rightAngle = replyTo.tqfind( '>' ); + rightAngle = replyTo.find( '>' ); if (rightAngle != -1) replyTo.truncate( rightAngle + 1 ); // now search the start of the message id - leftAngle = replyTo.tqfindRev( '<' ); + leftAngle = replyTo.findRev( '<' ); if (leftAngle != -1) replyTo = replyTo.mid( leftAngle ); @@ -2094,14 +2094,14 @@ TQString KMMessage::replyToId() const // misconfigured Mutt. They look like this <"from foo"@bar.baz>, i.e. // they contain double quotes and spaces. We only check for '"'. if (!replyTo.isEmpty() && (replyTo[0] == '<') && - ( -1 == replyTo.tqfind( '"' ) ) ) + ( -1 == replyTo.find( '"' ) ) ) return replyTo; references = headerField("References"); - leftAngle = references.tqfindRev( '<' ); + leftAngle = references.findRev( '<' ); if (leftAngle != -1) references = references.mid( leftAngle ); - rightAngle = references.tqfind( '>' ); + rightAngle = references.find( '>' ); if (rightAngle != -1) references.truncate( rightAngle + 1 ); @@ -2126,11 +2126,11 @@ TQString KMMessage::references() const TQString references = headerField( "References" ); // keep the last two entries for threading - leftAngle = references.tqfindRev( '<' ); - leftAngle = references.tqfindRev( '<', leftAngle - 1 ); + leftAngle = references.findRev( '<' ); + leftAngle = references.findRev( '<', leftAngle - 1 ); if( leftAngle != -1 ) references = references.mid( leftAngle ); - rightAngle = references.tqfindRev( '>' ); + rightAngle = references.findRev( '>' ); if( rightAngle != -1 ) references.truncate( rightAngle + 1 ); @@ -2146,7 +2146,7 @@ TQString KMMessage::replyToAuxIdMD5() const TQString result = references(); // references contains two items, use the first one // (the second to last reference) - const int rightAngle = result.tqfind( '>' ); + const int rightAngle = result.find( '>' ); if( rightAngle != -1 ) result.truncate( rightAngle + 1 ); @@ -2182,11 +2182,11 @@ TQString KMMessage::msgId() const TQString msgId = headerField("Message-Id"); // search the end of the message id - const int rightAngle = msgId.tqfind( '>' ); + const int rightAngle = msgId.find( '>' ); if (rightAngle != -1) msgId.truncate( rightAngle + 1 ); // now search the start of the message id - const int leftAngle = msgId.tqfindRev( '<' ); + const int leftAngle = msgId.findRev( '<' ); if (leftAngle != -1) msgId = msgId.mid( leftAngle ); return msgId; @@ -3197,8 +3197,8 @@ bool KMMessage::deleteBodyPart( int partIndex ) dummyPart.setContentDescription( comment ); dummyPart.setBodyEncodedBinary( TQByteArray() ); TQCString cd = dummyPart.contentDisposition(); - if ( cd.tqfind( "inline", 0, false ) == 0 ) { - cd.tqreplace( 0, 10, "attachment" ); + if ( cd.find( "inline", 0, false ) == 0 ) { + cd.replace( 0, 10, "attachment" ); dummyPart.setContentDisposition( cd ); } else if ( cd.isEmpty() ) { dummyPart.setContentDisposition( "attachment" ); @@ -3251,14 +3251,14 @@ DwBodyPart* KMMessage::createDWBodyPart(const KMMessagePart* aPart) int iL, i1, i2, iM; iL = additionalParam.length(); i1 = 0; - i2 = additionalParam.tqfind(';', i1, false); + i2 = additionalParam.find(';', i1, false); while ( i1 < iL ) { if( -1 == i2 ) i2 = iL; if( i1+1 < i2 ) { parAV = additionalParam.mid( i1, (i2-i1) ); - iM = parAV.tqfind('='); + iM = parAV.find('='); if( -1 < iM ) { parA = parAV.left( iM ).data(); @@ -3281,7 +3281,7 @@ DwBodyPart* KMMessage::createDWBodyPart(const KMMessagePart* aPart) ct.AddParameter( param ); } i1 = i2+1; - i2 = additionalParam.tqfind(';', i1, false); + i2 = additionalParam.find(';', i1, false); } } @@ -3975,7 +3975,7 @@ TQString KMMessage::expandAliases( const TQString& recipients ) // check whether the address is missing the domain part // FIXME: looking for '@' might be wrong - if ( receiver.tqfind('@') == -1 ) { + if ( receiver.find('@') == -1 ) { KConfigGroup general( KMKernel::config(), "General" ); TQString defaultdomain = general.readEntry( "Default domain" ); if( !defaultdomain.isEmpty() ) { @@ -4014,8 +4014,8 @@ TQString KMMessage::guessEmailAddressFromLoginName( const TQString& loginName ) const KUser user( loginName ); if ( user.isValid() ) { TQString fullName = user.fullName(); - if ( fullName.tqfind( TQRegExp( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" ) ) != -1 ) - address = '"' + fullName.tqreplace( '\\', "\\" ).tqreplace( '"', "\\" ) + if ( fullName.find( TQRegExp( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" ) ) != -1 ) + address = '"' + fullName.replace( '\\', "\\" ).replace( '"', "\\" ) + "\" <" + address + '>'; else address = fullName + " <" + address + '>'; diff --git a/kmail/kmmessage.h b/kmail/kmmessage.h index 32e79e2a..e15732b9 100644 --- a/kmail/kmmessage.h +++ b/kmail/kmmessage.h @@ -713,7 +713,7 @@ public: bool removeLineBreaks = false ); /** Converts the email address(es) to (a) nice HTML mailto: anchor(s). - * If stripped is TRUE then the visible part of the anchor tqcontains + * If stripped is TRUE then the visible part of the anchor contains * only the name part and not the given emailAddr. */ static TQString emailAddrAsAnchor(const TQString& emailAddr, diff --git a/kmail/kmmsgbase.cpp b/kmail/kmmsgbase.cpp index eb8ed59e..e69dcdfb 100644 --- a/kmail/kmmsgbase.cpp +++ b/kmail/kmmsgbase.cpp @@ -142,7 +142,7 @@ void KMMsgBase::toggletqStatus(const KMMsgtqStatus atqStatus, int idx) } if (storage()) { if (idx < 0) - idx = storage()->tqfind( this ); + idx = storage()->find( this ); storage()->msgStatusChanged( oldtqStatus, status(), idx ); storage()->headerOfMsgChanged(this, idx); } @@ -258,7 +258,7 @@ void KMMsgBase::setqStatus(const KMMsgtqStatus atqStatus, int idx) if ( oldtqStatus != mtqStatus && storage() ) { if (idx < 0) - idx = storage()->tqfind( this ); + idx = storage()->find( this ); storage()->msgStatusChanged( oldtqStatus, status(), idx ); storage()->headerOfMsgChanged( this, idx ); } @@ -608,7 +608,7 @@ TQStringList KMMsgBase::supportedEncodings(bool usAscii) { TQTextCodec *codec = KGlobal::charsets()->codecForName(*it); TQString mimeName = (codec) ? TQString(codec->mimeName()).lower() : (*it); - if (mimeNames.tqfind(mimeName) == mimeNames.end()) + if (mimeNames.find(mimeName) == mimeNames.end()) { encodings.append(KGlobal::charsets()->languageForEncoding(*it) + " ( " + mimeName + " )"); @@ -665,7 +665,7 @@ TQString KMMsgBase::decodeRFC2047String(const TQCString& aStr, TQCString prefCha if ( str.isEmpty() ) return TQString(); - if ( str.tqfind( "=?" ) < 0 ) { + if ( str.find( "=?" ) < 0 ) { if ( !prefCharset.isEmpty() && kmkernel->isCodecAsciiCompatible( KMMsgBase::codecForName( prefCharset ) ) ) { if ( prefCharset == "us-ascii" ) { @@ -813,7 +813,7 @@ TQCString KMMsgBase::encodeRFC2047String(const TQString& _str, start = pos; p = pos; while (p < strLength) { - if (!breakLine && (_str.tqat(p) == ' ' || dontQuote.tqfind(_str.tqat(p)) != -1)) + if (!breakLine && (_str.tqat(p) == ' ' || dontQuote.find(_str.tqat(p)) != -1)) start = p + 1; if (_str.tqat(p).tqunicode() >= 128 || _str.tqat(p).tqunicode() < 32) break; @@ -821,9 +821,9 @@ TQCString KMMsgBase::encodeRFC2047String(const TQString& _str, } if (breakLine || p < strLength) { - while (dontQuote.tqfind(_str.tqat(start)) != -1) start++; + while (dontQuote.find(_str.tqat(start)) != -1) start++; stop = start; - while (stop < strLength && dontQuote.tqfind(_str.tqat(stop)) == -1) + while (stop < strLength && dontQuote.find(_str.tqat(stop)) == -1) stop++; result += _str.mid(pos, start - pos).latin1(); encLength = encodeRFC2047Quoted(codec->fromUnicode(_str. @@ -849,7 +849,7 @@ TQCString KMMsgBase::encodeRFC2047String(const TQString& _str, if (result.right(5) == "?=\n ") { start--; result.truncate(result.length() - 1); } - int lastNewLine = result.tqfindRev("\n "); + int lastNewLine = result.findRev("\n "); if (!result.mid(lastNewLine).stripWhiteSpace().isEmpty() && result.length() - lastNewLine + encLength + 2 > maxLen) result += "\n "; @@ -946,12 +946,12 @@ TQCString KMMsgBase::encodeRFC2231StringAutoDetectCharset( const TQString &str, //----------------------------------------------------------------------------- TQString KMMsgBase::decodeRFC2231String(const TQCString& _str) { - int p = _str.tqfind('\''); + int p = _str.find('\''); if (p < 0) return kmkernel->networkCodec()->toUnicode(_str); TQCString charset = _str.left(p); - TQCString st = _str.mid(_str.tqfindRev('\'') + 1); + TQCString st = _str.mid(_str.findRev('\'') + 1); char ch, ch2; p = 0; while (p < (int)st.length()) @@ -996,10 +996,10 @@ TQCString KMMsgBase::extractRFC2231HeaderField( const TQCString &aStr, const TQC // Quoted values end at the ending quote if ( aStr[startPart] == '"' ) { startPart++; // the double quote isn't part of the filename - endPart = aStr.tqfind('"', startPart) - 1; + endPart = aStr.find('"', startPart) - 1; } else { - endPart = aStr.tqfind(';', startPart) - 1; + endPart = aStr.find(';', startPart) - 1; } if (endPart < 0) endPart = 32767; @@ -1081,7 +1081,7 @@ unsigned long KMMsgBase::getMsgSerNum() const if (msn) return msn; if (mParent) { - int index = mParent->tqfind((KMMsgBase*)this); + int index = mParent->find((KMMsgBase*)this); msn = KMMsgDict::instance()->getMsgSerNum(mParent, index); if (msn) MessageProperty::setSerialCache( this, msn ); @@ -1450,11 +1450,11 @@ void KMMsgBase::readConfig() sReplySubjPrefixes = composerGroup.readListEntry("reply-prefixes", ','); if (sReplySubjPrefixes.isEmpty()) sReplySubjPrefixes << "Re\\s*:" << "Re\\[\\d+\\]:" << "Re\\d+:"; - sReplaceSubjPrefix = composerGroup.readBoolEntry("tqreplace-reply-prefix", true); + sReplaceSubjPrefix = composerGroup.readBoolEntry("replace-reply-prefix", true); sForwardSubjPrefixes = composerGroup.readListEntry("forward-prefixes", ','); if (sForwardSubjPrefixes.isEmpty()) sForwardSubjPrefixes << "Fwd:" << "FW:"; - sReplaceForwSubjPrefix = composerGroup.readBoolEntry("tqreplace-forward-prefix", true); + sReplaceForwSubjPrefix = composerGroup.readBoolEntry("replace-forward-prefix", true); } //----------------------------------------------------------------------------- @@ -1469,7 +1469,7 @@ TQString KMMsgBase::stripOffPrefixes( const TQString& str ) // static TQString KMMsgBase::replacePrefixes( const TQString& str, const TQStringList& prefixRegExps, - bool tqreplace, + bool replace, const TQString& newPrefix ) { bool recognized = false; @@ -1489,8 +1489,8 @@ TQString KMMsgBase::replacePrefixes( const TQString& str, TQString tmp = str; if ( rx.search( tmp ) == 0 ) { recognized = true; - if ( tqreplace ) - return tmp.tqreplace( 0, rx.matchedLength(), newPrefix + ' ' ); + if ( replace ) + return tmp.replace( 0, rx.matchedLength(), newPrefix + ' ' ); } } if ( !recognized ) @@ -1508,10 +1508,10 @@ TQString KMMsgBase::cleanSubject() const //----------------------------------------------------------------------------- TQString KMMsgBase::cleanSubject( const TQStringList & prefixRegExps, - bool tqreplace, + bool replace, const TQString & newPrefix ) const { - return KMMsgBase::replacePrefixes( subject(), prefixRegExps, tqreplace, + return KMMsgBase::replacePrefixes( subject(), prefixRegExps, replace, newPrefix ); } diff --git a/kmail/kmmsgbase.h b/kmail/kmmsgbase.h index e3bf0029..94d5d966 100644 --- a/kmail/kmmsgbase.h +++ b/kmail/kmmsgbase.h @@ -414,7 +414,7 @@ public: **/ static TQString replacePrefixes( const TQString& str, const TQStringList& prefixRegExps, - bool tqreplace, + bool replace, const TQString& newPrefix ); /** Returns @p str with all "forward" and "reply" prefixes stripped off. @@ -427,7 +427,7 @@ public: sequence of whitespace-delimited prefixes at the beginning of #subject() is replaced by @p newPrefix **/ - TQString cleanSubject(const TQStringList& prefixRegExps, bool tqreplace, + TQString cleanSubject(const TQStringList& prefixRegExps, bool replace, const TQString& newPrefix) const; /** Return this mails subject, with all "forward" and "reply" diff --git a/kmail/kmmsgdict.cpp b/kmail/kmmsgdict.cpp index 223a8adf..f4943792 100644 --- a/kmail/kmmsgdict.cpp +++ b/kmail/kmmsgdict.cpp @@ -215,15 +215,15 @@ unsigned long KMMsgDict::insert(unsigned long msgSerNum, } if (index == -1) - index = folder->tqfind(msg); + index = folder->find(msg); // Should not happen, indicates id file corruption - while (dict->tqfind((long)msn)) { + while (dict->find((long)msn)) { msn = getNextMsgSerNum(); folder->setDirty( true ); // rewrite id file } - // Insert into the dict. Don't use dict->tqreplace() as we _know_ + // Insert into the dict. Don't use dict->replace() as we _know_ // there is no entry with the same msn, we just made sure. KMMsgDictEntry *entry = new KMMsgDictEntry(folder->folder(), index); dict->insert((long)msn, entry); @@ -246,12 +246,12 @@ unsigned long KMMsgDict::insert(const KMMsgBase *msg, int index) //----------------------------------------------------------------------------- -void KMMsgDict::tqreplace(unsigned long msgSerNum, +void KMMsgDict::replace(unsigned long msgSerNum, const KMMsgBase *msg, int index) { KMFolderIndex* folder = static_cast<KMFolderIndex*>( msg->storage() ); if ( !folder ) { - kdDebug(5006) << "KMMsgDict::tqreplace: Cannot replace the message serial " + kdDebug(5006) << "KMMsgDict::replace: Cannot replace the message serial " << "number, null pointer to storage. Requested serial: " << msgSerNum << endl; kdDebug(5006) << " Message info: Subject: " << msg->subject() << ", To: " @@ -260,7 +260,7 @@ void KMMsgDict::tqreplace(unsigned long msgSerNum, } if ( index == -1 ) - index = folder->tqfind( msg ); + index = folder->find( msg ); remove( msgSerNum ); KMMsgDictEntry *entry = new KMMsgDictEntry( folder->folder(), index ); @@ -279,7 +279,7 @@ void KMMsgDict::tqreplace(unsigned long msgSerNum, void KMMsgDict::remove(unsigned long msgSerNum) { long key = (long)msgSerNum; - KMMsgDictEntry *entry = (KMMsgDictEntry *)dict->tqfind(key); + KMMsgDictEntry *entry = (KMMsgDictEntry *)dict->find(key); if (!entry) return; @@ -319,7 +319,7 @@ void KMMsgDict::update(const KMMsgBase *msg, int index, int newIndex) void KMMsgDict::getLocation(unsigned long key, KMFolder **retFolder, int *retIndex) const { - KMMsgDictEntry *entry = (KMMsgDictEntry *)dict->tqfind((long)key); + KMMsgDictEntry *entry = (KMMsgDictEntry *)dict->find((long)key); if (entry) { *retFolder = (KMFolder *)entry->folder; *retIndex = entry->index; @@ -448,7 +448,7 @@ int KMMsgDict::readFolderIds( FolderStorage& storage ) if (swapByteOrder) msn = kmail_swap_32(msn); - if (!readOk || dict->tqfind(msn)) { + if (!readOk || dict->find(msn)) { for (unsigned int i = 0; i < index; i++) { msn = rentry->getMsn(i); dict->remove((long)msn); @@ -468,7 +468,7 @@ int KMMsgDict::readFolderIds( FolderStorage& storage ) Q_ASSERT( msn != 0 ); } - // Insert into the dict. Don't use dict->tqreplace() as we _know_ + // Insert into the dict. Don't use dict->replace() as we _know_ // there is no entry with the same msn, we just made sure. KMMsgDictEntry *entry = new KMMsgDictEntry( storage.folder(), index); dict->insert((long)msn, entry); diff --git a/kmail/kmmsgdict.h b/kmail/kmmsgdict.h index a1316534..60fabf6c 100644 --- a/kmail/kmmsgdict.h +++ b/kmail/kmmsgdict.h @@ -97,7 +97,7 @@ private: unsigned long insert(const KMMsgBase *msg, int index = -1); /** Set the serial number of @p msg to @p msgSerNum */ - void tqreplace(unsigned long msgSerNum, + void replace(unsigned long msgSerNum, const KMMsgBase *msg, int index = -1); /** Removes a message. */ diff --git a/kmail/kmmsgpart.cpp b/kmail/kmmsgpart.cpp index 9e71f285..447993db 100644 --- a/kmail/kmmsgpart.cpp +++ b/kmail/kmmsgpart.cpp @@ -45,7 +45,7 @@ KMMessagePart::KMMessagePart( TQDataStream & stream ) KPIM::kAsciiToUpper( mOriginalContentTypeStr.data() ); // set the type - int sep = mOriginalContentTypeStr.tqfind('/'); + int sep = mOriginalContentTypeStr.find('/'); mType = mOriginalContentTypeStr.left(sep); mSubtype = mOriginalContentTypeStr.mid(sep+1); @@ -406,7 +406,7 @@ TQCString KMMessagePart::bodyDecoded(void) const //kdWarning( result.length() != (unsigned int)len, 5006 ) // << "KMMessagePart::bodyDecoded(): body is binary but used as text!" << endl; - result = result.tqreplace( "\r\n", "\n" ); // CRLF -> LF conversion + result = result.replace( "\r\n", "\n" ); // CRLF -> LF conversion assert( mBodyDecodedSize < 0 || mBodyDecodedSize == len ); if ( mBodyDecodedSize < 0 ) @@ -425,7 +425,7 @@ void KMMessagePart::magicSetType(bool aAutoDecode) KMimeMagicResult * result = KMimeMagic::self()->findBufferType( body ); TQString mimetype = result->mimeType(); - const int sep = mimetype.tqfind('/'); + const int sep = mimetype.find('/'); mType = mimetype.left(sep).latin1(); mSubtype = mimetype.mid(sep+1).latin1(); } @@ -558,7 +558,7 @@ TQString KMMessagePart::fileName(void) const // Allow for multiple filname*0, filename*1, ... params (defined by RFC 2231) // in the Content-Disposision - if ( mContentDisposition.tqcontains( "filename*", false ) ) { + if ( mContentDisposition.contains( "filename*", false ) ) { // It's RFC 2231 encoded, so extract the file name with the 2231 method str = KMMsgBase::extractRFC2231HeaderField( mContentDisposition, "filename" ); @@ -568,7 +568,7 @@ TQString KMMessagePart::fileName(void) const // Standard RFC 2047-encoded // search the start of the filename - int startOfFilename = mContentDisposition.tqfind("filename=", 0, false); + int startOfFilename = mContentDisposition.find("filename=", 0, false); if (startOfFilename < 0) return TQString(); startOfFilename += 9; @@ -577,10 +577,10 @@ TQString KMMessagePart::fileName(void) const int endOfFilename; if ( '"' == mContentDisposition[startOfFilename] ) { startOfFilename++; // the double quote isn't part of the filename - endOfFilename = mContentDisposition.tqfind('"', startOfFilename) - 1; + endOfFilename = mContentDisposition.find('"', startOfFilename) - 1; } else { - endOfFilename = mContentDisposition.tqfind(';', startOfFilename) - 1; + endOfFilename = mContentDisposition.find(';', startOfFilename) - 1; } if (endOfFilename < 0) endOfFilename = 32767; diff --git a/kmail/kmmsgpartdlg.cpp b/kmail/kmmsgpartdlg.cpp index a56bee17..167ff8de 100644 --- a/kmail/kmmsgpartdlg.cpp +++ b/kmail/kmmsgpartdlg.cpp @@ -370,7 +370,7 @@ void KMMsgPartDialogCompat::setMsgPart( KMMessagePart * aMsgPart ) setMimeType( mMsgPart->typeStr(), mMsgPart->subtypeStr() ); setSize( mMsgPart->decodedSize() ); setInline( mMsgPart->contentDisposition() - .tqfind( TQRegExp("^\\s*inline", false) ) >= 0 ); + .find( TQRegExp("^\\s*inline", false) ) >= 0 ); } @@ -396,7 +396,7 @@ void KMMsgPartDialogCompat::applyChanges() if ( name != TQString( encName ) ) cDisp += "*=" + encName; else - cDisp += "=\"" + encName.tqreplace( '\\', "\\\\" ).tqreplace( '"', "\\\"" ) + '"'; + cDisp += "=\"" + encName.replace( '\\', "\\\\" ).replace( '"', "\\\"" ) + '"'; mMsgPart->setContentDisposition( cDisp ); } @@ -408,7 +408,7 @@ void KMMsgPartDialogCompat::applyChanges() // apply Content-Type: TQCString type = mimeType().latin1(); TQCString subtype; - int idx = type.tqfind('/'); + int idx = type.find('/'); if ( idx < 0 ) subtype = ""; else { diff --git a/kmail/kmreaderwin.cpp b/kmail/kmreaderwin.cpp index b8937dc0..19f0410a 100644 --- a/kmail/kmreaderwin.cpp +++ b/kmail/kmreaderwin.cpp @@ -1694,7 +1694,7 @@ TQString KMReaderWin::writeMessagePartToTempFile( KMMessagePart* aMsgPart, return TQString(); // strip off a leading path - int slashPos = fileName.tqfindRev( '/' ); + int slashPos = fileName.findRev( '/' ); if( -1 != slashPos ) fileName = fileName.mid( slashPos + 1 ); if( fileName.isEmpty() ) @@ -1764,8 +1764,8 @@ int KMReaderWin::msgPartFromUrl(const KURL &aUrl) if (!aUrl.isLocalFile()) return -1; TQString path = aUrl.path(); - uint right = path.tqfindRev('/'); - uint left = path.tqfindRev('.', right); + uint right = path.findRev('/'); + uint left = path.findRev('.', right); bool ok; int res = path.mid(left + 1, right - left - 1).toInt(&ok); @@ -1845,15 +1845,15 @@ bool foundSMIMEData( const TQString aUrl, displayName = ""; libName = ""; keyId = ""; - int i1 = aUrl.tqfind( showCertMan ); + int i1 = aUrl.find( showCertMan ); if( -1 < i1 ) { i1 += showCertMan.length(); - int i2 = aUrl.tqfind(" ### ", i1); + int i2 = aUrl.find(" ### ", i1); if( i1 < i2 ) { displayName = aUrl.mid( i1, i2-i1 ); i1 = i2+5; - i2 = aUrl.tqfind(" ### ", i1); + i2 = aUrl.find(" ### ", i1); if( i1 < i2 ) { libName = aUrl.mid( i1, i2-i1 ); @@ -2577,8 +2577,8 @@ KURL KMReaderWin::tempFileUrlFromPartNode( const partNode * node ) while ( it != end ) { TQString path = *it; it++; - uint right = path.tqfindRev('/'); - uint left = path.tqfindRev('.', right); + uint right = path.findRev('/'); + uint left = path.findRev('.', right); bool ok; int res = path.mid(left + 1, right - left - 1).toInt(&ok); diff --git a/kmail/kmsearchpattern.cpp b/kmail/kmsearchpattern.cpp index 4af3d68a..4c4340a2 100644 --- a/kmail/kmsearchpattern.cpp +++ b/kmail/kmsearchpattern.cpp @@ -33,7 +33,7 @@ using KMail::FilterLog; #include <assert.h> static const char* funcConfigNames[] = - { "tqcontains", "tqcontains-not", "equals", "not-equal", "regexp", + { "contains", "contains-not", "equals", "not-equal", "regexp", "not-regexp", "greater", "less-or-equal", "less", "greater-or-equal", "is-in-addressbook", "is-not-in-addressbook" , "is-in-category", "is-not-in-category", "has-attachment", "has-no-attachment"}; @@ -281,10 +281,10 @@ bool KMSearchRuleString::matches( const DwString & aStr, KMMessage & msg, rc = ( ( function() & 1 ) == 1 ); else { start += headerLen; - size_t stop = aStr.tqfind( '\n', start ); + size_t stop = aStr.find( '\n', start ); char ch = '\0'; while ( stop != DwString::npos && ( ( ch = aStr.at( stop + 1 ) ) == ' ' || ch == '\t' ) ) - stop = aStr.tqfind( '\n', stop + 1 ); + stop = aStr.find( '\n', stop + 1 ); const int len = stop == DwString::npos ? aStr.length() - start : stop - start ; const TQCString codedValue( aStr.data() + start, len + 1 ); const TQString msgContents = KMMsgBase::decodeRFC2047String( codedValue ).stripWhiteSpace(); // FIXME: This needs to be changed for IDN support. @@ -294,11 +294,11 @@ bool KMSearchRuleString::matches( const DwString & aStr, KMMessage & msg, static const DwBoyerMoore to("\nTo: "); static const DwBoyerMoore cc("\nCc: "); static const DwBoyerMoore bcc("\nBcc: "); - // <recipients> "tqcontains" "foo" is true if any of the fields tqcontains + // <recipients> "contains" "foo" is true if any of the fields contains // "foo", while <recipients> "does not contain" "foo" is true if none - // of the fields tqcontains "foo" + // of the fields contains "foo" if ( ( function() & 1 ) == 0 ) { - // positive function, e.g. "tqcontains" + // positive function, e.g. "contains" rc = ( matches( aStr, msg, &to, 2 ) || matches( aStr, msg, &cc, 2 ) || matches( aStr, msg, &bcc, 3 ) ); @@ -419,10 +419,10 @@ bool KMSearchRuleString::matchesInternal( const TQString & msgContents ) const return ( TQString::compare( msgContents.lower(), contents().lower() ) != 0 ); case KMSearchRule::FuncContains: - return ( msgContents.tqfind( contents(), 0, false ) >= 0 ); + return ( msgContents.find( contents(), 0, false ) >= 0 ); case KMSearchRule::FuncContainsNot: - return ( msgContents.tqfind( contents(), 0, false ) < 0 ); + return ( msgContents.find( contents(), 0, false ) < 0 ); case KMSearchRule::FuncRegExp: { @@ -576,10 +576,10 @@ bool KMSearchRuleNumerical::matchesInternal( long numericalValue, return ( numericalValue != numericalMsgContents ); case KMSearchRule::FuncContains: - return ( msgContents.tqfind( contents(), 0, false ) >= 0 ); + return ( msgContents.find( contents(), 0, false ) >= 0 ); case KMSearchRule::FuncContainsNot: - return ( msgContents.tqfind( contents(), 0, false ) < 0 ); + return ( msgContents.find( contents(), 0, false ) < 0 ); case KMSearchRule::FuncRegExp: { diff --git a/kmail/kmsearchpattern.h b/kmail/kmsearchpattern.h index 4c2cb75d..87533a25 100644 --- a/kmail/kmsearchpattern.h +++ b/kmail/kmsearchpattern.h @@ -90,7 +90,7 @@ public: /** Determine whether the rule is worth considering. It isn't if either the field is not set or the contents is empty. - KFilter should make sure that it's rule list tqcontains + KFilter should make sure that it's rule list contains only non-empty rules, as matches doesn't check this. */ virtual bool isEmpty() const = 0; @@ -299,7 +299,7 @@ public: under which it could be stored in the config file. As a TQPtrList with autoDelete enabled, it assumes that it is the - central repository for the rules it tqcontains. So if you want to + central repository for the rules it contains. So if you want to reuse a rule in another pattern, make a deep copy of that rule. @short An abstraction of a search over messages. diff --git a/kmail/kmsender.cpp b/kmail/kmsender.cpp index add46564..987e4928 100644 --- a/kmail/kmsender.cpp +++ b/kmail/kmsender.cpp @@ -404,7 +404,7 @@ void KMSender::doSendMsg() if (mCurrentMsg->tqparent() && !imapSentFolder) { // for speed optimization, this code assumes that mCurrentMsg is the // last one in it's tqparent folder; make sure that's really the case: - assert( mCurrentMsg->tqparent()->tqfind( mCurrentMsg ) + assert( mCurrentMsg->tqparent()->find( mCurrentMsg ) == mCurrentMsg->tqparent()->count() - 1 ); // unGet this message: mCurrentMsg->tqparent()->unGetMsg( mCurrentMsg->tqparent()->count() -1 ); @@ -710,7 +710,7 @@ void KMSender::slotIdle() mFailedMessages++; // reset cached password TQMapIterator <TQString,TQString> pc; - if ( (pc = mPasswdCache.tqfind( mMethodStr )) != mPasswdCache.end() ) { + if ( (pc = mPasswdCache.find( mMethodStr )) != mPasswdCache.end() ) { mPasswdCache.erase(pc); } // Sending of message failed. @@ -800,7 +800,7 @@ KMSendProc* KMSender::createSendProcFromString( const TQString & transport ) mTransportInfo->auth = false; mTransportInfo->encryption = "NONE"; TQString serverport = transport.mid(7); - int colon = serverport.tqfind(':'); + int colon = serverport.find(':'); if (colon != -1) { mTransportInfo->host = serverport.left(colon); mTransportInfo->port = serverport.mid(colon + 1); @@ -815,7 +815,7 @@ KMSendProc* KMSender::createSendProcFromString( const TQString & transport ) mTransportInfo->auth = false; mTransportInfo->encryption = "ssl"; TQString serverport = transport.mid(7); - int colon = serverport.tqfind(':'); + int colon = serverport.find(':'); if (colon != -1) { mTransportInfo->host = serverport.left(colon); mTransportInfo->port = serverport.mid(colon + 1); @@ -1019,7 +1019,7 @@ void KMSendSendmail::receivedStderr(KProcess *proc, char *buffer, int buflen) { assert(proc!=0); Q_UNUSED( proc ); - mLastErrorMessage.tqreplace(mLastErrorMessage.length(), buflen, buffer); + mLastErrorMessage.replace(mLastErrorMessage.length(), buflen, buffer); } @@ -1082,7 +1082,7 @@ bool KMSendSMTP::doSend( const TQString & sender, const TQStringList & to, const if (ti->auth) { - TQMapIterator<TQString,TQString> tpc = mSender->mPasswdCache.tqfind( ti->name ); + TQMapIterator<TQString,TQString> tpc = mSender->mPasswdCache.find( ti->name ); TQString tpwd = ( tpc != mSender->mPasswdCache.end() )?(*tpc):TQString(); if ( ti->passwd().isEmpty() ) diff --git a/kmail/kmservertest.cpp b/kmail/kmservertest.cpp index 67dc0f2d..c7f96ce3 100644 --- a/kmail/kmservertest.cpp +++ b/kmail/kmservertest.cpp @@ -112,17 +112,17 @@ void KMServerTest::slotData(KIO::Job *, const TQString &data) void KMServerTest::slotMetaData( const KIO::MetaData & md ) { - KIO::MetaData::const_iterator it = md.tqfind( "PLAIN AUTH METHODS" ); + KIO::MetaData::const_iterator it = md.find( "PLAIN AUTH METHODS" ); if ( it != md.end() ) { mAuthNone = it.data(); kdDebug(5006) << "mAuthNone: " << mAuthNone << endl; } - it = md.tqfind( "TLS AUTH METHODS" ); + it = md.find( "TLS AUTH METHODS" ); if ( it != md.end() ) { mAuthTLS = it.data(); kdDebug(5006) << "mAuthTLS: " << mAuthTLS << endl; } - it = md.tqfind( "SSL AUTH METHODS" ); + it = md.find( "SSL AUTH METHODS" ); if ( it != md.end() ) { mAuthSSL = it.data(); kdDebug(5006) << "mAuthSSL: " << mAuthSSL << endl; @@ -142,7 +142,7 @@ void KMServerTest::slotSlaveResult(KIO::Slave *aSlave, int error, if (aSlave != mSlave) return; if ( mSSL && error == 0 ) { // add a dummy entry to the list of SSL capabilities so that the receiver - // of the capabilities signal can use mListSSL.isEmpty() in order to tqfind + // of the capabilities signal can use mListSSL.isEmpty() in order to find // out whether SSL is supported mListSSL.append("SSL"); } diff --git a/kmail/kmstartup.cpp b/kmail/kmstartup.cpp index fd3d7bd7..4d82e9e1 100644 --- a/kmail/kmstartup.cpp +++ b/kmail/kmstartup.cpp @@ -173,7 +173,7 @@ void lockOrDie() { path_buffer[length] = '\0'; const TQString path = TQFile::decodeName(path_buffer); kdDebug() << k_funcinfo << path << endl; - const int pos = path.tqfindRev('/'); + const int pos = path.findRev('/'); const TQString fileName = path.mid(pos+1); kdDebug() << "Found process " << oldPid << " running. It's: " << fileName << endl; first_instance = fileName != "kmail" && fileName != "kontact"; diff --git a/kmail/kmsystemtray.cpp b/kmail/kmsystemtray.cpp index 9742d627..1c6bc036 100644 --- a/kmail/kmsystemtray.cpp +++ b/kmail/kmsystemtray.cpp @@ -483,7 +483,7 @@ void KMSystemTray::updateNewMessages() int unread = fldr->countUnread(); TQMap<TQGuardedPtr<KMFolder>, int>::Iterator it = - mFoldersWithUnread.tqfind(fldr); + mFoldersWithUnread.find(fldr); bool unmapped = (it == mFoldersWithUnread.end()); /** If the folder is not mapped yet, increment count by numUnread diff --git a/kmail/kmtransport.cpp b/kmail/kmtransport.cpp index 46ed0efc..e5afc1c6 100644 --- a/kmail/kmtransport.cpp +++ b/kmail/kmtransport.cpp @@ -522,7 +522,7 @@ void KMTransportDialog::makeSmtpPage() mSmtp.authDigestMd5 = new TQRadioButton( i18n("&DIGEST-MD5"), mSmtp.authGroup ); mSmtp.authNTLM = new TQRadioButton( i18n("&NTLM"), mSmtp.authGroup ); mSmtp.authGSSAPI = new TQRadioButton( i18n("&GSSAPI"), mSmtp.authGroup ); - if ( KProtocolInfo::capabilities("smtp").tqcontains("SASL") == 0 ) { + if ( KProtocolInfo::capabilities("smtp").contains("SASL") == 0 ) { mSmtp.authNTLM->hide(); mSmtp.authGSSAPI->hide(); } @@ -735,7 +735,7 @@ void KMTransportDialog::checkHighest(TQButtonGroup *btnGroup) { for ( int i = btnGroup->count() - 1; i >= 0 ; --i ) { - TQButton * btn = btnGroup->tqfind(i); + TQButton * btn = btnGroup->find(i); if (btn && btn->isEnabled()) { btn->animateClick(); @@ -756,7 +756,7 @@ void KMTransportDialog::slotSmtpCapabilities( const TQStringList & capaNormal, << authNone << ", " << authSSL << ", " << authTLS << " )" << endl; mSmtp.encryptionNone->setEnabled( !capaNormal.isEmpty() ); mSmtp.encryptionSSL->setEnabled( !capaSSL.isEmpty() ); - mSmtp.encryptionTLS->setEnabled( capaNormal.tqfindIndex("STARTTLS") != -1 ); + mSmtp.encryptionTLS->setEnabled( capaNormal.findIndex("STARTTLS") != -1 ); if ( authNone.isEmpty() && authSSL.isEmpty() && authTLS.isEmpty() ) { // slave doesn't seem to support "* AUTH METHODS" metadata (or server can't do AUTH) mAuthNone = authMethodsFromStringList( capaNormal ); diff --git a/kmail/listjob.cpp b/kmail/listjob.cpp index e126f3e5..e6726a9a 100644 --- a/kmail/listjob.cpp +++ b/kmail/listjob.cpp @@ -230,7 +230,7 @@ void ListJob::slotListEntries( KIO::Job* job, const KIO::UDSEntryList& uds ) // Some servers send _lots_ of duplicates // This check is too slow for huge lists if ( mSubfolderPaths.count() > 100 || - mSubfolderPaths.tqfindIndex(url.path()) == -1 ) + mSubfolderPaths.findIndex(url.path()) == -1 ) { mSubfolderNames.append( name ); mSubfolderPaths.append( url.path() ); diff --git a/kmail/mailinglist-magic.cpp b/kmail/mailinglist-magic.cpp index 3c9efd14..0b646e94 100644 --- a/kmail/mailinglist-magic.cpp +++ b/kmail/mailinglist-magic.cpp @@ -31,10 +31,10 @@ static TQString check_sender(const KMMessage *message, { header_name = "Sender"; header_value = header; - header = header.mid( 6, header.tqfind( '@' ) - 6 ); + header = header.mid( 6, header.find( '@' ) - 6 ); } else { - int index = header.tqfind( "-owner@ " ); + int index = header.find( "-owner@ " ); if ( index == -1 ) return TQString(); @@ -52,12 +52,12 @@ static TQString check_x_beenthere(const KMMessage *message, TQString &header_value ) { TQString header = message->headerField( "X-BeenThere" ); - if ( header.isNull() || header.tqfind( '@' ) == -1 ) + if ( header.isNull() || header.find( '@' ) == -1 ) return TQString(); header_name = "X-BeenThere"; header_value = header; - header.truncate( header.tqfind( '@' ) ); + header.truncate( header.find( '@' ) ); return header; } @@ -68,13 +68,13 @@ static TQString check_delivered_to(const KMMessage *message, { TQString header = message->headerField( "Delivered-To" ); if ( header.isNull() || header.left(13 ) != "mailing list" - || header.tqfind( '@' ) == -1 ) + || header.find( '@' ) == -1 ) return TQString(); header_name = "Delivered-To"; header_value = header; - return header.mid( 13, header.tqfind( '@' ) - 13 ); + return header.mid( 13, header.find( '@' ) - 13 ); } /* X-Mailing-List: <?([^@]+) */ @@ -86,15 +86,15 @@ static TQString check_x_mailing_list(const KMMessage *message, if ( header.isEmpty() ) return TQString(); - if ( header.tqfind( '@' ) < 1 ) + if ( header.find( '@' ) < 1 ) return TQString(); header_name = "X-Mailing-List"; header_value = header; if ( header[0] == '<' ) - header = header.mid(1, header.tqfind( '@' ) - 1); + header = header.mid(1, header.find( '@' ) - 1); else - header.truncate( header.tqfind( '@' ) ); + header.truncate( header.find( '@' ) ); return header; } @@ -108,11 +108,11 @@ static TQString check_list_id(const KMMessage *message, if ( header.isEmpty() ) return TQString(); - lAnglePos = header.tqfind( '<' ); + lAnglePos = header.find( '<' ); if ( lAnglePos < 0 ) return TQString(); - firstDotPos = header.tqfind( '.', lAnglePos ); + firstDotPos = header.find( '.', lAnglePos ); if ( firstDotPos < 0 ) return TQString(); @@ -132,14 +132,14 @@ static TQString check_list_post(const KMMessage *message, if ( header.isEmpty() ) return TQString(); - int lAnglePos = header.tqfind( "<mailto:" ); + int lAnglePos = header.find( "<mailto:" ); if ( lAnglePos < 0 ) return TQString(); header_name = "List-Post"; header_value = header; header = header.mid( lAnglePos + 8, header.length()); - header.truncate( header.tqfind('@') ); + header.truncate( header.find('@') ); return header; } @@ -152,12 +152,12 @@ static TQString check_mailing_list(const KMMessage *message, if ( header.isEmpty() ) return TQString(); - if (header.left( 5 ) != "list " || header.tqfind( '@' ) < 5 ) + if (header.left( 5 ) != "list " || header.find( '@' ) < 5 ) return TQString(); header_name = "Mailing-List"; header_value = header; - header = header.mid(5, header.tqfind( '@' ) - 5); + header = header.mid(5, header.find( '@' ) - 5); return header; } @@ -170,12 +170,12 @@ static TQString check_x_loop(const KMMessage *message, if ( header.isEmpty() ) return TQString(); - if (header.tqfind( '@' ) < 2 ) + if (header.find( '@' ) < 2 ) return TQString(); header_name = "X-Loop"; header_value = header; - header.truncate(header.tqfind( '@' )); + header.truncate(header.find( '@' )); return header; } @@ -189,7 +189,7 @@ static TQString check_x_ml_name(const KMMessage *message, header_name = "X-ML-Name"; header_value = header; - header.truncate(header.tqfind( '@' )); + header.truncate(header.find( '@' )); return header; } @@ -218,8 +218,8 @@ headerToAddress( const TQString& header ) if ( header.isEmpty() ) return addr; - while ( (start = header.tqfind( "<", start )) != -1 ) { - if ( (end = header.tqfind( ">", ++start ) ) == -1 ) { + while ( (start = header.find( "<", start )) != -1 ) { + if ( (end = header.find( ">", ++start ) ) == -1 ) { kdDebug(5006)<<k_funcinfo<<"Serious mailing list header parsing error !"<<endl; return addr; } diff --git a/kmail/mailinglistpropertiesdialog.cpp b/kmail/mailinglistpropertiesdialog.cpp index 2fb6203d..7caa9817 100644 --- a/kmail/mailinglistpropertiesdialog.cpp +++ b/kmail/mailinglistpropertiesdialog.cpp @@ -257,7 +257,7 @@ void MailingListFolderPropertiesDialog::fillMLFromWidgets() for ( TQStringList::ConstIterator it = oldList.begin(); it != oldList.end(); ++it ) { if ( !(*it).startsWith("http:") && !(*it).startsWith("https:") && - !(*it).startsWith("mailto:") && ( (*it).tqfind('@') != -1 ) ) { + !(*it).startsWith("mailto:") && ( (*it).find('@') != -1 ) ) { changed = true; newList << "mailto:" + *it; } diff --git a/kmail/mboxjob.cpp b/kmail/mboxjob.cpp index 93f94d43..0d46fe8b 100644 --- a/kmail/mboxjob.cpp +++ b/kmail/mboxjob.cpp @@ -89,7 +89,7 @@ MboxJob::startJob() kdDebug(5006)<<msg<<endl; kdDebug(5006)<<this<<endl; kdDebug(5006)<<"Done"<<endl; - //KMMessage* msg = mParent->getMsg( mParent->tqfind( mMsgList.first() ) ); + //KMMessage* msg = mParent->getMsg( mParent->find( mMsgList.first() ) ); msg->setComplete( true ); emit messageRetrieved( msg ); } diff --git a/kmail/messagecomposer.cpp b/kmail/messagecomposer.cpp index cf3357fa..c69aa525 100644 --- a/kmail/messagecomposer.cpp +++ b/kmail/messagecomposer.cpp @@ -1527,7 +1527,7 @@ void MessageComposer::composeMessage( KMMessage& theMessage, innerDwPart->Assemble(); TQByteArray tmpbody = KMail::Util::ByteArray( innerDwPart->AsString() ); if ( mIsRichText ) { // and add our mp/a boundary - int boundPos = tmpbody.tqfind( '\n' ); + int boundPos = tmpbody.find( '\n' ); if( -1 < boundPos ) { TQCString bStr( ";\n boundary=\"" ); bStr += mSaveBoundary.c_str(); @@ -1590,7 +1590,7 @@ void MessageComposer::composeMessage( KMMessage& theMessage, // manually add a boundary definition to the Content-Type header if( !mMultipartMixedBoundary.isEmpty() ) { - int boundPos = mEncodedBody.tqfind( '\n' ); + int boundPos = mEncodedBody.find( '\n' ); if( -1 < boundPos ) { // insert new "boundary" parameter TQCString bStr( ";\n boundary=\"" ); @@ -1928,7 +1928,7 @@ bool MessageComposer::processStructuringInfo( const TQString bugURL, const TQCString boundaryCStr = KMime::multiPartBoundary(); // add "boundary" parameter if ( makeMultiMime( format, signing ) ) - mainHeader.tqreplace( "%boundary", boundaryCStr ); + mainHeader.replace( "%boundary", boundaryCStr ); if ( toplevelCT ) { if ( const char * str = toplevelContentDisposition( format, signing ) ) { diff --git a/kmail/messagecopyhelper.cpp b/kmail/messagecopyhelper.cpp index 84618ea8..91692016 100644 --- a/kmail/messagecopyhelper.cpp +++ b/kmail/messagecopyhelper.cpp @@ -43,7 +43,7 @@ MessageCopyHelper::MessageCopyHelper( const TQValueList< TQ_UINT32 > & msgs, continue; if ( f == dest ) continue; // already there - if ( !mOpenFolders.tqcontains( f ) ) {// not yet opened + if ( !mOpenFolders.contains( f ) ) {// not yet opened f->open( "messagecopyhelper" ); mOpenFolders.insert( f, 0 ); } diff --git a/kmail/messageproperty.cpp b/kmail/messageproperty.cpp index 91261540..b8b37f91 100644 --- a/kmail/messageproperty.cpp +++ b/kmail/messageproperty.cpp @@ -42,14 +42,14 @@ TQMap<const KMMsgBase*, long > MessageProperty::sSerialCache; bool MessageProperty::filtering( TQ_UINT32 serNum ) { - return sFolders.tqcontains( serNum ); + return sFolders.contains( serNum ); } void MessageProperty::setFiltering( TQ_UINT32 serNum, bool filter ) { assert(!filtering(serNum) || !filter); if (filter && !filtering(serNum)) - sFolders.tqreplace(serNum, TQGuardedPtr<KMFolder>(0) ); + sFolders.replace(serNum, TQGuardedPtr<KMFolder>(0) ); else if (!filter) sFolders.remove(serNum); } @@ -66,7 +66,7 @@ void MessageProperty::setFiltering( const KMMsgBase *msgBase, bool filter ) KMFolder* MessageProperty::filterFolder( TQ_UINT32 serNum ) { - TQMap<TQ_UINT32, TQGuardedPtr<KMFolder> >::const_iterator it = sFolders.tqfind( serNum ); + TQMap<TQ_UINT32, TQGuardedPtr<KMFolder> >::const_iterator it = sFolders.find( serNum ); return it == sFolders.constEnd() ? 0 : (*it).operator->(); } @@ -87,7 +87,7 @@ void MessageProperty::setFilterFolder( const KMMsgBase *msgBase, KMFolder* folde ActionScheduler* MessageProperty::filterHandler( TQ_UINT32 serNum ) { - TQMap<TQ_UINT32, TQGuardedPtr<ActionScheduler> >::const_iterator it = sHandlers.tqfind( serNum ); + TQMap<TQ_UINT32, TQGuardedPtr<ActionScheduler> >::const_iterator it = sHandlers.find( serNum ); return it == sHandlers.constEnd() ? 0 : (*it).operator->(); } @@ -111,14 +111,14 @@ void MessageProperty::setFilterHandler( const KMMsgBase *msgBase, ActionSchedule bool MessageProperty::transferInProgress( TQ_UINT32 serNum ) { - TQMap<TQ_UINT32, int >::const_iterator it = sTransfers.tqfind( serNum ); + TQMap<TQ_UINT32, int >::const_iterator it = sTransfers.find( serNum ); return it == sTransfers.constEnd() ? false : *it; } void MessageProperty::setTransferInProgress( TQ_UINT32 serNum, bool transfer, bool force ) { int transferInProgress = 0; - TQMap<TQ_UINT32, int >::const_iterator it = sTransfers.tqfind( serNum ); + TQMap<TQ_UINT32, int >::const_iterator it = sTransfers.find( serNum ); if (it != sTransfers.constEnd()) transferInProgress = *it; if ( force && !transfer ) @@ -145,7 +145,7 @@ void MessageProperty::setTransferInProgress( const KMMsgBase *msgBase, bool tran TQ_UINT32 MessageProperty::serialCache( const KMMsgBase *msgBase ) { - TQMap<const KMMsgBase*, long >::const_iterator it = sSerialCache.tqfind( msgBase ); + TQMap<const KMMsgBase*, long >::const_iterator it = sSerialCache.find( msgBase ); return it == sSerialCache.constEnd() ? 0 : *it; } diff --git a/kmail/mh2kmailr b/kmail/mh2kmailr index df76fec1..d88905aa 100755 --- a/kmail/mh2kmailr +++ b/kmail/mh2kmailr @@ -14,13 +14,13 @@ fi MH_DIR=$1 -for d in `/usr/bin/tqfind $MH_DIR -type d -print|sed -e :a -e 's/^.\{1,5\}$/ &/;ta'|sort`; do +for d in `/usr/bin/find $MH_DIR -type d -print|sed -e :a -e 's/^.\{1,5\}$/ &/;ta'|sort`; do FOLDER=${d}.mbx # remove old kmail folder if any rm -f $FOLDER -for f in `/usr/bin/tqfind $d -type f -maxdepth 1 -print|sed -e :a -e 's/^.\{1,5\}$/ &/;ta'|sort`; do +for f in `/usr/bin/find $d -type f -maxdepth 1 -print|sed -e :a -e 's/^.\{1,5\}$/ &/;ta'|sort`; do echo "From ???@??? 00:00:00 1997 +0000" >> $FOLDER cat $f >> $FOLDER done diff --git a/kmail/networkaccount.cpp b/kmail/networkaccount.cpp index b400b52a..fa719c53 100644 --- a/kmail/networkaccount.cpp +++ b/kmail/networkaccount.cpp @@ -321,7 +321,7 @@ namespace KMail { if ( host().isEmpty() ) return; if ( checking ) { - if ( s_serverConnections.tqfind( host() ) != s_serverConnections.end() ) + if ( s_serverConnections.find( host() ) != s_serverConnections.end() ) s_serverConnections[host()] += 1; else s_serverConnections[host()] = 1; @@ -329,7 +329,7 @@ namespace KMail { << host() << " now is " << s_serverConnections[host()] << endl; } else { - if ( s_serverConnections.tqfind( host() ) != s_serverConnections.end() && + if ( s_serverConnections.find( host() ) != s_serverConnections.end() && s_serverConnections[host()] > 0 ) { s_serverConnections[host()] -= 1; kdDebug(5006) << "connections to server " << host() @@ -344,12 +344,12 @@ namespace KMail { kdDebug(5006) << "for host " << host() << " current connections=" - << (s_serverConnections.tqfind(host())==s_serverConnections.end() ? 0 : s_serverConnections[host()]) + << (s_serverConnections.find(host())==s_serverConnections.end() ? 0 : s_serverConnections[host()]) << " and limit is " << GlobalSettings::self()->maxConnectionsPerHost() << endl; bool connectionLimitForHostReached = !host().isEmpty() && GlobalSettings::self()->maxConnectionsPerHost() > 0 - && s_serverConnections.tqfind( host() ) != s_serverConnections.end() + && s_serverConnections.find( host() ) != s_serverConnections.end() && s_serverConnections[host()] >= GlobalSettings::self()->maxConnectionsPerHost(); kdDebug(5006) << "connection limit reached: " << connectionLimitForHostReached << endl; diff --git a/kmail/newfolderdialog.cpp b/kmail/newfolderdialog.cpp index d1e7de22..11a52043 100644 --- a/kmail/newfolderdialog.cpp +++ b/kmail/newfolderdialog.cpp @@ -121,7 +121,7 @@ NewFolderDialog::NewFolderDialog( TQWidget* tqparent, KMFolder *folder ) mContentsHBox = new TQHBoxLayout( 0, 0, 6, "mContentsHBox"); mContentsLabel = new TQLabel( privateLayoutWidget, "mContentsLabel" ); - mContentsLabel->setText( i18n( "Folder &tqcontains:" ) ); + mContentsLabel->setText( i18n( "Folder &contains:" ) ); mContentsHBox->addWidget( mContentsLabel ); mContentsComboBox = new TQComboBox( false, privateLayoutWidget, "mContentsComboBox" ); diff --git a/kmail/objecttreeparser.cpp b/kmail/objecttreeparser.cpp index 0b79d98c..db27f7f5 100644 --- a/kmail/objecttreeparser.cpp +++ b/kmail/objecttreeparser.cpp @@ -804,9 +804,9 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, TQByteArray ciphertext( data.msgPart().bodyDecodedBinary() ); #ifdef MARCS_DEBUG TQCString cipherStr( ciphertext.data(), ciphertext.size() + 1 ); - bool cipherIsBinary = (-1 == cipherStr.tqfind("BEGIN ENCRYPTED MESSAGE", 0, false) ) && - (-1 == cipherStr.tqfind("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) && - (-1 == cipherStr.tqfind("BEGIN PGP MESSAGE", 0, false) ); + bool cipherIsBinary = (-1 == cipherStr.find("BEGIN ENCRYPTED MESSAGE", 0, false) ) && + (-1 == cipherStr.find("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) && + (-1 == cipherStr.find("BEGIN PGP MESSAGE", 0, false) ); dumpToFile( "dat_04_reader.encrypted", ciphertext.data(), ciphertext.size() ); @@ -916,9 +916,9 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, // ### while pinentry-qt appears) TQByteArray ciphertext( data.msgPart().bodyDecodedBinary() ); TQCString cipherStr( ciphertext.data(), ciphertext.size() + 1 ); - bool cipherIsBinary = (-1 == cipherStr.tqfind("BEGIN ENCRYPTED MESSAGE", 0, false) ) && - (-1 == cipherStr.tqfind("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) && - (-1 == cipherStr.tqfind("BEGIN PGP MESSAGE", 0, false) ); + bool cipherIsBinary = (-1 == cipherStr.find("BEGIN ENCRYPTED MESSAGE", 0, false) ) && + (-1 == cipherStr.find("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) && + (-1 == cipherStr.find("BEGIN PGP MESSAGE", 0, false) ); if ( !cipherIsBinary ) { decryptedData = cipherStr; } @@ -939,12 +939,12 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, bool ObjectTreeParser::containsExternalReferences( const TQCString & str ) { TQRegExp httpRegExp("(\\\"|\\\'|url\\s*\\(\\s*)http[s]?:"); - int httpPos = str.tqfind( httpRegExp, 0 ); + int httpPos = str.find( httpRegExp, 0 ); while ( httpPos >= 0 ) { // look backwards for "href" if ( httpPos > 5 ) { - int hrefPos = str.tqfindRev( "href", httpPos - 5, true ); + int hrefPos = str.findRev( "href", httpPos - 5, true ); // if no 'href' is found or the distance between 'href' and '"http[s]:' // is larger than 7 (7 is the distance in 'href = "http[s]:') then // we assume that we have found an external reference @@ -952,7 +952,7 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, return true; } // find next occurrence of "http: or "https: - httpPos = str.tqfind( httpRegExp, httpPos + 6 ); + httpPos = str.find( httpRegExp, httpPos + 6 ); } return false; } @@ -979,12 +979,12 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, // We must fo this, or else we will see only 1st inlined html // attachment. It is IMHO enough to search only for </BODY> and // put \0 there. - int i = cstr.tqfindRev("</body>", -1, false); //case insensitive + int i = cstr.findRev("</body>", -1, false); //case insensitive if ( 0 <= i ) cstr.truncate(i); else // just in case - search for </html> { - i = cstr.tqfindRev("</html>", -1, false); //case insensitive + i = cstr.findRev("</html>", -1, false); //case insensitive if ( 0 <= i ) cstr.truncate(i); } // ---Sven's strip </BODY> and </HTML> from end of attachment end- @@ -1031,7 +1031,7 @@ static bool isMailmanMessage( partNode * curNode ) { return true; if ( headers.HasField("X-Mailer") && 0 == TQCString( headers.FieldBody("X-Mailer").AsString().c_str() ) - .tqfind("MAILMAN", 0, false) ) + .find("MAILMAN", 0, false) ) return true; return false; } @@ -1047,21 +1047,21 @@ namespace KMail { const TQCString delimZ2("--__--__--\n\n_____________"); const TQCString delimZ1("--__--__--\r\n\r\n_____________"); TQCString partStr, digestHeaderStr; - int thisDelim = cstr.tqfind(delim1.data(), 0, false); + int thisDelim = cstr.find(delim1.data(), 0, false); if ( thisDelim == -1 ) - thisDelim = cstr.tqfind(delim2.data(), 0, false); + thisDelim = cstr.find(delim2.data(), 0, false); if ( thisDelim == -1 ) { kdDebug(5006) << " Sorry: Old style Mailman message but no delimiter found." << endl; return false; } - int nextDelim = cstr.tqfind(delim1.data(), thisDelim+1, false); + int nextDelim = cstr.find(delim1.data(), thisDelim+1, false); if ( -1 == nextDelim ) - nextDelim = cstr.tqfind(delim2.data(), thisDelim+1, false); + nextDelim = cstr.find(delim2.data(), thisDelim+1, false); if ( -1 == nextDelim ) - nextDelim = cstr.tqfind(delimZ1.data(), thisDelim+1, false); + nextDelim = cstr.find(delimZ1.data(), thisDelim+1, false); if ( -1 == nextDelim ) - nextDelim = cstr.tqfind(delimZ2.data(), thisDelim+1, false); + nextDelim = cstr.find(delimZ2.data(), thisDelim+1, false); if ( nextDelim < 0) return false; @@ -1081,15 +1081,15 @@ namespace KMail { curNode->setType( DwMime::kTypeMultipart ); curNode->setSubType( DwMime::kSubtypeDigest ); while( -1 < nextDelim ){ - int thisEoL = cstr.tqfind("\nMessage:", thisDelim, false); + int thisEoL = cstr.find("\nMessage:", thisDelim, false); if ( -1 < thisEoL ) thisDelim = thisEoL+1; else{ - thisEoL = cstr.tqfind("\n_____________", thisDelim, false); + thisEoL = cstr.find("\n_____________", thisDelim, false); if ( -1 < thisEoL ) thisDelim = thisEoL+1; } - thisEoL = cstr.tqfind('\n', thisDelim); + thisEoL = cstr.find('\n', thisDelim); if ( -1 < thisEoL ) thisDelim = thisEoL+1; else @@ -1101,10 +1101,10 @@ namespace KMail { partStr += cstr.mid( thisDelim, nextDelim-thisDelim ); TQCString subject("embedded message"); TQCString subSearch("\nSubject:"); - int subPos = partStr.tqfind(subSearch.data(), 0, false); + int subPos = partStr.find(subSearch.data(), 0, false); if ( -1 < subPos ){ subject = partStr.mid(subPos+subSearch.length()); - thisEoL = subject.tqfind('\n'); + thisEoL = subject.find('\n'); if ( -1 < thisEoL ) subject.truncate( thisEoL ); } @@ -1114,21 +1114,21 @@ namespace KMail { subject, true ); //mReader->queueHtml("<br><hr><br>"); thisDelim = nextDelim+1; - nextDelim = cstr.tqfind(delim1.data(), thisDelim, false); + nextDelim = cstr.find(delim1.data(), thisDelim, false); if ( -1 == nextDelim ) - nextDelim = cstr.tqfind(delim2.data(), thisDelim, false); + nextDelim = cstr.find(delim2.data(), thisDelim, false); if ( -1 == nextDelim ) - nextDelim = cstr.tqfind(delimZ1.data(), thisDelim, false); + nextDelim = cstr.find(delimZ1.data(), thisDelim, false); if ( -1 == nextDelim ) - nextDelim = cstr.tqfind(delimZ2.data(), thisDelim, false); + nextDelim = cstr.find(delimZ2.data(), thisDelim, false); } // reset curent node's Content-Type curNode->setType( DwMime::kTypeText ); curNode->setSubType( DwMime::kSubtypePlain ); - int thisEoL = cstr.tqfind("_____________", thisDelim); + int thisEoL = cstr.find("_____________", thisDelim); if ( -1 < thisEoL ){ thisDelim = thisEoL; - thisEoL = cstr.tqfind('\n', thisDelim); + thisEoL = cstr.find('\n', thisDelim); if ( -1 < thisEoL ) thisDelim = thisEoL+1; } @@ -1720,7 +1720,7 @@ namespace KMail { bool isSigned = smimeType == "signed-data"; bool isEncrypted = smimeType == "enveloped-data"; - // Analyze "signTestNode" node to tqfind/verify a signature. + // Analyze "signTestNode" node to find/verify a signature. // If zero this verification was successfully done after // decrypting via recursion by insertAndParseNewChildNode(). partNode* signTestNode = isEncrypted ? 0 : node; @@ -2252,7 +2252,7 @@ TQString ObjectTreeParser::sigStatusToString( const Kleo::CryptoBackend::Protoco } /* // add i18n support for 3rd party plug-ins here: - else if (0 <= cryptPlug->libName().tqfind( "yetanotherpluginname", 0, false )) { + else if (0 <= cryptPlug->libName().find( "yetanotherpluginname", 0, false )) { } */ @@ -2982,7 +2982,7 @@ TQString ObjectTreeParser::quotedHTML( const TQString& s, bool decorate ) TQString line; /* search next occurrence of '\n' */ - pos = s.tqfind('\n', beg, FALSE); + pos = s.find('\n', beg, FALSE); if (pos == (unsigned int)(-1)) pos = length; @@ -3083,7 +3083,7 @@ TQString ObjectTreeParser::quotedHTML( const TQString& s, bool decorate ) { // don't write empty <div ...></div> blocks (they have zero height) // ignore ^M DOS linebreaks - if( !line.tqreplace('\015', "").isEmpty() ) + if( !line.replace('\015', "").isEmpty() ) { htmlStr +=TQString( "<div dir=\"%1\">" ).tqarg( line.isRightToLeft() ? "rtl":"ltr" ); htmlStr += LinkLocator::convertToHtml( line, convertFlags ); diff --git a/kmail/objecttreeparser.h b/kmail/objecttreeparser.h index 2325b242..b864ea61 100644 --- a/kmail/objecttreeparser.h +++ b/kmail/objecttreeparser.h @@ -253,7 +253,7 @@ namespace KMail { bool processToltecMail( partNode * node ); /** Checks whether @p str contains external references. To be precise, - we only check whether @p str tqcontains 'xxx="http[s]:' where xxx is + we only check whether @p str contains 'xxx="http[s]:' where xxx is not href. Obfuscated external references are ignored on purpose. */ static bool containsExternalReferences( const |