Fix "Open containing folder" opened the wrong path for folder item

Previously that action is the same as "Open" action which is wrong
behavior, it should be opening the parent folder instead. The wrong
behavior is observed on nautilus 3.36.3 and nemo 4.6.5.
This commit is contained in:
Chocobo1
2020-08-29 20:46:13 +08:00
parent 3c6e6ae872
commit ef6dfa9b54
3 changed files with 45 additions and 63 deletions

View File

@@ -82,7 +82,7 @@ public slots:
void readSettings();
void saveSettings();
void reloadPreferences();
void openDoubleClickedFile(const QModelIndex &index) const;
void openItem(const QModelIndex &index) const;
void loadTrackers(BitTorrent::TorrentHandle *const torrent);
protected slots:
@@ -107,8 +107,8 @@ private slots:
private:
QPushButton *getButtonFromIndex(int index);
void applyPriorities();
void openFile(const QModelIndex &index) const;
void openFolder(const QModelIndex &index, bool containingFolder) const;
void openParentFolder(const QModelIndex &index) const;
QString getFullPath(const QModelIndex &index) const;
Ui::PropertiesWidget *m_ui;
BitTorrent::TorrentHandle *m_torrent;