mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
ConnectFriendWizard
- Cleaned includes - Corrected call of mailto, certificate now has new lines in mail body git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3264 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
9495648d16
commit
3f7ad6ebd9
@ -24,7 +24,6 @@
|
|||||||
#include "rsiface/rspeers.h" //for rsPeers variable
|
#include "rsiface/rspeers.h" //for rsPeers variable
|
||||||
#include "rsiface/rsiface.h"
|
#include "rsiface/rsiface.h"
|
||||||
|
|
||||||
#include <QtGui>
|
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
#include <QTextEdit>
|
#include <QTextEdit>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
@ -33,25 +32,21 @@
|
|||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QGroupBox>
|
#include <QGroupBox>
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <QtGui>
|
|
||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
#include <QTableWidget>
|
#include <QTableWidget>
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
|
#include <QApplication>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
#include <QTextCodec>
|
||||||
#include <QGridLayout>
|
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QHBoxLayout>
|
|
||||||
|
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
#include <QDesktopServices>
|
||||||
#include <QRegExpValidator>
|
#include <QFile>
|
||||||
#include <QRegExp>
|
#include <QUrl>
|
||||||
|
#include <QTextStream>
|
||||||
|
#include <QDragEnterEvent>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <sstream>
|
|
||||||
#include <iostream>
|
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
#define SSL_ID_FIELD_CONNECT_FRIEND_WIZARD "idField"
|
#define SSL_ID_FIELD_CONNECT_FRIEND_WIZARD "idField"
|
||||||
@ -291,30 +286,24 @@ TextPage::TextPage(QWidget *parent)
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
//#include <windows.h>
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TextPage::runEmailClient()
|
TextPage::runEmailClient()
|
||||||
{
|
{
|
||||||
std::string mailstr = "mailto:";
|
/* search and replace the end of lines with: "%0D%0A" */
|
||||||
|
size_t loc;
|
||||||
mailstr += "?subject=RetroShare Invite";
|
std::string cert = userCertEdit->toPlainText().toStdString();
|
||||||
|
while ((loc = cert.find("\n")) != cert.npos) {
|
||||||
|
cert.replace(loc, 1, "%0D%0A");
|
||||||
|
}
|
||||||
|
|
||||||
mailstr += "&body=";
|
std::string mailstr = "mailto:";
|
||||||
|
mailstr += "?subject=RetroShare Invite";
|
||||||
|
mailstr += "&body=" + cert;
|
||||||
|
|
||||||
mailstr += (userCertEdit->toPlainText()).toStdString();
|
std::cerr << "MAIL STRING:" << mailstr.c_str() << std::endl;
|
||||||
|
|
||||||
/* search and replace the end of lines with: "%0D%0A" */
|
/* pass the url directly to QDesktopServices::openUrl */
|
||||||
std::cerr << "MAIL STRING:" << mailstr.c_str() << std::endl;
|
QDesktopServices::openUrl (QUrl (QString::fromStdString(mailstr)));
|
||||||
size_t loc;
|
|
||||||
while((loc = mailstr.find("\n")) != mailstr.npos)
|
|
||||||
{
|
|
||||||
/* sdfkasdflkjh */
|
|
||||||
mailstr.replace(loc, 1, "%0D%0A");
|
|
||||||
}
|
|
||||||
|
|
||||||
QDesktopServices::openUrl( QUrl::fromEncoded( mailstr.c_str() ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user