Add support for multiple MPD servers.

This commit is contained in:
craig.p.drummond
2012-06-08 17:53:35 +00:00
committed by craig.p.drummond
parent 0f639db994
commit f31a7264cd
36 changed files with 1125 additions and 569 deletions

View File

@@ -40,6 +40,24 @@
#include <pwd.h>
#endif
QString Utils::strippedText(QString s)
{
s.remove(QString::fromLatin1("..."));
int i = 0;
while (i < s.size()) {
++i;
if (s.at(i - 1) != QLatin1Char('&')) {
continue;
}
if (i < s.size() && s.at(i) == QLatin1Char('&')) {
++i;
}
s.remove(i - 1, 1);
}
return s.trimmed();
}
QString Utils::dirSyntax(const QString &d)
{
if(!d.isEmpty())