Simplify the code a bit now that QIniSettings uses qBittorrent / qBittorrent by default

This commit is contained in:
Christophe Dumez 2013-02-16 20:04:48 +02:00
commit da3406b811
18 changed files with 52 additions and 52 deletions

View file

@ -300,7 +300,7 @@ void options_imp::changePage(QListWidgetItem *current, QListWidgetItem *previous
}
void options_imp::loadWindowState() {
QIniSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
QIniSettings settings;
resize(settings.value(QString::fromUtf8("Preferences/State/size"), sizeFittingScreen()).toSize());
QPoint p = settings.value(QString::fromUtf8("Preferences/State/pos"), QPoint()).toPoint();
if (!p.isNull())
@ -320,7 +320,7 @@ void options_imp::loadWindowState() {
}
void options_imp::saveWindowState() const {
QIniSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
QIniSettings settings;
settings.setValue(QString::fromUtf8("Preferences/State/size"), size());
settings.setValue(QString::fromUtf8("Preferences/State/pos"), pos());
// Splitter size