Changeset View
Changeset View
Standalone View
Standalone View
src/platformtheme/kdeplatformfiledialoghelper.cpp
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | 52 | { | |||
---|---|---|---|---|---|
56 | list.replaceInStrings(QStringLiteral("/"), QStringLiteral("\\/")); | 56 | list.replaceInStrings(QStringLiteral("/"), QStringLiteral("\\/")); | ||
57 | QStringList::const_iterator it(list.constBegin()), end(list.constEnd()); | 57 | QStringList::const_iterator it(list.constBegin()), end(list.constEnd()); | ||
58 | bool first = true; | 58 | bool first = true; | ||
59 | 59 | | |||
60 | for (; it != end; ++it) { | 60 | for (; it != end; ++it) { | ||
61 | int ob = it->lastIndexOf(QLatin1Char('(')), | 61 | int ob = it->lastIndexOf(QLatin1Char('(')), | ||
62 | cb = it->lastIndexOf(QLatin1Char(')')); | 62 | cb = it->lastIndexOf(QLatin1Char(')')); | ||
63 | 63 | | |||
64 | if (-1 != cb && ob < cb) { | | |||
65 | if (first) { | 64 | if (first) { | ||
66 | first = false; | 65 | first = false; | ||
67 | } else { | 66 | } else { | ||
68 | str << '\n'; | 67 | str << '\n'; | ||
69 | } | 68 | } | ||
69 | if (-1 != cb && ob < cb) { | ||||
70 | str << it->mid(ob + 1, (cb - ob) - 1) << '|' << it->mid(0, ob); | 70 | str << it->mid(ob + 1, (cb - ob) - 1) << '|' << it->mid(0, ob); | ||
71 | } else { | ||||
72 | str << (*it); | ||||
71 | } | 73 | } | ||
72 | } | 74 | } | ||
73 | 75 | | |||
74 | return filter; | 76 | return filter; | ||
75 | } | 77 | } | ||
76 | 78 | | |||
77 | /* | 79 | /* | ||
78 | * Map a KDE filter string into a Qt one. | 80 | * Map a KDE filter string into a Qt one. | ||
▲ Show 20 Lines • Show All 366 Lines • Show Last 20 Lines |