Fix compiler errors reported by other users (#909)
* Fix utf8_str compiler error reported by users when using wxWidgets 3.0. * Bring back RIGCAPS_NOT_CONST check to keep things compiling on distros still on Hamlib 4.5.v2.0-dev
parent
2fcc6aa379
commit
44b3f52d9d
|
@ -539,7 +539,7 @@ void FreeDVReporterDialog::setReporter(std::shared_ptr<FreeDVReporter> reporter)
|
||||||
{
|
{
|
||||||
// Update status message
|
// Update status message
|
||||||
auto statusMsg = m_statusMessage->GetValue();
|
auto statusMsg = m_statusMessage->GetValue();
|
||||||
reporter->updateMessage(statusMsg.utf8_string());
|
reporter->updateMessage((const char*)statusMsg.utf8_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -649,7 +649,7 @@ void FreeDVReporterDialog::OnSendQSY(wxCommandEvent& event)
|
||||||
|
|
||||||
void FreeDVReporterDialog::OnOpenWebsite(wxCommandEvent& event)
|
void FreeDVReporterDialog::OnOpenWebsite(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
std::string url = "https://" + wxGetApp().appConfiguration.reportingConfiguration.freedvReporterHostname->utf8_string() + "/";
|
std::string url = std::string("https://") + (const char*)wxGetApp().appConfiguration.reportingConfiguration.freedvReporterHostname->utf8_str() + "/";
|
||||||
wxLaunchDefaultBrowser(url);
|
wxLaunchDefaultBrowser(url);
|
||||||
DeselectItem();
|
DeselectItem();
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,7 +161,7 @@ class FreeDVReporterDialog : public wxFrame
|
||||||
{
|
{
|
||||||
if (reporter_)
|
if (reporter_)
|
||||||
{
|
{
|
||||||
reporter_->updateMessage(statusMsg.utf8_string());
|
reporter_->updateMessage((const char*)statusMsg.utf8_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,11 @@ HamlibRigController::RigList HamlibRigController::RigList_;
|
||||||
HamlibRigController::RigNameList HamlibRigController::RigNameList_;
|
HamlibRigController::RigNameList HamlibRigController::RigNameList_;
|
||||||
std::mutex HamlibRigController::RigListMutex_;
|
std::mutex HamlibRigController::RigListMutex_;
|
||||||
|
|
||||||
|
#if RIGCAPS_NOT_CONST
|
||||||
|
int HamlibRigController::BuildRigList_(struct rig_caps *rig, rig_ptr_t rigList) {
|
||||||
|
#else
|
||||||
int HamlibRigController::BuildRigList_(const struct rig_caps *rig, rig_ptr_t rigList) {
|
int HamlibRigController::BuildRigList_(const struct rig_caps *rig, rig_ptr_t rigList) {
|
||||||
|
#endif // RIGCAPS_NOT_CONST
|
||||||
((HamlibRigController::RigList *)rigList)->push_back(rig);
|
((HamlibRigController::RigList *)rigList)->push_back(rig);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,11 @@ private:
|
||||||
|
|
||||||
static bool RigCompare_(const struct rig_caps *rig1, const struct rig_caps *rig2);
|
static bool RigCompare_(const struct rig_caps *rig1, const struct rig_caps *rig2);
|
||||||
|
|
||||||
|
#if RIGCAPS_NOT_CONST
|
||||||
|
static int BuildRigList_(struct rig_caps *rig, rig_ptr_t);
|
||||||
|
#else
|
||||||
static int BuildRigList_(const struct rig_caps *rig, rig_ptr_t);
|
static int BuildRigList_(const struct rig_caps *rig, rig_ptr_t);
|
||||||
|
#endif // RIGCAPS_NOT_CONST
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // HAMLIB_RIG_CONTROLLER_H
|
#endif // HAMLIB_RIG_CONTROLLER_H
|
||||||
|
|
Loading…
Reference in New Issue