fixed a few bugs in reputation items serialisation code and GUI display

This commit is contained in:
csoler 2015-10-08 23:02:34 -04:00
parent 3d21d99601
commit 8c6c9344fe
5 changed files with 31 additions and 26 deletions

View file

@ -682,16 +682,16 @@ void IdDialog::insertIdDetails(uint32_t token)
ui->overallOpinion_TF->setText(QString::number(info.mOverallReputationScore));
switch(data.mReputation.mOwnOpinion)
switch(info.mOwnOpinion)
{
case RsReputations::OPINION_NEGATIVE: ui->ownOpinion_CB->setCurrentIndex(0); break ;
case RsReputations::OPINION_NEUTRAL : ui->ownOpinion_CB->setCurrentIndex(1); break ;
case RsReputations::OPINION_POSITIVE: ui->ownOpinion_CB->setCurrentIndex(2); break ;
default:
std::cerr << "Unexpected value in own opinion: " << data.mReputation.mOwnOpinion << std::endl;
std::cerr << "Unexpected value in own opinion: " << info.mOwnOpinion << std::endl;
}
ui->neighborNodesOpinion_TF->setText(QString::number(data.mReputation.mPeerOpinion));
//ui->neighborNodesOpinion_TF->setText(QString::number(info.m));
}
void IdDialog::modifyReputation()

View file

@ -534,7 +534,7 @@ p, li { white-space: pre-wrap; }
</property>
<item>
<property name="text">
<string>Positive</string>
<string>Negative</string>
</property>
</item>
<item>
@ -544,7 +544,7 @@ p, li { white-space: pre-wrap; }
</item>
<item>
<property name="text">
<string>Negative</string>
<string>Positive</string>
</property>
</item>
</widget>