Fixed #153.
This commit is contained in:
parent
2379158610
commit
e533a16fe1
@ -11,6 +11,7 @@ Added:
|
|||||||
▪ User is now able to delete TT-RSS feeds. (issue #151)
|
▪ User is now able to delete TT-RSS feeds. (issue #151)
|
||||||
|
|
||||||
Fixed:
|
Fixed:
|
||||||
|
▪ Fixed problems with master update mutex locking. (bug #153)
|
||||||
▪ Fixed some problems, that "Add category to selected account" was enabled when it shouldn't be.
|
▪ Fixed some problems, that "Add category to selected account" was enabled when it shouldn't be.
|
||||||
▪ ♥ Auto-updating of feeds fixed (again?!). ♥
|
▪ ♥ Auto-updating of feeds fixed (again?!). ♥
|
||||||
▪ Fixed problem with adding feeds in TT-RSS accounts. (bug #154)
|
▪ Fixed problem with adding feeds in TT-RSS accounts. (bug #154)
|
||||||
|
@ -100,8 +100,6 @@ void MessagesView::reloadSelections(bool mark_current_index_read) {
|
|||||||
else {
|
else {
|
||||||
// Messages were probably removed from the model, nothing can
|
// Messages were probably removed from the model, nothing can
|
||||||
// be selected and no message can be displayed.
|
// be selected and no message can be displayed.
|
||||||
// TOTO: Check if this is OKAY. If not, then emit this signal
|
|
||||||
// from FeedsView itself.
|
|
||||||
emit currentMessagesRemoved();
|
emit currentMessagesRemoved();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@
|
|||||||
#include <QSqlError>
|
#include <QSqlError>
|
||||||
#include <QStack>
|
#include <QStack>
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QPointer>
|
|
||||||
#include <QSqlTableModel>
|
#include <QSqlTableModel>
|
||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
|
|
||||||
@ -133,9 +132,21 @@ bool StandardServiceRoot::supportsCategoryAdding() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void StandardServiceRoot::addNewFeed(const QString &url) {
|
void StandardServiceRoot::addNewFeed(const QString &url) {
|
||||||
QPointer<FormStandardFeedDetails> form_pointer = new FormStandardFeedDetails(this, qApp->mainForm());
|
if (!qApp->feedUpdateLock()->tryLock()) {
|
||||||
|
// Lock was not obtained because
|
||||||
|
// it is used probably by feed updater or application
|
||||||
|
// is quitting.
|
||||||
|
qApp->showGuiMessage(tr("Cannot add item"),
|
||||||
|
tr("Cannot add feed because another critical operation is ongoing."),
|
||||||
|
QSystemTrayIcon::Warning, qApp->mainForm(), true);
|
||||||
|
// Thus, cannot delete and quit the method.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QScopedPointer<FormStandardFeedDetails> form_pointer(new FormStandardFeedDetails(this, qApp->mainForm()));
|
||||||
form_pointer.data()->exec(NULL, NULL, url);
|
form_pointer.data()->exec(NULL, NULL, url);
|
||||||
delete form_pointer.data();
|
|
||||||
|
qApp->feedUpdateLock()->unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant StandardServiceRoot::data(int column, int role) const {
|
QVariant StandardServiceRoot::data(int column, int role) const {
|
||||||
@ -405,23 +416,33 @@ bool StandardServiceRoot::mergeImportExportModel(FeedsImportExportModel *model,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void StandardServiceRoot::addNewCategory() {
|
void StandardServiceRoot::addNewCategory() {
|
||||||
QPointer<FormStandardCategoryDetails> form_pointer = new FormStandardCategoryDetails(this, qApp->mainForm());
|
if (!qApp->feedUpdateLock()->tryLock()) {
|
||||||
|
// Lock was not obtained because
|
||||||
|
// it is used probably by feed updater or application
|
||||||
|
// is quitting.
|
||||||
|
qApp->showGuiMessage(tr("Cannot add category"),
|
||||||
|
tr("Cannot add category because another critical operation is ongoing."),
|
||||||
|
QSystemTrayIcon::Warning, qApp->mainForm(), true);
|
||||||
|
// Thus, cannot delete and quit the method.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QScopedPointer<FormStandardCategoryDetails> form_pointer(new FormStandardCategoryDetails(this, qApp->mainForm()));
|
||||||
form_pointer.data()->exec(NULL, NULL);
|
form_pointer.data()->exec(NULL, NULL);
|
||||||
delete form_pointer.data();
|
|
||||||
|
qApp->feedUpdateLock()->unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void StandardServiceRoot::importFeeds() {
|
void StandardServiceRoot::importFeeds() {
|
||||||
QPointer<FormStandardImportExport> form = new FormStandardImportExport(this, qApp->mainForm());
|
QScopedPointer<FormStandardImportExport> form(new FormStandardImportExport(this, qApp->mainForm()));
|
||||||
form.data()->setMode(FeedsImportExportModel::Import);
|
form.data()->setMode(FeedsImportExportModel::Import);
|
||||||
form.data()->exec();
|
form.data()->exec();
|
||||||
delete form.data();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void StandardServiceRoot::exportFeeds() {
|
void StandardServiceRoot::exportFeeds() {
|
||||||
QPointer<FormStandardImportExport> form = new FormStandardImportExport(this, qApp->mainForm());
|
QScopedPointer<FormStandardImportExport> form(new FormStandardImportExport(this, qApp->mainForm()));
|
||||||
form.data()->setMode(FeedsImportExportModel::Export);
|
form.data()->setMode(FeedsImportExportModel::Export);
|
||||||
form.data()->exec();
|
form.data()->exec();
|
||||||
delete form.data();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList StandardServiceRoot::textualFeedIds(const QList<Feed*> &feeds) {
|
QStringList StandardServiceRoot::textualFeedIds(const QList<Feed*> &feeds) {
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "miscellaneous/settings.h"
|
#include "miscellaneous/settings.h"
|
||||||
|
#include "miscellaneous/mutex.h"
|
||||||
#include "miscellaneous/textfactory.h"
|
#include "miscellaneous/textfactory.h"
|
||||||
#include "gui/dialogs/formmain.h"
|
#include "gui/dialogs/formmain.h"
|
||||||
#include "network-web/networkfactory.h"
|
#include "network-web/networkfactory.h"
|
||||||
@ -34,7 +35,6 @@
|
|||||||
#include <QSqlTableModel>
|
#include <QSqlTableModel>
|
||||||
#include <QSqlQuery>
|
#include <QSqlQuery>
|
||||||
#include <QSqlError>
|
#include <QSqlError>
|
||||||
#include <QPointer>
|
|
||||||
#include <QPair>
|
#include <QPair>
|
||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
|
|
||||||
@ -62,7 +62,6 @@ void TtRssServiceRoot::start(bool freshly_activated) {
|
|||||||
|
|
||||||
void TtRssServiceRoot::stop() {
|
void TtRssServiceRoot::stop() {
|
||||||
m_network->logout();
|
m_network->logout();
|
||||||
|
|
||||||
qDebug("Stopping Tiny Tiny RSS account, logging out with result '%d'.", (int) m_network->lastError());
|
qDebug("Stopping Tiny Tiny RSS account, logging out with result '%d'.", (int) m_network->lastError());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,9 +70,9 @@ QString TtRssServiceRoot::code() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool TtRssServiceRoot::editViaGui() {
|
bool TtRssServiceRoot::editViaGui() {
|
||||||
QPointer<FormEditAccount> form_pointer = new FormEditAccount(qApp->mainForm());
|
QScopedPointer<FormEditAccount> form_pointer(new FormEditAccount(qApp->mainForm()));
|
||||||
form_pointer.data()->execForEdit(this);
|
form_pointer.data()->execForEdit(this);
|
||||||
delete form_pointer.data();
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,10 +118,21 @@ bool TtRssServiceRoot::supportsCategoryAdding() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TtRssServiceRoot::addNewFeed(const QString &url) {
|
void TtRssServiceRoot::addNewFeed(const QString &url) {
|
||||||
QPointer<FormEditFeed> form_pointer = new FormEditFeed(this, qApp->mainForm());
|
if (!qApp->feedUpdateLock()->tryLock()) {
|
||||||
|
// Lock was not obtained because
|
||||||
|
// it is used probably by feed updater or application
|
||||||
|
// is quitting.
|
||||||
|
qApp->showGuiMessage(tr("Cannot add item"),
|
||||||
|
tr("Cannot add feed because another critical operation is ongoing."),
|
||||||
|
QSystemTrayIcon::Warning, qApp->mainForm(), true);
|
||||||
|
// Thus, cannot delete and quit the method.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QScopedPointer<FormEditFeed> form_pointer(new FormEditFeed(this, qApp->mainForm()));
|
||||||
form_pointer.data()->execForAdd(url);
|
form_pointer.data()->execForAdd(url);
|
||||||
delete form_pointer.data();
|
|
||||||
|
qApp->feedUpdateLock()->unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TtRssServiceRoot::addNewCategory() {
|
void TtRssServiceRoot::addNewCategory() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user