Fixed icons.
This commit is contained in:
parent
c4a8497471
commit
523adcf4b7
4 changed files with 4 additions and 7 deletions
|
@ -253,7 +253,6 @@ RootItem *TtRssGetFeedsCategoriesResponse::feedsCategories(bool obtain_icons, QS
|
||||||
else {
|
else {
|
||||||
TtRssCategory *category = new TtRssCategory();
|
TtRssCategory *category = new TtRssCategory();
|
||||||
|
|
||||||
category->setIcon(qApp->icons()->fromTheme(QSL("folder-category")));
|
|
||||||
category->setTitle(item["name"].toString());
|
category->setTitle(item["name"].toString());
|
||||||
category->setCustomId(item_id);
|
category->setCustomId(item_id);
|
||||||
act_parent->appendChild(category);
|
act_parent->appendChild(category);
|
||||||
|
|
|
@ -25,12 +25,13 @@
|
||||||
|
|
||||||
|
|
||||||
TtRssCategory::TtRssCategory(RootItem *parent) : Category(parent), m_customId(NO_PARENT_CATEGORY) {
|
TtRssCategory::TtRssCategory(RootItem *parent) : Category(parent), m_customId(NO_PARENT_CATEGORY) {
|
||||||
|
setIcon(qApp->icons()->fromTheme(QSL("folder-category")));
|
||||||
}
|
}
|
||||||
|
|
||||||
TtRssCategory::TtRssCategory(const QSqlRecord &record) : Category(NULL) {
|
TtRssCategory::TtRssCategory(const QSqlRecord &record) : Category(NULL) {
|
||||||
|
setIcon(qApp->icons()->fromTheme(QSL("folder-category")));
|
||||||
setId(record.value(CAT_DB_ID_INDEX).toInt());
|
setId(record.value(CAT_DB_ID_INDEX).toInt());
|
||||||
setTitle(record.value(CAT_DB_TITLE_INDEX).toString());
|
setTitle(record.value(CAT_DB_TITLE_INDEX).toString());
|
||||||
setIcon(qApp->icons()->fromByteArray(record.value(CAT_DB_ICON_INDEX).toByteArray()));
|
|
||||||
setCustomId(record.value(CAT_DB_CUSTOM_ID_INDEX).toInt());
|
setCustomId(record.value(CAT_DB_CUSTOM_ID_INDEX).toInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,6 +81,7 @@ int TtRssFeed::countOfUnreadMessages() {
|
||||||
}
|
}
|
||||||
|
|
||||||
int TtRssFeed::update() {
|
int TtRssFeed::update() {
|
||||||
|
// TODO: přes getHeadlines provede stažení kompletnich zprav.
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,8 +49,7 @@ void TtRssServiceRoot::start() {
|
||||||
loadFromDatabase();
|
loadFromDatabase();
|
||||||
|
|
||||||
if (childCount() == 0) {
|
if (childCount() == 0) {
|
||||||
// TODO: pokud tady není nic načteno, tak
|
syncIn();
|
||||||
// syncIn
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,9 +275,6 @@ void TtRssServiceRoot::updateTitle() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void TtRssServiceRoot::syncIn() {
|
void TtRssServiceRoot::syncIn() {
|
||||||
// TODO: provede stažení kanálů/kategorií
|
|
||||||
// ze serveru, a sloučení s aktuálními
|
|
||||||
// neprovádí aktualizace kanálů ani stažení počtu nepřečtených zpráv
|
|
||||||
QNetworkReply::NetworkError err;
|
QNetworkReply::NetworkError err;
|
||||||
TtRssGetFeedsCategoriesResponse feed_cats_response = m_network->getFeedsCategories(err);
|
TtRssGetFeedsCategoriesResponse feed_cats_response = m_network->getFeedsCategories(err);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue