mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 04:54:18 +00:00
Fix CookiesDialog position
This commit is contained in:
parent
f36e891010
commit
1fbf121506
@ -35,7 +35,7 @@
|
|||||||
#include "ui_cookiesdialog.h"
|
#include "ui_cookiesdialog.h"
|
||||||
|
|
||||||
#define SETTINGS_KEY(name) "CookiesDialog/" name
|
#define SETTINGS_KEY(name) "CookiesDialog/" name
|
||||||
const QString KEY_GEOMETRY = SETTINGS_KEY("Geometry");
|
const QString KEY_SIZE = SETTINGS_KEY("Size");
|
||||||
const QString KEY_COOKIESVIEWSTATE = SETTINGS_KEY("CookiesViewState");
|
const QString KEY_COOKIESVIEWSTATE = SETTINGS_KEY("CookiesViewState");
|
||||||
|
|
||||||
CookiesDialog::CookiesDialog(QWidget *parent)
|
CookiesDialog::CookiesDialog(QWidget *parent)
|
||||||
@ -55,14 +55,14 @@ CookiesDialog::CookiesDialog(QWidget *parent)
|
|||||||
m_cookiesModel->index(0, 0),
|
m_cookiesModel->index(0, 0),
|
||||||
QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
|
QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
|
||||||
|
|
||||||
restoreGeometry(SettingsStorage::instance()->loadValue(KEY_GEOMETRY).toByteArray());
|
resize(SettingsStorage::instance()->loadValue(KEY_SIZE, size()).toSize());
|
||||||
m_ui->treeView->header()->restoreState(
|
m_ui->treeView->header()->restoreState(
|
||||||
SettingsStorage::instance()->loadValue(KEY_COOKIESVIEWSTATE).toByteArray());
|
SettingsStorage::instance()->loadValue(KEY_COOKIESVIEWSTATE).toByteArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
CookiesDialog::~CookiesDialog()
|
CookiesDialog::~CookiesDialog()
|
||||||
{
|
{
|
||||||
SettingsStorage::instance()->storeValue(KEY_GEOMETRY, saveGeometry());
|
SettingsStorage::instance()->storeValue(KEY_SIZE, size());
|
||||||
SettingsStorage::instance()->storeValue(
|
SettingsStorage::instance()->storeValue(
|
||||||
KEY_COOKIESVIEWSTATE, m_ui->treeView->header()->saveState());
|
KEY_COOKIESVIEWSTATE, m_ui->treeView->header()->saveState());
|
||||||
delete m_ui;
|
delete m_ui;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user