mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 20:44:15 +00:00
Remember torrent import dialog geometry and position
This commit is contained in:
parent
f1ca4f40af
commit
a39c7f52cf
@ -49,10 +49,12 @@ TorrentImportDlg::TorrentImportDlg(QWidget *parent) :
|
||||
#if LIBTORRENT_VERSION_MINOR < 15
|
||||
ui->checkSkipCheck->setVisible(false);
|
||||
#endif
|
||||
loadSettings();
|
||||
}
|
||||
|
||||
TorrentImportDlg::~TorrentImportDlg()
|
||||
{
|
||||
saveSettings();
|
||||
delete ui;
|
||||
}
|
||||
|
||||
@ -277,3 +279,15 @@ bool TorrentImportDlg::skipFileChecking() const
|
||||
return ui->checkSkipCheck->isChecked();
|
||||
}
|
||||
#endif
|
||||
|
||||
void TorrentImportDlg::loadSettings()
|
||||
{
|
||||
QIniSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||
settings.setValue("TorrentImportDlg/dimensions", saveGeometry());
|
||||
}
|
||||
|
||||
void TorrentImportDlg::saveSettings()
|
||||
{
|
||||
QIniSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||
restoreGeometry(settings.value("TorrentImportDlg/dimensions").toByteArray());
|
||||
}
|
||||
|
@ -69,6 +69,10 @@ private slots:
|
||||
|
||||
void on_importBtn_clicked();
|
||||
|
||||
private:
|
||||
void loadSettings();
|
||||
void saveSettings();
|
||||
|
||||
private:
|
||||
Ui::TorrentImportDlg *ui;
|
||||
boost::intrusive_ptr<libtorrent::torrent_info> t;
|
||||
|
Loading…
x
Reference in New Issue
Block a user