From 83c100eb23a073b9cac69db11c2efb1ad52b5ea4 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Tue, 17 Feb 2009 11:44:56 +0000 Subject: 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 --- src/qmmp/qmmp.cpp | 11 +++++++++-- src/qmmp/qmmp.h | 4 ++++ 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3-13-gbd6f