fixed compilation in parameter handling

This commit is contained in:
csoler 2024-02-13 16:24:32 +01:00
parent c5aface2cb
commit 9210e52aae
4 changed files with 14 additions and 5 deletions

View File

@ -1704,7 +1704,8 @@ void MainWindow::openRsCollection(const QString &filename)
if (qinfo.exists()) {
if (qinfo.absoluteFilePath().endsWith(RsCollection::ExtensionString)) {
RsCollection collection;
collection.openColl(qinfo.absoluteFilePath());
collection.downloadFiles();
//collection.openColl(qinfo.absoluteFilePath());
}
}
}

View File

@ -359,7 +359,7 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
>> parameter('k',"style" ,guistylesheetfile ,"style sheet file" ,"gui stylesheet file" ,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('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
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);
@ -372,9 +372,15 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
#ifdef RS_AUTOLOGIN
as >> option('a',"auto-login" ,conf.autoLogin ,"AutoLogin (Windows Only) + StartMinimised");
#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());
if(!as.isOk())
{
std::cerr << "Incorrect arguments." << std::endl;
std::cerr << as.usage() << std::endl;
return 0;
}
conf.logFileName = QString::fromStdString(logfilename);
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

View File

@ -57,6 +57,7 @@
#include "rshare.h"
#ifdef TO_REMOVE
/* Available command-line arguments. */
#define ARG_RESET "reset" /**< Reset RsApplication's saved settings. */
#define ARG_DATADIR "datadir" /**< Directory to use for data files. */
@ -87,7 +88,6 @@ static const char* const forwardableArgs[] = {
};
/* Static member variables */
#ifdef TO_REMOVE
QMap<QString, QString> RsApplication::_args; /**< List of command-line arguments. */
QString RsApplication::_style; /**< The current GUI style. */
QString RsApplication::_stylesheet; /**< The current GUI stylesheet. */

View File

@ -50,9 +50,11 @@
struct RsGUIConfigOptions: public RsConfigOptions
{
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 language; // The current language.