mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 12:34:19 +00:00
- RSS feed parent was not updated after being moved to another folder
This commit is contained in:
parent
480df1f5dc
commit
725700420c
@ -317,6 +317,8 @@ void RssFolder::addFile(RssFile * item) {
|
||||
(*this)[((RssFolder*)item)->getName()] = item;
|
||||
qDebug("Added folder %s to folder ./%s", ((RssFolder*)item)->getName().toLocal8Bit().data(), name.toLocal8Bit().data());
|
||||
}
|
||||
// Update parent
|
||||
item->setParent(this);
|
||||
}
|
||||
|
||||
/** RssManager **/
|
||||
@ -371,7 +373,9 @@ void RssManager::moveFile(QStringList old_path, QStringList new_path) {
|
||||
QString new_name = new_path.takeLast();
|
||||
RssFolder* dest_folder = (RssFolder*)getFile(new_path);
|
||||
if(dest_folder != src_folder) {
|
||||
// Copy to new Folder
|
||||
dest_folder->addFile(item);
|
||||
// Remove reference in old folder
|
||||
src_folder->removeFileRef(item);
|
||||
} else {
|
||||
qDebug("Nothing to move, same destination folder");
|
||||
|
@ -91,7 +91,8 @@ public:
|
||||
virtual QString getName() const = 0;
|
||||
virtual void rename(QStringList path, QString new_name) = 0;
|
||||
virtual void markAllAsRead() = 0;
|
||||
virtual RssFolder* getParent() = 0;
|
||||
virtual RssFolder* getParent() const = 0;
|
||||
virtual void setParent(RssFolder*) = 0;
|
||||
};
|
||||
|
||||
// Item of a rss stream, single information
|
||||
@ -389,7 +390,8 @@ public slots:
|
||||
public:
|
||||
RssStream(RssFolder* parent, RssManager *rssmanager, bittorrent *BTSession, QString _url);
|
||||
~RssStream();
|
||||
RssFolder* getParent() { return parent; }
|
||||
RssFolder* getParent() const { return parent; }
|
||||
void setParent(RssFolder* _parent) { parent = _parent; }
|
||||
FileType getType() const;
|
||||
void refresh();
|
||||
QStringList getPath() const;
|
||||
@ -436,7 +438,8 @@ private:
|
||||
public:
|
||||
RssFolder(RssFolder *parent, RssManager *rssmanager, bittorrent *BTSession, QString name);
|
||||
~RssFolder();
|
||||
RssFolder* getParent() { return parent; }
|
||||
RssFolder* getParent() const { return parent; }
|
||||
void setParent(RssFolder* _parent) { parent = _parent; }
|
||||
unsigned int getNbUnRead() const;
|
||||
FileType getType() const;
|
||||
RssStream* addStream(QStringList full_path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user