mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 10:22:49 +00:00
generic: adjust to KUrl changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
d48559e1e8
commit
568b377ca8
6 changed files with 9 additions and 9 deletions
|
@ -251,7 +251,7 @@ int VersionControlObserver::createItemStatesList(QMap<QString, QVector<ItemState
|
|||
|
||||
if (items.count() > 0) {
|
||||
const KUrl& url = items.first().item.url();
|
||||
itemStates.insert(url.directory(KUrl::AppendTrailingSlash), items);
|
||||
itemStates.insert(url.directory(KUrl::AddTrailingSlash), items);
|
||||
}
|
||||
|
||||
return index - firstIndex; // number of processed items
|
||||
|
|
|
@ -47,7 +47,7 @@ void AutoStartItem::setPath(const QString &path)
|
|||
{
|
||||
Q_ASSERT(path.endsWith(QDir::separator()));
|
||||
|
||||
if (path == m_fileName.directory(KUrl::AppendTrailingSlash)) {
|
||||
if (path == m_fileName.directory(KUrl::AddTrailingSlash)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ void KFindItemModel::insertFileItems( const QList< QPair<KFileItem,QString> > &
|
|||
{
|
||||
QPair<KFileItem,QString> pair = *it;
|
||||
|
||||
QString subDir = m_view->reducedDir(pair.first.url().directory(KUrl::AppendTrailingSlash));
|
||||
QString subDir = m_view->reducedDir(pair.first.url().directory(KUrl::AddTrailingSlash));
|
||||
m_itemList.append( KFindItem( pair.first, subDir, pair.second ) );
|
||||
}
|
||||
|
||||
|
@ -258,7 +258,7 @@ QVariant KFindItem::data( int column, int role ) const
|
|||
switch( column )
|
||||
{
|
||||
case 0:
|
||||
return m_fileItem.url().fileName(KUrl::ObeyTrailingSlash);
|
||||
return m_fileItem.url().fileName(KUrl::LeaveTrailingSlash);
|
||||
case 1:
|
||||
return m_subDir;
|
||||
case 2:
|
||||
|
|
|
@ -204,7 +204,7 @@ void KQuery::processQuery( const KFileItem &file)
|
|||
while ( nextItem.hasNext() )
|
||||
{
|
||||
QRegExp *reg = nextItem.next();
|
||||
matched = matched || ( reg == 0L ) || ( reg->exactMatch( file.url().fileName( KUrl::IgnoreTrailingSlash ) ) ) ;
|
||||
matched = matched || ( reg == 0L ) || ( reg->exactMatch( file.url().fileName( KUrl::RemoveTrailingSlash ) ) ) ;
|
||||
}
|
||||
if (!matched)
|
||||
return;
|
||||
|
|
|
@ -615,7 +615,7 @@ void MTPSlave::copy(const KUrl& src, const KUrl& dest, int, JobFlags flags)
|
|||
}
|
||||
|
||||
kDebug(KIO_MTP) << "Copy file" << src.fileName() << "from filesystem to device"
|
||||
<< src.directory(KUrl::AppendTrailingSlash) << dest.directory(KUrl::AppendTrailingSlash);
|
||||
<< src.directory(KUrl::AddTrailingSlash) << dest.directory(KUrl::AddTrailingSlash);
|
||||
|
||||
if (!(flags & KIO::Overwrite) && getPath(dest.path()).first) {
|
||||
error(ERR_FILE_ALREADY_EXIST, dest.path());
|
||||
|
@ -627,7 +627,7 @@ void MTPSlave::copy(const KUrl& src, const KUrl& dest, int, JobFlags flags)
|
|||
QPair<void*, LIBMTP_mtpdevice_t*> pair = getPath(dest.directory());
|
||||
|
||||
if (!pair.first) {
|
||||
error(ERR_DOES_NOT_EXIST, dest.directory(KUrl::AppendTrailingSlash));
|
||||
error(ERR_DOES_NOT_EXIST, dest.directory(KUrl::AddTrailingSlash));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -688,7 +688,7 @@ void MTPSlave::copy(const KUrl& src, const KUrl& dest, int, JobFlags flags)
|
|||
}
|
||||
|
||||
kDebug(KIO_MTP) << "Copy file" << src.fileName() << "from device to filesystem"
|
||||
<< dest.directory(KUrl::AppendTrailingSlash) << dest.directory(KUrl::AppendTrailingSlash);
|
||||
<< dest.directory(KUrl::AddTrailingSlash) << dest.directory(KUrl::AddTrailingSlash);
|
||||
|
||||
QFileInfo destination(dest.path());
|
||||
|
||||
|
|
|
@ -833,7 +833,7 @@ void KonqOperations::slotResult(KJob *job)
|
|||
KonqOperations *KonqOperations::rename( QWidget * parent, const KUrl & oldurl, const QString & name )
|
||||
{
|
||||
KUrl newurl( oldurl );
|
||||
newurl.setPath( oldurl.directory( KUrl::AppendTrailingSlash ) + name );
|
||||
newurl.setPath( oldurl.directory( KUrl::AddTrailingSlash ) + name );
|
||||
kDebug(1203) << "KonqOperations::rename("<<name<<") called. newurl=" << newurl;
|
||||
return rename( parent, oldurl, newurl );
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue