From ce7a1c26fc7cb22c493aab571294210c8292d875 Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Sun, 29 Oct 2023 13:39:05 +0100 Subject: [PATCH] Make code compliant with Qt6. --- Configuration.cpp | 3 ++- widgets/mainwindow.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Configuration.cpp b/Configuration.cpp index 85db76ec0..b19fb6123 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -2500,8 +2500,9 @@ void Configuration::impl::on_hamlib_download_button_clicked (bool /*clicked*/) { #ifdef WIN32 extern char* hamlib_version2; + QString hamlib = QString(QLatin1String(hamlib_version2)); SettingsGroup g {settings_, "Configuration"}; - settings_->setValue ("HamlibBackedUp", hamlib_version2); + settings_->setValue ("HamlibBackedUp", hamlib); settings_->sync (); QDir dataPath = QCoreApplication::applicationDirPath(); QFile f1 {dataPath.absolutePath() + "/" + "libhamlib-4_old.dll"}; diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 04cfb7be6..e27106071 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -1092,8 +1092,9 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, 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; + QString hamlib = QString(QLatin1String(hamlib_version2)); m_settings->beginGroup("Configuration"); - m_settings->setValue ("HamlibBackedUp", hamlib_version2); + m_settings->setValue ("HamlibBackedUp", hamlib); m_settings->endGroup(); }); }