diff --git a/CMakeLists.txt b/CMakeLists.txt index cf6f6b6b2..edfdbf633 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,8 +71,8 @@ project(rssguard) set(APP_NAME "RSS Guard") set(APP_LOW_NAME "rssguard") -set(APP_VERSION "2.1") -set(FILE_VERSION "2,1,0,0") +set(APP_VERSION "2.0.5") +set(FILE_VERSION "2,0,5,0") set(APP_AUTHOR "Martin Rotter") set(APP_URL "http://bitbucket.org/skunkos/rssguard") set(APP_URL_ISSUES "http://bitbucket.org/skunkos/rssguard/issues") diff --git a/src/gui/feedsview.h b/src/gui/feedsview.h index 1cbc658fc..cfa377873 100644 --- a/src/gui/feedsview.h +++ b/src/gui/feedsview.h @@ -155,6 +155,7 @@ class FeedsView : public QTreeView { // Handle selections. void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected); + // React on "Del" key. void keyPressEvent(QKeyEvent *event); // Show custom context menu. diff --git a/src/gui/formsettings.ui b/src/gui/formsettings.ui index 83b256042..02a08e8e9 100644 --- a/src/gui/formsettings.ui +++ b/src/gui/formsettings.ui @@ -6,7 +6,7 @@ 0 0 - 928 + 951 498 @@ -478,8 +478,8 @@ Authors of this application are NOT responsible for lost data. 0 0 - 167 - 219 + 190 + 238 @@ -1163,7 +1163,7 @@ Authors of this application are NOT responsible for lost data. - 0 + 1 diff --git a/src/gui/messagesview.cpp b/src/gui/messagesview.cpp index 42a465274..8a0a6807b 100755 --- a/src/gui/messagesview.cpp +++ b/src/gui/messagesview.cpp @@ -208,14 +208,14 @@ void MessagesView::selectionChanged(const QItemSelection &selected, const QItemS current_index.row(), current_index.column(), mapped_current_index.row(), mapped_current_index.column()); - if (mapped_current_index.isValid() && !selected_rows.isEmpty()) { + if (mapped_current_index.isValid() && selected_rows.count() == 1) { if (!m_batchUnreadSwitch) { // Set this message as read only if current item // wasn't changed by "mark selected messages unread" action. m_sourceModel->setMessageRead(mapped_current_index.row(), 1); } - emit currentMessagesChanged(QList() << m_sourceModel->messageAt(m_proxyModel->mapToSource(selected_rows.first()).row())); + emit currentMessagesChanged(QList() << m_sourceModel->messageAt(m_proxyModel->mapToSource(selected_rows.at(0)).row())); } else { emit currentMessagesRemoved(); diff --git a/src/gui/messagesview.h b/src/gui/messagesview.h index adc7337d2..2aadf4395 100755 --- a/src/gui/messagesview.h +++ b/src/gui/messagesview.h @@ -87,6 +87,7 @@ class MessagesView : public QTreeView { // Changes resize mode for all columns. void adjustColumns(); + // Saves current sort state. void saveSortState(int column, Qt::SortOrder order); protected: diff --git a/src/miscellaneous/skinfactory.cpp b/src/miscellaneous/skinfactory.cpp index 329aaeee0..286ba6a7a 100755 --- a/src/miscellaneous/skinfactory.cpp +++ b/src/miscellaneous/skinfactory.cpp @@ -46,8 +46,7 @@ void SkinFactory::loadCurrentSkin() { qDebug("Skin '%s' loaded.", qPrintable(skin_name_from_settings)); } else { - qFatal("Skin '%s' not loaded because its data are corrupted. No skin is loaded now!", - qPrintable(skin_name_from_settings)); + qFatal("Skin '%s' not loaded because its data are corrupted. No skin is loaded now!", qPrintable(skin_name_from_settings)); } } @@ -87,9 +86,7 @@ bool SkinFactory::loadSkinFromData(const Skin &skin) { } if (!raw_data.isEmpty()) { - QString parsed_data = raw_data.replace("##", - APP_SKIN_PATH + '/' + - skin_folder); + QString parsed_data = raw_data.replace("##", APP_SKIN_PATH + '/' + skin_folder); qApp->setStyleSheet(parsed_data); } @@ -101,9 +98,7 @@ void SkinFactory::setCurrentSkinName(const QString &skin_name) { } QString SkinFactory::selectedSkinName() { - return qApp->settings()->value(GROUP(GUI), - "skin", - APP_SKIN_DEFAULT).toString(); + return qApp->settings()->value(GROUP(GUI), "skin", APP_SKIN_DEFAULT).toString(); } Skin SkinFactory::skinInfo(const QString &skin_name, bool *ok) { diff --git a/src/miscellaneous/systemfactory.cpp b/src/miscellaneous/systemfactory.cpp index 5bb3081e3..53ffb339d 100755 --- a/src/miscellaneous/systemfactory.cpp +++ b/src/miscellaneous/systemfactory.cpp @@ -195,6 +195,9 @@ bool SystemFactory::isUpdateNewer(const QString &update_version) { // New version is indeed higher thatn current version. return true; } + else if (new_number < current_number) { + return false; + } } // Versions are either the same or they have unequal sizes. @@ -203,8 +206,12 @@ bool SystemFactory::isUpdateNewer(const QString &update_version) { return false; } else { - // Version are not the same length. New version is really higher if it is longer + its last digit is not 0. - return !new_version_tkn.isEmpty() && new_version_tkn.takeFirst().toInt() != 0; + if (new_version_tkn.isEmpty()) { + return false; + } + else { + return new_version_tkn.join("").toInt() > 0; + } } }