mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 18:04:32 +00:00
saving torrent list view when changed
bc its otherwise forgotten by an unclean exit
This commit is contained in:
parent
3d7ca1da77
commit
5cab5bd129
@ -149,6 +149,8 @@ TransferListWidget::TransferListWidget(QWidget *parent, MainWindow *main_window,
|
|||||||
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(displayListMenu(const QPoint &)));
|
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(displayListMenu(const QPoint &)));
|
||||||
header()->setContextMenuPolicy(Qt::CustomContextMenu);
|
header()->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
connect(header(), SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(displayDLHoSMenu(const QPoint &)));
|
connect(header(), SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(displayDLHoSMenu(const QPoint &)));
|
||||||
|
connect(header(), SIGNAL(sectionMoved(int, int, int)), this, SLOT(saveSettings()));
|
||||||
|
connect(header(), SIGNAL(sectionResized(int, int, int)), this, SLOT(saveSettings()));
|
||||||
|
|
||||||
editHotkey = new QShortcut(QKeySequence("F2"), this, SLOT(renameSelectedTorrent()), 0, Qt::WidgetShortcut);
|
editHotkey = new QShortcut(QKeySequence("F2"), this, SLOT(renameSelectedTorrent()), 0, Qt::WidgetShortcut);
|
||||||
deleteHotkey = new QShortcut(QKeySequence::Delete, this, SLOT(deleteSelectedTorrents()), 0, Qt::WidgetShortcut);
|
deleteHotkey = new QShortcut(QKeySequence::Delete, this, SLOT(deleteSelectedTorrents()), 0, Qt::WidgetShortcut);
|
||||||
@ -594,6 +596,7 @@ void TransferListWidget::displayDLHoSMenu(const QPoint&)
|
|||||||
setColumnHidden(col, !isColumnHidden(col));
|
setColumnHidden(col, !isColumnHidden(col));
|
||||||
if (!isColumnHidden(col) && columnWidth(col) <= 5)
|
if (!isColumnHidden(col) && columnWidth(col) <= 5)
|
||||||
setColumnWidth(col, 100);
|
setColumnWidth(col, 100);
|
||||||
|
saveSettings();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +92,6 @@ protected:
|
|||||||
QString getHashFromRow(int row) const;
|
QString getHashFromRow(int row) const;
|
||||||
QModelIndex mapToSource(const QModelIndex &index) const;
|
QModelIndex mapToSource(const QModelIndex &index) const;
|
||||||
QModelIndex mapFromSource(const QModelIndex &index) const;
|
QModelIndex mapFromSource(const QModelIndex &index) const;
|
||||||
void saveSettings();
|
|
||||||
bool loadSettings();
|
bool loadSettings();
|
||||||
QStringList getSelectedTorrentsHashes() const;
|
QStringList getSelectedTorrentsHashes() const;
|
||||||
|
|
||||||
@ -104,6 +103,7 @@ protected slots:
|
|||||||
void toggleSelectedTorrentsSequentialDownload() const;
|
void toggleSelectedTorrentsSequentialDownload() const;
|
||||||
void toggleSelectedFirstLastPiecePrio() const;
|
void toggleSelectedFirstLastPiecePrio() const;
|
||||||
void askNewLabelForSelection();
|
void askNewLabelForSelection();
|
||||||
|
void saveSettings();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool openUrl(const QString& _path) const;
|
bool openUrl(const QString& _path) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user