removed unused RsId and Fof pages from ConnectFriendWizard

This commit is contained in:
csoler 2019-06-10 00:20:01 +02:00
parent 6294aefc6d
commit 0c510a55e9
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C
3 changed files with 4 additions and 132 deletions

View File

@ -416,26 +416,6 @@ void ConnectFriendWizard::initializePage(int id)
ui->CertificatePage->registerField("friendCertificateFile*", ui->friendFileNameEdit);
break;
case Page_Foff:
ui->userSelectionCB->addItem(tr("Any peer I've not signed"));
ui->userSelectionCB->addItem(tr("Friends of my friends who already trust me"));
ui->userSelectionCB->addItem(tr("Signed peers showing as denied"));
ui->selectedPeersTW->setHorizontalHeaderItem(0, new QTableWidgetItem(tr("")));
ui->selectedPeersTW->setHorizontalHeaderItem(1, new QTableWidgetItem(tr("Peer name")));
ui->selectedPeersTW->setHorizontalHeaderItem(2, new QTableWidgetItem(tr("Also signed by")));
ui->selectedPeersTW->setHorizontalHeaderItem(3, new QTableWidgetItem(tr("Peer id")));
connect(ui->makeFriendButton, SIGNAL(clicked()), this, SLOT(signAllSelectedUsers()));
connect(ui->userSelectionCB, SIGNAL(activated(int)), this, SLOT(updatePeersList(int)));
updatePeersList(ui->userSelectionCB->currentIndex());
ui->FofPage->setComplete(false);
break;
case Page_Rsid:
ui->RsidPage->registerField("friendRSID*", ui->friendRsidEdit);
break;
case Page_WebMail:
case Page_Email:
@ -782,25 +762,6 @@ bool ConnectFriendWizard::validateCurrentPage()
}
break;
}
case Page_Foff:
break;
case Page_Rsid:
{
QString rsidstring = ui->friendRsidEdit->text();
if (rsidstring.isEmpty()) {
return false;
}
// search for peer id in string
RsPeerId rsidstr = PeerDefs::idFromRsid(rsidstring, false);
if (rsidstr.isNull() || !rsPeers->getPeerDetails(rsidstr, peerDetails)) {
setField("errorMessage", tr("This Peer %1 is not available in your Network").arg(rsidstring));
error = false;
}
break;
}
case Page_Email:
{
QString mailaddresses = ui->addressEdit->text();
@ -855,9 +816,6 @@ int ConnectFriendWizard::nextId() const
switch ((Page) currentId()) {
case Page_Text:
case Page_Cert:
case Page_Rsid:
return error ? ConnectFriendWizard::Page_Conclusion : ConnectFriendWizard::Page_ErrorMessage;
case Page_Foff:
case Page_WebMail:
case Page_Email:
case Page_ErrorMessage:
@ -1215,6 +1173,7 @@ void ConnectFriendWizard::generateCertificateCalled()
}
}
#ifdef TO_BE_REMOVED
//============================= FofPage ======================================
void ConnectFriendWizard::updatePeersList(int index)
@ -1350,6 +1309,8 @@ void ConnectFriendWizard::signAllSelectedUsers()
//============================= RsidPage =====================================
#endif
//============================ Emailpage =====================================
//========================= ErrorMessagePage =================================

View File

@ -50,7 +50,7 @@ class ConnectFriendWizard : public QWizard
Q_PROPERTY(QString titleColor READ titleColor WRITE setTitleColor)
public:
enum Page { Page_Text, Page_Cert, Page_ErrorMessage, Page_Conclusion, Page_Foff, Page_Rsid, Page_WebMail, Page_Email, Page_FriendRequest, Page_FriendRecommendations };
enum Page { Page_Text, Page_Cert, Page_ErrorMessage, Page_Conclusion, Page_WebMail, Page_Email, Page_FriendRequest, Page_FriendRecommendations };
ConnectFriendWizard(QWidget *parent = 0);
~ConnectFriendWizard();
@ -97,10 +97,6 @@ private slots:
void loadFriendCert();
void generateCertificateCalled();
/* FofPage */
void updatePeersList(int index);
void signAllSelectedUsers();
/* ConclusionPage */
void groupCurrentIndexChanged(int index);

View File

@ -386,91 +386,6 @@
</item>
</layout>
</widget>
<widget class="ConnectFriendPage" name="FofPage">
<property name="title">
<string>Friends of friends</string>
</property>
<property name="subTitle">
<string>Select now who you want to make friends with.</string>
</property>
<attribute name="pageId">
<string notr="true">ConnectFriendWizard::Page_Foff</string>
</attribute>
<layout class="QVBoxLayout" name="FofPageVLayout">
<item>
<widget class="QLabel" name="userSelectionLabel">
<property name="text">
<string>Show me:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="userSelectionCB"/>
</item>
<item>
<widget class="QTableWidget" name="selectedPeersTW">
<property name="sortingEnabled">
<bool>true</bool>
</property>
<property name="columnCount">
<number>4</number>
</property>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<column/>
<column/>
<column/>
<column/>
</widget>
</item>
<item>
<widget class="QPushButton" name="makeFriendButton">
<property name="text">
<string>Make friend with these peers</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="ConnectFriendPage" name="RsidPage">
<property name="title">
<string>RetroShare ID</string>
</property>
<property name="subTitle">
<string>Use RetroShare ID for adding a Friend which is available in your network.</string>
</property>
<attribute name="pageId">
<string notr="true">ConnectFriendWizard::Page_Rsid</string>
</attribute>
<layout class="QVBoxLayout" name="RsidPageVLayout">
<item>
<widget class="QGroupBox" name="userRsidFrame">
<property name="title">
<string>Add Friends RetroShare ID...</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="userRsidFrameVLayout"/>
</widget>
</item>
<item>
<widget class="QLabel" name="friendRsidLabel">
<property name="text">
<string>Paste Friends RetroShare ID in the box below</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="friendRsidEdit">
<property name="whatsThis">
<string>Enter the RetroShare ID of your Friend, e.g. Peer@BDE8D16A46D938CF</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWizardPage" name="WebmailPage">
<property name="title">
<string>RetroShare is better with Friends </string>