mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kio: remove now non-operational KDirLister::OpenUrlFlags
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
888926984f
commit
471df42df0
4 changed files with 9 additions and 24 deletions
|
@ -196,7 +196,7 @@ public:
|
|||
|
||||
// private methods
|
||||
bool checkPreviewInternal() const;
|
||||
bool openUrl(const KUrl &url, KDirLister::OpenUrlFlags flags = KDirLister::NoFlags);
|
||||
bool openUrl(const KUrl &url);
|
||||
int sortColumn() const;
|
||||
Qt::SortOrder sortOrder() const;
|
||||
void updateSorting(QDir::SortFlags sort);
|
||||
|
@ -1009,13 +1009,13 @@ void KDirOperator::updateDir()
|
|||
void KDirOperator::rereadDir()
|
||||
{
|
||||
pathChanged();
|
||||
d->openUrl(d->currUrl, KDirLister::Reload);
|
||||
d->openUrl(d->currUrl);
|
||||
}
|
||||
|
||||
|
||||
bool KDirOperator::Private::openUrl(const KUrl& url, KDirLister::OpenUrlFlags flags)
|
||||
bool KDirOperator::Private::openUrl(const KUrl &url)
|
||||
{
|
||||
const bool result = KProtocolManager::supportsListing(url) && dirLister->openUrl(url, flags);
|
||||
const bool result = KProtocolManager::supportsListing(url) && dirLister->openUrl(url);
|
||||
if (!result) // in that case, neither completed() nor canceled() will be emitted by KDL
|
||||
_k_slotCanceled();
|
||||
|
||||
|
|
|
@ -272,10 +272,8 @@ KDirLister::~KDirLister()
|
|||
delete d;
|
||||
}
|
||||
|
||||
bool KDirLister::openUrl(const KUrl &url, OpenUrlFlags flags)
|
||||
bool KDirLister::openUrl(const KUrl &url)
|
||||
{
|
||||
Q_UNUSED(flags);
|
||||
|
||||
stop();
|
||||
|
||||
if (d->dirWatch) {
|
||||
|
@ -295,7 +293,7 @@ bool KDirLister::openUrl(const KUrl &url, OpenUrlFlags flags)
|
|||
d->dirNotify = nullptr;
|
||||
}
|
||||
|
||||
kDebug(7003) << "opening" << url << flags;
|
||||
kDebug(7003) << "opening" << url;
|
||||
d->url = url;
|
||||
d->allItems.clear();
|
||||
if (!d->filteredItems.isEmpty()) {
|
||||
|
@ -435,7 +433,7 @@ void KDirLister::updateDirectory()
|
|||
{
|
||||
// NOTE: no partial updates for non-local directories because the signals are bogus for
|
||||
// some KIO slaves (such as trash:/, see kde-workspace/kioslave/trash/ktrash.cpp for example)
|
||||
openUrl(d->url, KDirLister::NoFlags);
|
||||
openUrl(d->url);
|
||||
}
|
||||
|
||||
bool KDirLister::isFinished() const
|
||||
|
|
|
@ -54,16 +54,6 @@ class KIO_EXPORT KDirLister : public QObject
|
|||
Q_PROPERTY(QStringList mimeFilter READ mimeFilters WRITE setMimeFilter RESET clearMimeFilter)
|
||||
|
||||
public:
|
||||
enum OpenUrlFlag
|
||||
{
|
||||
NoFlags = 0x0, ///< No additional flags specified.
|
||||
|
||||
Keep = 0x1, ///< Deprecated, non-operational.
|
||||
|
||||
Reload = 0x2 ///< Deprecated, non-operational.
|
||||
};
|
||||
Q_DECLARE_FLAGS(OpenUrlFlags, OpenUrlFlag)
|
||||
|
||||
/**
|
||||
* Create a directory lister.
|
||||
*/
|
||||
|
@ -85,11 +75,10 @@ public:
|
|||
* completed() signal is emitted (and isFinished() returns true).
|
||||
*
|
||||
* @param url the directory URL.
|
||||
* @param flags see OpenUrlFlags
|
||||
* @return true if successful, false otherwise (e.g. if invalid @p url) was
|
||||
* passed.
|
||||
*/
|
||||
bool openUrl(const KUrl &url, OpenUrlFlags flags = NoFlags);
|
||||
bool openUrl(const KUrl &url);
|
||||
|
||||
/**
|
||||
* Stop listing the current directory URL. Emits canceled() if there was
|
||||
|
@ -467,6 +456,4 @@ private:
|
|||
Q_PRIVATE_SLOT(d, void _k_slotUpdateDirectory());
|
||||
};
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(KDirLister::OpenUrlFlags)
|
||||
|
||||
#endif // KDIRLISTER_H
|
||||
|
|
|
@ -1019,7 +1019,7 @@ void KDirModel::fetchMore( const QModelIndex & parent )
|
|||
dirNode->setPopulated( true );
|
||||
|
||||
const KUrl parentUrl = parentItem.url();
|
||||
d->m_dirLister->openUrl(parentUrl, KDirLister::Keep);
|
||||
d->m_dirLister->openUrl(parentUrl);
|
||||
}
|
||||
|
||||
bool KDirModel::dropMimeData( const QMimeData * data, Qt::DropAction action, int row, int column, const QModelIndex & parent )
|
||||
|
|
Loading…
Add table
Reference in a new issue