~ubuntu-branches/ubuntu/utopic/kde4libs/utopic

« back to all changes in this revision

Viewing changes to kio/kfile/kpropertiesdialog.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac, Philip Muškovac, Felix Geyer
  • Date: 2011-12-23 20:22:04 UTC
  • mfrom: (1.14.12)
  • Revision ID: package-import@ubuntu.com-20111223202204-pa369jt38tng7j3k
Tags: 4:4.7.95-0ubuntu1
[ Philip Muškovac ]
* New upstream release candidate
  - update kdelibs5-data.install

[ Felix Geyer ]
* Update symbols files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
}
57
57
#include <unistd.h>
58
58
#include <errno.h>
59
 
#include <assert.h>
60
59
#include <algorithm>
61
60
#include <functional>
62
61
 
212
211
{
213
212
    setCaption( i18n( "Properties for %1" , KIO::decodeFileName(item.url().fileName())) );
214
213
 
215
 
    assert( !item.isNull() );
 
214
    Q_ASSERT( !item.isNull() );
216
215
    d->m_items.append(item);
217
216
 
218
217
    d->m_singleUrl = item.url();
219
 
    assert(!d->m_singleUrl.isEmpty());
 
218
    Q_ASSERT(!d->m_singleUrl.isEmpty());
220
219
 
221
220
    d->init();
222
221
}
239
238
    else
240
239
        setCaption( i18n( "Properties for %1" , KIO::decodeFileName(_items.first().url().fileName())) );
241
240
 
242
 
    assert( !_items.isEmpty() );
 
241
    Q_ASSERT( !_items.isEmpty() );
243
242
    d->m_singleUrl = _items.first().url();
244
 
    assert(!d->m_singleUrl.isEmpty());
 
243
    Q_ASSERT(!d->m_singleUrl.isEmpty());
245
244
 
246
245
    d->m_items = _items;
247
246
 
273
272
    d->m_singleUrl = _tempUrl;
274
273
    d->m_defaultName = _defaultName;
275
274
    d->m_currentDir = _currentDir;
276
 
    assert(!d->m_singleUrl.isEmpty());
 
275
    Q_ASSERT(!d->m_singleUrl.isEmpty());
277
276
 
278
277
    // Create the KFileItem for the _template_ file, in order to read from it.
279
278
    d->m_items.append(KFileItem(KFileItem::Unknown, KFileItem::Unknown, d->m_singleUrl));
563
562
 
564
563
    d->m_singleUrl = newUrl;
565
564
    d->m_items.first().setUrl(newUrl);
566
 
    assert(!d->m_singleUrl.isEmpty());
 
565
    Q_ASSERT(!d->m_singleUrl.isEmpty());
567
566
    // If we have an Desktop page, set it dirty, so that a full file is saved locally
568
567
    // Same for a URL page (because of the Name= hack)
569
568
    foreach (KPropertiesDialogPlugin *it, d->m_pageList) {
1339
1338
 
1340
1339
            // Don't remove the template !!
1341
1340
            if ( !d->m_bFromTemplate ) // (normal renaming)
1342
 
                job = KIO::move( oldurl, properties->kurl() );
 
1341
                job = KIO::moveAs( oldurl, properties->kurl() );
1343
1342
            else // Copying a template
1344
 
                job = KIO::copy( oldurl, properties->kurl() );
 
1343
                job = KIO::copyAs( oldurl, properties->kurl() );
1345
1344
 
1346
1345
            connect( job, SIGNAL( result( KJob * ) ),
1347
1346
                     SLOT( slotCopyFinished( KJob * ) ) );
1381
1380
        }
1382
1381
    }
1383
1382
 
1384
 
    assert( !properties->item().isNull() );
1385
 
    assert( !properties->item().url().isEmpty() );
 
1383
    Q_ASSERT( !properties->item().isNull() );
 
1384
    Q_ASSERT( !properties->item().url().isEmpty() );
1386
1385
 
1387
1386
    // Save the file where we can -> usually in ~/.kde/...
1388
1387
    if (d->bDesktopFile && !d->m_sRelativePath.isEmpty())