11 #include "terminalparser.hpp"
12 using namespace Huggle;
15 TerminalParser::TerminalParser(
int argc_, QStringList argv)
22 bool TerminalParser::Parse()
25 while (x < this->args.count())
28 QString text = this->args.at(x);
29 if (text ==
"-h" || text ==
"--help")
34 if (!text.startsWith(
"--") && text.startsWith(
"-"))
39 if (this->ParseChar(text.at(0)))
56 cout << (QString(
"This parameter isn't valid: ") + text).toStdString() << endl;
65 bool TerminalParser::ParseChar(QChar x)
79 void TerminalParser::DisplayHelp()
85 cout <<
"Huggle 3 QT-LX" << endl << endl;
86 cout <<
"Parameters:" << endl;
87 cout <<
" -v: Increases verbosity" << endl;
88 cout <<
" --safe: Start huggle in special mode where lot of stuff is skipped during load" << endl;
89 cout <<
" -h | --help: Display this help" << endl<< endl;
90 cout <<
"Huggle is open source, contribute at https://github.com/huggle/huggle3-qt-lx" << endl;
static unsigned int Verbosity
Verbosity for debugging to terminal etc, can be switched with parameter –verbosity.
static bool _SafeMode
If this is true some functionalities will be disabled.