diff options
| author | Jonathan Bauer | 2011-03-05 20:54:04 +0100 |
|---|---|---|
| committer | Jonathan Bauer | 2011-03-05 20:54:04 +0100 |
| commit | f10f6dd6dc6fae0d6bf35ecf3b60e17da050a414 (patch) | |
| tree | de2723fd07c2c10000637179ad2ff3a50d8d7f72 | |
| parent | help fixed, misc cleanups... (diff) | |
| download | fbgui-f10f6dd6dc6fae0d6bf35ecf3b60e17da050a414.tar.gz fbgui-f10f6dd6dc6fae0d6bf35ecf3b60e17da050a414.tar.xz fbgui-f10f6dd6dc6fae0d6bf35ecf3b60e17da050a414.zip | |
printUsage updated, random ideas...
| -rw-r--r-- | src/fbgui.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/fbgui.cpp b/src/fbgui.cpp index 3fad734..c6f7e0d 100644 --- a/src/fbgui.cpp +++ b/src/fbgui.cpp @@ -12,11 +12,12 @@ void printUsage() // Prints usage information. // TODO: Complete usage info. QTextStream qout(stdout); - qout << QObject::tr("Usage: ./fbgui [OPTIONS] <URL>") << endl; + qout << QObject::tr("Usage: ./fbgui [OPTIONS]") << endl; qout << QObject::tr("Options:") << endl; - qout << "-h or --help " << QObject::tr("Prints usage information.") << endl; - qout << "-qws " << QObject::tr("Set this application to also be the server application.") << endl; - qout << " " << QObject::tr("Skip this option if you have a QT server application") << endl; + qout << "-u <URL>, --url=<URL> " << QObject::tr("Set which URL to load.") << endl; + qout << "-h, --help " << QObject::tr("Prints usage information.") << endl; + // qout << "-qws " << QObject::tr("Set this application to also be the server application.") << endl; + // qout << " " << QObject::tr("Skip this option if you have a QT server application") << endl; exit(1); } @@ -34,6 +35,10 @@ int main(int argc, char *argv[]) /* SETTINGS TEST */ CommandLineOptions clOptions(argc, argv); + // TODO: Use QSettings for accessing the ini file but + // check first if option was set from cmdline. + // (if it was, dont set it from ini). + // Check if help was requested, if so printUsage() and exit. if (clOptions.contains("help")) { @@ -46,8 +51,8 @@ int main(int argc, char *argv[]) return EXIT_SUCCESS; } - // Check if URL was given at cmdline argument, - // if not set default. + // Check if URL was given at cmdline argument, if not set default. + // TODO: fix short options parsing, doesn't work atm. QUrl url; if (clOptions.contains("url")) url = clOptions.value("url"); |
