4 #include <QCoreApplication>
5 #include <QCommandLineParser>
6 #include <QNetworkAccessManager>
15 int main(
int argc,
char *argv[])
17 QCoreApplication app(argc, argv);
25 qRegisterMetaType<postID>(
"postID");
26 qRegisterMetaType<VFS_request*>(
"VFS_request*");
27 qRegisterMetaType<VFS_request::requestType>(
"VFS_request::requestType");
34 QNetworkAccessManager m;
39 QJSValue
value = engine.toScriptValue<QVariantMap>(vm);
47 QCommandLineParser parser;
48 QCommandLineOption helpOption = parser.addHelpOption();
49 QCommandLineOption versionOption = parser.addVersionOption();
52 QCommandLineOption configOption(
54 "The path to an xml config file.",
57 parser.addOption(configOption);
58 parser.addPositionalArgument(
"config",
"The path to an xml config file.",
"[config]");
61 QCommandLineOption pluginsOption(
63 "A plugin directory path. This option can appear multiple times.",
66 parser.addOption(pluginsOption);
69 QCommandLineOption describeOption(
71 "Load all plugins found and print a description for the nodes within them."
73 parser.addOption(describeOption);
77 const QStringList args = parser.positionalArguments();
81 bool help = parser.isSet(helpOption);
82 bool version = parser.isSet(versionOption);
83 QString
config = args.length() ? args.at(0) : parser.value(configOption);
84 QStringList plugins = parser.values(pluginsOption);
85 bool describe = parser.isSet(describeOption);
86 bool printconfig =
false;
91 VFS v(
config,plugins,describe,printconfig);
93 if (describe ||
config.isEmpty())
VFS is the root node for a Virtual Filesystem.
setter value
a setter DOCME
getter help
A getter that will return a pane object's help message, or a default message indicating that no help ...
setter config
a setter DOCME
#define APPLICATION_VERSION
#define ORGANIZATION_NAME
#define ORGANIZATION_DOMAIN
int main(int argc, char *argv[])