MCPcopy Create free account
hub / github.com/cc20110101/RedisView / readSettings

Method readSettings

src/RedisView/AppView/MainWindow.cpp:661–673  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

659}
660
661void MainWindow::readSettings() {
662 QString sPath = QCoreApplication::applicationDirPath() + "/" + IniFileName;
663 //settings.setPath(QSettings::IniFormat, QSettings::SystemScope, sPath);
664 QSettings settings(sPath, QSettings::IniFormat);
665 settings.setIniCodec("UTF-8");
666 const QByteArray geometry = settings.value("geometry", QByteArray()).toByteArray();
667 if(geometry.isEmpty()) {
668 this->showMaximized();
669 settings.setValue("geometry", saveGeometry());
670 } else {
671 restoreGeometry(geometry);
672 }
673}
674
675void MainWindow::writeSettings() {
676 QString sPath = QCoreApplication::applicationDirPath() + "/" + IniFileName;

Callers

nothing calls this directly

Calls 1

setValueMethod · 0.80

Tested by

no test coverage detected