This commit is contained in:
Martin Rotter 2017-10-23 07:00:51 +02:00
parent b3a7c34a95
commit 6a2a0893f8
6 changed files with 28 additions and 11 deletions

View File

@ -1,13 +1,14 @@
3.5.5
—————
Fixed:
▪ Displaying correct update files. (#155)
3.5.4
—————
Fixed:
▪ First item in itemviews is now selected when focus is gained. (#142)
3.5.3
—————
Fixed:
▪ Some feed files do not have URLs of messages properly sanitized. Strip "\n" and "\t" from URls. (bug #154)
3.5.1

View File

@ -55,7 +55,7 @@ APP_REVERSE_NAME = "com.github.rssguard"
APP_LOW_H_NAME = ".rssguard"
APP_AUTHOR = "Martin Rotter"
APP_COPYRIGHT = "(C) 2011-2017 $$APP_AUTHOR"
APP_VERSION = "3.5.4"
APP_VERSION = "3.5.5"
APP_LONG_NAME = "$$APP_NAME $$APP_VERSION"
APP_EMAIL = "rotter.martinos@gmail.com"
APP_URL = "https://github.com/martinrotter/rssguard"

View File

@ -145,11 +145,13 @@ void FormUpdate::loadAvailableFiles() {
m_ui.m_listFiles->clear();
foreach (const UpdateUrl& url, m_updateInfo.m_urls) {
QListWidgetItem* item = new QListWidgetItem(url.m_name + tr(" (size ") + url.m_size + QSL(")"));
if (SystemFactory::supportedUpdateFiles().match(url.m_name).hasMatch()) {
QListWidgetItem* item = new QListWidgetItem(url.m_name + tr(" (size ") + url.m_size + QSL(")"));
item->setData(Qt::UserRole, url.m_fileUrl);
item->setToolTip(url.m_fileUrl);
m_ui.m_listFiles->addItem(item);
item->setData(Qt::UserRole, url.m_fileUrl);
item->setToolTip(url.m_fileUrl);
m_ui.m_listFiles->addItem(item);
}
}
if (m_ui.m_listFiles->count() > 0) {

View File

@ -50,7 +50,7 @@ FeedReader::~FeedReader() {
QList<ServiceEntryPoint*> FeedReader::feedServices() {
if (m_feedServices.isEmpty()) {
// NOTE: All installed services create their entry points here.
//m_feedServices.append(new GmailEntryPoint());
m_feedServices.append(new GmailEntryPoint());
m_feedServices.append(new InoreaderEntryPoint());
m_feedServices.append(new OwnCloudServiceEntryPoint());
m_feedServices.append(new StandardServiceEntryPoint());

View File

@ -28,6 +28,18 @@ SystemFactory::SystemFactory(QObject* parent) : QObject(parent) {}
SystemFactory::~SystemFactory() {}
QRegularExpression SystemFactory::supportedUpdateFiles() {
#if defined(Q_OS_WIN)
return QRegularExpression(QSL(".+win.+\\.(exe|7z)"));
#elif defined(Q_OS_MAC)
return QRegularExpression(QSL(".dmg"));
#elif defined(Q_OS_LINUX)
return QRegularExpression(QSL(".AppImage"));
#else
return QRegularExpression(QSL(".*"));
#endif
}
SystemFactory::AutoStartStatus SystemFactory::autoStartStatus() const {
// User registry way to auto-start the application on Windows.
#if defined(Q_OS_WIN)

View File

@ -72,6 +72,8 @@ class SystemFactory : public QObject {
// Tries to download list with new updates.
void checkForUpdates() const;
static QRegularExpression supportedUpdateFiles();
// Checks if update is newer than current application version.
static bool isVersionNewer(const QString& new_version, const QString& base_version);
static bool isVersionEqualOrNewer(const QString& new_version, const QString& base_version);