Closed mateosalta closed 11 years ago
Ah, that's because the currentMSecsSinceEpoch()
method wasn't added until Qt 4.7. However, you can replace:
QDateTime::currentMSecsSinceEpoch()
With:
(QDateTime::toTime_t() * 1000)
This does the exact same thing but it will compile on Qt 4.6.
Ok getting close, it still complains a bit, I changed line 31 in CBasicBroadcaster from
m_uptime = QDateTime::currentMSecsSinceEpoch();
To:
m_uptime = (QDateTime::toTime_t() * 1000);
and got this error on build:
error: cannot call member function 'uint QDateTime::toTime_t() const' without object
Oops. I made a slight error. This is the correct code to insert:
(QDateTime().toTime_t() * 1000)
I didn't realize that toTime_t()
wasn't a static method :disappointed:
Awesome, that did the trick. That should make the PPC-Mac version just as good as the other. :)
In making a ppc version some of the code in CbasicBroadcaster.cpp and CBroadcastServer.cpp was deleted to prevent build errors, https://github.com/nathan-osman/NitroShare-Mac/compare/master...PPC
This is probably something to do with differences in the versions, here is a manual for 4.6 QDateTime, http://qt.developpez.com/doc/4.6/qdatetime/
I'm hoping we can make changes to put the functionality back in.