Commit 5ceae9e0 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some error

svn path=/trunk/KDE/kdebase/libkonq/; revision=538523
parent 275c6495
......@@ -308,7 +308,8 @@ bool KFileIVI::acceptDrop( const QMimeSource *mime ) const
KUrl::List::Iterator it = uris.begin();
for ( ; it != uris.end() ; it++ )
{
if ( m_fileitem->url().equals( *it, true /*ignore trailing slashes*/ ) )
KUrl::EqualsOptions flags = KUrl::CompareWithoutTrailingSlash;
if ( m_fileitem->url().equals( *it, flags /*ignore trailing slashes*/ ) )
return true;
}
}
......
......@@ -805,7 +805,7 @@ void KonqIconViewWidget::setURL( const KUrl &kurl )
d->pFileTip->setPreview( KGlobalSettings::showFilePreview(m_url) );
if ( m_url.isLocalFile() )
m_dotDirectoryPath = m_url.path(1).append( ".directory" );
m_dotDirectoryPath = m_url.path(KUrl::AddTrailingSlash).append( ".directory" );
else
m_dotDirectoryPath.clear();
}
......@@ -827,7 +827,7 @@ void KonqIconViewWidget::startImagePreview( const QStringList &, bool force )
KLibFactory *factory = KLibLoader::self()->factory("konq_sound");
if (factory)
d->pSoundPlayer = static_cast<KonqSoundPlayer *>(
factory->create(this, 0, "KonqSoundPlayer"));
factory->create(this, "KonqSoundPlayer"));
d->bSoundPreviews = (d->pSoundPlayer != 0L);
}
......
......@@ -515,7 +515,7 @@ void KonqOperations::doFileCopy()
bool linkOnly = false;
if (isDesktopFile && !KAuthorized::authorizeKAction("run_desktop_files") &&
(m_destURL.path(1) == KGlobalSettings::desktopPath()) )
(m_destURL.path(KUrl::AddTrailingSlash) == KGlobalSettings::desktopPath()) )
{
linkOnly = true;
}
......@@ -662,7 +662,7 @@ void KonqOperations::rename( QWidget * parent, const KUrl & oldurl, const KUrl&
op->setOperation( job, MOVE, lst, newurl );
(void) new KonqCommandRecorder( KonqCommand::MOVE, lst, newurl, job );
// if moving the desktop then update config file and emit
if ( oldurl.isLocalFile() && oldurl.path(1) == KGlobalSettings::desktopPath() )
if ( oldurl.isLocalFile() && oldurl.path(KUrl::AddTrailingSlash) == KGlobalSettings::desktopPath() )
{
kDebug(1203) << "That rename was the Desktop path, updating config files" << endl;
KConfig *globalConfig = KGlobal::config();
......@@ -747,7 +747,9 @@ void KonqOperations::slotResult( KJob * job )
void KonqOperations::rename( QWidget * parent, const KUrl & oldurl, const QString & name )
{
KUrl newurl( oldurl );
newurl.setPath( oldurl.directory(false, true) + name );
//newurl.setPath( oldurl.directory(false, true) + name );
KUrl::DirectoryOption flags = KUrl::IgnoreTrailingSlash;
newurl.setPath( oldurl.directory( flags ) +name);
kDebug(1203) << "KonqOperations::rename("<<name<<") called. newurl=" << newurl << endl;
rename( parent, oldurl, newurl );
}
......@@ -756,7 +758,7 @@ void KonqOperations::newDir( QWidget * parent, const KUrl & baseURL )
{
bool ok;
QString name = i18n( "New Folder" );
if ( baseURL.isLocalFile() && QFileInfo( baseURL.path(+1) + name ).exists() )
if ( baseURL.isLocalFile() && QFileInfo( baseURL.path(KUrl::AddTrailingSlash) + name ).exists() )
name = KIO::RenameDlg::suggestName( baseURL, i18n( "New Folder" ) );
name = KInputDialog::getText ( i18n( "New Folder" ),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment