mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-25 13:38:44 +01:00
Properly reload individualy switched msg when changing importance - color of font did not change all the times.
This commit is contained in:
parent
b99acea244
commit
73925b6452
@ -109,6 +109,7 @@ class FeedsModel : public QAbstractItemModel {
|
||||
// Loads feed/categories from the database.
|
||||
void loadActivatedServiceAccounts();
|
||||
|
||||
// Stops all accounts before exit.
|
||||
void stopServiceAccounts();
|
||||
|
||||
// Reloads counts of all feeds/categories/whatever in the model.
|
||||
@ -124,8 +125,6 @@ class FeedsModel : public QAbstractItemModel {
|
||||
// Removes item with given index.
|
||||
// NOTE: Also deletes item from memory.
|
||||
void removeItem(const QModelIndex &index);
|
||||
|
||||
// Removes given item from the model/memory.
|
||||
void removeItem(RootItem *deleting_item);
|
||||
|
||||
// Recycle bins operations.
|
||||
|
@ -399,6 +399,8 @@ bool MessagesModel::switchMessageImportance(int row_index) {
|
||||
|
||||
// Commit changes.
|
||||
if (DatabaseQueries::markMessageImportant(database(), message.m_id, next_importance)) {
|
||||
emit dataChanged(index(row_index, 0), index(row_index, MSG_DB_FEED_CUSTOM_ID_INDEX), QVector<int>() << Qt::FontRole);
|
||||
|
||||
return m_selectedItem->getParentServiceRoot()->onAfterSwitchMessageImportance(m_selectedItem,
|
||||
QList<QPair<Message,RootItem::Importance> >() << pair);
|
||||
}
|
||||
|
@ -59,6 +59,7 @@ class MessagesModel : public QSqlTableModel {
|
||||
void updateDateFormat();
|
||||
void reloadWholeLayout();
|
||||
|
||||
// Adds this new state to queue of sort states.
|
||||
void addSortState(int column, Qt::SortOrder order);
|
||||
|
||||
// CORE messages manipulators.
|
||||
@ -99,13 +100,14 @@ class MessagesModel : public QSqlTableModel {
|
||||
void setupFonts();
|
||||
void setupIcons();
|
||||
|
||||
// Fetches ALL available data to the model.
|
||||
void fetchAllData();
|
||||
|
||||
// Direct SQL stuff.
|
||||
QString orderByClause() const;
|
||||
QString selectStatement() const;
|
||||
QString formatFields() const;
|
||||
|
||||
// Fetches ALL available data to the model.
|
||||
void fetchAllData();
|
||||
|
||||
// NOTE: These two lists contain data for multicolumn sorting.
|
||||
// They are always same length. Most important sort column/order
|
||||
// are located at the start of lists;
|
||||
|
Loading…
x
Reference in New Issue
Block a user