From 9254ecb8588906f998bcf5fa973a4df289249ac3 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Mon, 11 Apr 2011 15:26:40 +0200 Subject: started inline documentation --- src/main.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index b9643c1..ad86396 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -25,6 +25,13 @@ void printHelp() int main(int argc, char *argv[]) { + // Initialisation of the QApplication: + // In QT, every application is composed of two separate + // components: the GUI-Client and the GUI-Server. + // + // The third parameter sets the application as the + // GUI-Server (aswell as the GUI-Client). + QApplication app(argc, argv, QApplication::GuiServer); app.setOrganizationName("team_projekt_2011"); app.setApplicationName("prebootGUI"); @@ -34,7 +41,7 @@ int main(int argc, char *argv[]) translator.load(":" + QLocale::system().name()); app.installTranslator(&translator); - // parse command line arguments + // parse command line arguments using getopt QMap clOpts; int longIndex = 0; static const char *optString = "c:u:d:s:t:D:h"; @@ -94,7 +101,11 @@ int main(int argc, char *argv[]) else debugMode = -1; - // look for config file + // look for config file either in: + // - the path found in the configuration file + // - the user's home directory (as .fbgui.conf) + // - /etc/fbgui.conf + QString configFilePath; QFileInfo confInfo; if (clOpts.contains("configFile")) @@ -137,7 +148,7 @@ int main(int argc, char *argv[]) else updateInterval = DEFAULT_UPDATE_INTERVAL; - // sets which file to watch to trigger loading of URL + // set which file to watch to trigger loading of URL if (clOpts.contains("trigger")) fileToTriggerURL = clOpts.value("trigger"); else if (confFileSettings.contains("default/file_trigger")) -- cgit v1.2.3-55-g7522