Commit 4e8bf4a1 authored by Tobias Koenig's avatar Tobias Koenig
Browse files

Renamed: CachePolicy::enableSyncOnDemand() -> CachePolicy::setSyncOnDemand();

         CollectionStatisticsDelegate::toggleUnreadAfterFolderName() -> CollectionStatisticsDelegate::setUnreadCountShown()
         ItemModifyJob::noRevCheck() -> ItemModifyJob::disableRevisionCheck()


svn path=/trunk/KDE/kdepimlibs/; revision=789491
parent d099e011
......@@ -127,7 +127,7 @@ bool CachePolicy::syncOnDemand() const
return d->syncOnDemand;
}
void CachePolicy::enableSyncOnDemand(bool enable)
void CachePolicy::setSyncOnDemand(bool enable)
{
d->syncOnDemand = enable;
}
......@@ -127,8 +127,7 @@ class AKONADI_EXPORT CachePolicy
/**
Enable on-demand syncing.
*/
//FIXME_API: rename to setSyncOnDemand
void enableSyncOnDemand( bool enable );
void setSyncOnDemand( bool enable );
private:
class Private;
......
......@@ -52,7 +52,7 @@ void CachePolicyPage::save(Collection & collection)
policy.setInheritFromParent( ui.inherit->isChecked() );
policy.setIntervalCheckTime( ui.checkInterval->value() );
policy.setCacheTimeout( ui.localCacheTimeout->value() );
policy.enableSyncOnDemand( ui.syncOnDemand->isChecked() );
policy.setSyncOnDemand( ui.syncOnDemand->isChecked() );
policy.setLocalParts( ui.localParts->items() );
collection.setCachePolicy( policy );
}
......
......@@ -60,12 +60,18 @@ CollectionStatisticsDelegate::~CollectionStatisticsDelegate()
delete d_ptr;
}
void CollectionStatisticsDelegate::toggleUnreadAfterFolderName( bool enable )
void CollectionStatisticsDelegate::setUnreadCountShown( bool enable )
{
Q_D( CollectionStatisticsDelegate );
d->drawUnreadAfterFolder = enable;
}
bool CollectionStatisticsDelegate::unreadCountShown() const
{
Q_D( const CollectionStatisticsDelegate );
return d->drawUnreadAfterFolder;
}
void CollectionStatisticsDelegate::initStyleOption( QStyleOptionViewItem *option,
const QModelIndex &index ) const
{
......
......@@ -70,10 +70,9 @@ class AKONADI_EXPORT CollectionStatisticsDelegate : public QStyledItemDelegate
* @param enable if true, the unread count is drawn behind the folder name,
* if false, the folder name will be drawn normally.
*/
//FIXME_API: rename to setUnreadCountShown( bool );
void toggleUnreadAfterFolderName( bool enable );
void setUnreadCountShown( bool enable );
//FIXME_API: add unreadCountShown(). Also change it in compat class def below
bool unreadCountShown() const;
protected:
......
......@@ -227,7 +227,7 @@ void ItemModifyJob::storePayload()
d->mParts = d->mItem.availableParts();
}
void ItemModifyJob::noRevCheck()
void ItemModifyJob::disableRevisionCheck()
{
Q_D( ItemModifyJob );
......
......@@ -61,8 +61,7 @@ class AKONADI_EXPORT ItemModifyJob : public Job
/**
Disable revision checking.
*/
void noRevCheck();
//FIXME_API: rename to disableRevisionCheck()
void disableRevisionCheck();
/**
Sets the item flags to @p flags.
......
......@@ -96,7 +96,7 @@ KJob* PasteHelper::paste(const QMimeData * mimeData, const Collection & collecti
if ( !copy ) {
ItemModifyJob *job = new ItemModifyJob( item, transaction );
job->setCollection( collection );
job->noRevCheck();
job->disableRevisionCheck();
} else {
new ItemCopyJob( item, collection, transaction );
}
......
......@@ -41,7 +41,7 @@ int ProtocolHelper::parseCachePolicy(const QByteArray & data, CachePolicy & poli
else if ( key == "CACHETIMEOUT" )
policy.setCacheTimeout( value.toInt() );
else if ( key == "SYNCONDEMAND" )
policy.enableSyncOnDemand( value == "true" );
policy.setSyncOnDemand( value == "true" );
else if ( key == "LOCALPARTS" ) {
QList<QByteArray> tmp;
QStringList parts;
......
......@@ -318,7 +318,7 @@ void ResourceBase::itemRetrieved( const Item &item )
ItemModifyJob *job = new ItemModifyJob( i, session() );
job->storePayload();
// FIXME: remove once the item with which we call retrieveItem() has a revision number
job->noRevCheck();
job->disableRevisionCheck();
connect( job, SIGNAL(result(KJob*)), SLOT(slotDeliveryDone(KJob*)) );
}
......@@ -341,7 +341,7 @@ void ResourceBase::changesCommitted(const Item& item)
{
ItemModifyJob *job = new ItemModifyJob( item, session() );
job->setClean();
job->noRevCheck(); // TODO: remove, but where/how do we handle the error?
job->disableRevisionCheck(); // TODO: remove, but where/how do we handle the error?
changeProcessed();
}
......
......@@ -36,11 +36,11 @@ class ChangeRecorderTest : public QObject
Item item( uid );
ItemModifyJob *job = new ItemModifyJob( item );
job->addFlag( "random_flag" );
job->noRevCheck();
job->disableRevisionCheck();
QVERIFY( job->exec() );
job = new ItemModifyJob( item );
job->removeFlag( "random_flag" );
job->noRevCheck();
job->disableRevisionCheck();
QVERIFY( job->exec() );
}
......
......@@ -240,7 +240,7 @@ void CollectionJobTest::testCreateDeleteFolder_data()
policy.setInheritFromParent( false );
policy.setIntervalCheckTime( 60 );
policy.setLocalParts( QStringList( Item::PartEnvelope ) );
policy.enableSyncOnDemand( true );
policy.setSyncOnDemand( true );
policy.setCacheTimeout( 120 );
col.setCachePolicy( policy );
QTest::newRow( "complex" ) << col << true;
......
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