mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 10:52:49 +00:00
kioslave: curl slave line parser optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
a2c0f0f006
commit
b266599a69
1 changed files with 2 additions and 1 deletions
|
@ -1006,6 +1006,7 @@ QList<KIO::UDSEntry> CurlProtocol::udsEntries()
|
||||||
|
|
||||||
kDebug(7103) << "Encoding" << remoteEncoding()->encoding();
|
kDebug(7103) << "Encoding" << remoteEncoding()->encoding();
|
||||||
|
|
||||||
|
static const QByteArray linkseparator = QByteArray("->");
|
||||||
foreach(const QByteArray &line, m_writedata.split('\n')) {
|
foreach(const QByteArray &line, m_writedata.split('\n')) {
|
||||||
if (line.isEmpty()) {
|
if (line.isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -1028,7 +1029,7 @@ QList<KIO::UDSEntry> CurlProtocol::udsEntries()
|
||||||
|
|
||||||
// take out the link parts, if any
|
// take out the link parts, if any
|
||||||
QByteArray ftplinkpath;
|
QByteArray ftplinkpath;
|
||||||
const int linkseparatorindex = lineparts.indexOf(QByteArray("->"));
|
const int linkseparatorindex = lineparts.indexOf(linkseparator);
|
||||||
if (linkseparatorindex > 0) {
|
if (linkseparatorindex > 0) {
|
||||||
foreach (const QByteArray &linkpart, lineparts.mid(linkseparatorindex)) {
|
foreach (const QByteArray &linkpart, lineparts.mid(linkseparatorindex)) {
|
||||||
ftplinkpath.append(linkpart);
|
ftplinkpath.append(linkpart);
|
||||||
|
|
Loading…
Add table
Reference in a new issue