From c4fff8defa4b11b227c02cd18c1906bfb7c6bc9f Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sun, 12 May 2013 11:55:49 +0000 Subject: fixed windows support git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3447 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmp/qmmpplugincache.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/qmmp/qmmpplugincache.cpp b/src/qmmp/qmmpplugincache.cpp index b98020327..9a9817266 100644 --- a/src/qmmp/qmmpplugincache.cpp +++ b/src/qmmp/qmmpplugincache.cpp @@ -39,8 +39,12 @@ QmmpPluginCache::QmmpPluginCache(const QString &file, QSettings *settings) m_path = info.QFileInfo::canonicalFilePath(); settings->beginGroup("PluginCache"); +#ifdef Q_OS_WIN + if(settings->allKeys().contains(m_path)) +#else QString copy = m_path; if(settings->allKeys().contains(copy.remove(0,1))) +#endif { QStringList values = settings->value(m_path).toStringList(); if(values.count() != 3) @@ -144,8 +148,11 @@ void QmmpPluginCache::cleanup(QSettings *settings) foreach (QString key, settings->allKeys()) { - //TODO win32 support - if(!QFile::exists("/" + key)) +#ifdef Q_OS_WIN + if(!QFile::exists(key)) +#else + if(!QFile::exists(key)) +#endif { settings->remove(key); qDebug("QmmpPluginCache: removed key %s", qPrintable(key)); -- cgit v1.2.3-13-gbd6f