mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-10 18:15:18 -04:00
GXS:
- added three new classes for automatic refresh of ui - RsGxsUpdateBroadcastBase - RsGxsUpdateBroadcastWidget - RsGxsUpdateBroadcastPage - prevent call to :singleShot on RsProtectedTimer - extend RsGxsUpdateBroadcast - added automatic refresh to Identity and Forums (except subscribe/unsubscribe) git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6503 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
14890ef007
commit
621c8037bc
19 changed files with 551 additions and 255 deletions
|
@ -22,33 +22,15 @@
|
|||
#pragma once
|
||||
|
||||
#include <QTimer>
|
||||
#include <retroshare-gui/RsAutoUpdatePage.h>
|
||||
#include <iostream>
|
||||
|
||||
#define PROTECTED_TIMER_DEBUG
|
||||
|
||||
class RsProtectedTimer: public QTimer
|
||||
class RsProtectedTimer : public QTimer
|
||||
{
|
||||
public:
|
||||
RsProtectedTimer(QObject *parent)
|
||||
: QTimer(parent)
|
||||
{
|
||||
}
|
||||
public:
|
||||
RsProtectedTimer(QObject *parent);
|
||||
|
||||
virtual void timerEvent(QTimerEvent *e)
|
||||
{
|
||||
if(RsAutoUpdatePage::eventsLocked())
|
||||
{
|
||||
#ifdef PROTECTED_TIMER_DEBUG
|
||||
std::cerr << "Timer is blocked!." << std::endl;
|
||||
#endif
|
||||
return ;
|
||||
}
|
||||
protected:
|
||||
virtual void timerEvent(QTimerEvent *e);
|
||||
|
||||
#ifdef PROTECTED_TIMER_DEBUG
|
||||
std::cerr << "Timer has passed protection." << std::endl;
|
||||
#endif
|
||||
QTimer::timerEvent(e) ;
|
||||
}
|
||||
// do not use, please use setInterval, setSingleShot and connect signal timeout
|
||||
static void singleShot(int /*msec*/, QObject */*receiver*/, const char */*member*/) {}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue