mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
moved to QueuedConnection to update the feed count
This commit is contained in:
parent
93cd6a5df1
commit
856d1b62a7
@ -18,7 +18,6 @@
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#include <QTimer>
|
||||
#include <QDateTime>
|
||||
|
||||
#include "NewsFeed.h"
|
||||
@ -91,7 +90,7 @@ NewsFeed::NewsFeed(QWidget *parent) : MainPage(parent), ui(new Ui::NewsFeed)
|
||||
connect(ui->sortComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(sortChanged(int)));
|
||||
|
||||
connect(ui->removeAllButton, SIGNAL(clicked()), ui->feedWidget, SLOT(clear()));
|
||||
connect(ui->feedWidget, SIGNAL(feedCountChanged()), this, SLOT(sendNewsFeedChanged()));
|
||||
connect(ui->feedWidget, SIGNAL(feedCountChanged()), this, SLOT(sendNewsFeedChanged()),Qt::QueuedConnection);
|
||||
|
||||
connect(ui->feedOptionsButton, SIGNAL(clicked()), this, SLOT(feedoptions()));
|
||||
ui->feedOptionsButton->hide(); // (csoler) Hidden until we repare the system to display a specific settings page.
|
||||
|
@ -392,9 +392,20 @@ void RSFeedWidget::removeFeedItem(FeedItem *feedItem)
|
||||
|
||||
QTreeWidgetItem *treeItem = findTreeWidgetItem(feedItem);
|
||||
feedRemoved(feedItem);
|
||||
if (treeItem) {
|
||||
|
||||
if (treeItem)
|
||||
{
|
||||
int treeItem_index = ui->treeWidget->indexOfTopLevelItem(treeItem);
|
||||
|
||||
if(treeItem_index < 0)
|
||||
{
|
||||
std::cerr << "(EE) Cannot remove designated item \"" << feedItem->uniqueIdentifier() << "\": not found!" << std::endl;
|
||||
return ;
|
||||
}
|
||||
|
||||
ui->treeWidget->takeTopLevelItem(treeItem_index);
|
||||
delete(treeItem);
|
||||
}
|
||||
}
|
||||
|
||||
if (!mCountChangedDisabled) {
|
||||
emit feedCountChanged();
|
||||
@ -498,6 +509,9 @@ FeedItem *RSFeedWidget::findFeedItem(const std::string& identifier)
|
||||
|
||||
std::string id = feedItem->uniqueIdentifier();
|
||||
|
||||
std::cerr << "Comparing \"" << id << "\"";
|
||||
std::cerr << " to " << identifier << "\"" << " pthread_t = " << pthread_self() << std::endl;
|
||||
|
||||
if (id == identifier)
|
||||
return feedItem;
|
||||
}
|
||||
|
@ -183,6 +183,7 @@ void GxsChannelPostItem::setup()
|
||||
|
||||
connect(ui->downloadButton, SIGNAL(clicked()), this, SLOT(download()));
|
||||
// HACK FOR NOW.
|
||||
ui->commentButton->hide();// hidden until properly enabled.
|
||||
connect(ui->commentButton, SIGNAL(clicked()), this, SLOT(loadComments()));
|
||||
|
||||
connect(ui->playButton, SIGNAL(clicked()), this, SLOT(play(void)));
|
||||
|
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1140</width>
|
||||
<width>1359</width>
|
||||
<height>342</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -57,18 +57,6 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>82</width>
|
||||
<height>108</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>156</width>
|
||||
<height>107</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
@ -138,12 +126,6 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">Short Description</string>
|
||||
</property>
|
||||
@ -570,8 +552,8 @@
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../icons.qrc"/>
|
||||
<include location="../images.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -26,7 +26,7 @@ NewsFeedUserNotify::NewsFeedUserNotify(NewsFeed *newsFeed, QObject *parent) :
|
||||
{
|
||||
mNewFeedCount = 0;
|
||||
|
||||
connect(newsFeed, SIGNAL(newsFeedChanged(int)), this, SLOT(newsFeedChanged(int)));
|
||||
connect(newsFeed, SIGNAL(newsFeedChanged(int)), this, SLOT(newsFeedChanged(int)),Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
void NewsFeedUserNotify::newsFeedChanged(int count)
|
||||
|
Loading…
Reference in New Issue
Block a user