mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-31 09:34:52 +01:00
Editing of ownCloud NEWS acc props works now.
This commit is contained in:
parent
3efd22491c
commit
8517f2b027
@ -99,6 +99,15 @@ QList<QAction*> ServiceRoot::serviceMenu() {
|
||||
return QList<QAction*>();
|
||||
}
|
||||
|
||||
void ServiceRoot::completelyRemoveAllData() {
|
||||
// Purge old data from SQL and clean all model items.
|
||||
removeOldFeedTree(true);
|
||||
cleanAllItems();
|
||||
updateCounts(true);
|
||||
itemChanged(QList<RootItem*>() << this);
|
||||
requestReloadMessageList(true);
|
||||
}
|
||||
|
||||
void ServiceRoot::removeOldFeedTree(bool including_messages) {
|
||||
QSqlDatabase database = qApp->database()->connection(metaObject()->className(), DatabaseFactory::FromSettings);
|
||||
QSqlQuery query(database);
|
||||
|
@ -149,6 +149,8 @@ class ServiceRoot : public RootItem {
|
||||
// Selected item is naturally recycle bin.
|
||||
virtual bool onAfterMessagesRestoredFromBin(RootItem *selected_item, const QList<Message> &messages);
|
||||
|
||||
void completelyRemoveAllData();
|
||||
|
||||
// Obvious methods to wrap signals.
|
||||
void itemChanged(const QList<RootItem*> &items);
|
||||
void requestReloadMessageList(bool mark_selected_messages_read);
|
||||
|
@ -147,9 +147,8 @@ void FormEditOwnCloudAccount::onClickedOk() {
|
||||
accept();
|
||||
|
||||
if (editing_account) {
|
||||
// TODO: aktualizovat
|
||||
//m_editableRoot->completelyRemoveAllData();
|
||||
//m_editableRoot->syncIn();
|
||||
m_editableRoot->completelyRemoveAllData();
|
||||
m_editableRoot->syncIn();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,11 +22,13 @@
|
||||
#include "miscellaneous/application.h"
|
||||
#include "miscellaneous/textfactory.h"
|
||||
#include "miscellaneous/iconfactory.h"
|
||||
#include "gui/dialogs/formmain.h"
|
||||
#include "services/owncloud/owncloudserviceentrypoint.h"
|
||||
#include "services/owncloud/owncloudrecyclebin.h"
|
||||
#include "services/owncloud/owncloudfeed.h"
|
||||
#include "services/owncloud/owncloudcategory.h"
|
||||
#include "services/owncloud/network/owncloudnetworkfactory.h"
|
||||
#include "services/owncloud/gui/formeditowncloudaccount.h"
|
||||
|
||||
#include <QSqlQuery>
|
||||
#include <QSqlError>
|
||||
@ -51,7 +53,10 @@ bool OwnCloudServiceRoot::canBeDeleted() const {
|
||||
}
|
||||
|
||||
bool OwnCloudServiceRoot::editViaGui() {
|
||||
return false;
|
||||
QScopedPointer<FormEditOwnCloudAccount> form_pointer(new FormEditOwnCloudAccount(qApp->mainForm()));
|
||||
form_pointer.data()->execForEdit(this);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OwnCloudServiceRoot::deleteViaGui() {
|
||||
|
@ -72,7 +72,7 @@ bool TtRssServiceRoot::editViaGui() {
|
||||
QScopedPointer<FormEditAccount> form_pointer(new FormEditAccount(qApp->mainForm()));
|
||||
form_pointer.data()->execForEdit(this);
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TtRssServiceRoot::deleteViaGui() {
|
||||
@ -450,15 +450,6 @@ void TtRssServiceRoot::updateTitle() {
|
||||
setTitle(m_network->username() + QL1S("@") + host);
|
||||
}
|
||||
|
||||
void TtRssServiceRoot::completelyRemoveAllData() {
|
||||
// Purge old data from SQL and clean all model items.
|
||||
removeOldFeedTree(true);
|
||||
cleanAllItems();
|
||||
updateCounts(true);
|
||||
itemChanged(QList<RootItem*>() << this);
|
||||
requestReloadMessageList(true);
|
||||
}
|
||||
|
||||
void TtRssServiceRoot::syncIn() {
|
||||
QIcon original_icon = icon();
|
||||
|
||||
|
@ -61,7 +61,6 @@ class TtRssServiceRoot : public ServiceRoot {
|
||||
bool markFeedsReadUnread(QList<Feed*> items, ReadStatus read);
|
||||
void saveAccountDataToDatabase();
|
||||
void updateTitle();
|
||||
void completelyRemoveAllData();
|
||||
|
||||
public slots:
|
||||
void addNewFeed(const QString &url = QString());
|
||||
|
Loading…
x
Reference in New Issue
Block a user