Browse Source

Fix tiny memory leak

adaptive-webui-19844
Christophe Dumez 14 years ago
parent
commit
81eb8b1341
  1. 3
      src/GUI.cpp
  2. 1
      src/GUI.h

3
src/GUI.cpp

@ -110,7 +110,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), for
actionSet_global_download_limit->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/download.png"))); actionSet_global_download_limit->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/download.png")));
actionDocumentation->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/qb_question.png"))); actionDocumentation->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/qb_question.png")));
actionLock_qBittorrent->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/encrypted32.png"))); actionLock_qBittorrent->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/encrypted32.png")));
QMenu *lockMenu = new QMenu(); lockMenu = new QMenu();
QAction *defineUiLockPasswdAct = lockMenu->addAction(tr("Set the password...")); QAction *defineUiLockPasswdAct = lockMenu->addAction(tr("Set the password..."));
connect(defineUiLockPasswdAct, SIGNAL(triggered()), this, SLOT(defineUILockPassword())); connect(defineUiLockPasswdAct, SIGNAL(triggered()), this, SLOT(defineUILockPassword()));
actionLock_qBittorrent->setMenu(lockMenu); actionLock_qBittorrent->setMenu(lockMenu);
@ -269,6 +269,7 @@ GUI::~GUI() {
delete search_filter; delete search_filter;
delete transferList; delete transferList;
delete guiUpdater; delete guiUpdater;
delete lockMenu;
if(createTorrentDlg) if(createTorrentDlg)
delete createTorrentDlg; delete createTorrentDlg;
if(console) if(console)

1
src/GUI.h

@ -170,6 +170,7 @@ private:
QAction *prioSeparator2; QAction *prioSeparator2;
QSplitter *hSplitter; QSplitter *hSplitter;
QSplitter *vSplitter; QSplitter *vSplitter;
QMenu *lockMenu;
// Search // Search
QPointer<SearchEngine> searchEngine; QPointer<SearchEngine> searchEngine;
// RSS // RSS

Loading…
Cancel
Save