MCPcopy Create free account
hub / github.com/dail8859/NotepadNext / parseCommandLine

Function parseCommandLine

src/NotepadNextApplication.cpp:48–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46const SingleApplication::Options opts = SingleApplication::ExcludeAppPath | SingleApplication::ExcludeAppVersion | SingleApplication::SecondaryNotification;
47
48void parseCommandLine(QCommandLineParser &parser, const QStringList &args)
49{
50 parser.setApplicationDescription("Notepad Next");
51 parser.addHelpOption();
52 parser.addVersionOption();
53
54 parser.addPositionalArgument("files", "Files to open.");
55
56 parser.addOptions({
57 {"translation", "Overrides the system default translation.", "translation"},
58 {"reset-settings", "Resets all application settings."},
59 {"n", "Places the cursor on the line number for the first file specified", "line number"},
60 {"workspace", "Opens the specified folder as a workspace", "workspace path"}
61 });
62
63 parser.process(args);
64}
65
66static QString toLocalFileName(const QString file)
67{

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected