mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 08:59:37 -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
|
// To allow a proper sorting, be careful to pad at right with spaces. This
|
||||||
// is achieved by using QString("%1").arg(number,15,10).
|
// is achieved by using QString("%1").arg(number,15,10).
|
||||||
//
|
//
|
||||||
ui.searchResultWidget->setItemDelegateForColumn(SR_SIZE_COL, new RSHumanReadableSizeDelegate()) ;
|
ui.searchResultWidget->setItemDelegateForColumn(SR_SIZE_COL, mSizeColumnDelegate=new RSHumanReadableSizeDelegate()) ;
|
||||||
ui.searchResultWidget->setItemDelegateForColumn(SR_AGE_COL, new RSHumanReadableAgeDelegate()) ;
|
ui.searchResultWidget->setItemDelegateForColumn(SR_AGE_COL, mAgeColumnDelegate=new RSHumanReadableAgeDelegate()) ;
|
||||||
|
|
||||||
/* make it extended selection */
|
/* make it extended selection */
|
||||||
ui.searchResultWidget -> setSelectionMode(QAbstractItemView::ExtendedSelection);
|
ui.searchResultWidget -> setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||||
@ -225,12 +225,17 @@ SearchDialog::~SearchDialog()
|
|||||||
// save settings
|
// save settings
|
||||||
processSettings(false);
|
processSettings(false);
|
||||||
|
|
||||||
if (compareSummaryRole) {
|
if (compareSummaryRole)
|
||||||
delete(compareSummaryRole);
|
delete(compareSummaryRole);
|
||||||
}
|
|
||||||
if (compareResultRole) {
|
if (compareResultRole)
|
||||||
delete(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)
|
void SearchDialog::processSettings(bool bLoad)
|
||||||
|
@ -156,6 +156,9 @@ private:
|
|||||||
RSTreeWidgetItemCompareRole *compareSummaryRole;
|
RSTreeWidgetItemCompareRole *compareSummaryRole;
|
||||||
RSTreeWidgetItemCompareRole *compareResultRole;
|
RSTreeWidgetItemCompareRole *compareResultRole;
|
||||||
|
|
||||||
|
QAbstractItemDelegate *mAgeColumnDelegate;
|
||||||
|
QAbstractItemDelegate *mSizeColumnDelegate;
|
||||||
|
|
||||||
/* Color definitions (for standard see qss.default) */
|
/* Color definitions (for standard see qss.default) */
|
||||||
QColor mTextColorLocal;
|
QColor mTextColorLocal;
|
||||||
QColor mTextColorDownloading;
|
QColor mTextColorDownloading;
|
||||||
|
Loading…
Reference in New Issue
Block a user