Qt: Code cleanup

This commit is contained in:
Vicki Pfau 2017-04-13 00:28:41 -07:00
parent a8121fd635
commit 0fdb436d3e
1 changed files with 2 additions and 13 deletions

View File

@ -264,19 +264,6 @@ void Window::reloadConfig() {
m_log.setLevels(opts->logLevel);
QString saveStateExtdata = m_config->getOption("saveStateExtdata");
bool ok;
int flags = saveStateExtdata.toInt(&ok);
if (ok) {
m_controller->setSaveStateExtdata(flags);
}
QString loadStateExtdata = m_config->getOption("loadStateExtdata");
flags = loadStateExtdata.toInt(&ok);
if (ok) {
m_controller->setLoadStateExtdata(flags);
}
m_controller->setConfig(m_config->config());
m_display->lockAspectRatio(opts->lockAspectRatio);
m_display->filter(opts->resampleVideo);
@ -1446,11 +1433,13 @@ void Window::setupMenu(QMenuBar* menubar) {
saveStateExtdata->connect([this](const QVariant& value) {
m_controller->setSaveStateExtdata(value.toInt());
}, this);
m_config->updateOption("saveStateExtdata");
ConfigOption* loadStateExtdata = m_config->addOption("loadStateExtdata");
loadStateExtdata->connect([this](const QVariant& value) {
m_controller->setLoadStateExtdata(value.toInt());
}, this);
m_config->updateOption("loadStateExtdata");
QAction* exitFullScreen = new QAction(tr("Exit fullscreen"), frameMenu);
connect(exitFullScreen, SIGNAL(triggered()), this, SLOT(exitFullScreen()));