Commit 16157c36 authored by Aaron J. Seigo's avatar Aaron J. Seigo
Browse files

merging changes. some were already made, but others weren't. trying to

sort things out. i suppose noting on kde-core-devel that this work was
already done isn't enough these days. =/

svn path=/trunk/KDE/kdebase/libkonq/; revision=538619
parent 5ceae9e0
......@@ -308,8 +308,7 @@ bool KFileIVI::acceptDrop( const QMimeSource *mime ) const
KUrl::List::Iterator it = uris.begin();
for ( ; it != uris.end() ; it++ )
{
KUrl::EqualsOptions flags = KUrl::CompareWithoutTrailingSlash;
if ( m_fileitem->url().equals( *it, flags /*ignore trailing slashes*/ ) )
if ( m_fileitem->url().equals( *it, KUrl::CompareWithoutTrailingSlash ) )
return true;
}
}
......
......@@ -21,6 +21,8 @@
//Added by qt3to4:
#include <QVBoxLayout>
#include <QList>
#include <kactioncollection.h>
#include <kseparatoraction.h>
#include <kdebug.h>
#include <kdesktopfile.h>
#include <kdirwatch.h>
......
......@@ -25,7 +25,7 @@
//Added by qt3to4:
#include <QList>
#include <kactionmenu.h>
#include <kaction.h>
#include <kactionmenu.h>
#include <kdialogbase.h>
#include <kurl.h>
#include <libkonq_export.h>
......
......@@ -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(KUrl::AddTrailingSlash).append( ".directory" );
m_dotDirectoryPath = m_url.path( KUrl::AddTrailingSlash ).append( ".directory" );
else
m_dotDirectoryPath.clear();
}
......@@ -826,8 +826,10 @@ void KonqIconViewWidget::startImagePreview( const QStringList &, bool force )
{
KLibFactory *factory = KLibLoader::self()->factory("konq_sound");
if (factory)
d->pSoundPlayer = static_cast<KonqSoundPlayer *>(
factory->create(this, "KonqSoundPlayer"));
{
d->pSoundPlayer = static_cast<KonqSoundPlayer *>(
factory->create(this, "KonqSoundPlayer"));
}
d->bSoundPreviews = (d->pSoundPlayer != 0L);
}
......
......@@ -335,7 +335,7 @@ void KonqOperations::doDrop( const KFileItem * destItem, const KUrl & dest, QDro
for ( ; it != lst.end() ; it++ )
{
kDebug(1203) << "URL : " << (*it).url() << endl;
if ( dest.equals( *it, true /*ignore trailing slashes*/ ) )
if ( dest.equals( *it, KUrl::CompareWithoutTrailingSlash ) )
{
// The event source may be the view or an item (icon)
// Note: ev->source() can be 0L! (in case of kdesktop) (Simon)
......@@ -515,7 +515,7 @@ void KonqOperations::doFileCopy()
bool linkOnly = false;
if (isDesktopFile && !KAuthorized::authorizeKAction("run_desktop_files") &&
(m_destURL.path(KUrl::AddTrailingSlash) == 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(KUrl::AddTrailingSlash) == 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,10 +747,8 @@ 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 );
KUrl::DirectoryOption flags = KUrl::IgnoreTrailingSlash;
newurl.setPath( oldurl.directory( flags ) +name);
kDebug(1203) << "KonqOperations::rename("<<name<<") called. newurl=" << newurl << endl;
newurl.setPath( oldurl.directory( KUrl::IgnoreTrailingSlash ) + name );
kDebug(1203) << "KonqOperations::rename("<<name<<") called. newurl=" << newurl << endl;
rename( parent, oldurl, newurl );
}
......@@ -758,7 +756,7 @@ void KonqOperations::newDir( QWidget * parent, const KUrl & baseURL )
{
bool ok;
QString name = i18n( "New Folder" );
if ( baseURL.isLocalFile() && QFileInfo( baseURL.path(KUrl::AddTrailingSlash) + 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" ),
......
......@@ -425,8 +425,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
firstPopupURL.cleanPath();
//kDebug(1203) << "View path is " << url.url() << endl;
//kDebug(1203) << "First popup path is " << firstPopupURL.url() << endl;
KUrl::EqualsOptions flags = KUrl::CompareWithoutTrailingSlash;
currentDir = firstPopupURL.equals( url, flags/* ignore_trailing */ );
currentDir = firstPopupURL.equals( url, KUrl::CompareWithoutTrailingSlash );
if ( isLocal && m_sMimeType == "application/x-desktop" ) {
KSimpleConfig cfg( firstPopupURL.path(), true );
cfg.setDesktopGroup();
......@@ -656,7 +655,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
// first check the .directory if this is a directory
if (isDirectory && isSingleLocal)
{
QString dotDirectoryFile = m_lstItems.first()->url().path(KUrl::AddTrailingSlash).append(".directory");
QString dotDirectoryFile = m_lstItems.first()->url().path( KUrl::AddTrailingSlash ).append(".directory");
KSimpleConfig cfg( dotDirectoryFile, true );
cfg.setDesktopGroup();
......@@ -1139,8 +1138,8 @@ void KonqPopupMenu::addPlugins()
//kDebug() << (*iterator)->library() << endl;
KonqPopupMenuPlugin *plugin =
KLibLoader::createInstance<KonqPopupMenuPlugin>( QFile::encodeName( (*iterator)->library() ),
this,
QStringList((*iterator)->name().toLatin1()) );
this );
plugin->setName( (*iterator)->name().toLatin1() );
if ( !plugin )
continue;
QString pluginClientName = QString::fromLatin1( "Plugin%1" ).arg( pluginCount );
......
......@@ -26,6 +26,7 @@
#include <qmenu.h>
#include <qmap.h>
#include <kaction.h>
#include <kactioncollection.h>
#include <qstringlist.h>
......
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