[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/base/plasma
From: Christian Weilbach <christian () whiletaker ! homeip ! net>
Date: 2008-08-20 16:18:35
Message-ID: 1219249115.445296.32475.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 850012 by weilbach:
Replace "..." as the url seperator in RSS with " " (whitespace) as this is a good \
seperator (needs to be escaped in urls) for urls and is good for config dialogs as \
well.
M +2 -6 applets/news/news.cpp
M +7 -11 applets/rssnow/news.cpp
M +5 -5 engines/rss/rss.cpp
M +1 -1 engines/rss/rss.h
--- trunk/playground/base/plasma/applets/news/news.cpp #850011:850012
@@ -115,7 +115,7 @@
// as well
foreach (QString feed, m_feeds) {
feedstring.append(feed);
- feedstring.append("...");
+ feedstring.append(" ");
}
m_feedstring = feedstring;
@@ -182,11 +182,7 @@
ui.firstKColorButton->setColor(m_firstColor);
ui.secondKColorButton->setColor(m_secondColor);
- foreach (QString feed, m_feeds){
- feed.replace("...","");
- ui.feedList->addItem(feed);
- }
-
+ ui.feedList->addItems(m_feeds);
}
void News::addFeed()
--- trunk/playground/base/plasma/applets/rssnow/news.cpp #850011:850012
@@ -160,11 +160,7 @@
ui.showDropTarget->setCheckState(Qt::Unchecked);
}
- QString feedstring;
- foreach (QString feed, m_feedlist) {
- feed.replace("...","");
- ui.feedList->addItem(feed);
- }
+ ui.feedList->addItems(m_feedlist);
parent->addPage(widget, i18n("Configure News"));
}
@@ -303,11 +299,11 @@
//FIXME: yeah, using strings her is ugly, but nested lists give
//issues with KConfigGroup. This could be done better though.
// it causes bugs, too! see the spiegel.de rss which url contains ","
- // i have fixed the rss dataengine as well so now "..." is standard
+ // i have fixed the rss dataengine as well so now " " is standard
QString feeds;
foreach (KUrl feed, urls){
feeds.append(QString(feed.prettyUrl()));
- feeds.append("...");
+ feeds.append(" ");
}
int start = 0;
@@ -324,8 +320,8 @@
if (m_showdroptarget && (i == (m_layout->count() - 1))) {
m_feedlist.append(feeds);
} else {
- if (!m_feedlist[i-start].endsWith("...")) {
- m_feedlist[i-start].append("...");
+ if (!m_feedlist[i-start].endsWith(" ")) {
+ m_feedlist[i-start].append(" ");
}
m_feedlist[i-start].append(feeds);
}
@@ -354,8 +350,8 @@
//group all feeds together so it can fit:
QString allfeeds;
foreach (QString feed, m_feedlist) {
- if (!feed.endsWith("...")) {
- feed.append("...");
+ if (!feed.endsWith(" ")) {
+ feed.append(" ");
}
allfeeds.append(feed);
}
--- trunk/playground/base/plasma/engines/rss/rss.cpp #850011:850012
@@ -73,9 +73,9 @@
*/
// NOTE: A comma seperated list of feeds is not url compliant. Urls
// may and do contain commas see \
http://www.spiegel.de/schlagzeilen/rss/0,5291,,00.xml
- // I have changed it to something more not url compliant "..." three dots
+ // I have changed it to something more not url compliant " " three dots
// Otherwise take a list instead
- QStringList sources = name.split("...", QString::SkipEmptyParts);
+ QStringList sources = name.split(" ", QString::SkipEmptyParts);
foreach (QString source, sources) {
// Let's first see if we've got a recent cached version of
@@ -235,7 +235,7 @@
*/
QVariantList list = mergeFeeds(source);
setData(source, "items", list);
- QStringList sources = source.split("...", QString::SkipEmptyParts);
+ QStringList sources = source.split(" ", QString::SkipEmptyParts);
if (sources.size() > 1) {
setData(source, "title", i18n("%1 RSS feeds fetched", sources.size()));
} else {
@@ -245,7 +245,7 @@
bool RssEngine::cachesUpToDate(const QString & source) const
{
- QStringList sources = source.split("...", QString::SkipEmptyParts);
+ QStringList sources = source.split(" ", QString::SkipEmptyParts);
bool outOfDate = false;
foreach (QString url, sources) {
if (QDateTime::currentDateTime() >
@@ -267,7 +267,7 @@
QVariantList RssEngine::mergeFeeds(QString source) const
{
QVariantList result;
- QStringList sources = source.split("...", QString::SkipEmptyParts);
+ QStringList sources = source.split(" ", QString::SkipEmptyParts);
foreach (QString feed, sources) {
result += m_feedItems[feed.toLower()];
--- trunk/playground/base/plasma/engines/rss/rss.h #850011:850012
@@ -32,7 +32,7 @@
/**
* This class can be used to fetch one or more rss feeds. By
* requesting a datasource with the url's of one or more rss
- * feeds seperated by "...", you will receive a merged list
+ * feeds seperated by " ", you will receive a merged list
* containing the items of all feeds requested. This list is
* sorted by timestamp.
* This class also fetches the favicons from all requested
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic