summaryrefslogtreecommitdiffstats
path: root/konq-plugins/akregator/feeddetector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'konq-plugins/akregator/feeddetector.cpp')
-rw-r--r--konq-plugins/akregator/feeddetector.cpp46
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);