diff options
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]); |
