summaryrefslogtreecommitdiffstats
path: root/src/CommandLineOptions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/CommandLineOptions.cpp')
-rw-r--r--src/CommandLineOptions.cpp43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/CommandLineOptions.cpp b/src/CommandLineOptions.cpp
deleted file mode 100644
index 945cff9..0000000
--- a/src/CommandLineOptions.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * This class parses the command line options.
- */
-
-#include <QDebug>
-#include <getopt.h>
-#include <cstdlib>
-#include "CommandLineOptions.h"
-
-CommandLineOptions::CommandLineOptions(int argc, char * const argv[]){
- qDebug() << "Received " << argc << "arguments.";
- for (int i = argc; i != 0; i--)
- qDebug() << i << " argument: " << argv[i];
- // Parse command line arguments.
- int longIndex = 0;
- static const char *optString = "u:h";
- static const struct option longOpts[] =
- {
- {"url", required_argument, NULL, 'u'},
- {"help", no_argument, NULL, 'h'}
- };
- // getopt_long returns the index of the next argument to be read, -1 if there are no more arguments.
- int opt = getopt_long(argc, argv, optString, longOpts, &longIndex);
- while (opt != -1)
- {
- switch(opt)
- {
- case 'u':
- options.insert("url", optarg);
- qDebug() << "Added URL to clOptions:" << optarg;
- break;
- case 'h':
- options.insert("help", "help");
- qDebug() << "Added help to clOptions.";
- break;
- }
- opt = getopt_long(argc, argv, optString, longOpts, &longIndex);
- }
-}
-
-CommandLineOptions::~CommandLineOptions(){
-
-}