diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-02-17 11:44:56 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-02-17 11:44:56 +0000 |
| commit | 83c100eb23a073b9cac69db11c2efb1ad52b5ea4 (patch) | |
| tree | d2fe90b519d55b75ae9a2ae70b0fa43a79bf6ad7 | |
| parent | 0ffa05b536ad907e63d34a1ab7244ce159354269 (diff) | |
| download | qmmp-83c100eb23a073b9cac69db11c2efb1ad52b5ea4.tar.gz qmmp-83c100eb23a073b9cac69db11c2efb1ad52b5ea4.tar.bz2 qmmp-83c100eb23a073b9cac69db11c2efb1ad52b5ea4.zip | |
libqmmp: allow config path override
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@791 90c681e8-e032-0410-971d-27865f9a5e38
| -rw-r--r-- | src/qmmp/qmmp.cpp | 11 | ||||
| -rw-r--r-- | src/qmmp/qmmp.h | 4 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/qmmp/qmmp.cpp b/src/qmmp/qmmp.cpp index 56638e33e..40b837718 100644 --- a/src/qmmp/qmmp.cpp +++ b/src/qmmp/qmmp.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2088-2009 by Ilya Kotov * + * Copyright (C) 2008-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -27,9 +27,16 @@ #include "qmmp.h" +QString Qmmp::m_configFile = QDir::homePath() +"/.qmmp/qmmprc"; + QString Qmmp::configFile() { - return QDir::homePath() +"/.qmmp/qmmprc"; + return m_configFile; +} + +void Qmmp::setConfigFile(const QString &path) +{ + m_configFile = path; } QString Qmmp::strVersion() diff --git a/src/qmmp/qmmp.h b/src/qmmp/qmmp.h index 0fb0c065e..bb5ae6830 100644 --- a/src/qmmp/qmmp.h +++ b/src/qmmp/qmmp.h @@ -31,6 +31,7 @@ public: enum State {Playing = 0, Paused, Stopped, Buffering, NormalError, FatalError}; enum MetaData {TITLE = 0, ARTIST, ALBUM, COMMENT, GENRE, YEAR, TRACK, URL}; static QString configFile(); + static void setConfigFile(const QString &path); static QString strVersion(); //global proxy static bool useProxy(); @@ -40,6 +41,9 @@ public: static void setProxyAuthEnabled(bool yes); static void setProxy (const QUrl &proxy); +private: + static QString m_configFile; + }; #endif |
