mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-14 08:59:50 -05:00
fixed filtering of files in channels
This commit is contained in:
parent
f6c584183b
commit
5069a1a10e
@ -306,6 +306,10 @@ void GxsChannelFilesStatusWidget::resume()
|
|||||||
|
|
||||||
void GxsChannelFilesStatusWidget::cancel()
|
void GxsChannelFilesStatusWidget::cancel()
|
||||||
{
|
{
|
||||||
|
// When QMessgeBox asks for cancel confirmtion, this makes the widget lose focus => since it is an editor widget,
|
||||||
|
// it gets destroyed by the parent list widget => subsequent code after the QMessageBox runs over a deleted object => crash
|
||||||
|
// In summary: no QMessageBox here when the Status widget is used as an editor.
|
||||||
|
|
||||||
if(!mUsedAsEditor)
|
if(!mUsedAsEditor)
|
||||||
if ((QMessageBox::question(this, "", tr("Are you sure that you want to cancel and delete the file?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No)) == QMessageBox::No) {
|
if ((QMessageBox::question(this, "", tr("Are you sure that you want to cancel and delete the file?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No)) == QMessageBox::No) {
|
||||||
return;
|
return;
|
||||||
|
@ -295,7 +295,7 @@ void RsGxsChannelPostFilesModel::setFilter(const QStringList& strings, uint32_t&
|
|||||||
{
|
{
|
||||||
preMods();
|
preMods();
|
||||||
|
|
||||||
initEmptyHierarchy();
|
mFilteredFiles.clear();
|
||||||
|
|
||||||
if(strings.empty())
|
if(strings.empty())
|
||||||
{
|
{
|
||||||
@ -317,8 +317,6 @@ void RsGxsChannelPostFilesModel::setFilter(const QStringList& strings, uint32_t&
|
|||||||
}
|
}
|
||||||
count = mFilteredFiles.size();
|
count = mFilteredFiles.size();
|
||||||
|
|
||||||
std::cerr << "After filtering: " << count << " posts remain." << std::endl;
|
|
||||||
|
|
||||||
if (rowCount()>0)
|
if (rowCount()>0)
|
||||||
{
|
{
|
||||||
beginInsertRows(QModelIndex(),0,rowCount()-1);
|
beginInsertRows(QModelIndex(),0,rowCount()-1);
|
||||||
|
@ -194,7 +194,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="channel_TW">
|
<widget class="QTabWidget" name="channel_TW">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab_3">
|
<widget class="QWidget" name="tab_3">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -402,7 +402,7 @@
|
|||||||
<string notr="true"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
<string notr="true"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
p, li { white-space: pre-wrap; }
|
p, li { white-space: pre-wrap; }
|
||||||
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
|
</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;">
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Description</span></p></body></html></string>
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Description</span></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="textInteractionFlags">
|
<property name="textInteractionFlags">
|
||||||
|
Loading…
Reference in New Issue
Block a user