Added the delete of the TokenQueue in some destructors to fix crashes.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7597 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2014-10-12 10:46:09 +00:00
parent e996f9e275
commit bec735b60a
21 changed files with 72 additions and 11 deletions

View File

@ -89,6 +89,11 @@ CirclesDialog::CirclesDialog(QWidget *parent)
}
CirclesDialog::~CirclesDialog()
{
delete mCircleQueue;
}
void CirclesDialog::todo()
{
QMessageBox::information(this, "Todo",

View File

@ -38,6 +38,7 @@ class CirclesDialog : public RsGxsUpdateBroadcastPage, public TokenResponse
public:
CirclesDialog(QWidget *parent = 0);
~CirclesDialog();
virtual QIcon iconPixmap() const { return QIcon(IMAGE_CIRCLES) ; } //MainPage
virtual QString pageName() const { return tr("Circles") ; } //MainPage

View File

@ -203,6 +203,11 @@ IdDialog::IdDialog(QWidget *parent)
registerHelpButton(ui.helpButton, hlp_str) ;
}
IdDialog::~IdDialog()
{
delete(mIdQueue);
}
void IdDialog::todo()
{
QMessageBox::information(this, "Todo",

View File

@ -44,6 +44,7 @@ class IdDialog : public RsGxsUpdateBroadcastPage, public TokenResponse
public:
IdDialog(QWidget *parent = 0);
~IdDialog();
virtual QIcon iconPixmap() const { return QIcon(IMAGE_IDDIALOG) ; } //MainPage
virtual QString pageName() const { return tr("Identities") ; } //MainPage

View File

@ -83,6 +83,11 @@ IdEditDialog::IdEditDialog(QWidget *parent)
ui.pushButton_Tag->setEnabled(false);
}
IdEditDialog::~IdEditDialog()
{
delete(mIdQueue);
}
void IdEditDialog::setupNewId(bool pseudo)
{
setWindowTitle(tr("New identity"));

View File

@ -41,6 +41,7 @@ class IdEditDialog : public QDialog, public TokenResponse
public:
IdEditDialog(QWidget *parent = 0);
~IdEditDialog();
void setupNewId(bool pseudo);
void setupExistingId(std::string keyId);

View File

@ -196,6 +196,12 @@ PeopleDialog::PeopleDialog(QWidget *parent)
#endif
}
void PeopleDialog::~PeopleDialog()
{
delete(mIdentityQueue);
delete(mCirclesQueue);
}
void PeopleDialog::updateDisplay(bool complete)
{
Q_UNUSED(complete);

View File

@ -51,6 +51,7 @@ class PeopleDialog : public RsGxsUpdateBroadcastPage, public Ui::PeopleDialog, p
static const uint32_t PD_CIRCLES ;
PeopleDialog(QWidget *parent = 0);
~PeopleDialog();
virtual QIcon iconPixmap() const { return QIcon(IMAGE_IDENTITY) ; } //MainPage
virtual QString pageName() const { return tr("People") ; } //MainPage

View File

@ -97,6 +97,11 @@ PhotoShare::PhotoShare(QWidget *parent)
requestAlbumData();
}
void PhotoShare::~PhotoShare()
{
delete(mPhotoQueue);
}
void PhotoShare::notifySelection(PhotoShareItem *selection)
{

View File

@ -29,6 +29,7 @@ class PhotoShare : public MainPage, public TokenResponse, public PhotoShareItemH
public:
PhotoShare(QWidget *parent = 0);
~PhotoShare();
void notifySelection(PhotoShareItem* selection);

View File

@ -51,14 +51,16 @@ PhotoSlideShow::PhotoSlideShow(const RsPhotoAlbum& album, QWidget *parent)
//QTimer::singleShot(5000, this, SLOT(timerEvent()));
}
PhotoSlideShow::~PhotoSlideShow(){
PhotoSlideShow::~PhotoSlideShow()
{
std::map<RsGxsMessageId, RsPhotoPhoto *>::iterator mit = mPhotos.begin();
for(; mit != mPhotos.end(); mit++)
{
delete mit->second;
}
delete(mPhotoQueue);
}
void PhotoSlideShow::showPhotoDetails()

View File

@ -122,6 +122,11 @@ WikiDialog::WikiDialog(QWidget *parent)
insertWikiGroups();
}
WikiDialog::~WikiDialog()
{
delete(mWikiQueue);
}
void WikiDialog::checkUpdate()
{
/* update */

View File

@ -46,6 +46,7 @@ class WikiDialog : public MainPage, public TokenResponse
public:
WikiDialog(QWidget *parent = 0);
~WikiDialog();
virtual QIcon iconPixmap() const { return QIcon(IMAGE_WIKI) ; } //MainPage
virtual QString pageName() const { return tr("Wiki Pages") ; } //MainPage

View File

@ -97,6 +97,7 @@ WikiEditDialog::WikiEditDialog(QWidget *parent)
WikiEditDialog::~WikiEditDialog()
{
delete (mThreadCompareRole);
delete(mWikiQueue);
}
void WikiEditDialog::mergeModeToggle()

View File

@ -119,6 +119,7 @@ FriendSelectionWidget::FriendSelectionWidget(QWidget *parent)
FriendSelectionWidget::~FriendSelectionWidget()
{
delete(mIdQueue);
delete ui;
}

View File

@ -52,7 +52,7 @@
#define IMAGE_VOTEDOWN ":/images/vote_down.png"
GxsCommentTreeWidget::GxsCommentTreeWidget(QWidget *parent)
:QTreeWidget(parent), mRsTokenService(NULL), mCommentService(NULL), mTokenQueue(NULL)
:QTreeWidget(parent), mTokenQueue(NULL), mRsTokenService(NULL), mCommentService(NULL)
{
// QTreeWidget* widget = this;
@ -73,6 +73,13 @@ GxsCommentTreeWidget::GxsCommentTreeWidget(QWidget *parent)
return;
}
GxsCommentTreeWidget::~GxsCommentTreeWidget()
{
if (mTokenQueue) {
delete(mTokenQueue);
}
}
void GxsCommentTreeWidget::setCurrentMsgId(QTreeWidgetItem *current, QTreeWidgetItem *previous)
{
@ -84,7 +91,7 @@ void GxsCommentTreeWidget::setCurrentMsgId(QTreeWidgetItem *current, QTreeWidget
}
}
void GxsCommentTreeWidget::customPopUpMenu(const QPoint& point)
void GxsCommentTreeWidget::customPopUpMenu(const QPoint& /*point*/)
{
QMenu contextMnu( this );
QAction* action = contextMnu.addAction(QIcon(IMAGE_MESSAGE), tr("Reply to Comment"), this, SLOT(replyToComment()));

View File

@ -36,6 +36,7 @@ class GxsCommentTreeWidget : public QTreeWidget, public TokenResponse
public:
GxsCommentTreeWidget(QWidget *parent = 0);
~GxsCommentTreeWidget();
void setup(RsTokenService *token_service, RsGxsCommentService *comment_service);
void requestComments(const RsGxsGrpMsgIdPair& threadId);

View File

@ -79,6 +79,13 @@ GxsGroupDialog::GxsGroupDialog(TokenQueue *tokenExternalQueue, RsTokenService *t
init();
}
GxsGroupDialog::~GxsGroupDialog()
{
if (mInternalTokenQueue) {
delete(mInternalTokenQueue);
}
}
void GxsGroupDialog::init()
{
// connect up the buttons.

View File

@ -143,6 +143,8 @@ public:
*/
GxsGroupDialog(TokenQueue *tokenExternalQueue, RsTokenService *tokenService, Mode mode, RsGxsGroupId groupId, uint32_t enableFlags, uint32_t defaultFlags, QWidget *parent = NULL);
~GxsGroupDialog();
uint32_t mode() { return mMode; }
// overloaded from TokenResponse

View File

@ -53,6 +53,7 @@ GxsMessageFramePostWidget::~GxsMessageFramePostWidget()
delete(mFillThread);
mFillThread = NULL;
}
delete(mTokenQueue);
}
void GxsMessageFramePostWidget::setGroupId(const RsGxsGroupId &groupId)

View File

@ -84,6 +84,15 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId)
#endif
}
CreateGxsChannelMsg::~CreateGxsChannelMsg()
{
#ifdef CHANNELS_FRAME_CATCHER
delete fCatcher;
#endif
delete(mChannelQueue);
}
void CreateGxsChannelMsg::contextMenu(QPoint /*point*/)
{
QList<RetroShareLink> links ;
@ -142,13 +151,6 @@ void CreateGxsChannelMsg::pasteLink()
}
}
CreateGxsChannelMsg::~CreateGxsChannelMsg()
{
#ifdef CHANNELS_FRAME_CATCHER
delete fCatcher;
#endif
}
/* Dropping */
void CreateGxsChannelMsg::dragEnterEvent(QDragEnterEvent *event)