diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
commit | 7346aee26bf190a7e70333c40fab4caca847cd27 (patch) | |
tree | 4b019b434f88dcc3eeaafe1d3f26240b4c4718e8 /konq-plugins/akregator/feeddetector.cpp | |
parent | 23a3d3aa5b44cbdf305495919866d9dbf4f6da54 (diff) | |
download | tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.tar.gz tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konq-plugins/akregator/feeddetector.cpp')
-rw-r--r-- | konq-plugins/akregator/feeddetector.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/konq-plugins/akregator/feeddetector.cpp b/konq-plugins/akregator/feeddetector.cpp index 928a282..57a333c 100644 --- a/konq-plugins/akregator/feeddetector.cpp +++ b/konq-plugins/akregator/feeddetector.cpp @@ -22,10 +22,10 @@ without including the source code for Qt in the source distribution. */ -#include <qregexp.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qvaluelist.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqvaluelist.h> #include <kcharsets.h> #include "feeddetector.h" @@ -33,26 +33,26 @@ using namespace Akregator; -FeedDetectorEntryList FeedDetector::extractFromLinkTags(const QString& s) +FeedDetectorEntryList FeedDetector::extractFromLinkTags(const TQString& s) { //reduce all sequences of spaces, newlines etc. to one space: - QString str = s.simplifyWhiteSpace(); + TQString str = s.simplifyWhiteSpace(); // extracts <link> tags - QRegExp reLinkTag("<[\\s]?LINK[^>]*REL[\\s]?=[\\s]?\\\"[\\s]?(ALTERNATE|SERVICE\\.FEED)[\\s]?\\\"[^>]*>", false); + TQRegExp reLinkTag("<[\\s]?LINK[^>]*REL[\\s]?=[\\s]?\\\"[\\s]?(ALTERNATE|SERVICE\\.FEED)[\\s]?\\\"[^>]*>", false); // extracts the URL (href="url") - QRegExp reHref("HREF[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false); + TQRegExp reHref("HREF[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false); // extracts type attribute - QRegExp reType("TYPE[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false); + TQRegExp reType("TYPE[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false); // extracts the title (title="title") - QRegExp reTitle("TITLE[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false); + TQRegExp reTitle("TITLE[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false); int pos = 0; int matchpos = 0; // get all <link> tags - QStringList linkTags; + TQStringList linkTags; //int strlength = str.length(); while ( matchpos != -1 ) { @@ -66,9 +66,9 @@ FeedDetectorEntryList FeedDetector::extractFromLinkTags(const QString& s) FeedDetectorEntryList list; - for ( QStringList::Iterator it = linkTags.begin(); it != linkTags.end(); ++it ) + for ( TQStringList::Iterator it = linkTags.begin(); it != linkTags.end(); ++it ) { - QString type; + TQString type; int pos = reType.search(*it, 0); if (pos != -1) type = reType.cap(1).lower(); @@ -78,14 +78,14 @@ FeedDetectorEntryList FeedDetector::extractFromLinkTags(const QString& s) && type != "application/atom+xml" && type != "text/xml" ) continue; - QString title; + TQString title; pos = reTitle.search(*it, 0); if (pos != -1) title = reTitle.cap(1); title = KCharsets::resolveEntities(title); - QString url; + TQString url; pos = reHref.search(*it, 0); if (pos != -1) url = reHref.cap(1); @@ -104,33 +104,33 @@ FeedDetectorEntryList FeedDetector::extractFromLinkTags(const QString& s) return list; } -QStringList FeedDetector::extractBruteForce(const QString& s) +TQStringList FeedDetector::extractBruteForce(const TQString& s) { - QString str = s.simplifyWhiteSpace(); + TQString str = s.simplifyWhiteSpace(); - QRegExp reAhrefTag("<[\\s]?A[^>]?HREF=[\\s]?\\\"[^\\\"]*\\\"[^>]*>", false); + TQRegExp reAhrefTag("<[\\s]?A[^>]?HREF=[\\s]?\\\"[^\\\"]*\\\"[^>]*>", false); // extracts the URL (href="url") - QRegExp reHref("HREF[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false); + TQRegExp reHref("HREF[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false); - QRegExp rssrdfxml(".*(RSS|RDF|XML)", false); + TQRegExp rssrdfxml(".*(RSS|RDF|XML)", false); int pos = 0; int matchpos = 0; // get all <a href> tags and capture url - QStringList list; + TQStringList list; //int strlength = str.length(); while ( matchpos != -1 ) { matchpos = reAhrefTag.search(str, pos); if ( matchpos != -1 ) { - QString ahref = str.mid(matchpos, reAhrefTag.matchedLength()); + TQString ahref = str.mid(matchpos, reAhrefTag.matchedLength()); int hrefpos = reHref.search(ahref, 0); if ( hrefpos != -1 ) { - QString url = reHref.cap(1); + TQString url = reHref.cap(1); url = KCharsets::resolveEntities(url); |