mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-17 13:24:15 -05:00
- Correct missed parts for fixed updateGroup.
- Updated IdDialog to support Modifying Opinions on GxsIds. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7132 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1b2ed66814
commit
4bdd7b3b4d
@ -41,6 +41,7 @@
|
||||
#define IDDIALOG_IDLIST 1
|
||||
#define IDDIALOG_IDDETAILS 2
|
||||
#define IDDIALOG_REPLIST 3
|
||||
#define IDDIALOG_REFRESH 4
|
||||
|
||||
/****************************************************************
|
||||
*/
|
||||
@ -85,6 +86,14 @@ IdDialog::IdDialog(QWidget *parent)
|
||||
mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui.line_RatingOverall);
|
||||
mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui.line_RatingImplicit);
|
||||
mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui.line_RatingOwn);
|
||||
mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui.line_RatingPeers);
|
||||
mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui.repModButton);
|
||||
mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui.repMod_Accept);
|
||||
mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui.repMod_Ban);
|
||||
mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui.repMod_Negative);
|
||||
mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui.repMod_Positive);
|
||||
mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui.repMod_Custom);
|
||||
mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui.repMod_spinBox);
|
||||
|
||||
mStateHelper->addLoadPlaceholder(IDDIALOG_IDDETAILS, ui.lineEdit_Nickname);
|
||||
mStateHelper->addLoadPlaceholder(IDDIALOG_IDDETAILS, ui.lineEdit_GpgName);
|
||||
@ -95,6 +104,7 @@ IdDialog::IdDialog(QWidget *parent)
|
||||
mStateHelper->addLoadPlaceholder(IDDIALOG_IDDETAILS, ui.line_RatingOverall);
|
||||
mStateHelper->addLoadPlaceholder(IDDIALOG_IDDETAILS, ui.line_RatingImplicit);
|
||||
mStateHelper->addLoadPlaceholder(IDDIALOG_IDDETAILS, ui.line_RatingOwn);
|
||||
mStateHelper->addLoadPlaceholder(IDDIALOG_IDDETAILS, ui.line_RatingPeers);
|
||||
|
||||
mStateHelper->addClear(IDDIALOG_IDDETAILS, ui.lineEdit_Nickname);
|
||||
mStateHelper->addClear(IDDIALOG_IDDETAILS, ui.lineEdit_GpgName);
|
||||
@ -105,10 +115,11 @@ IdDialog::IdDialog(QWidget *parent)
|
||||
mStateHelper->addClear(IDDIALOG_IDDETAILS, ui.line_RatingOverall);
|
||||
mStateHelper->addClear(IDDIALOG_IDDETAILS, ui.line_RatingImplicit);
|
||||
mStateHelper->addClear(IDDIALOG_IDDETAILS, ui.line_RatingOwn);
|
||||
mStateHelper->addClear(IDDIALOG_IDDETAILS, ui.line_RatingPeers);
|
||||
|
||||
mStateHelper->addWidget(IDDIALOG_REPLIST, ui.treeWidget_RepList);
|
||||
mStateHelper->addLoadPlaceholder(IDDIALOG_REPLIST, ui.treeWidget_RepList);
|
||||
mStateHelper->addClear(IDDIALOG_REPLIST, ui.treeWidget_RepList);
|
||||
//mStateHelper->addWidget(IDDIALOG_REPLIST, ui.treeWidget_RepList);
|
||||
//mStateHelper->addLoadPlaceholder(IDDIALOG_REPLIST, ui.treeWidget_RepList);
|
||||
//mStateHelper->addClear(IDDIALOG_REPLIST, ui.treeWidget_RepList);
|
||||
|
||||
/* Connect signals */
|
||||
connect(ui.toolButton_NewId, SIGNAL(clicked()), this, SLOT(addIdentity()));
|
||||
@ -118,6 +129,7 @@ IdDialog::IdDialog(QWidget *parent)
|
||||
|
||||
connect(ui.filterComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(filterComboBoxChanged()));
|
||||
connect(ui.filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterChanged(QString)));
|
||||
connect(ui.repModButton, SIGNAL(clicked()), this, SLOT(modifyReputation()));
|
||||
|
||||
/* Add filter types */
|
||||
ui.filterComboBox->addItem(tr("All"), RSID_FILTER_ALL);
|
||||
@ -141,6 +153,10 @@ IdDialog::IdDialog(QWidget *parent)
|
||||
|
||||
mStateHelper->setActive(IDDIALOG_IDDETAILS, false);
|
||||
mStateHelper->setActive(IDDIALOG_REPLIST, false);
|
||||
|
||||
// Hiding RepList until that part is finished.
|
||||
//ui.treeWidget_RepList->setVisible(false);
|
||||
ui.toolButton_Reputation->setVisible(false);
|
||||
}
|
||||
|
||||
void IdDialog::todo()
|
||||
@ -500,10 +516,89 @@ void IdDialog::insertIdDetails(uint32_t token)
|
||||
ui.line_RatingImplicit->setText("+5 Anon Id");
|
||||
}
|
||||
|
||||
{
|
||||
QString rating = QString::number(data.mReputation.mOverallScore);
|
||||
ui.line_RatingOverall->setText(rating);
|
||||
}
|
||||
|
||||
{
|
||||
QString rating = QString::number(data.mReputation.mIdScore);
|
||||
ui.line_RatingImplicit->setText(rating);
|
||||
}
|
||||
|
||||
{
|
||||
QString rating = QString::number(data.mReputation.mOwnOpinion);
|
||||
ui.line_RatingOwn->setText(rating);
|
||||
}
|
||||
|
||||
{
|
||||
QString rating = QString::number(data.mReputation.mPeerOpinion);
|
||||
ui.line_RatingPeers->setText(rating);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* request network ratings */
|
||||
requestRepList(data.mMeta.mGroupId);
|
||||
// Removing this for the moment.
|
||||
// requestRepList(data.mMeta.mGroupId);
|
||||
}
|
||||
|
||||
void IdDialog::modifyReputation()
|
||||
{
|
||||
std::cerr << "IdDialog::modifyReputation()";
|
||||
std::cerr << std::endl;
|
||||
|
||||
std::string id = ui.lineEdit_KeyId->text().toStdString();
|
||||
|
||||
int mod = 0;
|
||||
if (ui.repMod_Accept->isChecked())
|
||||
{
|
||||
mod += 100;
|
||||
}
|
||||
else if (ui.repMod_Positive->isChecked())
|
||||
{
|
||||
mod += 10;
|
||||
}
|
||||
else if (ui.repMod_Negative->isChecked())
|
||||
{
|
||||
mod += -10;
|
||||
}
|
||||
else if (ui.repMod_Ban->isChecked())
|
||||
{
|
||||
mod += -100;
|
||||
}
|
||||
else if (ui.repMod_Custom->isChecked())
|
||||
{
|
||||
mod += ui.repMod_spinBox->value();
|
||||
}
|
||||
else
|
||||
{
|
||||
// invalid
|
||||
return;
|
||||
}
|
||||
|
||||
std::cerr << "IdDialog::modifyReputation() ID: " << id << " Mod: " << mod;
|
||||
std::cerr << std::endl;
|
||||
|
||||
uint32_t token;
|
||||
if (!rsIdentity->submitOpinion(token, id, false, mod))
|
||||
{
|
||||
std::cerr << "IdDialog::modifyReputation() Error submitting Opinion";
|
||||
std::cerr << std::endl;
|
||||
|
||||
}
|
||||
|
||||
std::cerr << "IdDialog::modifyReputation() queuingRequest(), token: " << token;
|
||||
std::cerr << std::endl;
|
||||
|
||||
// trigger refresh when finished.
|
||||
// basic / anstype are not needed.
|
||||
mIdQueue->queueRequest(token, 0, 0, IDDIALOG_REFRESH);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void IdDialog::updateDisplay(bool /*complete*/)
|
||||
{
|
||||
/* Update identity list */
|
||||
@ -561,6 +656,7 @@ void IdDialog::requestRepList(const RsGxsGroupId &aboutId)
|
||||
void IdDialog::insertRepList(uint32_t token)
|
||||
{
|
||||
mStateHelper->setLoading(IDDIALOG_REPLIST, false);
|
||||
#if 0
|
||||
|
||||
std::vector<RsGxsIdOpinion> opinions;
|
||||
std::vector<RsGxsIdOpinion>::iterator vit;
|
||||
@ -575,7 +671,6 @@ void IdDialog::insertRepList(uint32_t token)
|
||||
return;
|
||||
}
|
||||
|
||||
mStateHelper->setActive(IDDIALOG_REPLIST, true);
|
||||
|
||||
for(vit = opinions.begin(); vit != opinions.end(); vit++)
|
||||
{
|
||||
@ -598,9 +693,11 @@ void IdDialog::insertRepList(uint32_t token)
|
||||
|
||||
ui.treeWidget_RepList->addTopLevelItem(item);
|
||||
}
|
||||
#endif
|
||||
mStateHelper->setActive(IDDIALOG_REPLIST, true);
|
||||
}
|
||||
|
||||
void IdDialog::loadRequest(const TokenQueue */*queue*/, const TokenRequest &req)
|
||||
void IdDialog::loadRequest(const TokenQueue * /*queue*/, const TokenRequest &req)
|
||||
{
|
||||
std::cerr << "IdDialog::loadRequest() UserType: " << req.mUserType;
|
||||
std::cerr << std::endl;
|
||||
@ -619,6 +716,9 @@ void IdDialog::loadRequest(const TokenQueue */*queue*/, const TokenRequest &req)
|
||||
insertRepList(req.mToken);
|
||||
break;
|
||||
|
||||
case IDDIALOG_REFRESH:
|
||||
updateDisplay(true);
|
||||
break;
|
||||
default:
|
||||
std::cerr << "IdDialog::loadRequest() ERROR";
|
||||
std::cerr << std::endl;
|
||||
|
@ -58,6 +58,7 @@ private slots:
|
||||
void updateSelection();
|
||||
|
||||
void todo();
|
||||
void modifyReputation();
|
||||
|
||||
private:
|
||||
void requestIdDetails(std::string &id);
|
||||
|
@ -6,10 +6,16 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>744</width>
|
||||
<height>647</height>
|
||||
<width>605</width>
|
||||
<height>525</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string/>
|
||||
</property>
|
||||
@ -431,73 +437,186 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="reputationGroupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Reputation</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Implicit Score</string>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Overall</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="line_RatingOverall">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Implicit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="line_RatingImplicit">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Opinion</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="line_RatingOwn">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Peers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="line_RatingPeers">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="line_RatingOverall"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Overall Rating</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="line_RatingImplicit"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Your Rating</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="line_RatingOwn"/>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="RSTreeWidget" name="treeWidget_RepList">
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Friend</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Rating</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Comment</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Local Reputation</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="tweakGroupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Tweak Opinion</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="repMod_Accept">
|
||||
<property name="text">
|
||||
<string>Accept (+100)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="repMod_Positive">
|
||||
<property name="text">
|
||||
<string>Positive (+10)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="repMod_Negative">
|
||||
<property name="text">
|
||||
<string>Negative (-10)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="repMod_Ban">
|
||||
<property name="text">
|
||||
<string>Ban (-100)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="repMod_Custom">
|
||||
<property name="text">
|
||||
<string>Custom</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="repMod_spinBox">
|
||||
<property name="minimum">
|
||||
<number>-100</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="repModButton">
|
||||
<property name="text">
|
||||
<string>Modify</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@ -540,7 +659,6 @@
|
||||
<tabstop>line_RatingOverall</tabstop>
|
||||
<tabstop>line_RatingImplicit</tabstop>
|
||||
<tabstop>line_RatingOwn</tabstop>
|
||||
<tabstop>treeWidget_RepList</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
|
@ -108,7 +108,6 @@ bool PostedGroupDialog::service_CreateGroup(uint32_t &token, const RsGroupMetaDa
|
||||
}
|
||||
|
||||
bool PostedGroupDialog::service_EditGroup(uint32_t &token,
|
||||
RsGxsGroupUpdateMeta &updateMeta,
|
||||
RsGroupMetaData &editedMeta)
|
||||
{
|
||||
RsPostedGroup grp;
|
||||
@ -118,7 +117,7 @@ bool PostedGroupDialog::service_EditGroup(uint32_t &token,
|
||||
std::cerr << "PostedGroupDialog::service_EditGroup() submitting changes";
|
||||
std::cerr << std::endl;
|
||||
|
||||
rsPosted->updateGroup(token, updateMeta, grp);
|
||||
rsPosted->updateGroup(token, grp);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,6 @@ protected:
|
||||
virtual bool service_CreateGroup(uint32_t &token, const RsGroupMetaData &meta);
|
||||
virtual bool service_loadGroup(uint32_t token, Mode mode, RsGroupMetaData& groupMetaData);
|
||||
virtual bool service_EditGroup(uint32_t &token,
|
||||
RsGxsGroupUpdateMeta &updateMeta,
|
||||
RsGroupMetaData &editedMeta);
|
||||
|
||||
private:
|
||||
|
@ -456,19 +456,11 @@ void GxsGroupDialog::editGroup()
|
||||
return; //Don't add a empty name!!
|
||||
}
|
||||
|
||||
RsGxsGroupUpdateMeta updateMeta(mGrpMeta.mGroupId);
|
||||
if (!buildUpdateMeta(mGrpMeta, newMeta, updateMeta))
|
||||
{
|
||||
/* error message */
|
||||
QMessageBox::warning(this, "RetroShare", tr("Failed to Build UpdateMeta - Attempted to change field that is not allowed"), QMessageBox::Ok, QMessageBox::Ok);
|
||||
return; //Don't add a empty name!!
|
||||
}
|
||||
|
||||
std::cerr << "GxsGroupDialog::editGroup() calling service_EditGroup";
|
||||
std::cerr << std::endl;
|
||||
|
||||
uint32_t token;
|
||||
if (service_EditGroup(token, updateMeta, newMeta))
|
||||
if (service_EditGroup(token, newMeta))
|
||||
{
|
||||
// get the Queue to handle response.
|
||||
if(mExternalTokenQueue != NULL)
|
||||
@ -483,88 +475,6 @@ void GxsGroupDialog::editGroup()
|
||||
close();
|
||||
}
|
||||
|
||||
bool GxsGroupDialog::buildUpdateMeta(
|
||||
const RsGroupMetaData &origMeta,
|
||||
const RsGroupMetaData &newMeta,
|
||||
RsGxsGroupUpdateMeta &updateMeta)
|
||||
{
|
||||
/* check through the fields, and note which have changed */
|
||||
if (origMeta.mGroupId != newMeta.mGroupId)
|
||||
{
|
||||
std::cerr << "GxsGroupDialog::buildUpdateMeta()";
|
||||
std::cerr << " GroupId Mismatch";
|
||||
std::cerr << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (origMeta.mGroupName != newMeta.mGroupName)
|
||||
{
|
||||
updateMeta.setMetaUpdate(RsGxsGroupUpdateMeta::NAME,
|
||||
newMeta.mGroupName);
|
||||
}
|
||||
|
||||
// These are not allowed to be changed yet!
|
||||
bool metaOk = true;
|
||||
if (origMeta.mGroupFlags != newMeta.mGroupFlags)
|
||||
{
|
||||
std::cerr << "GxsGroupDialog::buildUpdateMeta()";
|
||||
std::cerr << " GroupFlags Differences - Not Allowed";
|
||||
std::cerr << std::endl;
|
||||
metaOk = false;
|
||||
}
|
||||
if (origMeta.mSignFlags != newMeta.mSignFlags)
|
||||
{
|
||||
std::cerr << "GxsGroupDialog::buildUpdateMeta()";
|
||||
std::cerr << " SignFlags Differences - Not Allowed";
|
||||
std::cerr << std::endl;
|
||||
metaOk = false;
|
||||
}
|
||||
if (origMeta.mAuthorId != newMeta.mAuthorId)
|
||||
{
|
||||
std::cerr << "GxsGroupDialog::buildUpdateMeta()";
|
||||
std::cerr << " AuthorId Differences - Not Allowed";
|
||||
std::cerr << std::endl;
|
||||
metaOk = false;
|
||||
}
|
||||
if (origMeta.mAuthenFlags != newMeta.mAuthenFlags)
|
||||
{
|
||||
std::cerr << "GxsGroupDialog::buildUpdateMeta()";
|
||||
std::cerr << " AuthenFlags Differences - Not Allowed";
|
||||
std::cerr << std::endl;
|
||||
metaOk = false;
|
||||
}
|
||||
if (origMeta.mParentGrpId != newMeta.mParentGrpId)
|
||||
{
|
||||
std::cerr << "GxsGroupDialog::buildUpdateMeta()";
|
||||
std::cerr << " ParentGrpId Differences - Not Allowed";
|
||||
std::cerr << std::endl;
|
||||
metaOk = false;
|
||||
}
|
||||
if (origMeta.mCircleType != newMeta.mCircleType)
|
||||
{
|
||||
std::cerr << "GxsGroupDialog::buildUpdateMeta()";
|
||||
std::cerr << " CircleType Differences - Not Allowed";
|
||||
std::cerr << std::endl;
|
||||
metaOk = false;
|
||||
}
|
||||
if (origMeta.mCircleId != newMeta.mCircleId)
|
||||
{
|
||||
std::cerr << "GxsGroupDialog::buildUpdateMeta()";
|
||||
std::cerr << " CircleId Differences - Not Allowed";
|
||||
std::cerr << std::endl;
|
||||
metaOk = false;
|
||||
}
|
||||
if (origMeta.mInternalCircle != newMeta.mInternalCircle)
|
||||
{
|
||||
std::cerr << "GxsGroupDialog::buildUpdateMeta()";
|
||||
std::cerr << " InternalCircle Differences - Not Allowed";
|
||||
std::cerr << std::endl;
|
||||
metaOk = false;
|
||||
}
|
||||
return metaOk;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool GxsGroupDialog::prepareGroupMetaData(RsGroupMetaData &meta)
|
||||
{
|
||||
|
@ -181,7 +181,6 @@ protected:
|
||||
* @param meta The deriving GXS service should set their grp meta to this value
|
||||
*/
|
||||
virtual bool service_EditGroup(uint32_t &token,
|
||||
RsGxsGroupUpdateMeta &updateMeta,
|
||||
RsGroupMetaData &editedMeta) = 0;
|
||||
|
||||
// To be overloaded by users.
|
||||
@ -233,11 +232,6 @@ private:
|
||||
void updateFromExistingMeta();
|
||||
|
||||
bool prepareGroupMetaData(RsGroupMetaData &meta);
|
||||
bool buildUpdateMeta(
|
||||
const RsGroupMetaData &origMeta,
|
||||
const RsGroupMetaData &newMeta,
|
||||
RsGxsGroupUpdateMeta &updateMeta);
|
||||
|
||||
|
||||
std::list<std::string> mShareList;
|
||||
QPixmap picture;
|
||||
|
@ -108,7 +108,6 @@ bool WikiGroupDialog::service_CreateGroup(uint32_t &token, const RsGroupMetaData
|
||||
}
|
||||
|
||||
bool WikiGroupDialog::service_EditGroup(uint32_t &token,
|
||||
RsGxsGroupUpdateMeta &updateMeta,
|
||||
RsGroupMetaData &editedMeta)
|
||||
{
|
||||
RsWikiCollection grp;
|
||||
@ -117,7 +116,7 @@ bool WikiGroupDialog::service_EditGroup(uint32_t &token,
|
||||
std::cerr << "WikiGroupDialog::service_EditGroup() submitting changes.";
|
||||
std::cerr << std::endl;
|
||||
|
||||
rsWiki->updateCollection(token, updateMeta, grp);
|
||||
rsWiki->updateCollection(token, grp);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,6 @@ protected:
|
||||
virtual bool service_CreateGroup(uint32_t &token, const RsGroupMetaData &meta);
|
||||
virtual bool service_loadGroup(uint32_t token, Mode mode, RsGroupMetaData& groupMetaData);
|
||||
virtual bool service_EditGroup(uint32_t &token,
|
||||
RsGxsGroupUpdateMeta &updateMeta,
|
||||
RsGroupMetaData& groupMetaData);
|
||||
|
||||
private:
|
||||
|
@ -106,7 +106,6 @@ bool GxsChannelGroupDialog::service_CreateGroup(uint32_t &token, const RsGroupMe
|
||||
|
||||
|
||||
bool GxsChannelGroupDialog::service_EditGroup(uint32_t &token,
|
||||
RsGxsGroupUpdateMeta &updateMeta,
|
||||
RsGroupMetaData &editedMeta)
|
||||
{
|
||||
RsGxsChannelGroup grp;
|
||||
@ -116,7 +115,7 @@ bool GxsChannelGroupDialog::service_EditGroup(uint32_t &token,
|
||||
std::cerr << "GxsChannelGroupDialog::service_EditGroup() submitting changes";
|
||||
std::cerr << std::endl;
|
||||
|
||||
rsGxsChannels->updateGroup(token, updateMeta, grp);
|
||||
rsGxsChannels->updateGroup(token, grp);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,6 @@ protected:
|
||||
virtual bool service_CreateGroup(uint32_t &token, const RsGroupMetaData &meta);
|
||||
virtual bool service_loadGroup(uint32_t token, Mode mode, RsGroupMetaData& groupMetaData);
|
||||
virtual bool service_EditGroup(uint32_t &token,
|
||||
RsGxsGroupUpdateMeta &updateMeta,
|
||||
RsGroupMetaData &editedMeta);
|
||||
|
||||
};
|
||||
|
@ -106,7 +106,6 @@ bool GxsForumGroupDialog::service_CreateGroup(uint32_t &token, const RsGroupMeta
|
||||
}
|
||||
|
||||
bool GxsForumGroupDialog::service_EditGroup(uint32_t &token,
|
||||
RsGxsGroupUpdateMeta &updateMeta,
|
||||
RsGroupMetaData &editedMeta)
|
||||
{
|
||||
RsGxsForumGroup grp;
|
||||
@ -116,7 +115,7 @@ bool GxsForumGroupDialog::service_EditGroup(uint32_t &token,
|
||||
std::cerr << "GxsForumGroupDialog::service_EditGroup() submitting changes";
|
||||
std::cerr << std::endl;
|
||||
|
||||
rsGxsForums->updateGroup(token, updateMeta, grp);
|
||||
rsGxsForums->updateGroup(token, grp);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,6 @@ protected:
|
||||
virtual bool service_CreateGroup(uint32_t &token, const RsGroupMetaData &meta);
|
||||
virtual bool service_loadGroup(uint32_t token, Mode mode, RsGroupMetaData& groupMetaData);
|
||||
virtual bool service_EditGroup(uint32_t &token,
|
||||
RsGxsGroupUpdateMeta &updateMeta,
|
||||
RsGroupMetaData &editedMeta);
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user