Add CLI pairing support
This commit is contained in:
parent
692942e5be
commit
aaf59c2d01
6 changed files with 176 additions and 0 deletions
10
app/main.cpp
10
app/main.cpp
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "cli/quitstream.h"
|
||||
#include "cli/startstream.h"
|
||||
#include "cli/pair.h"
|
||||
#include "cli/commandlineparser.h"
|
||||
#include "path.h"
|
||||
#include "utils.h"
|
||||
|
|
@ -610,6 +611,15 @@ int main(int argc, char *argv[])
|
|||
engine.rootContext()->setContextProperty("launcher", launcher);
|
||||
break;
|
||||
}
|
||||
case GlobalCommandLineParser::PairRequested:
|
||||
{
|
||||
initialView = "qrc:/gui/CliPair.qml";
|
||||
PairCommandLineParser pairParser;
|
||||
pairParser.parse(app.arguments());
|
||||
auto launcher = new CliPair::Launcher(pairParser.getHost(), pairParser.getPredefinedPin(), &app);
|
||||
engine.rootContext()->setContextProperty("launcher", launcher);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
engine.rootContext()->setContextProperty("initialView", initialView);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue