×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Getting warning when compiling with Qt in QtCreator

  • Posts: 1
  • Thank you received: 0
Hi All,

I am compiling indilib with my own observatory software (in C++ & Qt 6.2). When I compile, I get the following warning (many of them):

/home/shoupydad/QtProjects/CCDAuto/indiclient.cpp:227: warning: ‘INDI::Property::operator INDI::PropertyViewSwitch*() const’ is deprecated: Do not use INDI::Property as pointer. [-Wdeprecated-declarations]
../CCDAuto/indiclient.cpp: In member function ‘bool IndiClient::isDomeSlaved(const char*)’:
../CCDAuto/indiclient.cpp:227:57: warning: ‘INDI::Property::operator INDI::PropertyViewSwitch*() const’ is deprecated: Do not use INDI::Property as pointer. [-Wdeprecated-declarations]
227 | slavedSwitch = domeDevice->getSwitch("DOME_AUTOSYNC");
| ^

The offending code is:

ISwitchVectorProperty *slavedSwitch = nullptr;
slavedSwitch = domeDevice->getSwitch("DOME_AUTOSYNC");
if (slavedSwitch == nullptr) {
mainWindow->StatusPrint("*** Warning - Unable to find dome DOME_AUTOSYNC property. (isDomeSlaved) ");
return false;
}

Is there some other way I should be getting a switch? Thanks for any help/info. Tony...
7 months 2 weeks ago #95577

Please Log in or Create an account to join the conversation.

Time to create page: 0.324 seconds