Commit 91d4497d authored by Volker Krause's avatar Volker Krause
Browse files

Follow kdepimlibs changes.

svn path=/trunk/KDE/kdepim/akonadi/; revision=878850
parent cdbf6423
......@@ -23,7 +23,7 @@
#include "singlefileresourcebase.h"
#include <akonadi/collectiondisplayattribute.h>
#include <akonadi/entitydisplayattribute.h>
#include <kio/job.h>
#include <KDirWatch>
......@@ -78,7 +78,7 @@ class SingleFileResource : public SingleFileResourceBase
{
if ( !nameWasChanged )
setName( mCurrentUrl.fileName() );
// check if the file does not exist yet, if so, create it
if ( !QFile::exists( mCurrentUrl.path() ) ) {
QFile f( mCurrentUrl.path() );
......@@ -98,7 +98,7 @@ class SingleFileResource : public SingleFileResourceBase
if ( Settings::self()->monitorFile() )
KDirWatch::self()->addFile( mCurrentUrl.path() );
emit status( Idle, i18nc( "@info:status", "Ready" ) );
}
else
......@@ -116,7 +116,7 @@ class SingleFileResource : public SingleFileResourceBase
}
KGlobal::ref();
// NOTE: Test what happens with remotefile -> save, close before save is finished.
mDownloadJob = KIO::file_copy( mCurrentUrl, KUrl( cacheFile() ), -1, KIO::Overwrite | KIO::DefaultFlags | KIO::HideProgressInfo );
connect( mDownloadJob, SIGNAL( result( KJob * ) ),
......@@ -202,7 +202,7 @@ class SingleFileResource : public SingleFileResourceBase
rights |= Collection::CanChangeCollection;
c.setRights( rights );
}
CollectionDisplayAttribute* attr = c.attribute<CollectionDisplayAttribute>( Collection::AddIfMissing );
EntityDisplayAttribute* attr = c.attribute<EntityDisplayAttribute>( Collection::AddIfMissing );
attr->setDisplayName( name() );
attr->setIconName( mCollectionIcon );
Collection::List list;
......
......@@ -21,7 +21,7 @@
#include "singlefileresourcebase.h"
#include <akonadi/changerecorder.h>
#include <akonadi/collectiondisplayattribute.h>
#include <akonadi/entitydisplayattribute.h>
#include <akonadi/itemfetchscope.h>
#include <kio/job.h>
......@@ -64,8 +64,8 @@ void SingleFileResourceBase::setSupportedMimetypes(const QStringList & mimeTypes
void SingleFileResourceBase::collectionChanged(const Akonadi::Collection & collection)
{
QString newName = collection.name();
if ( collection.hasAttribute<CollectionDisplayAttribute>() ) {
CollectionDisplayAttribute *attr = collection.attribute<CollectionDisplayAttribute>();
if ( collection.hasAttribute<EntityDisplayAttribute>() ) {
EntityDisplayAttribute *attr = collection.attribute<EntityDisplayAttribute>();
if ( !attr->displayName().isEmpty() )
newName = attr->displayName();
}
......
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