So this is the minimal example code I'm attempting to get to work:
int GekkoFyre::CmnRoutines::curl_xferinfo(void *p, curl_off_t dltotal, curl_off_t dlnow,
curl_off_t ultotal, curl_off_t ulnow)
{
CurlStatistics stats;
stats.ul_now = ulnow;
stats.ul_total = ultotal;
stats.dl_now = dlnow;
stats.dl_total = dltotal;
emit sendXferStats(stats);
}
And this is the header:
static int curl_xferinfo(void *p, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal,
curl_off_t ulnow);
signals:
void sendXferStats(const CurlStatistics &stats);
And this is the reason why the function needs to be static:
curl_easy_setopt(curl_ptr, CURLOPT_XFERINFOFUNCTION, curl_xferinfo);
// Pass the struct pointer into the xferinfo function, but note that this is an
// alias to CURLOPT_PROGRESSDATA
curl_easy_setopt(curl_ptr, CURLOPT_XFERINFODATA, &curl_struct.prog);
I know from various posts throughout StackOverflow that it is possible under certain conditions to emit a signal from a static function, such as this one: Sending signal from static class method in Qt
What I want to know is, how do I do that in this instance? If it is at all possible? Thank you so much in advance, as any help is immensely appreciated.