mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-02-03 02:37:46 +01:00
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)
|
||||
|
||||
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.
|
||||
▪ ♥ Auto-updating of feeds fixed (again?!). ♥
|
||||
▪ Fixed problem with adding feeds in TT-RSS accounts. (bug #154)
|
||||
|
@ -100,8 +100,6 @@ void MessagesView::reloadSelections(bool mark_current_index_read) {
|
||||
else {
|
||||
// Messages were probably removed from the model, nothing can
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,6 @@
|
||||
#include <QSqlError>
|
||||
#include <QStack>
|
||||
#include <QAction>
|
||||
#include <QPointer>
|
||||
#include <QSqlTableModel>
|
||||
#include <QClipboard>
|
||||
|
||||
@ -133,9 +132,21 @@ bool StandardServiceRoot::supportsCategoryAdding() const {
|
||||
}
|
||||
|
||||
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);
|
||||
delete form_pointer.data();
|
||||
|
||||
qApp->feedUpdateLock()->unlock();
|
||||
}
|
||||
|
||||
QVariant StandardServiceRoot::data(int column, int role) const {
|
||||
@ -405,23 +416,33 @@ bool StandardServiceRoot::mergeImportExportModel(FeedsImportExportModel *model,
|
||||
}
|
||||
|
||||
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);
|
||||
delete form_pointer.data();
|
||||
|
||||
qApp->feedUpdateLock()->unlock();
|
||||
}
|
||||
|
||||
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()->exec();
|
||||
delete form.data();
|
||||
}
|
||||
|
||||
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()->exec();
|
||||
delete form.data();
|
||||
}
|
||||
|
||||
QStringList StandardServiceRoot::textualFeedIds(const QList<Feed*> &feeds) {
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "miscellaneous/application.h"
|
||||
#include "miscellaneous/settings.h"
|
||||
#include "miscellaneous/mutex.h"
|
||||
#include "miscellaneous/textfactory.h"
|
||||
#include "gui/dialogs/formmain.h"
|
||||
#include "network-web/networkfactory.h"
|
||||
@ -34,7 +35,6 @@
|
||||
#include <QSqlTableModel>
|
||||
#include <QSqlQuery>
|
||||
#include <QSqlError>
|
||||
#include <QPointer>
|
||||
#include <QPair>
|
||||
#include <QClipboard>
|
||||
|
||||
@ -62,7 +62,6 @@ void TtRssServiceRoot::start(bool freshly_activated) {
|
||||
|
||||
void TtRssServiceRoot::stop() {
|
||||
m_network->logout();
|
||||
|
||||
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() {
|
||||
QPointer<FormEditAccount> form_pointer = new FormEditAccount(qApp->mainForm());
|
||||
QScopedPointer<FormEditAccount> form_pointer(new FormEditAccount(qApp->mainForm()));
|
||||
form_pointer.data()->execForEdit(this);
|
||||
delete form_pointer.data();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -119,10 +118,21 @@ bool TtRssServiceRoot::supportsCategoryAdding() const {
|
||||
}
|
||||
|
||||
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);
|
||||
delete form_pointer.data();
|
||||
|
||||
qApp->feedUpdateLock()->unlock();
|
||||
}
|
||||
|
||||
void TtRssServiceRoot::addNewCategory() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user