mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 16:39:29 -05:00
fixed missing deletes in search dialog
This commit is contained in:
parent
a2eced6d4a
commit
bb1996725d
@ -154,8 +154,8 @@ SearchDialog::SearchDialog(QWidget *parent)
|
||||
// To allow a proper sorting, be careful to pad at right with spaces. This
|
||||
// is achieved by using QString("%1").arg(number,15,10).
|
||||
//
|
||||
ui.searchResultWidget->setItemDelegateForColumn(SR_SIZE_COL, new RSHumanReadableSizeDelegate()) ;
|
||||
ui.searchResultWidget->setItemDelegateForColumn(SR_AGE_COL, new RSHumanReadableAgeDelegate()) ;
|
||||
ui.searchResultWidget->setItemDelegateForColumn(SR_SIZE_COL, mSizeColumnDelegate=new RSHumanReadableSizeDelegate()) ;
|
||||
ui.searchResultWidget->setItemDelegateForColumn(SR_AGE_COL, mAgeColumnDelegate=new RSHumanReadableAgeDelegate()) ;
|
||||
|
||||
/* make it extended selection */
|
||||
ui.searchResultWidget -> setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||
@ -225,12 +225,17 @@ SearchDialog::~SearchDialog()
|
||||
// save settings
|
||||
processSettings(false);
|
||||
|
||||
if (compareSummaryRole) {
|
||||
if (compareSummaryRole)
|
||||
delete(compareSummaryRole);
|
||||
}
|
||||
if (compareResultRole) {
|
||||
|
||||
if (compareResultRole)
|
||||
delete(compareResultRole);
|
||||
}
|
||||
|
||||
delete mSizeColumnDelegate;
|
||||
delete mAgeColumnDelegate;
|
||||
|
||||
ui.searchResultWidget->setItemDelegateForColumn(SR_SIZE_COL, nullptr);
|
||||
ui.searchResultWidget->setItemDelegateForColumn(SR_AGE_COL, nullptr);
|
||||
}
|
||||
|
||||
void SearchDialog::processSettings(bool bLoad)
|
||||
|
@ -156,6 +156,9 @@ private:
|
||||
RSTreeWidgetItemCompareRole *compareSummaryRole;
|
||||
RSTreeWidgetItemCompareRole *compareResultRole;
|
||||
|
||||
QAbstractItemDelegate *mAgeColumnDelegate;
|
||||
QAbstractItemDelegate *mSizeColumnDelegate;
|
||||
|
||||
/* Color definitions (for standard see qss.default) */
|
||||
QColor mTextColorLocal;
|
||||
QColor mTextColorDownloading;
|
||||
|
Loading…
Reference in New Issue
Block a user