Bug#961133: qcustomplot: buildtest-plot autopkgtest fails with Qt 5.14 because of deprecation warning

Dmitry Shachnev mitya57 at debian.org
Wed May 20 15:02:43 BST 2020


Source: qcustomplot
Version: 2.0.1+dfsg1-1
Tags: patch
User: debian-qt-kde at lists.debian.org
Usertags: qt5.14

Dear Maintainer,

One of qcustomplot autopkgtests fails when run against Qt 5.14, currently
available in experimental. It fails because of stderr:

  [ 83%] Building CXX object CMakeFiles/plots.dir/mainwindow.cpp.o
  /tmp/tmp.vk2CMqIqRc/src/mainwindow.cpp: In member function ‘void MainWindow::realtimeDataSlot()’:
  /tmp/tmp.vk2CMqIqRc/src/mainwindow.cpp:1386:29: warning: ‘int QTime::elapsed() const’ is deprecated: Use QElapsedTimer instead [-Wdeprecated-declarations]
   1386 |   double key = time.elapsed()/1000.0; // time elapsed since start of demo, in seconds
        |                             ^
  In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QDateTime:1,
                   from /usr/include/qcustomplot.h:61,
                   from /tmp/tmp.vk2CMqIqRc/src/mainwindow.h:47,
                   from /tmp/tmp.vk2CMqIqRc/src/mainwindow.cpp:42:
  /usr/include/x86_64-linux-gnu/qt5/QtCore/qdatetime.h:230:54: note: declared here
    230 |     QT_DEPRECATED_X("Use QElapsedTimer instead") int elapsed() const;
        |                                                      ^~~~~~~

Attached is a patch that changes the code to use QElapsedTimer, as suggested.
It works with Qt 5.12 too.

--
Dmitry Shachnev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 02_Use_QElapsedTimer.patch
Type: text/x-diff
Size: 769 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20200520/5139a028/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20200520/5139a028/attachment.sig>


More information about the debian-science-maintainers mailing list