sdrangel
sdrangel copied to clipboard
Streamline the handling of configurations
This issue is for describing the state as of commit 75afe418c184e87aca65dd683144cb80e74fc9ec of 2024/05/12 and modify the code, the online manual, or just have a place to document it.
Configuration file written twice when exiting sdrangel
The file ~/.config/f4exb/SDRangel.conf
is written twice on Linux in a short time because MainSettings::save
is called twice when quitting sdrangel when clicking the X button or pressing Ctrl+Q:
1 MainSettings::save | mainsettings.cpp | 173 |
2 MainWindow::closeEvent | mainwindow.cpp | 1745 |
1 MainSettings::save | mainsettings.cpp | 173 |
2 MainWindow::~MainWindow | mainwindow.cpp | 322 |
This is unnecessary and wasteful. Issue #379 might be related.
Preferences::resetToDefaults called multiple times
Preferences::resetToDefaults
is called 3 times when there is no configuration file (such as when sdrangel is run for the first time) and 2 times when there is a configuration file.
When there is no configuration:
1 Preferences::resetToDefaults | preferences.cpp | 48 |
2 Preferences::Preferences | preferences.cpp | 25 |
3 MainSettings::MainSettings | mainsettings.cpp | 30 |
4 MainCore::MainCore | maincore.cpp | 76 |
5 Holder::Holder | maincore.cpp | 92 |
6 (anonymous namespace)::Q_QGS_mainCore::innerFunction | maincore.cpp | 92 |
7 QGlobalStatic<MainCore, (anonymous namespace)::Q_QGS_mainCore::innerFunction, (anonymous namespace)::Q_QGS_mainCore::guard>::operator QGlobalStatic<MainCore, (anonymous namespace)::Q_QGS_mainCore::innerFunction, (anonymous namespace)::Q_QGS_mainCore::guard>::Type * | qglobalstatic.h | 137 |
8 MainCore::instance | maincore.cpp | 95 |
9 MainWindow::MainWindow | mainwindow.cpp | 128 |
10 runQtApplication | main.cpp | 196 |
11 main | main.cpp | 248 |
1 Preferences::resetToDefaults | preferences.cpp | 48 |
2 Preferences::Preferences | preferences.cpp | 25 |
3 MainSettings::MainSettings | mainsettings.cpp | 30 |
4 MainCore::MainCore | maincore.cpp | 76 |
5 Holder::Holder | maincore.cpp | 92 |
6 (anonymous namespace)::Q_QGS_mainCore::innerFunction | maincore.cpp | 92 |
7 QGlobalStatic<MainCore, (anonymous namespace)::Q_QGS_mainCore::innerFunction, (anonymous namespace)::Q_QGS_mainCore::guard>::operator QGlobalStatic<MainCore, (anonymous namespace)::Q_QGS_mainCore::innerFunction, (anonymous namespace)::Q_QGS_mainCore::guard>::Type * | qglobalstatic.h | 137 |
8 MainCore::instance | maincore.cpp | 95 |
9 MainWindow::MainWindow | mainwindow.cpp | 128 |
10 runQtApplication | main.cpp | 196 |
11 main | main.cpp | 248 |
1 Preferences::resetToDefaults | preferences.cpp | 48 |
2 Preferences::Preferences | preferences.cpp | 25 |
3 MainSettings::MainSettings | mainsettings.cpp | 30 |
4 MainCore::MainCore | maincore.cpp | 76 |
5 Holder::Holder | maincore.cpp | 92 |
6 (anonymous namespace)::Q_QGS_mainCore::innerFunction | maincore.cpp | 92 |
7 QGlobalStatic<MainCore, (anonymous namespace)::Q_QGS_mainCore::innerFunction, (anonymous namespace)::Q_QGS_mainCore::guard>::operator QGlobalStatic<MainCore, (anonymous namespace)::Q_QGS_mainCore::innerFunction, (anonymous namespace)::Q_QGS_mainCore::guard>::Type * | qglobalstatic.h | 137 |
8 MainCore::instance | maincore.cpp | 95 |
9 MainWindow::MainWindow | mainwindow.cpp | 128 |
10 runQtApplication | main.cpp | 196 |
11 main | main.cpp | 248 |
When there is a configuration:
1 Preferences::resetToDefaults | preferences.cpp | 48 |
2 Preferences::Preferences | preferences.cpp | 25 |
3 MainSettings::MainSettings | mainsettings.cpp | 30 |
4 MainCore::MainCore | maincore.cpp | 76 |
5 Holder::Holder | maincore.cpp | 92 |
6 (anonymous namespace)::Q_QGS_mainCore::innerFunction | maincore.cpp | 92 |
7 QGlobalStatic<MainCore, (anonymous namespace)::Q_QGS_mainCore::innerFunction, (anonymous namespace)::Q_QGS_mainCore::guard>::operator QGlobalStatic<MainCore, (anonymous namespace)::Q_QGS_mainCore::innerFunction, (anonymous namespace)::Q_QGS_mainCore::guard>::Type * | qglobalstatic.h | 137 |
8 MainCore::instance | maincore.cpp | 95 |
9 MainWindow::MainWindow | mainwindow.cpp | 128 |
10 runQtApplication | main.cpp | 196 |
11 main | main.cpp | 248 |
1 Preferences::resetToDefaults | preferences.cpp | 48 |
2 MainSettings::resetToDefaults | mainsettings.cpp | 235 |
3 MainSettings::MainSettings | mainsettings.cpp | 32 |
4 MainCore::MainCore | maincore.cpp | 76 |
5 Holder::Holder | maincore.cpp | 92 |
6 (anonymous namespace)::Q_QGS_mainCore::innerFunction | maincore.cpp | 92 |
7 QGlobalStatic<MainCore, (anonymous namespace)::Q_QGS_mainCore::innerFunction, (anonymous namespace)::Q_QGS_mainCore::guard>::operator QGlobalStatic<MainCore, (anonymous namespace)::Q_QGS_mainCore::innerFunction, (anonymous namespace)::Q_QGS_mainCore::guard>::Type * | qglobalstatic.h | 137 |
8 MainCore::instance | maincore.cpp | 95 |
9 MainWindow::MainWindow | mainwindow.cpp | 128 |
10 runQtApplication | main.cpp | 196 |
11 main | main.cpp | 248 |
Station Position changed unexpectedly
It may happen that the position saved in the configuration for a station that didn't move (such as as desktop PC without a GPS receiver and whose public IP didn't change, with the "geoclue2" provider) when the "Auto-update from GPS" option is selected. This is unnecessary and wasteful but it is outside of the control of sdrangel so possible fixes are:
- deselect the auto-update option and type the desired position by hand
- install a GPS receiver
The label of the checkbox and the tooltip of the button could also be changed to refer to a generic GNSS and to suggest that position could be:
- the label could be changed from "Auto-update from GPS" to "Auto-update from GNSS"
- the tooltip could be changed from "Set position from GPS (if available)" to "Set position from GNSS (or other source if available)"
Order of presets changed after second run
The configuration that is automatically created the first time that sdrangel is run, contains presets for NOAA 18 and NOAA 19 (in this order), but after subsequent runs, the order is unnecessarily swapped in the .conf file.