mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-16 01:54:52 -04:00
ID rework
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-IdCleaning@7167 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ad1602d701
commit
97ac7f85f7
17 changed files with 57 additions and 57 deletions
|
@ -128,7 +128,7 @@ void CirclesDialog::editExistingCircle()
|
||||||
}
|
}
|
||||||
|
|
||||||
QString coltext = item->text(CIRCLEGROUP_CIRCLE_COL_GROUPID);
|
QString coltext = item->text(CIRCLEGROUP_CIRCLE_COL_GROUPID);
|
||||||
std::string id = coltext.toStdString();
|
RsGxsGroupId id ( coltext.toStdString());
|
||||||
|
|
||||||
CreateCircleDialog dlg;
|
CreateCircleDialog dlg;
|
||||||
dlg.editExistingId(id);
|
dlg.editExistingId(id);
|
||||||
|
@ -140,11 +140,11 @@ void CirclesDialog::reloadAll()
|
||||||
requestGroupMeta();
|
requestGroupMeta();
|
||||||
|
|
||||||
/* grab all ids */
|
/* grab all ids */
|
||||||
std::list<std::string> friend_pgpIds;
|
std::list<RsPgpId> friend_pgpIds;
|
||||||
std::list<std::string> all_pgpIds;
|
std::list<RsPgpId> all_pgpIds;
|
||||||
std::list<std::string>::iterator it;
|
std::list<RsPgpId>::iterator it;
|
||||||
|
|
||||||
std::set<std::string> friend_set;
|
std::set<RsPgpId> friend_set;
|
||||||
|
|
||||||
rsPeers->getGPGAcceptedList(friend_pgpIds);
|
rsPeers->getGPGAcceptedList(friend_pgpIds);
|
||||||
rsPeers->getGPGAllList(all_pgpIds);
|
rsPeers->getGPGAllList(all_pgpIds);
|
||||||
|
@ -170,7 +170,7 @@ void CirclesDialog::reloadAll()
|
||||||
QTreeWidgetItem *item = new QTreeWidgetItem();
|
QTreeWidgetItem *item = new QTreeWidgetItem();
|
||||||
|
|
||||||
item->setText(CIRCLEGROUP_FRIEND_COL_NAME, QString::fromUtf8(details.name.c_str()));
|
item->setText(CIRCLEGROUP_FRIEND_COL_NAME, QString::fromUtf8(details.name.c_str()));
|
||||||
item->setText(CIRCLEGROUP_FRIEND_COL_ID, QString::fromStdString(*it));
|
item->setText(CIRCLEGROUP_FRIEND_COL_ID, QString::fromStdString((*it).toStdString()));
|
||||||
friendsItem->addChild(item);
|
friendsItem->addChild(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ void CirclesDialog::reloadAll()
|
||||||
QTreeWidgetItem *item = new QTreeWidgetItem();
|
QTreeWidgetItem *item = new QTreeWidgetItem();
|
||||||
|
|
||||||
item->setText(CIRCLEGROUP_FRIEND_COL_NAME, QString::fromUtf8(details.name.c_str()));
|
item->setText(CIRCLEGROUP_FRIEND_COL_NAME, QString::fromUtf8(details.name.c_str()));
|
||||||
item->setText(CIRCLEGROUP_FRIEND_COL_ID, QString::fromStdString(*it));
|
item->setText(CIRCLEGROUP_FRIEND_COL_ID, QString::fromStdString((*it).toStdString()));
|
||||||
fofItem->addChild(item);
|
fofItem->addChild(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -251,10 +251,10 @@ void set_tree_background(QTreeWidget *tree, uint32_t type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void check_mark_item(QTreeWidgetItem *item, const std::set<std::string> &names, uint32_t col, uint32_t type)
|
void check_mark_item(QTreeWidgetItem *item, const std::set<RsPgpId> &names, uint32_t col, uint32_t type)
|
||||||
{
|
{
|
||||||
QString coltext = item->text(col);
|
QString coltext = item->text(col);
|
||||||
std::string colstr = coltext.toStdString();
|
RsPgpId colstr ( coltext.toStdString());
|
||||||
if (names.end() != names.find(colstr))
|
if (names.end() != names.find(colstr))
|
||||||
{
|
{
|
||||||
set_item_background(item, type);
|
set_item_background(item, type);
|
||||||
|
@ -263,7 +263,7 @@ void check_mark_item(QTreeWidgetItem *item, const std::set<std::string> &names,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void update_mark_children(QTreeWidgetItem *item, const std::set<std::string> &names, uint32_t col, uint32_t type)
|
void update_mark_children(QTreeWidgetItem *item, const std::set<RsPgpId> &names, uint32_t col, uint32_t type)
|
||||||
{
|
{
|
||||||
int count = item->childCount();
|
int count = item->childCount();
|
||||||
for(int i = 0; i < count; i++)
|
for(int i = 0; i < count; i++)
|
||||||
|
@ -278,7 +278,7 @@ void update_mark_children(QTreeWidgetItem *item, const std::set<std::string> &na
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void mark_matching_tree(QTreeWidget *tree, const std::set<std::string> &names, uint32_t col, uint32_t type)
|
void mark_matching_tree(QTreeWidget *tree, const std::set<RsPgpId> &names, uint32_t col, uint32_t type)
|
||||||
{
|
{
|
||||||
std::cerr << "CirclesDialog mark_matching_tree()";
|
std::cerr << "CirclesDialog mark_matching_tree()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
@ -296,13 +296,13 @@ void mark_matching_tree(QTreeWidget *tree, const std::set<std::string> &names, u
|
||||||
|
|
||||||
/**** Circles checks - v expensive ***/
|
/**** Circles checks - v expensive ***/
|
||||||
|
|
||||||
void mark_circle_item(QTreeWidgetItem *item, const std::set<std::string> &names)
|
void mark_circle_item(QTreeWidgetItem *item, const std::set<RsPgpId> &names)
|
||||||
{
|
{
|
||||||
std::string id = item->text(CIRCLEGROUP_CIRCLE_COL_GROUPID).toStdString();
|
RsGxsCircleId id ( item->text(CIRCLEGROUP_CIRCLE_COL_GROUPID).toStdString());
|
||||||
RsGxsCircleDetails details;
|
RsGxsCircleDetails details;
|
||||||
if (rsGxsCircles->getCircleDetails(id, details))
|
if (rsGxsCircles->getCircleDetails(id, details))
|
||||||
{
|
{
|
||||||
std::set<std::string>::iterator it;
|
std::set<RsPgpId>::iterator it;
|
||||||
for(it = names.begin(); it != names.end(); it++)
|
for(it = names.begin(); it != names.end(); it++)
|
||||||
{
|
{
|
||||||
if (details.mAllowedPeers.end() != details.mAllowedPeers.find(*it))
|
if (details.mAllowedPeers.end() != details.mAllowedPeers.find(*it))
|
||||||
|
@ -321,7 +321,7 @@ void mark_circle_item(QTreeWidgetItem *item, const std::set<std::string> &names)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void mark_circle_children(QTreeWidgetItem *item, const std::set<std::string> &names)
|
void mark_circle_children(QTreeWidgetItem *item, const std::set<RsPgpId> &names)
|
||||||
{
|
{
|
||||||
int count = item->childCount();
|
int count = item->childCount();
|
||||||
for(int i = 0; i < count; i++)
|
for(int i = 0; i < count; i++)
|
||||||
|
@ -336,7 +336,7 @@ void mark_circle_children(QTreeWidgetItem *item, const std::set<std::string> &na
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void mark_circle_tree(QTreeWidget *tree, const std::set<std::string> &names)
|
void mark_circle_tree(QTreeWidget *tree, const std::set<RsPgpId> &names)
|
||||||
{
|
{
|
||||||
std::cerr << "CirclesDialog mark_circle_tree()";
|
std::cerr << "CirclesDialog mark_circle_tree()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
@ -377,7 +377,7 @@ void CirclesDialog::circle_selected()
|
||||||
if (rsGxsCircles->getCircleDetails(id, details))
|
if (rsGxsCircles->getCircleDetails(id, details))
|
||||||
{
|
{
|
||||||
/* now mark all the members */
|
/* now mark all the members */
|
||||||
std::set<std::string> members;
|
std::set<RsPgpId> members;
|
||||||
std::map<RsPgpId, std::list<RsGxsId> >::iterator it;
|
std::map<RsPgpId, std::list<RsGxsId> >::iterator it;
|
||||||
for(it = details.mAllowedPeers.begin(); it != details.mAllowedPeers.end(); it++)
|
for(it = details.mAllowedPeers.begin(); it != details.mAllowedPeers.end(); it++)
|
||||||
{
|
{
|
||||||
|
@ -411,10 +411,10 @@ void CirclesDialog::friend_selected()
|
||||||
|
|
||||||
set_item_background(item, BLUE_BACKGROUND);
|
set_item_background(item, BLUE_BACKGROUND);
|
||||||
|
|
||||||
std::string id = item->text(CIRCLEGROUP_FRIEND_COL_ID).toStdString();
|
RsPgpId id ( item->text(CIRCLEGROUP_FRIEND_COL_ID).toStdString());
|
||||||
|
|
||||||
/* update permission lists */
|
/* update permission lists */
|
||||||
std::set<std::string> names;
|
std::set<RsPgpId> names;
|
||||||
names.insert(id);
|
names.insert(id);
|
||||||
mark_circle_tree(ui.treeWidget_membership, names);
|
mark_circle_tree(ui.treeWidget_membership, names);
|
||||||
}
|
}
|
||||||
|
@ -633,7 +633,7 @@ void CirclesDialog::loadGroupMeta(const uint32_t &token)
|
||||||
|
|
||||||
QTreeWidgetItem *groupItem = new QTreeWidgetItem();
|
QTreeWidgetItem *groupItem = new QTreeWidgetItem();
|
||||||
groupItem->setText(CIRCLEGROUP_CIRCLE_COL_GROUPNAME, QString::fromUtf8(vit->mGroupName.c_str()));
|
groupItem->setText(CIRCLEGROUP_CIRCLE_COL_GROUPNAME, QString::fromUtf8(vit->mGroupName.c_str()));
|
||||||
groupItem->setText(CIRCLEGROUP_CIRCLE_COL_GROUPID, QString::fromStdString(vit->mGroupId));
|
groupItem->setText(CIRCLEGROUP_CIRCLE_COL_GROUPID, QString::fromStdString(vit->mGroupId.toStdString()));
|
||||||
|
|
||||||
if (vit->mCircleType == GXS_CIRCLE_TYPE_LOCAL)
|
if (vit->mCircleType == GXS_CIRCLE_TYPE_LOCAL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -78,8 +78,8 @@ CreateCircleDialog::CreateCircleDialog()
|
||||||
mIsExistingCircle = false;
|
mIsExistingCircle = false;
|
||||||
mIsExternalCircle = true;
|
mIsExternalCircle = true;
|
||||||
|
|
||||||
ui.idChooser->loadIds(0,"");
|
ui.idChooser->loadIds(0,RsGxsId());
|
||||||
ui.circleComboBox->loadCircles(GXS_CIRCLE_CHOOSER_EXTERNAL, "");
|
ui.circleComboBox->loadCircles(GXS_CIRCLE_CHOOSER_EXTERNAL, RsGxsCircleId());
|
||||||
}
|
}
|
||||||
|
|
||||||
CreateCircleDialog::~CreateCircleDialog()
|
CreateCircleDialog::~CreateCircleDialog()
|
||||||
|
@ -255,7 +255,7 @@ void CreateCircleDialog::createCircle()
|
||||||
/* insert into circle */
|
/* insert into circle */
|
||||||
if (mIsExternalCircle)
|
if (mIsExternalCircle)
|
||||||
{
|
{
|
||||||
circle.mInvitedMembers.push_back(keyId.toStdString());
|
circle.mInvitedMembers.push_back(RsGxsId(keyId.toStdString()));
|
||||||
std::cerr << "CreateCircleDialog::createCircle() Inserting Member: " << keyId.toStdString();
|
std::cerr << "CreateCircleDialog::createCircle() Inserting Member: " << keyId.toStdString();
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
}
|
}
|
||||||
|
@ -557,7 +557,7 @@ void CreateCircleDialog::loadIdentities(uint32_t token)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString keyId = QString::fromStdString(data.mMeta.mGroupId);
|
QString keyId = QString::fromStdString(data.mMeta.mGroupId.toStdString());
|
||||||
QString nickname = QString::fromUtf8(data.mMeta.mGroupName.c_str());
|
QString nickname = QString::fromUtf8(data.mMeta.mGroupName.c_str());
|
||||||
QString idtype = tr("Anon Id");
|
QString idtype = tr("Anon Id");
|
||||||
|
|
||||||
|
|
|
@ -585,7 +585,7 @@ void IdDialog::insertRepList(uint32_t token)
|
||||||
/* insert 4 columns */
|
/* insert 4 columns */
|
||||||
|
|
||||||
/* friend name */
|
/* friend name */
|
||||||
item->setId(op.mMeta.mGroupId.toStdString(), RSIDREP_COL_NAME);
|
item->setId(op.mMeta.mAuthorId, RSIDREP_COL_NAME);
|
||||||
|
|
||||||
/* score */
|
/* score */
|
||||||
item->setText(RSIDREP_COL_OPINION, QString::number(op.getOpinion()));
|
item->setText(RSIDREP_COL_OPINION, QString::number(op.getOpinion()));
|
||||||
|
|
|
@ -240,7 +240,7 @@ void IdEditDialog::loadExistingId(uint32_t token)
|
||||||
void IdEditDialog::checkNewTag()
|
void IdEditDialog::checkNewTag()
|
||||||
{
|
{
|
||||||
std::string tag = ui.plainTextEdit_Tag->toPlainText().toStdString();
|
std::string tag = ui.plainTextEdit_Tag->toPlainText().toStdString();
|
||||||
std::string id = ui.lineEdit_KeyId->text().toStdString();
|
RsGxsId id ( ui.lineEdit_KeyId->text().toStdString());
|
||||||
std::string name = ui.lineEdit_Nickname->text().toUtf8().data();
|
std::string name = ui.lineEdit_Nickname->text().toUtf8().data();
|
||||||
|
|
||||||
QString desc;
|
QString desc;
|
||||||
|
@ -313,7 +313,7 @@ void IdEditDialog::rmTag(int idx)
|
||||||
loadRecognTags();
|
loadRecognTags();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IdEditDialog::tagDetails(const std::string &id, const std::string &name, const std::string &tag, QString &desc)
|
bool IdEditDialog::tagDetails(const RsGxsId &id, const std::string &name, const std::string &tag, QString &desc)
|
||||||
{
|
{
|
||||||
if (tag.empty())
|
if (tag.empty())
|
||||||
{
|
{
|
||||||
|
@ -378,7 +378,7 @@ void IdEditDialog::loadRecognTags()
|
||||||
for(it = mEditGroup.mRecognTags.begin(); it != mEditGroup.mRecognTags.end(); it++, i++)
|
for(it = mEditGroup.mRecognTags.begin(); it != mEditGroup.mRecognTags.end(); it++, i++)
|
||||||
{
|
{
|
||||||
QString recognTag;
|
QString recognTag;
|
||||||
tagDetails(mEditGroup.mMeta.mGroupId.toStdString(), mEditGroup.mMeta.mGroupName, *it, recognTag);
|
tagDetails(mEditGroup.mMeta.mGroupId, mEditGroup.mMeta.mGroupName, *it, recognTag);
|
||||||
|
|
||||||
switch(i)
|
switch(i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
#include "util/TokenQueue.h"
|
#include "util/TokenQueue.h"
|
||||||
#include <retroshare/rsidentity.h>
|
#include <retroshare/rsidentity.h>
|
||||||
|
#include <retroshare/rsgxsifacetypes.h>
|
||||||
|
|
||||||
class UIStateHelper;
|
class UIStateHelper;
|
||||||
|
|
||||||
|
@ -65,7 +66,7 @@ private:
|
||||||
|
|
||||||
void loadRecognTags();
|
void loadRecognTags();
|
||||||
// extract details.
|
// extract details.
|
||||||
bool tagDetails(const std::string &id, const std::string &name, const std::string &tag, QString &desc);
|
bool tagDetails(const RsGxsId &id, const std::string &name, const std::string &tag, QString &desc);
|
||||||
void rmTag(int idx);
|
void rmTag(int idx);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -46,7 +46,7 @@ GxsCommentDialog::GxsCommentDialog(QWidget *parent, RsTokenService *token_servic
|
||||||
ui.treeWidget->setup(token_service, comment_service);
|
ui.treeWidget->setup(token_service, comment_service);
|
||||||
|
|
||||||
/* fill in the available OwnIds for signing */
|
/* fill in the available OwnIds for signing */
|
||||||
ui.idChooser->loadIds(IDCHOOSER_ID_REQUIRED, "");
|
ui.idChooser->loadIds(IDCHOOSER_ID_REQUIRED, RsGxsId());
|
||||||
|
|
||||||
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 )));
|
||||||
|
|
|
@ -95,9 +95,9 @@ void GxsCommentTreeWidget::customPopUpMenu(const QPoint& point)
|
||||||
contextMnu.addSeparator();
|
contextMnu.addSeparator();
|
||||||
|
|
||||||
action = contextMnu.addAction(QIcon(IMAGE_VOTEUP), tr("Vote Up"), this, SLOT(voteUp()));
|
action = contextMnu.addAction(QIcon(IMAGE_VOTEUP), tr("Vote Up"), this, SLOT(voteUp()));
|
||||||
action->setDisabled(mVoterId.empty());
|
action->setDisabled(mVoterId.isNull());
|
||||||
action = contextMnu.addAction(QIcon(IMAGE_VOTEDOWN), tr("Vote Down"), this, SLOT(voteDown()));
|
action = contextMnu.addAction(QIcon(IMAGE_VOTEDOWN), tr("Vote Down"), this, SLOT(voteDown()));
|
||||||
action->setDisabled(mVoterId.empty());
|
action->setDisabled(mVoterId.isNull());
|
||||||
|
|
||||||
|
|
||||||
if (!mCurrentMsgId.isNull())
|
if (!mCurrentMsgId.isNull())
|
||||||
|
|
|
@ -37,7 +37,7 @@ GxsCreateCommentDialog::GxsCreateCommentDialog(TokenQueue *tokQ, RsGxsCommentSer
|
||||||
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(createComment()));
|
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(createComment()));
|
||||||
|
|
||||||
/* fill in the available OwnIds for signing */
|
/* fill in the available OwnIds for signing */
|
||||||
ui->idChooser->loadIds(IDCHOOSER_ID_REQUIRED, "");
|
ui->idChooser->loadIds(IDCHOOSER_ID_REQUIRED, RsGxsId());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GxsCreateCommentDialog::createComment()
|
void GxsCreateCommentDialog::createComment()
|
||||||
|
|
|
@ -108,9 +108,9 @@ void GxsGroupDialog::init()
|
||||||
|
|
||||||
/* Setup Reasonable Defaults */
|
/* Setup Reasonable Defaults */
|
||||||
|
|
||||||
ui.idChooser->loadIds(0,"");
|
ui.idChooser->loadIds(0,RsGxsId());
|
||||||
ui.circleComboBox->loadCircles(GXS_CIRCLE_CHOOSER_EXTERNAL,"");
|
ui.circleComboBox->loadCircles(GXS_CIRCLE_CHOOSER_EXTERNAL,RsGxsCircleId());
|
||||||
ui.localComboBox->loadCircles(GXS_CIRCLE_CHOOSER_PERSONAL,"");
|
ui.localComboBox->loadCircles(GXS_CIRCLE_CHOOSER_PERSONAL,RsGxsCircleId());
|
||||||
|
|
||||||
initMode();
|
initMode();
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ bool GxsIdChooser::MakeIdDesc(const RsGxsId &id, QString &desc)
|
||||||
if (mTimerCount > MAX_TRY)
|
if (mTimerCount > MAX_TRY)
|
||||||
{
|
{
|
||||||
desc = QString("%1 ... [").arg(tr("Not found"));
|
desc = QString("%1 ... [").arg(tr("Not found"));
|
||||||
desc += QString::fromStdString(id.substr(0,5));
|
desc += QString::fromStdString(id.toStdString().substr(0,5));
|
||||||
desc += "...]";
|
desc += "...]";
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -92,7 +92,7 @@ void GxsIdChooser::addPrivateId(const RsGxsId &gxsId, bool replace)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString id = QString::fromStdString(gxsId);
|
QString id = QString::fromStdString(gxsId.toStdString());
|
||||||
|
|
||||||
if (replace) {
|
if (replace) {
|
||||||
/* Find and replace text of exisiting item */
|
/* Find and replace text of exisiting item */
|
||||||
|
|
|
@ -69,20 +69,19 @@ static bool findTagIcon(int tag_class, int tag_type, QIcon &icon)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool CreateIdIcon(const std::string &id, QIcon &idIcon)
|
static bool CreateIdIcon(const RsGxsId &id, QIcon &idIcon)
|
||||||
{
|
{
|
||||||
QPixmap image(IconSize, IconSize);
|
QPixmap image(IconSize, IconSize);
|
||||||
QPainter painter(&image);
|
QPainter painter(&image);
|
||||||
|
|
||||||
painter.fillRect(0, 0, IconSize, IconSize, Qt::black);
|
painter.fillRect(0, 0, IconSize, IconSize, Qt::black);
|
||||||
|
|
||||||
int len = id.length();
|
int len = id.SIZE_IN_BYTES;
|
||||||
for(int i = 0; i + 1 < len; i += 2)
|
for(int i = 0; i<len; ++i)
|
||||||
{
|
{
|
||||||
char hex1 = id[i];
|
unsigned char hex = id.toByteArray()[i];
|
||||||
char hex2 = id[i+1];
|
int x = hex & 0xf ;
|
||||||
int x = (hex1 >= 'a') ? (hex1 - 'a' + 10) : (hex1 - '0');
|
int y = (hex & 0xf0) >> 4 ;
|
||||||
int y = (hex2 >= 'a') ? (hex2 - 'a' + 10) : (hex2 - '0');
|
|
||||||
painter.fillRect(x, y, x+1, y+1, Qt::green);
|
painter.fillRect(x, y, x+1, y+1, Qt::green);
|
||||||
}
|
}
|
||||||
idIcon = QIcon(image);
|
idIcon = QIcon(image);
|
||||||
|
@ -99,7 +98,7 @@ bool GxsIdDetails::MakeIdDesc(const RsGxsId &id, bool doIcons, QString &str, std
|
||||||
std::cerr << "GxsIdTreeWidget::MakeIdDesc() FAILED TO GET ID";
|
std::cerr << "GxsIdTreeWidget::MakeIdDesc() FAILED TO GET ID";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
str = QObject::tr("Loading... ") + QString::fromStdString(id.substr(0,5));
|
str = QObject::tr("Loading... ") + QString::fromStdString(id.toStdString().substr(0,5));
|
||||||
|
|
||||||
if (!doIcons)
|
if (!doIcons)
|
||||||
{
|
{
|
||||||
|
@ -144,7 +143,7 @@ bool GxsIdDetails::MakeIdDesc(const RsGxsId &id, bool doIcons, QString &str, std
|
||||||
|
|
||||||
if (addCode)
|
if (addCode)
|
||||||
{
|
{
|
||||||
str += QString::fromStdString(id.substr(0,5));
|
str += QString::fromStdString(id.toStdString().substr(0,5));
|
||||||
str += "...]";
|
str += "...]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ GxsIdLabel::GxsIdLabel(QWidget *parent)
|
||||||
void GxsIdLabel::setId(const RsGxsId &id)
|
void GxsIdLabel::setId(const RsGxsId &id)
|
||||||
{
|
{
|
||||||
mId = id;
|
mId = id;
|
||||||
if (mId == "")
|
if (mId.isNull())
|
||||||
{
|
{
|
||||||
setText("No Signature");
|
setText("No Signature");
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ void GxsIdItemDelegate::paint( QPainter * painter,
|
||||||
std::cerr << "GxsIdItemDelegate::paint()";
|
std::cerr << "GxsIdItemDelegate::paint()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
RsGxsId id = mTree->ItemTextFromIndex(index, mGxsIdColumn).toStdString();
|
RsGxsId id ( mTree->ItemTextFromIndex(index, mGxsIdColumn).toStdString());
|
||||||
paintGxsId(painter, option, id);
|
paintGxsId(painter, option, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ void GxsIdRSItemDelegate::paint( QPainter * painter,
|
||||||
std::cerr << "GxsIdRSItemDelegate::paint()";
|
std::cerr << "GxsIdRSItemDelegate::paint()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
RsGxsId id = mTree->ItemTextFromIndex(index, mGxsIdColumn).toStdString();
|
RsGxsId id ( mTree->ItemTextFromIndex(index, mGxsIdColumn).toStdString());
|
||||||
paintGxsId(painter, option, id);
|
paintGxsId(painter, option, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ void GxsIdRSTreeWidgetItem::setId(const RsGxsId &id, int column)
|
||||||
|
|
||||||
mId = id;
|
mId = id;
|
||||||
mColumn = column;
|
mColumn = column;
|
||||||
if (mId == "")
|
if (mId.isNull())
|
||||||
{
|
{
|
||||||
setText(mColumn, "No Signature");
|
setText(mColumn, "No Signature");
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,7 @@ void GxsIdTreeWidgetItem::setId(const RsGxsId &id, int column)
|
||||||
|
|
||||||
mId = id;
|
mId = id;
|
||||||
mColumn = column;
|
mColumn = column;
|
||||||
if (mId == "")
|
if (mId.isNull())
|
||||||
{
|
{
|
||||||
setText(mColumn, "No Signature");
|
setText(mColumn, "No Signature");
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,7 @@ void CreateGxsForumMsg::newMsg()
|
||||||
mForumMetaLoaded = false;
|
mForumMetaLoaded = false;
|
||||||
|
|
||||||
/* fill in the available OwnIds for signing */
|
/* fill in the available OwnIds for signing */
|
||||||
ui.idChooser->loadIds(IDCHOOSER_ID_REQUIRED, "");
|
ui.idChooser->loadIds(IDCHOOSER_ID_REQUIRED, RsGxsId());
|
||||||
|
|
||||||
if (mForumId.isNull()) {
|
if (mForumId.isNull()) {
|
||||||
mStateHelper->setActive(CREATEGXSFORUMMSG_FORUMINFO, false);
|
mStateHelper->setActive(CREATEGXSFORUMMSG_FORUMINFO, false);
|
||||||
|
|
|
@ -804,7 +804,7 @@ QTreeWidgetItem *GxsForumThreadWidget::convertMsgToThreadWidget(const RsGxsForum
|
||||||
item->setText(COLUMN_THREAD_DATE, text);
|
item->setText(COLUMN_THREAD_DATE, text);
|
||||||
item->setData(COLUMN_THREAD_DATE, ROLE_THREAD_SORT, sort);
|
item->setData(COLUMN_THREAD_DATE, ROLE_THREAD_SORT, sort);
|
||||||
|
|
||||||
item->setText(COLUMN_THREAD_AUTHOR, QString::fromStdString(msg.mMeta.mAuthorId));
|
item->setText(COLUMN_THREAD_AUTHOR, QString::fromStdString(msg.mMeta.mAuthorId.toStdString()));
|
||||||
//item->setId(msg.mMeta.mAuthorId, COLUMN_THREAD_AUTHOR);
|
//item->setId(msg.mMeta.mAuthorId, COLUMN_THREAD_AUTHOR);
|
||||||
//#TODO
|
//#TODO
|
||||||
#if 0
|
#if 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue