mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-05 07:35:12 -04:00
- removed LinksCloud from plugins (based on obsolete cache system)
- removed copy constructor of RsGenericId from std::string as it allowed many inconsistencies and double transforms of IDs from/to strings git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7289 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
160e04fe9a
commit
33abca82e5
33 changed files with 97 additions and 143 deletions
|
@ -290,7 +290,7 @@ void CreateCircleDialog::createCircle()
|
|||
std::cerr << std::endl;
|
||||
|
||||
// set distribution from GUI.
|
||||
circle.mMeta.mCircleId = "";
|
||||
circle.mMeta.mCircleId.clear() ;
|
||||
if (ui.radioButton_Public->isChecked())
|
||||
{
|
||||
std::cerr << "CreateCircleDialog::createCircle() Public Circle";
|
||||
|
@ -342,7 +342,7 @@ void CreateCircleDialog::createCircle()
|
|||
std::cerr << std::endl;
|
||||
|
||||
// set personal distribution
|
||||
circle.mMeta.mCircleId = "";
|
||||
circle.mMeta.mCircleId.clear() ;
|
||||
circle.mMeta.mCircleType = GXS_CIRCLE_TYPE_LOCAL;
|
||||
}
|
||||
std::cerr << "CreateCircleDialog::createCircle() : mCircleType: " << circle.mMeta.mCircleType;
|
||||
|
|
|
@ -1949,7 +1949,7 @@ void TransfersDialog::showFileDetails()
|
|||
for(int i = 0; i <= DLListModel->rowCount(); i++)
|
||||
if(selection->isRowSelected(i, QModelIndex()))
|
||||
{
|
||||
file_hash = getID(i, DLListModel).toStdString();
|
||||
file_hash = RsFileHash(getID(i, DLListModel).toStdString());
|
||||
++nb_select ;
|
||||
}
|
||||
if(nb_select != 1)
|
||||
|
|
|
@ -362,7 +362,7 @@ void PostedListDialog::updateDisplayedItems(const std::vector<RsGxsMessageId> &m
|
|||
|
||||
void PostedListDialog::changedTopic(const QString &id)
|
||||
{
|
||||
mCurrTopicId = id.toStdString();
|
||||
mCurrTopicId = RsGxsGroupId(id.toStdString());
|
||||
insertThreads();
|
||||
}
|
||||
|
||||
|
|
|
@ -337,7 +337,7 @@ bool WikiDialog::getSelectedPage(RsGxsGroupId &groupId, RsGxsMessageId &pageId,
|
|||
return false;
|
||||
}
|
||||
|
||||
pageId = item->text(WIKI_GROUP_COL_PAGEID).toStdString();
|
||||
pageId = RsGxsMessageId(item->text(WIKI_GROUP_COL_PAGEID).toStdString());
|
||||
origPageId = RsGxsMessageId(item->text(WIKI_GROUP_COL_ORIGPAGEID).toStdString());
|
||||
|
||||
#ifdef WIKI_DEBUG
|
||||
|
@ -559,7 +559,7 @@ void WikiDialog::wikiSubscribe(bool subscribe)
|
|||
|
||||
void WikiDialog::wikiGroupChanged(const QString &groupId)
|
||||
{
|
||||
mGroupId = groupId.toStdString();
|
||||
mGroupId = RsGxsGroupId(groupId.toStdString());
|
||||
|
||||
if (mGroupId.isNull()) {
|
||||
return;
|
||||
|
|
|
@ -162,7 +162,7 @@ void WikiEditDialog::historySelected()
|
|||
|
||||
RsGxsGrpMsgIdPair newSnapshot = mThreadMsgIdPair;
|
||||
std::string pageId = item->data(WET_DATA_COLUMN, WET_ROLE_PAGEID).toString().toStdString();
|
||||
newSnapshot.second = pageId;
|
||||
newSnapshot.second = RsGxsMessageId(pageId);
|
||||
|
||||
std::cerr << "WikiEditDialog::historySelected() New PageId: " << pageId;
|
||||
std::cerr << std::endl;
|
||||
|
@ -469,10 +469,10 @@ void WikiEditDialog::submitEdit()
|
|||
if (mNewPage)
|
||||
{
|
||||
mWikiSnapshot.mMeta.mGroupId = mWikiCollection.mMeta.mGroupId;
|
||||
mWikiSnapshot.mMeta.mOrigMsgId = "";
|
||||
mWikiSnapshot.mMeta.mMsgId = "";
|
||||
mWikiSnapshot.mMeta.mParentId = "";
|
||||
mWikiSnapshot.mMeta.mThreadId = "";
|
||||
mWikiSnapshot.mMeta.mOrigMsgId.clear() ;
|
||||
mWikiSnapshot.mMeta.mMsgId.clear() ;
|
||||
mWikiSnapshot.mMeta.mParentId.clear() ;
|
||||
mWikiSnapshot.mMeta.mThreadId.clear() ;
|
||||
|
||||
std::cerr << "WikiEditDialog::submitEdit() Is New Page";
|
||||
std::cerr << std::endl;
|
||||
|
@ -484,9 +484,9 @@ void WikiEditDialog::submitEdit()
|
|||
// A New Version of the ThreadHead.
|
||||
mWikiSnapshot.mMeta.mGroupId = mWikiCollection.mMeta.mGroupId;
|
||||
mWikiSnapshot.mMeta.mOrigMsgId = mRepublishOrigId;
|
||||
mWikiSnapshot.mMeta.mParentId = "";
|
||||
mWikiSnapshot.mMeta.mThreadId = "";
|
||||
mWikiSnapshot.mMeta.mMsgId = "";
|
||||
mWikiSnapshot.mMeta.mParentId.clear() ;
|
||||
mWikiSnapshot.mMeta.mThreadId.clear() ;
|
||||
mWikiSnapshot.mMeta.mMsgId.clear() ;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -118,19 +118,19 @@ ConfCertDialog::ConfCertDialog(const RsPeerId& id, const RsPgpId &pgp_id, QWidge
|
|||
connect(this, SIGNAL(configChanged()), w->getPage(MainWindow::Network), SLOT(insertConnect()));
|
||||
}
|
||||
}
|
||||
|
||||
ConfCertDialog::~ConfCertDialog()
|
||||
{
|
||||
// if(peerId.isNull())
|
||||
{
|
||||
QMap<RsPeerId, ConfCertDialog*>::iterator it = instances_ssl.find(peerId);
|
||||
if (it != instances_ssl.end())
|
||||
instances_ssl.erase(it);
|
||||
}
|
||||
// else
|
||||
{
|
||||
QMap<RsPgpId, ConfCertDialog*>::iterator it = instances_pgp.find(pgpId);
|
||||
if (it != instances_pgp.end())
|
||||
|
||||
ConfCertDialog::~ConfCertDialog()
|
||||
{
|
||||
// if(peerId.isNull())
|
||||
{
|
||||
QMap<RsPeerId, ConfCertDialog*>::iterator it = instances_ssl.find(peerId);
|
||||
if (it != instances_ssl.end())
|
||||
instances_ssl.erase(it);
|
||||
}
|
||||
// else
|
||||
{
|
||||
QMap<RsPgpId, ConfCertDialog*>::iterator it = instances_pgp.find(pgpId);
|
||||
if (it != instances_pgp.end())
|
||||
instances_pgp.erase(it);
|
||||
}
|
||||
}
|
||||
|
@ -155,12 +155,12 @@ void ConfCertDialog::loadAll()
|
|||
}
|
||||
|
||||
void ConfCertDialog::load()
|
||||
{
|
||||
RsPeerDetails detail;
|
||||
|
||||
if(!(rsPeers->getPeerDetails(peerId, detail) || rsPeers->getGPGDetails(pgpId, detail)))
|
||||
{
|
||||
QMessageBox::information(this,
|
||||
{
|
||||
RsPeerDetails detail;
|
||||
|
||||
if(!(rsPeers->getPeerDetails(peerId, detail) || rsPeers->getGPGDetails(pgpId, detail)))
|
||||
{
|
||||
QMessageBox::information(this,
|
||||
tr("RetroShare"),
|
||||
tr("Error : cannot get peer details."));
|
||||
close();
|
||||
|
|
|
@ -123,7 +123,7 @@ bool GxsCircleChooser::getChosenCircle(RsGxsCircleId &id)
|
|||
int idx = currentIndex();
|
||||
|
||||
QVariant var = itemData(idx);
|
||||
id = var.toString().toStdString();
|
||||
id = RsGxsCircleId(var.toString().toStdString());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ void GxsCommentTreeWidget::setCurrentMsgId(QTreeWidgetItem *current, QTreeWidget
|
|||
|
||||
if(current)
|
||||
{
|
||||
mCurrentMsgId = current->text(PCITEM_COLUMN_MSGID).toStdString();
|
||||
mCurrentMsgId = RsGxsMessageId(current->text(PCITEM_COLUMN_MSGID).toStdString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -629,7 +629,7 @@ bool GxsGroupDialog::setCircleParameters(RsGroupMetaData &meta)
|
|||
meta.mCircleType = GXS_CIRCLE_TYPE_YOUREYESONLY;
|
||||
meta.mCircleId.clear();
|
||||
meta.mOriginator.clear();
|
||||
meta.mInternalCircle = "Internal Circle Id";
|
||||
meta.mInternalCircle.clear() ;
|
||||
|
||||
if (!ui.localComboBox->getChosenCircle(meta.mInternalCircle))
|
||||
{
|
||||
|
|
|
@ -187,7 +187,7 @@ bool GxsIdChooser::getChosenId(RsGxsId &id)
|
|||
int idx = currentIndex();
|
||||
|
||||
QVariant var = itemData(idx);
|
||||
id = var.toString().toStdString();
|
||||
id = RsGxsId(var.toString().toStdString());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -617,9 +617,9 @@ void CreateGxsChannelMsg::sendMessage(const std::string &subject, const std::str
|
|||
RsGxsChannelPost post;
|
||||
|
||||
post.mMeta.mGroupId = mChannelId;
|
||||
post.mMeta.mParentId = "";
|
||||
post.mMeta.mThreadId = "";
|
||||
post.mMeta.mMsgId = "";
|
||||
post.mMeta.mParentId.clear() ;
|
||||
post.mMeta.mThreadId.clear() ;
|
||||
post.mMeta.mMsgId.clear() ;
|
||||
|
||||
post.mMeta.mMsgName = subject;
|
||||
post.mMsg = msg;
|
||||
|
|
|
@ -428,7 +428,7 @@ void GxsChannelDialog::restoreChannelKeys()
|
|||
|
||||
void GxsChannelDialog::selectChannel(const QString &id)
|
||||
{
|
||||
mChannelId = id.toStdString();
|
||||
mChannelId = RsGxsGroupId(id.toStdString());
|
||||
|
||||
bool autoDl = rsGxsChannels->getChannelAutoDownload(mChannelId);
|
||||
setAutoDownloadButton(autoDl);
|
||||
|
|
|
@ -271,7 +271,7 @@ void CreateGxsForumMsg::createMsg()
|
|||
RsGxsForumMsg msg;
|
||||
msg.mMeta.mGroupId = mForumId;
|
||||
msg.mMeta.mParentId = mParentId;
|
||||
msg.mMeta.mMsgId = "";
|
||||
msg.mMeta.mMsgId.clear() ;
|
||||
if (mParentMsgLoaded)
|
||||
{
|
||||
msg.mMeta.mThreadId = mParentMsg.mMeta.mThreadId;
|
||||
|
|
|
@ -473,7 +473,7 @@ void GxsForumThreadWidget::changedThread()
|
|||
if (!item || !item->isSelected()) {
|
||||
mThreadId.clear();
|
||||
} else {
|
||||
mThreadId = item->data(COLUMN_THREAD_DATA, ROLE_THREAD_MSGID).toString().toStdString();
|
||||
mThreadId = RsGxsMessageId(item->data(COLUMN_THREAD_DATA, ROLE_THREAD_MSGID).toString().toStdString());
|
||||
}
|
||||
|
||||
if (mFillThread) {
|
||||
|
|
|
@ -382,7 +382,7 @@ GxsForumThreadWidget *GxsForumsDialog::createThreadWidget(const RsGxsGroupId &fo
|
|||
|
||||
void GxsForumsDialog::changedForum(const QString &forumId)
|
||||
{
|
||||
mForumId = forumId.toStdString();
|
||||
mForumId = RsGxsGroupId(forumId.toStdString());
|
||||
if (mForumId.isNull()) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -595,7 +595,7 @@ void MessageComposer::pasteRecommended()
|
|||
if (links[i].valid() && links[i].type() == RetroShareLink::TYPE_FILE) {
|
||||
FileInfo fileInfo;
|
||||
fileInfo.fname = links[i].name().toStdString();
|
||||
fileInfo.hash = links[i].hash().toStdString();
|
||||
fileInfo.hash = RsFileHash(links[i].hash().toStdString());
|
||||
fileInfo.size = links[i].size();
|
||||
|
||||
addFile(fileInfo);
|
||||
|
|
|
@ -321,7 +321,7 @@ void MessageWidget::getcurrentrecommended()
|
|||
fi.size = it->data().toULongLong() ;
|
||||
break ;
|
||||
case COLUMN_FILE_HASH:
|
||||
fi.hash = it->data().toString().toStdString() ;
|
||||
fi.hash = RsFileHash(it->data().toString().toStdString()) ;
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue