wip: ini parse baseline
This commit is contained in:
parent
8e93120555
commit
8e07b1efdd
9 changed files with 356 additions and 27 deletions
|
|
@ -3,9 +3,11 @@
|
|||
#include "qtcommon.h"
|
||||
#include "qtclasses.h"
|
||||
#include "qtvisuals.h"
|
||||
#include "settings.h"
|
||||
//#include "global.h"
|
||||
|
||||
OverseerHandler *osh = nullptr;
|
||||
OverseerHandler *osh = nullptr;
|
||||
ini::UserSettings *set = nullptr;
|
||||
|
||||
QApplication* createApplication(int &argc, char *argv[])
|
||||
{
|
||||
|
|
@ -31,6 +33,14 @@ void closeDebugFileLog() {
|
|||
close_file_log_buffer();
|
||||
}
|
||||
|
||||
char* parseCmdArgs(int argc, char* argv[]) {
|
||||
if(argc == 1) return nullptr;
|
||||
char arg[] = "--config-path=";
|
||||
if(strstr(argv[1], arg)) {
|
||||
return argv[1] + (sizeof(arg) / sizeof(arg[0])) - 1;
|
||||
} else return nullptr;
|
||||
}
|
||||
|
||||
/* set_terminate
|
||||
* void closeDebugFileLog2() {
|
||||
* close_file_log_buffer();
|
||||
|
|
@ -46,6 +56,8 @@ int main (int argc, char* argv[]) {
|
|||
* log_debugcpp(a.toStdString());
|
||||
* }
|
||||
*/
|
||||
//std::map<const char*, cha>* values = new std::map<const char*, int>{ {"show_channels", false}, {"test", 7} };
|
||||
set = new ini::UserSettings(parseCmdArgs(argc, argv));
|
||||
initialize_file_log();
|
||||
atexit(closeDebugFileLog);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue