Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solve issue with non const rig_caps on hamlib #41

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/qsstv.pro
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ contains(QMAKE_HOST.arch, arm.*):{
else {
message(Compiling for x86)
CONFIG(debug ,debug|release){
dox.commands = cd $$PWD/documentation/manual ;doxygen manual.doxy; cd $$PWD ;doxygen $$PWD/documentation/api/api.doxy;
dox.commands = cd $$PWD/documentation/manual ;doxygen manual.y; cd $$PWD ;doxygen $$PWD/documentation/api/api.doxy;
dox.depends= FORCE
PRE_TARGETDEPS += dox
message(dox will be generated)
Expand Down
19 changes: 17 additions & 2 deletions src/rig/rigcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,29 @@
#define HAMLIB_FILPATHLEN FILPATHLEN
#endif

#ifdef RIGCAPS_NOT_CONST
/* Since this commit:
* https://github.com/Hamlib/Hamlib/commit/ed941939359da9f8734dbdf4a21a9b01622a1a6e
* a 'struct rig_caps' is no longer constant (as passed to 'rig_list_foreach()' etc.).
*/
QList<rig_caps *> capsList;
#else
QList<const rig_caps *> capsList;
#endif

QList<const rig_caps *> capsList;
bool radiolistLoaded=false;




#ifdef RIGCAPS_NOT_CONST
/* Since this commit:
* https://github.com/Hamlib/Hamlib/commit/ed941939359da9f8734dbdf4a21a9b01622a1a6e
* a 'struct rig_caps' is no longer constant (as passed to 'rig_list_foreach()' etc.).
*/
int collect(rig_caps *caps,rig_ptr_t)
#else
int collect(const rig_caps *caps,rig_ptr_t)
#endif
{
capsList.append(caps);
return 1;
Expand Down