~ubuntu-branches/ubuntu/quantal/kde-baseapps/quantal

« back to all changes in this revision

Viewing changes to lib/konq/konq_operations.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2012-05-25 17:26:17 UTC
  • mfrom: (1.1.12)
  • Revision ID: package-import@ubuntu.com-20120525172617-xr9bzhlugldbflvq
Tags: 4:4.8.80a-0ubuntu1
* Merge with debian git, remainging changes:
  - keep breaks/replaces
  - keep symbol files
  - keep kubuntu patches
  - dolphin suggests and not recommends ruby
  - add kfind, konsole and kompare to dolphin suggests
* konq-plugins breaks/replaces kde-baseapps-data << 4:4.8.80

* Drop squence numbers from kubuntu patches 

* New upstream beta release
  - refresh kubuntu_fix_systemsettings_about_me.diff
  - add new doc images to {konqueror,dolphin}.install

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
#include <kuiserverjobtracker.h>
50
50
#include <kstandarddirs.h>
51
51
// For doDrop
 
52
#include <kicon.h>
52
53
#include <kauthorized.h>
53
54
#include <kglobal.h>
54
55
#include <kglobalsettings.h>
98
99
 
99
100
void KonqOperations::del( QWidget * parent, Operation method, const KUrl::List & selectedUrls )
100
101
{
101
 
    kDebug(1203) << "KonqOperations::del " << parent->metaObject()->className();
 
102
    kDebug(1203) << parent->metaObject()->className();
102
103
    if ( selectedUrls.isEmpty() )
103
104
    {
104
105
        kWarning(1203) << "Empty URL list !" ;
271
272
KonqOperations *KonqOperations::doDrop( const KFileItem & destItem, const KUrl & dest, QDropEvent * ev, QWidget * parent,
272
273
                                        const QList<QAction*> & userActions  )
273
274
{
274
 
    kDebug(1203) << "doDrop: dest:" << dest;
 
275
    kDebug(1203) << "dest:" << dest;
275
276
    QMap<QString, QString> metaData;
276
277
    // Prefer local urls if possible, to avoid problems with desktop:/ urls from other users (#184403)
277
278
    const KUrl::List lst = KUrl::List::fromMimeData(ev->mimeData(), KUrl::List::PreferLocalUrls, &metaData);
305
306
        {
306
307
            modifiers |= Qt::ControlModifier | Qt::ShiftModifier;
307
308
            action = Qt::LinkAction;
308
 
            kDebug(1203) << "KonqOperations::doDrop Bookmark -> emulating Link";
 
309
            kDebug(1203) << "Bookmark -> emulating Link";
309
310
        }
310
311
 
311
312
        KonqOperations * op = new KonqOperations(parent);
352
353
    bool m_destIsLocal = false;
353
354
    m_destUrl = destItem.mostLocalUrl(m_destIsLocal); // #168154
354
355
 
355
 
    //kDebug(1203) << "KonqOperations::asyncDrop destItem->mode=" << destItem->mode() << " url=" << m_destUrl;
 
356
    //kDebug(1203) << "destItem->mode=" << destItem->mode() << " url=" << m_destUrl;
356
357
    // Check what the destination is
357
358
    if ( destItem.isDir() )
358
359
    {
415
416
    {
416
417
        // Should be a local executable
417
418
        // (If this fails, there is a bug in KFileItem::acceptsDrops / KDirModel::flags)
418
 
        kDebug(1203) << "KonqOperations::doDrop " << m_destUrl.path() << "should be an executable";
 
419
        kDebug(1203) << m_destUrl.path() << "should be an executable";
419
420
        Q_ASSERT ( access( QFile::encodeName(m_destUrl.path()), X_OK ) == 0 );
420
421
        // Launch executable for each of the files
421
422
        QStringList args;
643
644
        KIO::FileUndoManager::self()->recordCopyJob(job);
644
645
        return;
645
646
    case Qt::LinkAction :
646
 
        kDebug(1203) << "KonqOperations::asyncDrop lst.count=" << lst.count();
 
647
        kDebug(1203) << "lst.count=" << lst.count();
647
648
        job = KIO::link( lst, m_destUrl );
648
649
        job->setMetaData( m_info->metaData );
649
650
        setOperation( job, LINK, m_destUrl );
716
717
 
717
718
void KonqOperations::rename( QWidget * parent, const KUrl & oldurl, const KUrl& newurl )
718
719
{
719
 
    kDebug(1203) << "KonqOperations::rename oldurl=" << oldurl << " newurl=" << newurl;
 
720
    kDebug(1203) << "oldurl=" << oldurl << " newurl=" << newurl;
720
721
    if ( oldurl == newurl )
721
722
        return;
722
723