Add some improvements to the Update Hamlib feature (display Hamlib version, etc.).

This commit is contained in:
Uwe Risse
2023-10-29 12:48:26 +01:00
parent 84069fe9e9
commit 3fcb8d3deb
3 changed files with 100 additions and 29 deletions
+9 -1
View File
@@ -1088,7 +1088,15 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
// backup libhamlib-4.dll file, so it is still available after the next program update
QDir dataPath = QCoreApplication::applicationDirPath();
QFile f {dataPath.absolutePath() + "/" + "libhamlib-4_old.dll"};
if (!f.exists()) QFile::copy(dataPath.absolutePath() + "/" + "libhamlib-4.dll", dataPath.absolutePath() + "/" + "libhamlib-4_old.dll");
if (!f.exists()) {
QFile::copy(dataPath.absolutePath() + "/" + "libhamlib-4.dll", dataPath.absolutePath() + "/" + "libhamlib-4_old.dll");
QTimer::singleShot (5000, [=] { //wait until hamlib has been started
extern char* hamlib_version2;
m_settings->beginGroup("Configuration");
m_settings->setValue ("HamlibBackedUp", hamlib_version2);
m_settings->endGroup();
});
}
#endif
// this must be the last statement of constructor