mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-31 10:19:24 -04:00
used RsInfo instead of std::cerr in authssl.cc
This commit is contained in:
commit
9b78447109
25 changed files with 954 additions and 254 deletions
|
@ -128,10 +128,25 @@ public:
|
|||
|
||||
bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override
|
||||
{
|
||||
if(!m_showOfflineNodes && !sourceModel()->index(source_row,0,source_parent).data(RsFriendListModel::OnlineRole).toBool())
|
||||
// do not show empty groups
|
||||
|
||||
QModelIndex index = sourceModel()->index(source_row,0,source_parent);
|
||||
|
||||
if(index.data(RsFriendListModel::TypeRole) == RsFriendListModel::ENTRY_TYPE_GROUP)
|
||||
{
|
||||
RsGroupInfo group_info ;
|
||||
static_cast<RsFriendListModel*>(sourceModel())->getGroupData(index,group_info);
|
||||
|
||||
if(group_info.peerIds.empty())
|
||||
return false;
|
||||
}
|
||||
|
||||
// Filter offline friends
|
||||
|
||||
if(!m_showOfflineNodes && !index.data(RsFriendListModel::OnlineRole).toBool())
|
||||
return false;
|
||||
|
||||
return sourceModel()->index(source_row,0,source_parent).data(RsFriendListModel::FilterRole).toString() == RsFriendListModel::FilterString ;
|
||||
return index.data(RsFriendListModel::FilterRole).toString() == RsFriendListModel::FilterString ;
|
||||
}
|
||||
|
||||
void sort( int column, Qt::SortOrder order = Qt::AscendingOrder ) override
|
||||
|
@ -683,7 +698,7 @@ void NewFriendList::peerTreeWidgetCustomPopupMenu()
|
|||
contextMenu.addAction(QIcon(IMAGE_COPYLINK), tr("Copy certificate link"), this, SLOT(copyFullCertificate()));
|
||||
|
||||
//this is a SSL key
|
||||
contextMenu.addAction(QIcon(IMAGE_REMOVEFRIEND), tr("Remove Friend Node"), this, SLOT(removefriend()));
|
||||
contextMenu.addAction(QIcon(IMAGE_REMOVEFRIEND), tr("Remove Friend Node"), this, SLOT(removeNode()));
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -231,6 +231,8 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
|||
// fill quick view
|
||||
fillQuickView();
|
||||
|
||||
sortColumn(RsMessageModel::COLUMN_THREAD_DATE,Qt::DescendingOrder);
|
||||
|
||||
// load settings
|
||||
processSettings(true);
|
||||
|
||||
|
|
|
@ -80,6 +80,7 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags)
|
|||
ui.setupUi(this);
|
||||
|
||||
manager = NULL ;
|
||||
mOngoingConnectivityCheck = -1;
|
||||
|
||||
if(RsAccounts::isHiddenNode())
|
||||
{
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
*******************************************************************************/
|
||||
|
||||
#include "util/stacktrace.h"
|
||||
#include "util/argstream.h"
|
||||
|
||||
CrashStackTrace gCrashStackTrace;
|
||||
|
||||
|
@ -50,6 +51,7 @@ CrashStackTrace gCrashStackTrace;
|
|||
#include "util/RsGxsUpdateBroadcast.h"
|
||||
#include "util/rsdir.h"
|
||||
#include "util/rstime.h"
|
||||
#include "retroshare/rsinit.h"
|
||||
|
||||
#ifdef MESSENGER_WINDOW
|
||||
#include "gui/MessengerWindow.h"
|
||||
|
@ -228,7 +230,36 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
|||
|
||||
/* RetroShare Core Objects */
|
||||
RsInit::InitRsConfig();
|
||||
int initResult = RsInit::InitRetroShare(argc, argv);
|
||||
|
||||
RsConfigOptions conf;
|
||||
|
||||
conf.jsonApiPort = 0 ; // disable JSon API at start. The JSonAPI preference UI will enable it according to saved parameters.
|
||||
|
||||
argstream as(argc,argv);
|
||||
as >> option('s',"stderr" ,conf.outStderr ,"output to stderr instead of log file." )
|
||||
>> option('u',"udp" ,conf.udpListenerOnly,"Only listen to UDP." )
|
||||
>> parameter('c',"base-dir" ,conf.optBaseDir ,"directory", "Set base directory." ,false)
|
||||
>> parameter('l',"log-file" ,conf.logfname ,"logfile" ,"Set Log filename." ,false)
|
||||
>> parameter('d',"debug-level" ,conf.debugLevel ,"level" ,"Set debug level." ,false)
|
||||
>> parameter('i',"ip-address" ,conf.forcedInetAddress,"nnn.nnn.nnn.nnn", "Force IP address to use (if cannot be detected)." ,false)
|
||||
>> parameter('p',"port" ,conf.forcedPort ,"port" ,"Set listenning port to use." ,false)
|
||||
>> parameter('o',"opmode" ,conf.opModeStr ,"opmode" ,"Set Operating mode (Full, NoTurtle, Gaming, Minimal)." ,false);
|
||||
#ifdef RS_JSONAPI
|
||||
as >> parameter('J', "jsonApiPort", conf.jsonApiPort, "jsonApiPort", "Enable JSON API on the specified port", false )
|
||||
>> parameter('P', "jsonApiBindAddress", conf.jsonApiBindAddress, "jsonApiBindAddress", "JSON API Bind Address.", false);
|
||||
#endif // ifdef RS_JSONAPI
|
||||
|
||||
#ifdef LOCALNET_TESTING
|
||||
as >> parameter('R',"restrict-port" ,portRestrictions ,"port1-port2","Apply port restriction" ,false);
|
||||
#endif // ifdef LOCALNET_TESTING
|
||||
|
||||
#ifdef RS_AUTOLOGIN
|
||||
as >> option('a',"auto-login" ,conf.autoLogin ,"AutoLogin (Windows Only) + StartMinimised");
|
||||
#endif // ifdef RS_AUTOLOGIN
|
||||
|
||||
conf.main_executable_path = argv[0];
|
||||
|
||||
int initResult = RsInit::InitRetroShare(conf);
|
||||
|
||||
if(initResult == RS_INIT_NO_KEYRING) // happens when we already have accounts, but no pgp key. This is when switching to the openpgp-sdk version.
|
||||
{
|
||||
|
@ -252,7 +283,7 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
|||
if(!RsAccounts::CopyGnuPGKeyrings())
|
||||
return 0 ;
|
||||
|
||||
initResult = RsInit::InitRetroShare(argc, argv);
|
||||
initResult = RsInit::InitRetroShare(conf);
|
||||
|
||||
displayWarningAboutDSAKeys() ;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue