From ea78d18c21d3d5862cf7bae40fa7bf8f1e321438 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Fri, 24 Jun 2011 16:06:30 +0200 Subject: scripts changes --- src/fbsplash.cpp | 2 ++ src/main.cpp | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/fbsplash.cpp b/src/fbsplash.cpp index c30cd5a..7e97d91 100644 --- a/src/fbsplash.cpp +++ b/src/fbsplash.cpp @@ -2,6 +2,7 @@ #include "fbsplash.h" #include "ui_fbsplash.h" +//----------------------------------------------------------------------------- fbsplash::fbsplash(QWidget *parent) : QWidget(parent), ui(new Ui::fbsplash) { @@ -14,6 +15,7 @@ fbsplash::fbsplash(QWidget *parent) : showFullScreen(); } +//----------------------------------------------------------------------------- fbsplash::~fbsplash() { delete ui; } diff --git a/src/main.cpp b/src/main.cpp index cd1f5e0..d598271 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2,13 +2,13 @@ #include #include "fbsplash.h" -void printHelp(){ +void printHelp() { QTextStream qout(stdout); qout << "Usage: ./fbsplash [OPTIONS]\n"; qout << "Options:\n"; qout << "-h, --help " << "Prints this help.\n"; qout.flush(); - exit(EXIT_SUCCESS); + exit( EXIT_SUCCESS); } int main(int argc, char *argv[]) { @@ -19,9 +19,12 @@ int main(int argc, char *argv[]) { // Command line arguements parsing QMap clOpts; + + static const char *optString = "h"; + static const struct option + longOpts[] = { { "help", no_argument, NULL, 'h' } }; + int longIndex = 0; - static const char *optString = "c:u:d:s:t:D:hl:"; - static const struct option longOpts[] = { { "help", no_argument, NULL, 'h' } }; int opt = getopt_long(argc, argv, optString, longOpts, &longIndex); while (opt != -1) { switch (opt) { @@ -35,7 +38,6 @@ int main(int argc, char *argv[]) { if (clOpts.contains("help")) printHelp(); - // fbsplash init fbsplash bs; app.exec(); -- cgit v1.2.3-55-g7522