From c03f91253e40a59ecfbed7d8f653d1507a41989e Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Mon, 22 Aug 2016 11:21:25 +0200 Subject: [PATCH] Fixed #53. --- resources/text/CHANGELOG | 3 ++ rssguard.pro | 11 +++++ src/services/abstract/feed.cpp | 16 +++++++ src/services/abstract/feed.h | 18 ++------ src/services/abstract/rootitem.cpp | 64 ++++++++++++++++++++++++++ src/services/abstract/rootitem.h | 72 +++++++----------------------- 6 files changed, 114 insertions(+), 70 deletions(-) diff --git a/resources/text/CHANGELOG b/resources/text/CHANGELOG index 031c25a4a..9e7dd3219 100755 --- a/resources/text/CHANGELOG +++ b/resources/text/CHANGELOG @@ -7,6 +7,9 @@ Added: Changed: ▪ Big application core refactoring. Many functions rewritten, some bad code removed. +Fixed: +▪ RSS Guard was not launchable in Windows XP. (bug #53) + 3.3.3 ————— diff --git a/rssguard.pro b/rssguard.pro index 36a37e57a..219aac98c 100755 --- a/rssguard.pro +++ b/rssguard.pro @@ -153,6 +153,17 @@ CONFIG *= c++11 debug_and_release warn_on DEFINES *= QT_USE_QSTRINGBUILDER QT_USE_FAST_CONCATENATION QT_USE_FAST_OPERATOR_PLUS UNICODE _UNICODE VERSION = $$APP_VERSION +win32 { + # Makes sure we use correct subsystem on Windows. + !contains(QMAKE_TARGET.arch, x86_64) { + message(rssguard: Compilling x86 variant.) + QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS,5.01 + } else { + message(rssguard: Compilling x86_64 variant.) + QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS,5.02 + } +} + MOC_DIR = $$OUT_PWD/moc RCC_DIR = $$OUT_PWD/rcc UI_DIR = $$OUT_PWD/ui diff --git a/src/services/abstract/feed.cpp b/src/services/abstract/feed.cpp index 061079886..111f0cf1d 100755 --- a/src/services/abstract/feed.cpp +++ b/src/services/abstract/feed.cpp @@ -111,6 +111,22 @@ void Feed::setAutoUpdateRemainingInterval(int auto_update_remaining_interval) { m_autoUpdateRemainingInterval = auto_update_remaining_interval; } +Feed::Status Feed::status() const { + return m_status; +} + +void Feed::setStatus(const Feed::Status &status) { + m_status = status; +} + +QString Feed::url() const { + return m_url; +} + +void Feed::setUrl(const QString &url) { + m_url = url; +} + void Feed::updateCounts(bool including_total_count) { QSqlDatabase database = qApp->database()->connection(metaObject()->className(), DatabaseFactory::FromSettings); int account_id = getParentServiceRoot()->accountId(); diff --git a/src/services/abstract/feed.h b/src/services/abstract/feed.h index d22ba6bdb..4919ae687 100755 --- a/src/services/abstract/feed.h +++ b/src/services/abstract/feed.h @@ -72,21 +72,11 @@ class Feed : public RootItem, public QRunnable { int autoUpdateRemainingInterval() const; void setAutoUpdateRemainingInterval(int auto_update_remaining_interval); - inline Status status() const { - return m_status; - } + Status status() const; + void setStatus(const Status &status); - inline void setStatus(const Status &status) { - m_status = status; - } - - inline QString url() const { - return m_url; - } - - inline void setUrl(const QString &url) { - m_url = url; - } + QString url() const; + void setUrl(const QString &url); int updateMessages(const QList &messages); void updateCounts(bool including_total_count); diff --git a/src/services/abstract/rootitem.cpp b/src/services/abstract/rootitem.cpp index 8d3677f20..342d9b938 100755 --- a/src/services/abstract/rootitem.cpp +++ b/src/services/abstract/rootitem.cpp @@ -376,6 +376,70 @@ ServiceRoot *RootItem::getParentServiceRoot() const { return nullptr; } +RootItemKind::Kind RootItem::kind() const { + return m_kind; +} + +void RootItem::setKind(RootItemKind::Kind kind) { + m_kind = kind; +} + +QIcon RootItem::icon() const { + return m_icon; +} + +void RootItem::setIcon(const QIcon &icon) { + m_icon = icon; +} + +int RootItem::id() const { + return m_id; +} + +void RootItem::setId(int id) { + m_id = id; +} + +QString RootItem::title() const { + return m_title; +} + +void RootItem::setTitle(const QString &title) { + m_title = title; +} + +QDateTime RootItem::creationDate() const { + return m_creationDate; +} + +void RootItem::setCreationDate(const QDateTime &creation_date) { + m_creationDate = creation_date; +} + +QString RootItem::description() const { + return m_description; +} + +void RootItem::setDescription(const QString &description) { + m_description = description; +} + +QFont RootItem::normalFont() const { + return m_normalFont; +} + +void RootItem::setNormalFont(const QFont &normal_font) { + m_normalFont = normal_font; +} + +QFont RootItem::boldFont() const { + return m_boldFont; +} + +void RootItem::setBoldFont(const QFont &bold_font) { + m_boldFont = bold_font; +} + bool RootItem::removeChild(RootItem *child) { return m_childItems.removeOne(child); } diff --git a/src/services/abstract/rootitem.h b/src/services/abstract/rootitem.h index b383b36b8..eaf3387ad 100755 --- a/src/services/abstract/rootitem.h +++ b/src/services/abstract/rootitem.h @@ -180,73 +180,33 @@ class RootItem : public QObject { // Returns the service root node which is direct or indirect parent of current item. ServiceRoot *getParentServiceRoot() const; - inline RootItemKind::Kind kind() const { - return m_kind; - } - - inline void setKind(RootItemKind::Kind kind) { - m_kind = kind; - } + RootItemKind::Kind kind() const; + void setKind(RootItemKind::Kind kind); // Each item can have icon. - inline QIcon icon() const { - return m_icon; - } - - inline void setIcon(const QIcon &icon) { - m_icon = icon; - } + QIcon icon() const; + void setIcon(const QIcon &icon); // This ALWAYS represents primary column number/ID under which // the item is stored in DB. - inline int id() const { - return m_id; - } - - inline void setId(int id) { - m_id = id; - } + int id() const; + void setId(int id); // Each item has its title. - inline QString title() const { - return m_title; - } + QString title() const; + void setTitle(const QString &title); - inline void setTitle(const QString &title) { - m_title = title; - } + QDateTime creationDate() const; + void setCreationDate(const QDateTime &creation_date); - inline QDateTime creationDate() const { - return m_creationDate; - } + QString description() const; + void setDescription(const QString &description); - inline void setCreationDate(const QDateTime &creation_date) { - m_creationDate = creation_date; - } + QFont normalFont() const; + void setNormalFont(const QFont &normal_font); - inline QString description() const { - return m_description; - } - - inline void setDescription(const QString &description) { - m_description = description; - } - - inline QFont normalFont() const { - return m_normalFont; - } - - inline void setNormalFont(const QFont &normal_font) { - m_normalFont = normal_font; - } - - inline QFont boldFont() const { - return m_boldFont; - } - - inline void setBoldFont(const QFont &bold_font) { - m_boldFont = bold_font; - } + QFont boldFont() const; + void setBoldFont(const QFont &bold_font); // NOTE: For standard feed/category, this WILL equal to id(). int customId() const;