|
|
@ -353,9 +353,7 @@ void GUI::tab_changed(int new_tab) { |
|
|
|
void GUI::writeSettings() { |
|
|
|
void GUI::writeSettings() { |
|
|
|
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); |
|
|
|
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); |
|
|
|
settings.beginGroup(QString::fromUtf8("MainWindow")); |
|
|
|
settings.beginGroup(QString::fromUtf8("MainWindow")); |
|
|
|
settings.setValue("IsMaximized", isMaximized()); |
|
|
|
settings.setValue("geometry", saveGeometry()); |
|
|
|
settings.setValue(QString::fromUtf8("size"), size()); |
|
|
|
|
|
|
|
settings.setValue(QString::fromUtf8("pos"), pos()); |
|
|
|
|
|
|
|
// Splitter size
|
|
|
|
// Splitter size
|
|
|
|
QStringList sizes_str; |
|
|
|
QStringList sizes_str; |
|
|
|
sizes_str << QString::number(vSplitter->sizes().first()); |
|
|
|
sizes_str << QString::number(vSplitter->sizes().first()); |
|
|
@ -417,10 +415,8 @@ void GUI::displayRSSTab() const { |
|
|
|
void GUI::readSettings() { |
|
|
|
void GUI::readSettings() { |
|
|
|
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); |
|
|
|
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); |
|
|
|
settings.beginGroup(QString::fromUtf8("MainWindow")); |
|
|
|
settings.beginGroup(QString::fromUtf8("MainWindow")); |
|
|
|
resize(settings.value(QString::fromUtf8("size"), size()).toSize()); |
|
|
|
restoreGeometry(settings.value("geometry").toByteArray()); |
|
|
|
move(settings.value(QString::fromUtf8("pos"), misc::screenCenter(this)).toPoint()); |
|
|
|
// showMaximized();
|
|
|
|
if(settings.value("IsMaximized", false).toBool()) |
|
|
|
|
|
|
|
showMaximized(); |
|
|
|
|
|
|
|
const QStringList &sizes_str = settings.value("vSplitterSizes", QStringList()).toStringList(); |
|
|
|
const QStringList &sizes_str = settings.value("vSplitterSizes", QStringList()).toStringList(); |
|
|
|
// Splitter size
|
|
|
|
// Splitter size
|
|
|
|
QList<int> sizes; |
|
|
|
QList<int> sizes; |
|
|
|