Fix potential memleak caused by unused QAction pointer in SortVolumeComics

This commit is contained in:
Felix Kauselmann 2018-05-26 10:34:25 +02:00
parent 9851884021
commit ca3bc94f25

View File

@ -86,7 +86,7 @@ SortVolumeComics::SortVolumeComics(QWidget *parent) :
//rows actions //rows actions
QAction * removeItemFromList = new QAction(tr("remove selected comics"),this); QAction * removeItemFromList = new QAction(tr("remove selected comics"),this);
QAction * restoreAllItems = new QAction(tr("restore all removed comics"),this); QAction * restoreAllItems = new QAction(tr("restore all removed comics"),this);
QAction * restoreItems = new QAction(tr("restore removed comics"),this); //QAction * restoreItems = new QAction(tr("restore removed comics"),this);
tableFiles->setContextMenuPolicy(Qt::ActionsContextMenu); tableFiles->setContextMenuPolicy(Qt::ActionsContextMenu);
tableFiles->addAction(removeItemFromList); tableFiles->addAction(removeItemFromList);
@ -95,7 +95,7 @@ SortVolumeComics::SortVolumeComics(QWidget *parent) :
connect(removeItemFromList,SIGNAL(triggered()),this,SLOT(removeSelectedComics())); connect(removeItemFromList,SIGNAL(triggered()),this,SLOT(removeSelectedComics()));
connect(restoreAllItems,SIGNAL(triggered()),this,SLOT(restoreAllComics())); connect(restoreAllItems,SIGNAL(triggered()),this,SLOT(restoreAllComics()));
connect(restoreItems,SIGNAL(triggered()),this,SLOT(showRemovedComicsSelector())); //connect(restoreItems,SIGNAL(triggered()),this,SLOT(showRemovedComicsSelector()));
} }
void SortVolumeComics::setData(QList<ComicDB> & comics, const QString &json, const QString &vID) void SortVolumeComics::setData(QList<ComicDB> & comics, const QString &json, const QString &vID)