removed potential memory leak in TransfersDialog

This commit is contained in:
csoler 2016-04-22 18:49:42 -04:00
parent 52cf66a536
commit acd059bdf0
2 changed files with 5 additions and 2 deletions

View File

@ -219,8 +219,8 @@ TransfersDialog::TransfersDialog(QWidget *parent)
// workaround for Qt bug, should be solved in next Qt release 4.7.0 // workaround for Qt bug, should be solved in next Qt release 4.7.0
// http://bugreports.qt.nokia.com/browse/QTBUG-8270 // http://bugreports.qt.nokia.com/browse/QTBUG-8270
QShortcut *Shortcut = new QShortcut(QKeySequence (Qt::Key_Delete), ui.downloadList, 0, 0, Qt::WidgetShortcut); mShortcut = new QShortcut(QKeySequence (Qt::Key_Delete), ui.downloadList, 0, 0, Qt::WidgetShortcut);
connect(Shortcut, SIGNAL(activated()), this, SLOT( cancel ())); connect(mShortcut, SIGNAL(activated()), this, SLOT( cancel ()));
//Selection Setup //Selection Setup
selection = ui.downloadList->selectionModel(); selection = ui.downloadList->selectionModel();

View File

@ -31,6 +31,7 @@
#define IMAGE_TRANSFERS ":/icons/ktorrent_128.png" #define IMAGE_TRANSFERS ":/icons/ktorrent_128.png"
class QShortcut;
class DLListDelegate; class DLListDelegate;
class ULListDelegate; class ULListDelegate;
class QStandardItemModel; class QStandardItemModel;
@ -271,6 +272,8 @@ public slots:
qlonglong getLastDL(int row, QStandardItemModel *model); qlonglong getLastDL(int row, QStandardItemModel *model);
qlonglong getPath(int row, QStandardItemModel *model); qlonglong getPath(int row, QStandardItemModel *model);
QString getSources(int row, QStandardItemModel *model); QString getSources(int row, QStandardItemModel *model);
QShortcut *mShortcut ;
}; };
#endif #endif