Work on guessing feeds.

This commit is contained in:
Martin Rotter 2014-02-05 20:08:29 +01:00
parent b16d14e175
commit db9b6c3c0a
3 changed files with 18 additions and 2 deletions

View File

@ -44,6 +44,17 @@ FeedsModelStandardFeed *FeedsModelStandardFeed::loadFromRecord(const QSqlRecord
return feed; return feed;
} }
FeedsModelStandardFeed *FeedsModelStandardFeed::guessFeed(const QString &url,
const QString &username,
const QString &password) {
// TODO: http://www.google.com/s2/favicons?domain=root.cz
// ZISKAT ikonu (napsat taky aby se dala ikona pro
// dane url ziskavat taky samostatne
// pak ziskat informace o kanalu
return NULL;
}
QVariant FeedsModelStandardFeed::data(int column, int role) const { QVariant FeedsModelStandardFeed::data(int column, int role) const {
switch (role) { switch (role) {
case Qt::DisplayRole: case Qt::DisplayRole:

View File

@ -81,6 +81,13 @@ class FeedsModelStandardFeed : public FeedsModelFeed {
// Loads standard feed object from given SQL record. // Loads standard feed object from given SQL record.
static FeedsModelStandardFeed *loadFromRecord(const QSqlRecord &record); static FeedsModelStandardFeed *loadFromRecord(const QSqlRecord &record);
// Tries to guess feed hidden under given URL
// and uses given credentials.
// Returns NULL if something failed.
static FeedsModelStandardFeed *guessFeed(const QString &url,
const QString &username,
const QString &password);
protected: protected:
// Persistently stores given messages into the database // Persistently stores given messages into the database
// and updates existing messages if newer version is // and updates existing messages if newer version is

View File

@ -10,8 +10,6 @@ namespace Ui {
class FormStandardFeedDetails; class FormStandardFeedDetails;
} }
// TODO: http://fvicon.com/
class FeedsModel; class FeedsModel;
class FeedsModelStandardFeed; class FeedsModelStandardFeed;
class FeedsModelCategory; class FeedsModelCategory;