Skip to content

Replace obsolete qCopy with std::copy

Fixes 2 compilation warnings about using the obsolete function. Example:

/home/constantine/Projects/konsole/src/History.cpp:547:40: warning: ‘OutputIterator qCopy(InputIterator, InputIterator, OutputIterator) [with InputIterator = const Konsole::Character*; OutputIterator = QTypedArrayData<Konsole::Character>::iterator]’ is deprecated: Use std::copy [-Wdeprecated-declarations]
  547 |     qCopy(a, a + count, newLine.begin());
      |                                        ^
In file included from /usr/include/qt/QtCore/qlist.h:43,
                 from /usr/include/qt/QtCore/QList:1,
                 from /home/constantine/Projects/konsole/src/History.h:28,
                 from /home/constantine/Projects/konsole/src/History.cpp:22:
/usr/include/qt/QtCore/qalgorithms.h:82:56: note: declared here
   82 | QT_DEPRECATED_X("Use std::copy") inline OutputIterator qCopy(InputIterator begin, InputIterator end, OutputIterator dest)
Edited by Konstantin Kharlamov

Merge request reports

Loading