Added some sample feeds.
This commit is contained in:
parent
6476552aaa
commit
0b0451abbf
@ -65,18 +65,16 @@ CREATE TABLE IF NOT EXISTS Messages (
|
|||||||
FOREIGN KEY (feed) REFERENCES Feeds (id)
|
FOREIGN KEY (feed) REFERENCES Feeds (id)
|
||||||
);
|
);
|
||||||
-- !
|
-- !
|
||||||
INSERT INTO Feeds (title, date_created, category, encoding, url, type) VALUES ('qqq', '1994-11-05T08:15:30-05:00', 0, 'UTF-8', 'http://www.seznam2.cz', 1);
|
INSERT INTO Categories (id, parent_id, title, description, date_created, type) VALUES (1, -1, 'Linux', 'Collections of GNU/Linux-related feeds.', '2013-12-20T08:00:00-05:00', 0);
|
||||||
-- !
|
-- !
|
||||||
INSERT INTO Feeds (title, date_created, category, encoding, url, type) VALUES ('vwvw', '1994-11-05T08:15:30-05:00', 1, 'UTF-8', 'http://www.seznam3.cz', 1);
|
INSERT INTO Categories (id, parent_id, title, description, date_created, type) VALUES (2, -1, 'RSS Guard', 'News and updates on RSS Guard.', '2013-12-20T08:00:00-05:00', 0);
|
||||||
-- !
|
-- !
|
||||||
INSERT INTO Feeds (title, date_created, category, encoding, url, type) VALUES ('cbcd', '1994-11-05T08:15:30-05:00', -1, 'UTF-8', 'http://www.seznam1.cz', 1);
|
INSERT INTO Feeds (title, description, date_created, category, encoding, url, type) VALUES ('Linux Today', 'Linux Today - Linux News on Internet Time.', '2013-12-20T08:00:00-05:00', 1, 'UTF-8', 'http://feeds.feedburner.com/linuxtoday/linux?format=xml', 2);
|
||||||
-- !
|
-- !
|
||||||
INSERT INTO Feeds (title, date_created, category, encoding, url, type) VALUES ('attt', '1994-11-05T08:15:30-05:00', 1, 'UTF-8', 'http://www.seznam4.cz', 0);
|
INSERT INTO Feeds (title, description, date_created, category, encoding, url, type) VALUES ('LinuxInsider', 'LinuxInsider: Linux News & Information from Around the World.', '2013-12-20T08:00:00-05:00', 1, 'UTF-8', 'http://www.linuxinsider.com/perl/syndication/rssfull.pl', 3);
|
||||||
-- !
|
-- !
|
||||||
INSERT INTO Feeds (title, date_created, category, encoding, url, type) VALUES ('ahht', '1994-11-05T08:15:30-05:00', -1, 'UTF-8', 'http://www.seznam6.cz', 0);
|
INSERT INTO Feeds (title, description, date_created, category, encoding, url, type) VALUES ('Recent Commits', 'Recent commits for RSS Guard project.', '2013-12-20T08:00:00-05:00', 2, 'UTF-8', 'https://github.com/martinrotter/rssguard/commits/master.atom', 4);
|
||||||
-- !
|
-- !
|
||||||
INSERT INTO Categories (id, parent_id, title, date_created, type) VALUES (1, 0, 'bbb', '1994-11-05T08:15:30-05:00', 0);
|
INSERT INTO Feeds (title, description, date_created, category, encoding, url, type) VALUES ('Releases', 'Releases for RSS Guard.', '2013-12-20T08:00:00-05:00', 2, 'UTF-8', 'https://github.com/martinrotter/rssguard/releases.atom', 4);
|
||||||
-- !
|
-- !
|
||||||
INSERT INTO Categories (id, parent_id, title, date_created, type) VALUES (0, -1, 'aaa', '1994-11-05T08:15:30-05:00', 0);
|
INSERT INTO Feeds (title, description, date_created, category, encoding, url, type) VALUES ('Author''s Activity', 'RSS Guard author public activity overview.', '2013-12-20T08:00:00-05:00', 2, 'UTF-8', 'https://github.com/martinrotter.atom', 4);
|
||||||
-- !
|
|
||||||
INSERT INTO Categories (id, parent_id, title, date_created, type) VALUES (2, 0, 'ccc', '1994-11-05T08:15:30-05:00', 0);
|
|
@ -57,7 +57,7 @@ QVariant FeedsModelStandardCategory::data(int column, int role) const {
|
|||||||
|
|
||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
if (column == FDS_MODEL_TITLE_INDEX) {
|
if (column == FDS_MODEL_TITLE_INDEX) {
|
||||||
return QString("%1%2").arg(m_title, "-C");
|
return m_title;
|
||||||
}
|
}
|
||||||
else if (column == FDS_MODEL_COUNTS_INDEX) {
|
else if (column == FDS_MODEL_COUNTS_INDEX) {
|
||||||
return QString("(%1)").arg(QString::number(countOfUnreadMessages()));
|
return QString("(%1)").arg(QString::number(countOfUnreadMessages()));
|
||||||
|
@ -138,7 +138,8 @@ QVariant MessagesModel::data(const QModelIndex &index, int role) const {
|
|||||||
|
|
||||||
if (index_column == MSG_DB_DUPDATED_INDEX) {
|
if (index_column == MSG_DB_DUPDATED_INDEX) {
|
||||||
// This column contains QDateTime.
|
// This column contains QDateTime.
|
||||||
return TextFactory::parseDateTime(QSqlTableModel::data(index, role).toString()).toString(Qt::DefaultLocaleShortDate);
|
return TextFactory::parseDateTime(QSqlTableModel::data(index,
|
||||||
|
role).toString()).toString(Qt::DefaultLocaleShortDate);
|
||||||
}
|
}
|
||||||
else if (index_column != MSG_DB_IMPORTANT_INDEX &&
|
else if (index_column != MSG_DB_IMPORTANT_INDEX &&
|
||||||
index_column != MSG_DB_READ_INDEX) {
|
index_column != MSG_DB_READ_INDEX) {
|
||||||
|
@ -33,8 +33,7 @@ QDateTime TextFactory::parseDateTime(const QString &date_time) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
qWarning("Problem with parsing date '%s', returning invalid QDateTime instance.",
|
// Parsing failed, return invalid datetime.
|
||||||
qPrintable(date));
|
|
||||||
return QDateTime();
|
return QDateTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user