iamantony / qtcsv

Library for reading and writing csv-files in Qt.
MIT License
265 stars 141 forks source link

Building test fails? #59

Closed Bubblestun closed 4 years ago

Bubblestun commented 4 years ago

[OK ]cd C:\path\to\folder\with\qtcsv

[OK ]# Create build directory [OK ]mkdir .\build [OK ]cd .\build

[OK ]# Build library. You can choose build type: release or debug. Set DESTDIR to current directory. [OK ]qmake ..\qtcsv.pro CONFIG+=[release|debug] DESTDIR=%cd% [OK ]mingw32-make

[OK ]# Create build directory for tests [OK ]mkdir .\tests [OK ]cd .\tests

[OK ]# Copy library file into 'tests' directory [OK ]copy ..\qtcsv.dll .\

[OK ]# Build tests [OK ]qmake ....\tests\tests.pro CONFIG+=[release|debug] DESTDIR=%cd% [ERROR]mingw32-make

..\..\tests\testreader.cpp: In member function 'void TestReader::testReadFileWorldCitiesPop()':
..\..\tests\testreader.cpp:383:17: error: 'void QTime::start()' is deprecated: Use QElapsedTimer instead [-Werror=deprecated-declarations]
     timer.start();
                 ^
In file included from C:\Qt\5.14.2\mingw73_32\include/QtCore/qcborvalue.h:44:0,
                 from C:\Qt\5.14.2\mingw73_32\include/QtCore/qcborarray.h:43,
                 from C:\Qt\5.14.2\mingw73_32\include/QtCore/QtCore:38,
                 from C:\Qt\5.14.2\mingw73_32\include/QtTest/QtTestDepends:3,
                 from C:\Qt\5.14.2\mingw73_32\include\QtTest/QtTest:3,
                 from ..\..\tests\testreader.h:5,
                 from ..\..\tests\testreader.cpp:1:
C:\Qt\5.14.2\mingw73_32\include/QtCore/qdatetime.h:228:55: note: declared here
     QT_DEPRECATED_X("Use QElapsedTimer instead") void start();
                                                       ^~~~~
..\..\tests\testreader.cpp:385:50: error: 'int QTime::elapsed() const' is deprecated: Use QElapsedTimer instead [-Werror=deprecated-declarations]
     qDebug() << "Elapsed time:" << timer.elapsed() << "ms";
                                                  ^
In file included from C:\Qt\5.14.2\mingw73_32\include/QtCore/qcborvalue.h:44:0,
                 from C:\Qt\5.14.2\mingw73_32\include/QtCore/qcborarray.h:43,
                 from C:\Qt\5.14.2\mingw73_32\include/QtCore/QtCore:38,
                 from C:\Qt\5.14.2\mingw73_32\include/QtTest/QtTestDepends:3,
                 from C:\Qt\5.14.2\mingw73_32\include\QtTest/QtTest:3,
                 from ..\..\tests\testreader.h:5,
                 from ..\..\tests\testreader.cpp:1:
C:\Qt\5.14.2\mingw73_32\include/QtCore/qdatetime.h:230:54: note: declared here
     QT_DEPRECATED_X("Use QElapsedTimer instead") int elapsed() const;
                                                      ^~~~~~~
cc1plus.exe: all warnings being treated as errors
mingw32-make[1]: *** [Makefile.Release:2670: release/testreader.o] Error 1
mingw32-make[1]: Leaving directory 'D:/APP/qtcsv-master/build/tests'
mingw32-make: *** [Makefile:45: release] Error 2
iamantony commented 4 years ago

Hi @Bubblestun. Thanks for the info. Issue was fixed in 1b0ee019982e61345204f787c73e1697d46c15ac. Please verify on your side that code from master branch could be build with Qt 5.14 without warnings about QTime deprecation.

Bubblestun commented 4 years ago

I can confirm the issue is fixed. It builds on 5.14 without warnings. Thank you!