Changeset View
Changeset View
Standalone View
Standalone View
src/filewidgets/kfilewidget.cpp
Show First 20 Lines • Show All 1587 Lines • ▼ Show 20 Line(s) | 1587 | if (ret != KMessageBox::Continue) { | |||
---|---|---|---|---|---|
1588 | return false; | 1588 | return false; | ||
1589 | } | 1589 | } | ||
1590 | return true; | 1590 | return true; | ||
1591 | } | 1591 | } | ||
1592 | 1592 | | |||
1593 | return true; | 1593 | return true; | ||
1594 | } | 1594 | } | ||
1595 | 1595 | | |||
1596 | #ifndef KIOFILEWIDGETS_NO_DEPRECATED | | |||
1597 | void KFileWidget::setSelection(const QString &url) | 1596 | void KFileWidget::setSelection(const QString &url) | ||
1598 | { | 1597 | { | ||
1599 | // qDebug() << "setSelection " << url; | 1598 | // qDebug() << "setSelection " << url; | ||
1600 | 1599 | | |||
1601 | if (url.isEmpty()) { | 1600 | if (url.isEmpty()) { | ||
1602 | return; | 1601 | return; | ||
1603 | } | 1602 | } | ||
1604 | 1603 | | |||
1605 | QUrl u = d->getCompleteUrl(url); | 1604 | QUrl u = d->getCompleteUrl(url); | ||
1606 | if (!u.isValid()) { | 1605 | if (!u.isValid()) { | ||
1607 | // Relative path was treated as URL, but it was found to be invalid. | 1606 | // Relative path was treated as URL, but it was found to be invalid. | ||
1608 | qWarning() << url << " is not a correct argument for setSelection!"; | 1607 | qWarning() << url << " is not a correct argument for setSelection!"; | ||
1609 | return; | 1608 | return; | ||
1610 | } | 1609 | } | ||
1611 | 1610 | | |||
1612 | setSelectedUrl(urlFromString(url)); | 1611 | setSelectedUrl(urlFromString(url)); | ||
1613 | } | 1612 | } | ||
1614 | #endif | | |||
1615 | 1613 | | |||
1616 | void KFileWidget::setSelectedUrl(const QUrl &url) | 1614 | void KFileWidget::setSelectedUrl(const QUrl &url) | ||
1617 | { | 1615 | { | ||
1618 | // Honor protocols that do not support directory listing | 1616 | // Honor protocols that do not support directory listing | ||
1619 | if (!url.isRelative() && !KProtocolManager::supportsListing(url)) { | 1617 | if (!url.isRelative() && !KProtocolManager::supportsListing(url)) { | ||
1620 | return; | 1618 | return; | ||
1621 | } | 1619 | } | ||
1622 | d->setLocationText(url); | 1620 | d->setLocationText(url); | ||
▲ Show 20 Lines • Show All 1345 Lines • Show Last 20 Lines |