diff options
author | Jonathan Bauer | 2011-02-22 13:44:56 +0100 |
---|---|---|
committer | Jonathan Bauer | 2011-02-22 13:44:56 +0100 |
commit | 3d4100e9f5addffd7836e4ba2372c80dd7491077 (patch) | |
tree | 4e5f51e342ec5bfb05abca1a285ae749c4e4c3a1 /src/fbgui.cpp | |
parent | Code cleanup; few optimizations; download debug messages... (diff) | |
download | fbgui-3d4100e9f5addffd7836e4ba2372c80dd7491077.tar.gz fbgui-3d4100e9f5addffd7836e4ba2372c80dd7491077.tar.xz fbgui-3d4100e9f5addffd7836e4ba2372c80dd7491077.zip |
Simplified printing of the application path; more cleanup
Diffstat (limited to 'src/fbgui.cpp')
-rw-r--r-- | src/fbgui.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/fbgui.cpp b/src/fbgui.cpp index 1fb50c0..103ad44 100644 --- a/src/fbgui.cpp +++ b/src/fbgui.cpp @@ -20,20 +20,6 @@ void printUsage() exit(1); } -// This function returns the path of the application as a QString. -QString getPath() -{ - // Alternative 1 - QDir qdir; - return qdir.currentPath(); - // Alternative 2 - /* - char result[ PATH_MAX ]; - readlink("/proc/self/exe", result, PATH_MAX); - return QString(result); - */ -} - int main(int argc, char *argv[]) { // Parse command line arguments. @@ -63,15 +49,13 @@ int main(int argc, char *argv[]) } opt = getopt_long(argc, argv, optString, longOpts, &longIndex); } - // Get the application path and prints on screen. - qDebug() << "Application Path: " << getPath(); - // This is the main object of a QT Application. QApplication a(argc, argv); + // Get the application path and prints on screen. + qDebug() << "Application Path: " << a.applicationDirPath(); // Is this really needed, since we kill the app through the fbbrowser object? QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); // This part reads the URL to load from the arguments given through the commandline. - qDebug() << "Number of Arguments:" << argc << endl; QUrl url; if (argc > 1) url = QUrl(argv[1]); |