Warning: "implicit copy constructor for 'QListSpecialMethods<QList<int>>' is deprecated"
-
Hi,
QVector<int> v; QVector<int> w; v = w;
leads to the warning:
Definition of implicit copy constructor for 'QListSpecialMethods<QList<int>>' is deprecated because it has a user-declared destructorAm I doing sth wrong?
If not: how can I suppress the warning? I've tried#pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy-with-dtor" QVector<int> v; QVector<int> w; v = w; #pragma clang diagnostic pop
But the warning stays.
I am using Qt6.6.1 MinGW 64 bit on a Windows 10 Pro machine under Qt Creator 10.0.2.
BR
Sebastian -
Hi, I have Qt 6.6.3 MinGW 81.0 64-bit on a Windows 10 Pro using Qt Creator 13.0.2.
I started an empty Widgets project and added your 3 lines to the ctor in mainwindow.cpp:#include "mainwindow.h" #include "./ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); QVector<int> v; QVector<int> w; v = w; } MainWindow::~MainWindow() { delete ui; }
However it compiles fine, no errors.
-
S SeDi has marked this topic as solved on