diff options
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/mainwindow.cpp | 3 | ||||
| -rw-r--r-- | src/ui/qmmpstarter.cpp | 8 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index 3f3ee5752..7ac0461d2 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -148,8 +148,7 @@ MainWindow::MainWindow(const QStringList& args, BuiltinCommandLineOption* option m_playListModel->doCurrentVisibleRequest(); updateEQ(); #ifndef Q_OS_WIN32 - char buf[PATH_MAX + 1]; - QString cwd = QString::fromLocal8Bit(getcwd(buf,PATH_MAX)); + QString cwd = QDir::currentPath(); processCommandArgs(args,cwd); #endif if (m_startHidden && m_generalHandler->visibilityControl()) diff --git a/src/ui/qmmpstarter.cpp b/src/ui/qmmpstarter.cpp index 462329bb5..d0c126ba4 100644 --- a/src/ui/qmmpstarter.cpp +++ b/src/ui/qmmpstarter.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006 by Ilya Kotov * + * Copyright (C) 2006-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -19,8 +19,7 @@ ***************************************************************************/ #include <QApplication> -#include <QLocalServer> -#include <QLocalSocket> +#include <QDir> #include <cstdlib> #include <iostream> @@ -115,8 +114,7 @@ void QMMPStarter::writeCommand() #ifndef Q_OS_WIN32 if (!argString.isEmpty()) { - char buf[PATH_MAX + 1]; - QString workingDir = QString::fromLocal8Bit(getcwd(buf,PATH_MAX)) + "\n"; + QString workingDir = QDir::currentPath() + "\n"; QByteArray barray; barray.append(workingDir.toUtf8 ()); |
