vranki / ExtPlane

Plugin for X-Plane flight simulator which allows reading and writing simulation properties
138 stars 44 forks source link

QTime::elapsed() deprecated - replace with something else #73

Open sanderdatema opened 3 years ago

sanderdatema commented 3 years ago

I followed the steps in the readme, already had Xcode installed and added QT. But this is the error I get:

cd extplane-server/ && ( test -e Makefile || /usr/local/bin/qmake -o Makefile /Users/sander/Downloads/ExtPlane/extplane-server/extplane-server.pro ) && /Library/Developer/CommandLineTools/usr/bin/make -f Makefile
/Library/Developer/CommandLineTools/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -fPIC -std=gnu++1z  -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=11 -Wall -Wextra -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../util -I/usr/local/Cellar/qt/6.1.0_1/lib/QtNetwork.framework/Headers -I/usr/local/Cellar/qt/6.1.0_1/lib/QtCore.framework/Headers -I. -I/usr/local/Cellar/qt/6.1.0_1/share/qt/mkspecs/macx-clang -F/usr/local/Cellar/qt/6.1.0_1/lib -o datadataref.o datarefs/datadataref.cpp
datarefs/datadataref.cpp:9:18: error: no member named 'restart' in 'QTime'
    m_lastUpdate.restart();
    ~~~~~~~~~~~~ ^
datarefs/datadataref.cpp:22:47: error: no member named 'elapsed' in 'QTime'
    if(this->accuracy() == 0 || (m_lastUpdate.elapsed() > this->accuracy() ) ) {
                                 ~~~~~~~~~~~~ ^
datarefs/datadataref.cpp:28:26: error: no member named 'restart' in 'QTime'
            m_lastUpdate.restart();
            ~~~~~~~~~~~~ ^
3 errors generated.
make[1]: *** [datadataref.o] Error 1
make: *** [sub-extplane-server-make_first-ordered] Error 2
vranki commented 3 years ago

Looks like QTime::elapsed() is deprecated: https://doc.qt.io/qt-5/qtime-obsolete.html#elapsed

I'll rename this ticket to match this and mark it as a bug. Thanks for spotting this!