mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-25 06:40:58 -04:00
fixed comment voting
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8224 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
71ca750fc8
commit
21d62edca2
4 changed files with 12 additions and 3 deletions
|
@ -47,9 +47,7 @@ GxsCommentDialog::GxsCommentDialog(QWidget *parent, RsTokenService *token_servic
|
||||||
|
|
||||||
connect(ui->refreshButton, SIGNAL(clicked()), this, SLOT(refresh()));
|
connect(ui->refreshButton, SIGNAL(clicked()), this, SLOT(refresh()));
|
||||||
connect(ui->idChooser, SIGNAL(currentIndexChanged( int )), this, SLOT(voterSelectionChanged( int )));
|
connect(ui->idChooser, SIGNAL(currentIndexChanged( int )), this, SLOT(voterSelectionChanged( int )));
|
||||||
|
connect(ui->idChooser, SIGNAL(idsLoaded()), this, SLOT(idChooserReady()));
|
||||||
/* force voterId through - first time */
|
|
||||||
voterSelectionChanged( 0 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GxsCommentDialog::~GxsCommentDialog()
|
GxsCommentDialog::~GxsCommentDialog()
|
||||||
|
@ -81,6 +79,11 @@ void GxsCommentDialog::refresh()
|
||||||
commentLoad(mGrpId, mMsgId);
|
commentLoad(mGrpId, mMsgId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GxsCommentDialog::idChooserReady()
|
||||||
|
{
|
||||||
|
voterSelectionChanged(0);
|
||||||
|
}
|
||||||
|
|
||||||
void GxsCommentDialog::voterSelectionChanged( int index )
|
void GxsCommentDialog::voterSelectionChanged( int index )
|
||||||
{
|
{
|
||||||
std::cerr << "GxsCommentDialog::voterSelectionChanged(" << index << ")";
|
std::cerr << "GxsCommentDialog::voterSelectionChanged(" << index << ")";
|
||||||
|
|
|
@ -46,6 +46,7 @@ public:
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void refresh();
|
void refresh();
|
||||||
|
void idChooserReady();
|
||||||
void voterSelectionChanged( int index );
|
void voterSelectionChanged( int index );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -219,6 +219,7 @@ void GxsIdChooser::loadPrivateIds()
|
||||||
setItemData(count() - 1, TYPE_CREATE_ID, ROLE_TYPE);
|
setItemData(count() - 1, TYPE_CREATE_ID, ROLE_TYPE);
|
||||||
}
|
}
|
||||||
setDefaultItem();
|
setDefaultItem();
|
||||||
|
emit idsLoaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
mFirstLoad = false;
|
mFirstLoad = false;
|
||||||
|
|
|
@ -56,6 +56,10 @@ public:
|
||||||
bool setChosenId(const RsGxsId &gxsId);
|
bool setChosenId(const RsGxsId &gxsId);
|
||||||
ChosenId_Ret getChosenId(RsGxsId &gxsId);
|
ChosenId_Ret getChosenId(RsGxsId &gxsId);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
// emitted after first load of own ids
|
||||||
|
void idsLoaded();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void showEvent(QShowEvent *event);
|
virtual void showEvent(QShowEvent *event);
|
||||||
void updateDisplay(bool reset);
|
void updateDisplay(bool reset);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue