summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2011-01-24 13:24:03 +0100
committerJonathan Bauer2011-01-24 13:24:03 +0100
commitf39660090c41763355e4ef0a660aed2c2c4c551c (patch)
tree6424908e5ca827d63d7270d5567f6e73dc8ccf82
parentForgot to reset initialisation of opt to 0, was a test... (diff)
downloadfbgui-f39660090c41763355e4ef0a660aed2c2c4c551c.tar.gz
fbgui-f39660090c41763355e4ef0a660aed2c2c4c551c.tar.xz
fbgui-f39660090c41763355e4ef0a660aed2c2c4c551c.zip
A few corrections & -qws options explained...
-rwxr-xr-xfbbrowser/fbbrowserbin524896 -> 524912 bytes
-rw-r--r--fbbrowser/main.cpp11
2 files changed, 8 insertions, 3 deletions
diff --git a/fbbrowser/fbbrowser b/fbbrowser/fbbrowser
index c12c647..a0710ed 100755
--- a/fbbrowser/fbbrowser
+++ b/fbbrowser/fbbrowser
Binary files differ
diff --git a/fbbrowser/main.cpp b/fbbrowser/main.cpp
index 2658e6a..1355f6f 100644
--- a/fbbrowser/main.cpp
+++ b/fbbrowser/main.cpp
@@ -10,7 +10,11 @@ void printUsage()
// Prints usage information, incomplete.
// Q: How is the -qws option handled, mention it here or not?
QTextStream qout(stdout);
- qout << QObject::tr("Usage: ./fbbrowser [OPTIONS]") << endl;
+ qout << QObject::tr("Usage: ./fbbrowser [OPTIONS] <URL>") << 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;
exit(1);
}
@@ -27,13 +31,14 @@ QString getPath(const char* c)
int main(int argc, char *argv[])
{
// Parse command line arguments.
- int opt = 0;
+ int opt = 1;
int longIndex = 0;
// Declare the short options as a char*, these have exactly one - followed by letter from optString.
// For example: ./fbbrowser -h
// Declare the long options in the const struct, these have two - followed by a string found in longOpts[].
// Same as: ./fbbrowser --help
- static const char *optString = "h?";
+ // Note: I included 'qws' here to not have errors, when setting fbbrowser to be the server app aswell.
+ static const char *optString = "hqws";
static const struct option longOpts[] =
{
// If an option requires parameters, write this number instead of no_argument.