mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-25 09:11:28 -05:00
fixed compilation in parameter handling
This commit is contained in:
parent
c5aface2cb
commit
9210e52aae
@ -1704,7 +1704,8 @@ void MainWindow::openRsCollection(const QString &filename)
|
|||||||
if (qinfo.exists()) {
|
if (qinfo.exists()) {
|
||||||
if (qinfo.absoluteFilePath().endsWith(RsCollection::ExtensionString)) {
|
if (qinfo.absoluteFilePath().endsWith(RsCollection::ExtensionString)) {
|
||||||
RsCollection collection;
|
RsCollection collection;
|
||||||
collection.openColl(qinfo.absoluteFilePath());
|
collection.downloadFiles();
|
||||||
|
//collection.openColl(qinfo.absoluteFilePath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -359,7 +359,7 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
|||||||
>> parameter('k',"style" ,guistylesheetfile ,"style sheet file" ,"gui stylesheet file" ,false)
|
>> parameter('k',"style" ,guistylesheetfile ,"style sheet file" ,"gui stylesheet file" ,false)
|
||||||
>> parameter('L',"lang" ,language ,"langage" ,"language string" ,false)
|
>> parameter('L',"lang" ,language ,"langage" ,"language string" ,false)
|
||||||
>> parameter('r',"link" ,rslink ,"retroshare link" ,"retroshare link to open (passed to running server)" ,false)
|
>> parameter('r',"link" ,rslink ,"retroshare link" ,"retroshare link to open (passed to running server)" ,false)
|
||||||
>> parameter('f',"rsfile" ,rsfile ,"rsfile" ,"rsfile to open (passed to running server)" ,false);
|
>> parameter('f',"rsfile" ,rsfile ,"rsfile" ,"rscollection file to open (passed to running server)" ,false);
|
||||||
#ifdef RS_JSONAPI
|
#ifdef RS_JSONAPI
|
||||||
as >> parameter('J', "jsonApiPort" ,conf.jsonApiPort ,"jsonApiPort" ,"Enable JSON API on the specified port" ,false)
|
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);
|
>> parameter('P', "jsonApiBindAddress",conf.jsonApiBindAddress ,"jsonApiBindAddress" ,"JSON API Bind Address " ,false);
|
||||||
@ -372,9 +372,15 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
|||||||
#ifdef RS_AUTOLOGIN
|
#ifdef RS_AUTOLOGIN
|
||||||
as >> option('a',"auto-login" ,conf.autoLogin ,"AutoLogin (Windows Only) + StartMinimised");
|
as >> option('a',"auto-login" ,conf.autoLogin ,"AutoLogin (Windows Only) + StartMinimised");
|
||||||
#endif // ifdef RS_AUTOLOGIN
|
#endif // ifdef RS_AUTOLOGIN
|
||||||
as >> values<std::string>(std::back_inserter(links_and_files),"links and files")
|
as >> values<std::string>(std::back_inserter(links_and_files),"links and rscollection files")
|
||||||
>> help('h',"help",QObject::tr("Display this help").toStdString().c_str());
|
>> help('h',"help",QObject::tr("Display this help").toStdString().c_str());
|
||||||
|
|
||||||
|
if(!as.isOk())
|
||||||
|
{
|
||||||
|
std::cerr << "Incorrect arguments." << std::endl;
|
||||||
|
std::cerr << as.usage() << std::endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
conf.logFileName = QString::fromStdString(logfilename);
|
conf.logFileName = QString::fromStdString(logfilename);
|
||||||
conf.logLevel = QString::fromStdString(loglevel); // these will be checked when used in RsApplication
|
conf.logLevel = QString::fromStdString(loglevel); // these will be checked when used in RsApplication
|
||||||
conf.guiStyle = QString::fromStdString(guistyle); // these will be checked when used in RsApplication
|
conf.guiStyle = QString::fromStdString(guistyle); // these will be checked when used in RsApplication
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
|
|
||||||
#include "rshare.h"
|
#include "rshare.h"
|
||||||
|
|
||||||
|
#ifdef TO_REMOVE
|
||||||
/* Available command-line arguments. */
|
/* Available command-line arguments. */
|
||||||
#define ARG_RESET "reset" /**< Reset RsApplication's saved settings. */
|
#define ARG_RESET "reset" /**< Reset RsApplication's saved settings. */
|
||||||
#define ARG_DATADIR "datadir" /**< Directory to use for data files. */
|
#define ARG_DATADIR "datadir" /**< Directory to use for data files. */
|
||||||
@ -87,7 +88,6 @@ static const char* const forwardableArgs[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Static member variables */
|
/* Static member variables */
|
||||||
#ifdef TO_REMOVE
|
|
||||||
QMap<QString, QString> RsApplication::_args; /**< List of command-line arguments. */
|
QMap<QString, QString> RsApplication::_args; /**< List of command-line arguments. */
|
||||||
QString RsApplication::_style; /**< The current GUI style. */
|
QString RsApplication::_style; /**< The current GUI style. */
|
||||||
QString RsApplication::_stylesheet; /**< The current GUI stylesheet. */
|
QString RsApplication::_stylesheet; /**< The current GUI stylesheet. */
|
||||||
|
@ -50,9 +50,11 @@
|
|||||||
struct RsGUIConfigOptions: public RsConfigOptions
|
struct RsGUIConfigOptions: public RsConfigOptions
|
||||||
{
|
{
|
||||||
RsGUIConfigOptions()
|
RsGUIConfigOptions()
|
||||||
: logLevel("Off"), argc(0)
|
: optResetParams(false), logLevel("Off"), argc(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
bool optResetParams; // reset all GUI parameters
|
||||||
|
|
||||||
QString dateformat; // The format for dates in feed items etc.
|
QString dateformat; // The format for dates in feed items etc.
|
||||||
QString language; // The current language.
|
QString language; // The current language.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user