|
2019-04-08
, 09:07
|
|
Posts: 1,719 |
Thanked: 4,765 times |
Joined on Apr 2018
@ Helsinki, Finland.
|
#102
|
|
2019-04-08
, 16:13
|
|
Posts: 889 |
Thanked: 2,087 times |
Joined on Sep 2010
@ Manchester
|
#103
|
|
2021-01-24
, 04:31
|
Posts: 202 |
Thanked: 385 times |
Joined on Jul 2018
|
#104
|
The Following User Says Thank You to levone1 For This Useful Post: | ||
|
2021-07-07
, 02:36
|
Posts: 202 |
Thanked: 385 times |
Joined on Jul 2018
|
#105
|
= qMin(qMin(s.width() / 2, s.height() / 2), f)
graphicswidget/rect.cpp: In member function 'vir tual void karin::rect::setRadius(float)': graphicswidget/rect.cpp:293:55: error: no matchi ng function for call to 'qMin(const double&, flo at&)' = qMin(qMin(s.width() / 2, s.height() / 2), f); ^
The Following User Says Thank You to levone1 For This Useful Post: | ||
|
2021-07-07
, 11:10
|
|
Posts: 6,447 |
Thanked: 20,981 times |
Joined on Sep 2012
@ UK
|
#106
|
qMin(qMin(s.width() / 2, s.height() / 2), f)
qMin(double, whatever_type_f_is)
qMin(qMin(s.width() / 2, s.height() / 2), double(f))
The Following 3 Users Say Thank You to pichlo For This Useful Post: | ||
|
2021-07-07
, 16:33
|
Posts: 202 |
Thanked: 385 times |
Joined on Jul 2018
|
#107
|
You pretty much figured it out yourself. qMin returns a double, so
is seen by the compiler asCode:qMin(qMin(s.width() / 2, s.height() / 2), f)
If f is float, convert it to double. The best solution would be to make it double to start with, but if that is not practical, simply cast it:Code:qMin(double, whatever_type_f_is)
C++ is funny like that. In C, the conversion from float to double is automatic. C++ thinks it's too cool for that.Code:qMin(qMin(s.width() / 2, s.height() / 2), double(f))
EDIT:
In this case, C++ cannot convert automatically because qMin is a template and requires the same type for both parameters. The compiler does not know whether to convert them both to float or to double, so it gives up and throws a wobbly. I still think it should be smart enough to convert them both to the wider type, but as I say, C++ can be funny sometimes.
The Following User Says Thank You to levone1 For This Useful Post: | ||
|
2021-07-08
, 06:55
|
|
Posts: 6,447 |
Thanked: 20,981 times |
Joined on Sep 2012
@ UK
|
#108
|
I still couldn't get rpm to build, since the build was creating a /usr/lib.. directory in BUILDROOT iwhile the app needed a /usr/lib64... directory, but all the proper files were created, so I could easily copy manually. Any insight there would be appreciated, jist out of curiosity ...
|
2021-07-08
, 12:46
|
Posts: 202 |
Thanked: 385 times |
Joined on Jul 2018
|
#109
|
I haven't got the first idea. Have you tried asking Mr DuckDuckGo?
My naive guess would be that building it on a 32-bit architecture will always create a 32-bit RPM. On a 64-bit architecture you may have a choice. This looks promising, but I have not tried it myself.
|
2021-07-30
, 14:50
|
Posts: 202 |
Thanked: 385 times |
Joined on Jul 2018
|
#110
|
I haven't got the first idea. Have you tried asking Mr DuckDuckGo?
My naive guess would be that building it on a 32-bit architecture will always create a 32-bit RPM. On a 64-bit architecture you may have a choice. This looks promising, but I have not tried it myself.
void IpHeartBeatWatcher::run() { #ifdef SFOS handle_ = iphb_open(NULL); if (handle_ != NULL) { while ( doWatch_ ) { time_t time = iphb_wait(handle_, 0, (2 * IPHB_GS_WAIT_10_MINS), 1); printf("%ld seconds since the epoch began\n", (long)time); printf("%s", asctime(gmtime(&time))); emit triggered();
2 * IPHB_GS_WAIT_10_MINS
time_t seconds; seconds = time(NULL); printf("%ld seconds since the epoch began\n", (long)time);
The Following User Says Thank You to levone1 For This Useful Post: | ||
edit - actually, now I seem to have connection - mu bin files referred to in sudoers were in sbin... I pinged the ip that showed up in
Last edited by levone1; 2019-04-08 at 02:16.