Skip to content

Commit

Permalink
Settings debug
Browse files Browse the repository at this point in the history
  • Loading branch information
vladisslav2011 committed Mar 29, 2024
1 parent d4e37e4 commit 39165f1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/applications/gqrx/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ MainWindow::~MainWindow()

if (m_settings)
{
qDebug() << "Saving device string: "<<m_settings->value("input/device","").toString();
m_settings->setValue("configversion", 3);
m_settings->setValue("crashed", false);

Expand All @@ -447,7 +448,20 @@ MainWindow::~MainWindow()
// save session
storeSession();

qDebug() << "Writing configuration to:" << m_settings->fileName();
m_settings->sync();
switch(m_settings->status())
{
case QSettings::NoError:
qDebug() << "Settings are saved successfully";
break;
case QSettings::AccessError:
qDebug() << "Failed to save settings: access violation";
break;
case QSettings::FormatError:
qDebug() << "Failed to save settings: format error";
break;
}
delete m_settings;
}

Expand Down

0 comments on commit 39165f1

Please sign in to comment.