Fixed #346.
This commit is contained in:
parent
273655b1b3
commit
14fc33755b
11 changed files with 91 additions and 13 deletions
|
@ -18,11 +18,12 @@
|
||||||
|
|
||||||
MessagesModel::MessagesModel(QObject* parent)
|
MessagesModel::MessagesModel(QObject* parent)
|
||||||
: QSqlQueryModel(parent), m_cache(new MessagesModelCache(this)), m_messageHighlighter(MessageHighlighter::NoHighlighting),
|
: QSqlQueryModel(parent), m_cache(new MessagesModelCache(this)), m_messageHighlighter(MessageHighlighter::NoHighlighting),
|
||||||
m_customDateFormat(QString()), m_selectedItem(nullptr), m_itemHeight(-1) {
|
m_customDateFormat(QString()), m_selectedItem(nullptr), m_itemHeight(-1), m_displayFeedIcons(false) {
|
||||||
setupFonts();
|
setupFonts();
|
||||||
setupIcons();
|
setupIcons();
|
||||||
setupHeaderData();
|
setupHeaderData();
|
||||||
updateDateFormat();
|
updateDateFormat();
|
||||||
|
updateFeedIconsDisplay();
|
||||||
loadMessages(nullptr);
|
loadMessages(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,6 +157,10 @@ void MessagesModel::updateDateFormat() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MessagesModel::updateFeedIconsDisplay() {
|
||||||
|
m_displayFeedIcons = qApp->settings()->value(GROUP(Messages), SETTING(Messages::DisplayFeedIconsInList)).toBool();
|
||||||
|
}
|
||||||
|
|
||||||
void MessagesModel::reloadWholeLayout() {
|
void MessagesModel::reloadWholeLayout() {
|
||||||
emit layoutAboutToBeChanged();
|
emit layoutAboutToBeChanged();
|
||||||
emit layoutChanged();
|
emit layoutChanged();
|
||||||
|
@ -261,7 +266,9 @@ QVariant MessagesModel::data(const QModelIndex& idx, int role) const {
|
||||||
|
|
||||||
return author_name.isEmpty() ? QSL("-") : author_name;
|
return author_name.isEmpty() ? QSL("-") : author_name;
|
||||||
}
|
}
|
||||||
else if (index_column != MSG_DB_IMPORTANT_INDEX && index_column != MSG_DB_READ_INDEX && index_column != MSG_DB_HAS_ENCLOSURES) {
|
else if (index_column != MSG_DB_IMPORTANT_INDEX &&
|
||||||
|
index_column != MSG_DB_READ_INDEX &&
|
||||||
|
index_column != MSG_DB_HAS_ENCLOSURES) {
|
||||||
return QSqlQueryModel::data(idx, role);
|
return QSqlQueryModel::data(idx, role);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -324,10 +331,22 @@ QVariant MessagesModel::data(const QModelIndex& idx, int role) const {
|
||||||
const int index_column = idx.column();
|
const int index_column = idx.column();
|
||||||
|
|
||||||
if (index_column == MSG_DB_READ_INDEX) {
|
if (index_column == MSG_DB_READ_INDEX) {
|
||||||
QModelIndex idx_read = index(idx.row(), MSG_DB_READ_INDEX);
|
if (m_displayFeedIcons && m_selectedItem != nullptr) {
|
||||||
QVariant dta = m_cache->containsData(idx_read.row()) ? m_cache->data(idx_read) : QSqlQueryModel::data(idx_read);
|
QModelIndex idx_feedid = index(idx.row(), MSG_DB_FEED_CUSTOM_ID_INDEX);
|
||||||
|
QVariant dta = m_cache->containsData(idx_feedid.row())
|
||||||
|
? m_cache->data(idx_feedid)
|
||||||
|
: QSqlQueryModel::data(idx_feedid);
|
||||||
|
QString feed_custom_id = dta.toString();
|
||||||
|
auto acc = m_selectedItem->getParentServiceRoot()->feedIconForMessage(feed_custom_id);
|
||||||
|
|
||||||
return dta.toInt() == 1 ? m_readIcon : m_unreadIcon;
|
return acc;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
QModelIndex idx_read = index(idx.row(), MSG_DB_READ_INDEX);
|
||||||
|
QVariant dta = m_cache->containsData(idx_read.row()) ? m_cache->data(idx_read) : QSqlQueryModel::data(idx_read);
|
||||||
|
|
||||||
|
return dta.toInt() == 1 ? m_readIcon : m_unreadIcon;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (index_column == MSG_DB_IMPORTANT_INDEX) {
|
else if (index_column == MSG_DB_IMPORTANT_INDEX) {
|
||||||
QModelIndex idx_important = index(idx.row(), MSG_DB_IMPORTANT_INDEX);
|
QModelIndex idx_important = index(idx.row(), MSG_DB_IMPORTANT_INDEX);
|
||||||
|
|
|
@ -55,6 +55,7 @@ class MessagesModel : public QSqlQueryModel, public MessagesModelSqlLayer {
|
||||||
|
|
||||||
void setupFonts();
|
void setupFonts();
|
||||||
void updateDateFormat();
|
void updateDateFormat();
|
||||||
|
void updateFeedIconsDisplay();
|
||||||
void reloadWholeLayout();
|
void reloadWholeLayout();
|
||||||
|
|
||||||
// SINGLE message manipulators.
|
// SINGLE message manipulators.
|
||||||
|
@ -99,6 +100,7 @@ class MessagesModel : public QSqlQueryModel, public MessagesModelSqlLayer {
|
||||||
QIcon m_unreadIcon;
|
QIcon m_unreadIcon;
|
||||||
QIcon m_enclosuresIcon;
|
QIcon m_enclosuresIcon;
|
||||||
int m_itemHeight;
|
int m_itemHeight;
|
||||||
|
bool m_displayFeedIcons;
|
||||||
};
|
};
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(MessagesModel::MessageHighlighter)
|
Q_DECLARE_METATYPE(MessagesModel::MessageHighlighter)
|
||||||
|
|
|
@ -34,7 +34,7 @@ MessagesView::MessagesView(QWidget* parent) : QTreeView(parent), m_contextMenu(n
|
||||||
createConnections();
|
createConnections();
|
||||||
setModel(m_proxyModel);
|
setModel(m_proxyModel);
|
||||||
setupAppearance();
|
setupAppearance();
|
||||||
header()->setContextMenuPolicy(Qt::CustomContextMenu);
|
header()->setContextMenuPolicy(Qt::ContextMenuPolicy::CustomContextMenu);
|
||||||
connect(header(), &QHeaderView::customContextMenuRequested, this, [=](const QPoint& point) {
|
connect(header(), &QHeaderView::customContextMenuRequested, this, [=](const QPoint& point) {
|
||||||
TreeViewColumnsMenu mm(header());
|
TreeViewColumnsMenu mm(header());
|
||||||
mm.exec(header()->mapToGlobal(point));
|
mm.exec(header()->mapToGlobal(point));
|
||||||
|
|
|
@ -40,6 +40,7 @@ SettingsFeedsMessages::SettingsFeedsMessages(Settings* settings, QWidget* parent
|
||||||
connect(m_ui->m_checkAutoUpdateNotification, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
|
connect(m_ui->m_checkAutoUpdateNotification, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
|
||||||
connect(m_ui->m_checkAutoUpdate, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
|
connect(m_ui->m_checkAutoUpdate, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
|
||||||
connect(m_ui->m_checkAutoUpdateOnlyUnfocused, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
|
connect(m_ui->m_checkAutoUpdateOnlyUnfocused, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
|
||||||
|
connect(m_ui->m_checkDisplayFeedIcons, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
|
||||||
connect(m_ui->m_checkKeppMessagesInTheMiddle, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
|
connect(m_ui->m_checkKeppMessagesInTheMiddle, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
|
||||||
connect(m_ui->m_checkMessagesDateTimeFormat, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
|
connect(m_ui->m_checkMessagesDateTimeFormat, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
|
||||||
connect(m_ui->m_checkMessagesDateTimeFormat, &QCheckBox::toggled, m_ui->m_cmbMessagesDateTimeFormat, &QComboBox::setEnabled);
|
connect(m_ui->m_checkMessagesDateTimeFormat, &QCheckBox::toggled, m_ui->m_cmbMessagesDateTimeFormat, &QComboBox::setEnabled);
|
||||||
|
@ -125,6 +126,7 @@ void SettingsFeedsMessages::loadSettings() {
|
||||||
m_ui->m_spinHeightRowsMessages->setValue(settings()->value(GROUP(GUI), SETTING(GUI::HeightRowMessages)).toInt());
|
m_ui->m_spinHeightRowsMessages->setValue(settings()->value(GROUP(GUI), SETTING(GUI::HeightRowMessages)).toInt());
|
||||||
m_ui->m_spinHeightRowsFeeds->setValue(settings()->value(GROUP(GUI), SETTING(GUI::HeightRowFeeds)).toInt());
|
m_ui->m_spinHeightRowsFeeds->setValue(settings()->value(GROUP(GUI), SETTING(GUI::HeightRowFeeds)).toInt());
|
||||||
|
|
||||||
|
m_ui->m_checkDisplayFeedIcons->setChecked(settings()->value(GROUP(Messages), SETTING(Messages::DisplayFeedIconsInList)).toBool());
|
||||||
m_ui->m_checkBringToForegroundAfterMsgOpened->setChecked(settings()->value(GROUP(Messages),
|
m_ui->m_checkBringToForegroundAfterMsgOpened->setChecked(settings()->value(GROUP(Messages),
|
||||||
SETTING(Messages::BringAppToFrontAfterMessageOpenedExternally)).toBool());
|
SETTING(Messages::BringAppToFrontAfterMessageOpenedExternally)).toBool());
|
||||||
m_ui->m_checkAutoUpdateNotification->setChecked(settings()->value(GROUP(Feeds), SETTING(Feeds::EnableAutoUpdateNotification)).toBool());
|
m_ui->m_checkAutoUpdateNotification->setChecked(settings()->value(GROUP(Feeds), SETTING(Feeds::EnableAutoUpdateNotification)).toBool());
|
||||||
|
@ -183,6 +185,7 @@ void SettingsFeedsMessages::saveSettings() {
|
||||||
settings()->setValue(GROUP(GUI), GUI::HeightRowMessages, m_ui->m_spinHeightRowsMessages->value());
|
settings()->setValue(GROUP(GUI), GUI::HeightRowMessages, m_ui->m_spinHeightRowsMessages->value());
|
||||||
settings()->setValue(GROUP(GUI), GUI::HeightRowFeeds, m_ui->m_spinHeightRowsFeeds->value());
|
settings()->setValue(GROUP(GUI), GUI::HeightRowFeeds, m_ui->m_spinHeightRowsFeeds->value());
|
||||||
|
|
||||||
|
settings()->setValue(GROUP(Messages), Messages::DisplayFeedIconsInList, m_ui->m_checkDisplayFeedIcons->isChecked());
|
||||||
settings()->setValue(GROUP(Messages), Messages::BringAppToFrontAfterMessageOpenedExternally,
|
settings()->setValue(GROUP(Messages), Messages::BringAppToFrontAfterMessageOpenedExternally,
|
||||||
m_ui->m_checkBringToForegroundAfterMsgOpened->isChecked());
|
m_ui->m_checkBringToForegroundAfterMsgOpened->isChecked());
|
||||||
settings()->setValue(GROUP(Feeds), Feeds::EnableAutoUpdateNotification, m_ui->m_checkAutoUpdateNotification->isChecked());
|
settings()->setValue(GROUP(Feeds), Feeds::EnableAutoUpdateNotification, m_ui->m_checkAutoUpdateNotification->isChecked());
|
||||||
|
@ -216,6 +219,7 @@ void SettingsFeedsMessages::saveSettings() {
|
||||||
qApp->feedReader()->feedsModel()->reloadWholeLayout();
|
qApp->feedReader()->feedsModel()->reloadWholeLayout();
|
||||||
|
|
||||||
qApp->feedReader()->messagesModel()->updateDateFormat();
|
qApp->feedReader()->messagesModel()->updateDateFormat();
|
||||||
|
qApp->feedReader()->messagesModel()->updateFeedIconsDisplay();
|
||||||
qApp->feedReader()->messagesModel()->reloadWholeLayout();
|
qApp->feedReader()->messagesModel()->reloadWholeLayout();
|
||||||
|
|
||||||
onEndSaveSettings();
|
onEndSaveSettings();
|
||||||
|
|
|
@ -266,21 +266,21 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QCheckBox" name="m_checkBringToForegroundAfterMsgOpened">
|
<widget class="QCheckBox" name="m_checkBringToForegroundAfterMsgOpened">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Bring application window to front once message is opened in external web browser</string>
|
<string>Bring application window to front once message is opened in external web browser</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QCheckBox" name="m_checkKeppMessagesInTheMiddle">
|
<widget class="QCheckBox" name="m_checkKeppMessagesInTheMiddle">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Keep message selection in the middle of the message list viewport</string>
|
<string>Keep message selection in the middle of the message list viewport</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="5" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
|
@ -304,7 +304,7 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="6" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
|
@ -328,7 +328,7 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0">
|
<item row="7" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="m_checkMessagesDateTimeFormat">
|
<widget class="QCheckBox" name="m_checkMessagesDateTimeFormat">
|
||||||
|
@ -348,7 +348,7 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="0">
|
<item row="8" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_5">
|
<widget class="QGroupBox" name="groupBox_5">
|
||||||
|
@ -404,7 +404,7 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="0" colspan="2">
|
<item row="9" column="0" colspan="2">
|
||||||
<spacer name="verticalSpacer_2">
|
<spacer name="verticalSpacer_2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
|
@ -417,6 +417,13 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="m_checkDisplayFeedIcons">
|
||||||
|
<property name="text">
|
||||||
|
<string>Display real icons of feeds in list of messages instead of read/unread icons</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -444,6 +451,7 @@
|
||||||
<tabstop>m_cmbCountsFeedList</tabstop>
|
<tabstop>m_cmbCountsFeedList</tabstop>
|
||||||
<tabstop>m_checkRemoveReadMessagesOnExit</tabstop>
|
<tabstop>m_checkRemoveReadMessagesOnExit</tabstop>
|
||||||
<tabstop>m_checkDisplayPlaceholders</tabstop>
|
<tabstop>m_checkDisplayPlaceholders</tabstop>
|
||||||
|
<tabstop>m_checkDisplayFeedIcons</tabstop>
|
||||||
<tabstop>m_checkBringToForegroundAfterMsgOpened</tabstop>
|
<tabstop>m_checkBringToForegroundAfterMsgOpened</tabstop>
|
||||||
<tabstop>m_checkKeppMessagesInTheMiddle</tabstop>
|
<tabstop>m_checkKeppMessagesInTheMiddle</tabstop>
|
||||||
<tabstop>m_spinHeightRowsMessages</tabstop>
|
<tabstop>m_spinHeightRowsMessages</tabstop>
|
||||||
|
|
|
@ -91,6 +91,9 @@ DVALUE(char*) Messages::CustomDateFormatDef = "";
|
||||||
DKEY Messages::ClearReadOnExit = "clear_read_on_exit";
|
DKEY Messages::ClearReadOnExit = "clear_read_on_exit";
|
||||||
DVALUE(bool) Messages::ClearReadOnExitDef = false;
|
DVALUE(bool) Messages::ClearReadOnExitDef = false;
|
||||||
|
|
||||||
|
DKEY Messages::DisplayFeedIconsInList = "display_feed_icons_in_message_list";
|
||||||
|
DVALUE(bool) Messages::DisplayFeedIconsInListDef = false;
|
||||||
|
|
||||||
DKEY Messages::BringAppToFrontAfterMessageOpenedExternally = "bring_app_to_front_after_msg_opened";
|
DKEY Messages::BringAppToFrontAfterMessageOpenedExternally = "bring_app_to_front_after_msg_opened";
|
||||||
DVALUE(bool) Messages::BringAppToFrontAfterMessageOpenedExternallyDef = true;
|
DVALUE(bool) Messages::BringAppToFrontAfterMessageOpenedExternallyDef = true;
|
||||||
|
|
||||||
|
|
|
@ -112,6 +112,9 @@ namespace Messages {
|
||||||
KEY ClearReadOnExit;
|
KEY ClearReadOnExit;
|
||||||
VALUE(bool) ClearReadOnExitDef;
|
VALUE(bool) ClearReadOnExitDef;
|
||||||
|
|
||||||
|
KEY DisplayFeedIconsInList;
|
||||||
|
VALUE(bool) DisplayFeedIconsInListDef;
|
||||||
|
|
||||||
KEY BringAppToFrontAfterMessageOpenedExternally;
|
KEY BringAppToFrontAfterMessageOpenedExternally;
|
||||||
VALUE(bool) BringAppToFrontAfterMessageOpenedExternallyDef;
|
VALUE(bool) BringAppToFrontAfterMessageOpenedExternallyDef;
|
||||||
|
|
||||||
|
|
|
@ -303,6 +303,27 @@ QList<Category*> RootItem::getSubTreeCategories() const {
|
||||||
return children;
|
return children;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RootItem* RootItem::getItemFromSubTree(std::function<bool(const RootItem*)> tester) const {
|
||||||
|
QList<RootItem*> children;
|
||||||
|
QList<RootItem*> traversable_items;
|
||||||
|
|
||||||
|
traversable_items.append(const_cast<RootItem* const>(this));
|
||||||
|
|
||||||
|
// Iterate all nested items.
|
||||||
|
while (!traversable_items.isEmpty()) {
|
||||||
|
RootItem* active_item = traversable_items.takeFirst();
|
||||||
|
|
||||||
|
if (tester(active_item)) {
|
||||||
|
return active_item;
|
||||||
|
}
|
||||||
|
|
||||||
|
children.append(active_item);
|
||||||
|
traversable_items.append(active_item->childItems());
|
||||||
|
}
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
QHash<int, Category*> RootItem::getHashedSubTreeCategories() const {
|
QHash<int, Category*> RootItem::getHashedSubTreeCategories() const {
|
||||||
QHash<int, Category*> children;
|
QHash<int, Category*> children;
|
||||||
QList<RootItem*> traversable_items;
|
QList<RootItem*> traversable_items;
|
||||||
|
|
|
@ -134,6 +134,8 @@ class RSSGUARD_DLLSPEC RootItem : public QObject {
|
||||||
QList<RootItem*> getSubTree(RootItem::Kind kind_of_item) const;
|
QList<RootItem*> getSubTree(RootItem::Kind kind_of_item) const;
|
||||||
QList<Category*> getSubTreeCategories() const;
|
QList<Category*> getSubTreeCategories() const;
|
||||||
|
|
||||||
|
RootItem* getItemFromSubTree(std::function<bool(const RootItem*)> tester) const;
|
||||||
|
|
||||||
// Returns list of categories complemented by their own integer primary ID.
|
// Returns list of categories complemented by their own integer primary ID.
|
||||||
QHash<int, Category*> getHashedSubTreeCategories() const;
|
QHash<int, Category*> getHashedSubTreeCategories() const;
|
||||||
|
|
||||||
|
|
|
@ -166,6 +166,20 @@ void ServiceRoot::completelyRemoveAllData() {
|
||||||
requestReloadMessageList(true);
|
requestReloadMessageList(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QIcon ServiceRoot::feedIconForMessage(const QString& feed_custom_id) const {
|
||||||
|
QString low_id = feed_custom_id.toLower();
|
||||||
|
RootItem* found_item = getItemFromSubTree([low_id](const RootItem* it) {
|
||||||
|
return it->kind() == RootItem::Kind::Feed && it->customId().toLower() == low_id;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (found_item != nullptr) {
|
||||||
|
return found_item->icon();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return QIcon();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ServiceRoot::removeOldAccountFromDatabase(bool including_messages) {
|
void ServiceRoot::removeOldAccountFromDatabase(bool including_messages) {
|
||||||
QSqlDatabase database = qApp->database()->connection(metaObject()->className());
|
QSqlDatabase database = qApp->database()->connection(metaObject()->className());
|
||||||
|
|
||||||
|
|
|
@ -167,6 +167,8 @@ class ServiceRoot : public RootItem {
|
||||||
// and from model.
|
// and from model.
|
||||||
void completelyRemoveAllData();
|
void completelyRemoveAllData();
|
||||||
|
|
||||||
|
QIcon feedIconForMessage(const QString& feed_custom_id) const;
|
||||||
|
|
||||||
// Removes all/read only messages from given underlying feeds.
|
// Removes all/read only messages from given underlying feeds.
|
||||||
bool cleanFeeds(QList<Feed*> items, bool clean_read_only);
|
bool cleanFeeds(QList<Feed*> items, bool clean_read_only);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue