Hello community, here is the log from the commit of package kdepim4-runtime for openSUSE:Factory checked in at 2013-12-11 14:32:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kdepim4-runtime (Old) and /work/SRC/openSUSE:Factory/.kdepim4-runtime.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kdepim4-runtime" Changes: -------- --- /work/SRC/openSUSE:Factory/kdepim4-runtime/kdepim4-runtime.changes 2013-12-02 12:31:16.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.kdepim4-runtime.new/kdepim4-runtime.changes 2013-12-11 14:32:53.000000000 +0100 @@ -1,0 +2,14 @@ +Fri Nov 29 07:02:35 UTC 2013 - [email protected] + +- Update to 4.11.97 + * KDE 4.12 RC 1 release + * See http://www.kde.org/announcements/announce-4.12-rc.php + +------------------------------------------------------------------- +Sat Nov 23 22:17:15 UTC 2013 - [email protected] + +- Update to 4.11.95 + * KDE 4.12 Beta 3 release + * See http://www.kde.org/announcements/announce-4.12-beta3.php + +------------------------------------------------------------------- Old: ---- kdepim-runtime-4.11.90.tar.xz New: ---- kdepim-runtime-4.11.97.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdepim4-runtime.spec ++++++ --- /var/tmp/diff_new_pack.izEyfZ/_old 2013-12-11 14:32:54.000000000 +0100 +++ /var/tmp/diff_new_pack.izEyfZ/_new 2013-12-11 14:32:54.000000000 +0100 @@ -17,7 +17,7 @@ Name: kdepim4-runtime -Version: 4.11.90 +Version: 4.11.97 Release: 0 Summary: Base package of kdepim License: LGPL-2.1+ ++++++ kdepim-runtime-4.11.90.tar.xz -> kdepim-runtime-4.11.97.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/CMakeLists.txt new/kdepim-runtime-4.11.97/CMakeLists.txt --- old/kdepim-runtime-4.11.90/CMakeLists.txt 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/CMakeLists.txt 2013-11-25 23:15:16.000000000 +0100 @@ -35,7 +35,7 @@ # 3.2 alpha1 if(NOT DEFINED KDEPIM_RUNTIME_DEV_VERSION) - set(KDEPIM_RUNTIME_DEV_VERSION "beta2") + set(KDEPIM_RUNTIME_DEV_VERSION "rc1") endif() set(KDEPIM_RUNTIME_VERSION "4.12${KDEPIM_RUNTIME_DEV_VERSION}") @@ -52,11 +52,11 @@ ############### search packages used by KDE ############### # Kdelibs -find_package(KDE4 4.11.0 REQUIRED) +find_package(KDE4 4.11.3 REQUIRED) include(KDE4Defaults) # KdepimLibs -find_package(KdepimLibs 4.11.90) +find_package(KdepimLibs 4.11.97) set_package_properties(KdepimLibs PROPERTIES DESCRIPTION "The KDEPIM libraries" URL "http://www.kde.org" TYPE REQUIRED) #Boost diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/accountwizard/wizards/tine20/Messages.sh new/kdepim-runtime-4.11.97/accountwizard/wizards/tine20/Messages.sh --- old/kdepim-runtime-4.11.90/accountwizard/wizards/tine20/Messages.sh 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/accountwizard/wizards/tine20/Messages.sh 2013-11-25 23:15:16.000000000 +0100 @@ -1,3 +1,4 @@ #! /usr/bin/env bash $EXTRACTRC *.ui >> rc.cpp $XGETTEXT *.cpp -o $podir/accountwizard_tine20.pot +$XGETTEXT -kqsTr *.es -j -o $podir/accountwizard_tine20.pot diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/accountwizard/wizards/tine20/tine20wizard.es new/kdepim-runtime-4.11.97/accountwizard/wizards/tine20/tine20wizard.es --- old/kdepim-runtime-4.11.90/accountwizard/wizards/tine20/tine20wizard.es 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/accountwizard/wizards/tine20/tine20wizard.es 2013-11-25 23:15:16.000000000 +0100 @@ -21,7 +21,7 @@ // add this function to trim user input of whitespace when needed String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ""); }; -var page = Dialog.addPage( "tine20wizard.ui", "Personal Settings" ); +var page = Dialog.addPage( "tine20wizard.ui", qsTr("Personal Settings") ); var userChangedServerAddress = false; page.widget().nameEdit.text = SetupManager.name() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/agents/migration/migrationagent.desktop new/kdepim-runtime-4.11.97/agents/migration/migrationagent.desktop --- old/kdepim-runtime-4.11.90/agents/migration/migrationagent.desktop 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/agents/migration/migrationagent.desktop 2013-11-25 23:15:16.000000000 +0100 @@ -10,7 +10,9 @@ Name[gl]=Axente de migración Name[hu]=Költöztető ügynök Name[ia]=Agente de migration +Name[it]=Agente di migrazione Name[kk]=Көшіп ауысу агенті +Name[nb]=Migreringsagent Name[nl]=Migratie-agent Name[pt]=Agente de Migração Name[pt_BR]=Agente de Migração diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/agents/nepomukfeeder/findunindexeditemsjob.cpp new/kdepim-runtime-4.11.97/agents/nepomukfeeder/findunindexeditemsjob.cpp --- old/kdepim-runtime-4.11.90/agents/nepomukfeeder/findunindexeditemsjob.cpp 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/agents/nepomukfeeder/findunindexeditemsjob.cpp 2013-11-25 23:15:16.000000000 +0100 @@ -111,6 +111,7 @@ fetchJob->fetchScope().fetchAllAttributes(false); fetchJob->fetchScope().fetchFullPayload(false); fetchJob->fetchScope().setFetchModificationTime(true); + fetchJob->fetchScope().setCacheOnly(true); connect(fetchJob, SIGNAL(itemsReceived(Akonadi::Item::List)), this, SLOT(itemsReceived(Akonadi::Item::List))); connect(fetchJob, SIGNAL(result(KJob*)), this, SLOT(jobDone(KJob*))); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/agents/newmailnotifier/akonadi_newmailnotifier_agent.notifyrc new/kdepim-runtime-4.11.97/agents/newmailnotifier/akonadi_newmailnotifier_agent.notifyrc --- old/kdepim-runtime-4.11.90/agents/newmailnotifier/akonadi_newmailnotifier_agent.notifyrc 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/agents/newmailnotifier/akonadi_newmailnotifier_agent.notifyrc 2013-11-25 23:15:16.000000000 +0100 @@ -141,7 +141,9 @@ Name[gl]=Non foi posíbel atopar o servizo de texto lido Jovie Name[hu]=A Jovie szövegfelolvasó szolgáltatás nem található Name[ia]=Il non trovava le servicio de texto-a-Voce Jovie +Name[it]=Servizio di sintesi vocale Jovie non trovato Name[kk]=Jovie мәтінді дауыстап оқу қызметі табылған жоқ +Name[nb]=Fant ikke Jovie tekst-til-tale-tjeneste Name[nl]=Tekst-naar-spraak-service van Jovie niet gevonden Name[pt]=Serviço de Texto-para-Fala Jovie Não Encontrado Name[pt_BR]=Não foi encontrado o serviço de Texto-para-Fala do Jovie diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/dav/resource/davgroupwareresource.desktop new/kdepim-runtime-4.11.97/resources/dav/resource/davgroupwareresource.desktop --- old/kdepim-runtime-4.11.90/resources/dav/resource/davgroupwareresource.desktop 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/dav/resource/davgroupwareresource.desktop 2013-11-25 23:15:16.000000000 +0100 @@ -53,7 +53,9 @@ Comment[gl]=«Recurso para xestionar os calendarios e cadernos de enderezos DAV (CalDAV, GroupDAV)» Comment[hu]=„Erőforrás DAV naptárak és címjegyzékek (CalDAV, GroupDAV) kezeléséhez” Comment[ia]="Ressource pro administrar calendarios e adressarios de DAV (CalDAV, GroupDAV)" +Comment[it]="Risorsa per gestire calendari e rubriche DAV (CalDAV, GroupDAV)" Comment[kk]="DAV күнтізбе және адрестік кітапшасын (CalDAV, GroupDAV) басқару ресурсы" +Comment[nb]=«Ressurs som håndterer DAV-kalendere og adressebøker (CalDAV, GroupDAV)» Comment[nl]="Hulpbron om DAV-agenda's en adresboeken (CalDAV, GroupDAV) te beheren" Comment[pt]=Recurso para gerir os calendários e livros de endereços em DAV (CalDAV, GroupDAV) Comment[pt_BR]="Recurso para gerenciar calendários e livros de endereços por DAV (CalDAV, GroupDAV)" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/icaldir/icaldirresource.desktop new/kdepim-runtime-4.11.97/resources/icaldir/icaldirresource.desktop --- old/kdepim-runtime-4.11.90/resources/icaldir/icaldirresource.desktop 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/icaldir/icaldirresource.desktop 2013-11-25 23:15:16.000000000 +0100 @@ -48,7 +48,9 @@ Comment[gl]=«Fornece acceso a elementos de calendario, cada un almacenado nun ficheiro de seu, nun directorio dado.» Comment[hu]=„Hozzáférést biztosít a naptárelemekhez, mindegyiket külön fájlban tárolva a megadott könyvtárban” Comment[ia]="Il provide accesso a elementos de calendario, cata un immagazinate in un file singule, in un date directorio" +Comment[it]="Fornisce accesso a voci di calendario, ciascuna memorizzata in un singolo file in una data cartella" Comment[kk]="Көрсетілген қапшықта, бөлек файлдарда сақталған күнтізбенің жазуларына қатынау мүмкіндігін береді" +Comment[nb]=«Gir tilgang til kalenderelementer, hver lagret i én enkelt fil, i en gitt mappe» Comment[nl]="Geeft toegang tot agenda-items, elk opgeslagen in een enkel bestand in een opgegeven map" Comment[pt]=Oferece o acesso aos itens do calendário, estando cada um guardado num único ficheiro de uma dada pasta Comment[pt_BR]="Fornece acesso aos itens do calendário, cada um armazenado em um único arquivo na pasta indicada" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/imap/addcollectiontask.cpp new/kdepim-runtime-4.11.97/resources/imap/addcollectiontask.cpp --- old/kdepim-runtime-4.11.90/resources/imap/addcollectiontask.cpp 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/imap/addcollectiontask.cpp 2013-11-25 23:15:16.000000000 +0100 @@ -81,8 +81,6 @@ void AddCollectionTask::onCreateDone( KJob *job ) { if ( job->error() ) { - //create on server failed, remove from the cache - new Akonadi::CollectionDeleteJob( m_collection ); cancelTask( job->errorString() ); } else { // Automatically subscribe to newly created mailbox diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/imap/wizard/Messages.sh new/kdepim-runtime-4.11.97/resources/imap/wizard/Messages.sh --- old/kdepim-runtime-4.11.90/resources/imap/wizard/Messages.sh 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/imap/wizard/Messages.sh 2013-11-25 23:15:16.000000000 +0100 @@ -1,3 +1,4 @@ #! /usr/bin/env bash $EXTRACTRC *.ui >> rc.cpp $XGETTEXT *.cpp -o $podir/accountwizard_imap.pot +$XGETTEXT -kqsTr *.es -j -o $podir/accountwizard_imap.pot diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/imap/wizard/imapwizard.es new/kdepim-runtime-4.11.97/resources/imap/wizard/imapwizard.es --- old/kdepim-runtime-4.11.90/resources/imap/wizard/imapwizard.es 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/imap/wizard/imapwizard.es 2013-11-25 23:15:16.000000000 +0100 @@ -20,8 +20,7 @@ // add this function to trim user input of whitespace when needed String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ""); }; -// TODO: i18n?? -var page = Dialog.addPage( "imapwizard.ui", "Personal Settings" ); +var page = Dialog.addPage( "imapwizard.ui", qsTr("Personal Settings") ); // try to guess some defaults var emailAddr = SetupManager.email(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/kolabproxy/wizard/Messages.sh new/kdepim-runtime-4.11.97/resources/kolabproxy/wizard/Messages.sh --- old/kdepim-runtime-4.11.90/resources/kolabproxy/wizard/Messages.sh 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/kolabproxy/wizard/Messages.sh 2013-11-25 23:15:16.000000000 +0100 @@ -1,3 +1,4 @@ #! /usr/bin/env bash $EXTRACTRC *.ui >> rc.cpp $XGETTEXT *.cpp -o $podir/accountwizard_kolab.pot +$XGETTEXT -kqsTr *.es -j -o $podir/accountwizard_kolab.pot diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/kolabproxy/wizard/kolabwizard.es new/kdepim-runtime-4.11.97/resources/kolabproxy/wizard/kolabwizard.es --- old/kdepim-runtime-4.11.90/resources/kolabproxy/wizard/kolabwizard.es 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/kolabproxy/wizard/kolabwizard.es 2013-11-25 23:15:16.000000000 +0100 @@ -21,8 +21,7 @@ // add this function to trim user input of whitespace when needed String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ""); }; -// TODO: i18n?? -var page = Dialog.addPage( "kolabwizard.ui", "Personal Settings" ); +var page = Dialog.addPage( "kolabwizard.ui", qsTr("Personal Settings") ); var userChangedServerAddress = false; page.widget().nameEdit.text = SetupManager.name() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/maildir/libmaildir/maildir.cpp new/kdepim-runtime-4.11.97/resources/maildir/libmaildir/maildir.cpp --- old/kdepim-runtime-4.11.90/resources/maildir/libmaildir/maildir.cpp 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/maildir/libmaildir/maildir.cpp 2013-11-25 23:15:16.000000000 +0100 @@ -275,6 +275,9 @@ bool Maildir::isValid( QString &error, bool createMissingFolders ) const { + if ( path().isEmpty() ) { + return false; + } if ( !d->isRoot ) { if ( d->accessIsPossible( error, createMissingFolders ) ) { return true; @@ -422,6 +425,22 @@ return result; } +QString Maildir::pathToNew() const +{ + if ( isValid() ) { + return d->path + QString::fromLatin1( "/new" ); + } + return QString(); +} + +QString Maildir::pathToCurrent() const +{ + if ( isValid() ) { + return d->path + QString::fromLatin1( "/cur" ); + } + return QString(); +} + QString Maildir::subDirPath() const { QDir dir( d->path ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/maildir/libmaildir/maildir.h new/kdepim-runtime-4.11.97/resources/maildir/libmaildir/maildir.h --- old/kdepim-runtime-4.11.90/resources/maildir/libmaildir/maildir.h 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/maildir/libmaildir/maildir.h 2013-11-25 23:15:16.000000000 +0100 @@ -110,6 +110,12 @@ */ QStringList listCurrent() const; + /** Return the path to the "new" directory */ + QString pathToNew() const; + + /** Return the path to the "cur" directory */ + QString pathToCurrent() const; + /** * Returns the full path to the subdir (the NAME.directory folder ). **/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/maildir/maildirresource.cpp new/kdepim-runtime-4.11.97/resources/maildir/maildirresource.cpp --- old/kdepim-runtime-4.11.90/resources/maildir/maildirresource.cpp 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/maildir/maildirresource.cpp 2013-11-25 23:15:16.000000000 +0100 @@ -52,6 +52,8 @@ using KPIM::Maildir; using namespace Akonadi_Maildir_Resource; +#define CLEANER_TIMEOUT 2*6000 + Maildir MaildirResource::maildirForCollection( const Collection& col ) { const QString path = maildirPathForCollection( col ); @@ -140,6 +142,9 @@ } else { synchronizeCollectionTree(); } + + mChangedCleanerTimer = new QTimer( this ); + connect( mChangedCleanerTimer, SIGNAL( timeout() ), this, SLOT( changedCleaner() ) ); } void MaildirResource::attemptConfigRestoring( KJob * job ) @@ -282,6 +287,8 @@ stopMaildirScan( dir ); const QString rid = dir.addEntry( mail->encodedContent() ); + mChangedFiles.insert( rid ); + mChangedCleanerTimer->start( CLEANER_TIMEOUT ); restartMaildirScan( dir ); @@ -355,6 +362,12 @@ data = mail->encodedContent(); } dir.writeEntry( newItem.remoteId(), data ); + mChangedFiles.insert( newItem.remoteId() ); + mChangedCleanerTimer->start( CLEANER_TIMEOUT ); + } else { + restartMaildirScan( dir ); + cancelTask( i18n( "Error: Unsupported type." ) ); + return; } } @@ -396,6 +409,9 @@ const QString newRid = sourceDir.moveEntryTo( item.remoteId(), destDir ); + mChangedFiles.insert( newRid ); + mChangedCleanerTimer->start( CLEANER_TIMEOUT ); + restartMaildirScan( sourceDir ); restartMaildirScan( destDir ); @@ -685,7 +701,7 @@ { QFileInfo fileInfo( dir ); if ( fileInfo.isFile() ) { - slotFileChanged( dir ); + slotFileChanged( fileInfo ); return; } @@ -733,11 +749,14 @@ synchronizeCollection( cols.first().id() ); } -void MaildirResource::slotFileChanged( const QString& fileName ) +void MaildirResource::slotFileChanged( const QFileInfo& fileInfo ) { - QFileInfo fileInfo( fileName ); + const QString key = fileInfo.fileName(); + if ( mChangedFiles.contains( key ) ) { + mChangedFiles.remove( key ); + return; + } - QString key = fileInfo.fileName(); QString path = fileInfo.path(); if ( path.endsWith( QLatin1String( "/new" ) ) ) { path.remove( path.length() - 4, 4 ); @@ -836,4 +855,9 @@ mFsWatcher->restartDirScan( path + QLatin1Literal( "/cur" ) ); } +void MaildirResource::changedCleaner() +{ + mChangedFiles.clear(); +} + #include "maildirresource.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/maildir/maildirresource.h new/kdepim-runtime-4.11.97/resources/maildir/maildirresource.h --- old/kdepim-runtime-4.11.90/resources/maildir/maildirresource.h 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/maildir/maildirresource.h 2013-11-25 23:15:16.000000000 +0100 @@ -23,6 +23,8 @@ #include <akonadi/collection.h> #include <akonadi/resourcebase.h> +class QTimer; +class QFileInfo; class KDirWatch; namespace Akonadi_Maildir_Resource { @@ -71,12 +73,13 @@ void configurationChanged(); void slotItemsRetrievalResult(KJob* job); void slotDirChanged( const QString &dir ); - void slotFileChanged( const QString &fileName ); + void slotFileChanged( const QFileInfo &fileInfo ); void fsWatchDirFetchResult( KJob* job ); void fsWatchFileFetchResult( KJob* job ); void fsWatchFileModifyResult( KJob* job ); // Try to restore some config values from Akonadi data void attemptConfigRestoring( KJob* job ); + void changedCleaner(); private: bool ensureDirExists(); @@ -95,7 +98,8 @@ Akonadi_Maildir_Resource::MaildirSettings *mSettings; KDirWatch *mFsWatcher; QHash<QString, KPIM::Maildir> mMaildirsForCollection; - + QSet<QString> mChangedFiles; //files changed by the resource and that should be ignored in slotFileChanged + QTimer *mChangedCleanerTimer; }; #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/maildir/retrieveitemsjob.cpp new/kdepim-runtime-4.11.97/resources/maildir/retrieveitemsjob.cpp --- old/kdepim-runtime-4.11.90/resources/maildir/retrieveitemsjob.cpp 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/maildir/retrieveitemsjob.cpp 2013-11-25 23:15:16.000000000 +0100 @@ -26,6 +26,7 @@ #include <akonadi/transactionsequence.h> #include <QDateTime> +#include <QDirIterator> #include <KMime/Message> RetrieveItemsJob::RetrieveItemsJob ( const Akonadi::Collection& collection, const KPIM::Maildir& md, QObject* parent ) : @@ -34,9 +35,9 @@ m_maildir( md ), m_mimeType( KMime::Message::mimeType() ), m_transaction( 0 ), + m_entryIterator(0), m_previousMtime( 0 ), - m_highestMtime( 0 ), - m_nextIndex( 0 ) + m_highestMtime( 0 ) { Q_ASSERT( m_collection.isValid() ); Q_ASSERT( m_maildir.isValid() ); @@ -66,63 +67,69 @@ } m_listingPath = m_maildir.path() + QLatin1String( "/new/" ); - m_entryList = m_maildir.listNew(); + delete m_entryIterator; + m_entryIterator = new QDirIterator( m_maildir.pathToNew(), QDir::Files ); m_previousMtime = m_collection.remoteRevision().toLongLong(); m_highestMtime = 0; - processEntry(0); + processEntry(); } -void RetrieveItemsJob::processEntry(qint64 index) +void RetrieveItemsJob::processEntry() { - QString entry; + QFileInfo entryInfo; + + QString filePath = m_entryIterator->next(); + + QString fileName = m_entryIterator->fileName(); bool newItemFound = false; while ( !newItemFound ) { - if ( index >= m_entryList.size() ) { + if ( filePath.isEmpty() ) { if ( m_listingPath.endsWith( QLatin1String( "/new/" ) ) ) { m_listingPath = m_maildir.path() + QLatin1String( "/cur/" ); - m_entryList = m_maildir.listCurrent(); - processEntry( 0 ); + delete m_entryIterator; + m_entryIterator = new QDirIterator( m_maildir.pathToCurrent(), QDir::Files ); + processEntry(); } else { entriesProcessed(); } return; } - entry = m_entryList[index]; - const qint64 currentMtime = m_maildir.lastModified( entry ).toMSecsSinceEpoch(); + entryInfo = m_entryIterator->fileInfo(); + const qint64 currentMtime = entryInfo.lastModified().toMSecsSinceEpoch(); m_highestMtime = qMax( m_highestMtime, currentMtime ); - if ( currentMtime <= m_previousMtime && m_localItems.contains( entry ) ) { // old, we got this one already - m_localItems.remove( entry ); - index++; + if ( currentMtime <= m_previousMtime && m_localItems.contains( fileName ) ) { // old, we got this one already + m_localItems.remove( fileName ); + filePath = m_entryIterator->next(); + fileName = m_entryIterator->fileName(); } else { newItemFound = true; } } Akonadi::Item item; - item.setRemoteId( entry ); + item.setRemoteId( fileName ); item.setMimeType( m_mimeType ); - const qint64 entrySize = m_maildir.size( entry ); + const qint64 entrySize = entryInfo.size(); if ( entrySize >= 0 ) item.setSize( entrySize ); KMime::Message *msg = new KMime::Message; - msg->setHead( KMime::CRLFtoLF( m_maildir.readEntryHeadersFromFile( m_listingPath + entry ) ) ); + msg->setHead( KMime::CRLFtoLF( m_maildir.readEntryHeadersFromFile( m_listingPath + fileName ) ) ); msg->parse(); - Akonadi::Item::Flags flags = m_maildir.readEntryFlags( entry ); + Akonadi::Item::Flags flags = m_maildir.readEntryFlags( fileName ); Q_FOREACH ( const Akonadi::Item::Flag &flag, flags ) { item.setFlag( flag ); } item.setPayload( KMime::Message::Ptr( msg ) ); - m_nextIndex = index + 1; KJob *job = 0; - if ( m_localItems.contains( entry ) ) { // modification - item.setId( m_localItems.value( entry ).id() ); + if ( m_localItems.contains( fileName ) ) { // modification + item.setId( m_localItems.value( fileName ).id() ); job = new Akonadi::ItemModifyJob( item, transaction() ); - m_localItems.remove( entry ); + m_localItems.remove( fileName ); } else { // new item job = new Akonadi::ItemCreateJob( item, m_collection, transaction() ); } @@ -131,11 +138,13 @@ void RetrieveItemsJob::processEntryDone( KJob* ) { - processEntry( m_nextIndex ); + processEntry(); } void RetrieveItemsJob::entriesProcessed() { + delete m_entryIterator; + m_entryIterator = 0; if ( !m_localItems.isEmpty() ) { Akonadi::ItemDeleteJob *job = new Akonadi::ItemDeleteJob( m_localItems.values(), transaction() ); m_maildir.removeCachedKeys( m_localItems.keys() ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/maildir/retrieveitemsjob.h new/kdepim-runtime-4.11.97/resources/maildir/retrieveitemsjob.h --- old/kdepim-runtime-4.11.90/resources/maildir/retrieveitemsjob.h 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/maildir/retrieveitemsjob.h 2013-11-25 23:15:16.000000000 +0100 @@ -26,6 +26,7 @@ #include "maildir.h" +class QDirIterator; namespace Akonadi { class TransactionSequence; @@ -52,7 +53,7 @@ private slots: void localListDone( KJob *job ); void transactionDone( KJob *job ); - void processEntry( qint64 index ); + void processEntry(); void processEntryDone( KJob * ); private: @@ -61,10 +62,9 @@ QHash<QString, Akonadi::Item> m_localItems; QString m_mimeType; Akonadi::TransactionSequence *m_transaction; - QStringList m_entryList; + QDirIterator *m_entryIterator; qint64 m_previousMtime; qint64 m_highestMtime; - qint64 m_nextIndex; QString m_listingPath; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/maildir/wizard/Messages.sh new/kdepim-runtime-4.11.97/resources/maildir/wizard/Messages.sh --- old/kdepim-runtime-4.11.90/resources/maildir/wizard/Messages.sh 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/maildir/wizard/Messages.sh 2013-11-25 23:15:16.000000000 +0100 @@ -1,3 +1,4 @@ #! /usr/bin/env bash $EXTRACTRC *.ui >> rc.cpp $XGETTEXT *.cpp -o $podir/accountwizard_maildir.pot +$XGETTEXT -kqsTr *.es -j -o $podir/accountwizard_maildir.pot diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/maildir/wizard/maildirwizard.es new/kdepim-runtime-4.11.97/resources/maildir/wizard/maildirwizard.es --- old/kdepim-runtime-4.11.90/resources/maildir/wizard/maildirwizard.es 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/maildir/wizard/maildirwizard.es 2013-11-25 23:15:16.000000000 +0100 @@ -17,8 +17,7 @@ 02110-1301, USA. */ -// TODO: i18n?? -var page = Dialog.addPage( "maildirwizard.ui", "Personal Settings" ); +var page = Dialog.addPage( "maildirwizard.ui", qsTr("Personal Settings") ); function validateInput() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/mbox/wizard/Messages.sh new/kdepim-runtime-4.11.97/resources/mbox/wizard/Messages.sh --- old/kdepim-runtime-4.11.90/resources/mbox/wizard/Messages.sh 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/mbox/wizard/Messages.sh 2013-11-25 23:15:16.000000000 +0100 @@ -1,3 +1,4 @@ #! /usr/bin/env bash $EXTRACTRC *.ui >> rc.cpp $XGETTEXT *.cpp -o $podir/accountwizard_mailbox.pot +$XGETTEXT -kqsTr *.es -j -o $podir/accountwizard_mailbox.pot diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/mbox/wizard/mailboxwizard.es new/kdepim-runtime-4.11.97/resources/mbox/wizard/mailboxwizard.es --- old/kdepim-runtime-4.11.90/resources/mbox/wizard/mailboxwizard.es 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/mbox/wizard/mailboxwizard.es 2013-11-25 23:15:16.000000000 +0100 @@ -17,8 +17,7 @@ 02110-1301, USA. */ -// TODO: i18n?? -var page = Dialog.addPage( "mailboxwizard.ui", "Personal Settings" ); +var page = Dialog.addPage( "mailboxwizard.ui", qsTr("Personal Settings") ); function validateInput() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/mixedmaildir/mixedmaildirstore.cpp new/kdepim-runtime-4.11.97/resources/mixedmaildir/mixedmaildirstore.cpp --- old/kdepim-runtime-4.11.90/resources/mixedmaildir/mixedmaildirstore.cpp 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/mixedmaildir/mixedmaildirstore.cpp 2013-11-25 23:15:16.000000000 +0100 @@ -88,6 +88,8 @@ bool load( const QString &fileName ) { + mModificationTime = QFileInfo( fileName ).lastModified(); + // in case of reload, check if anything changed, otherwise keep deleted entries if ( !mDeletedOffsets.isEmpty() && fileName == mMBox.fileName() ) { const KMBox::MBoxEntry::List currentEntryList = mMBox.entries(); @@ -106,6 +108,8 @@ return mMBox.load( fileName ); } + QDateTime modificationTime() const { return mModificationTime; } + KMBox::MBoxEntry::List entryList() const { KMBox::MBoxEntry::List result; @@ -160,7 +164,9 @@ bool save() { - return mMBox.save(); + bool ret = mMBox.save(); + mModificationTime = QDateTime::currentDateTime(); + return ret; } int purge( QList<KMBox::MBoxEntry::Pair> &movedEntries ) @@ -197,6 +203,7 @@ } mDeletedOffsets.clear(); + mModificationTime = QDateTime::currentDateTime(); return ( result ? deleteCount : -1 ); } @@ -246,6 +253,7 @@ private: QSet<quint64> mDeletedOffsets; MBox mMBox; + QDateTime mModificationTime; typedef QHash<quint64, KMIndexDataPtr> IndexDataHash; IndexDataHash mIndexData; @@ -829,8 +837,10 @@ if ( !ok || !mbox->isValidOffset( offset ) ) { return false; } - - // TODO: size and modification timestamp? + + item.setModificationTime( mbox->modificationTime() ); + + // TODO: size? if ( includeHeaders || includeBody ) { KMime::Message::Ptr messagePtr( new KMime::Message() ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/mixedmaildir/retrieveitemsjob.cpp new/kdepim-runtime-4.11.97/resources/mixedmaildir/retrieveitemsjob.cpp --- old/kdepim-runtime-4.11.90/resources/mixedmaildir/retrieveitemsjob.cpp 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/mixedmaildir/retrieveitemsjob.cpp 2013-11-25 23:15:16.000000000 +0100 @@ -123,17 +123,18 @@ ItemFetchJob *itemFetch = qobject_cast<ItemFetchJob*>( job ); Q_ASSERT( itemFetch != 0 ); - const Item::List items = itemFetch->items(); + Item::List items = itemFetch->items(); + itemFetch->clearItems(); // save memory kDebug( KDE_DEFAULT_DEBUG_AREA ) << "Akonadi fetch got" << items.count() << "items"; mServerItemsByRemoteId.reserve( items.size() ); - Q_FOREACH ( const Item &item, items ) { + for ( int i = 0 ; i < items.count() ; ++i ) { + Item &item = items[i]; // items without remoteId have not been written to the resource yet if ( !item.remoteId().isEmpty() ) { // set the parent collection (with all ancestors) in every item - Item copy( item ); - copy.setParentCollection( mCollection ); - mServerItemsByRemoteId.insert( copy.remoteId(), copy ); + item.setParentCollection( mCollection ); + mServerItemsByRemoteId.insert( item.remoteId(), item ); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/pop3/wizard/Messages.sh new/kdepim-runtime-4.11.97/resources/pop3/wizard/Messages.sh --- old/kdepim-runtime-4.11.90/resources/pop3/wizard/Messages.sh 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/pop3/wizard/Messages.sh 2013-11-25 23:15:16.000000000 +0100 @@ -1,3 +1,4 @@ #! /usr/bin/env bash $EXTRACTRC *.ui >> rc.cpp $XGETTEXT *.cpp -o $podir/accountwizard_pop3.pot +$XGETTEXT -kqsTr *.js -j -o $podir/accountwizard_pop3.pot diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/pop3/wizard/pop3wizard.js new/kdepim-runtime-4.11.97/resources/pop3/wizard/pop3wizard.js --- old/kdepim-runtime-4.11.90/resources/pop3/wizard/pop3wizard.js 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/pop3/wizard/pop3wizard.js 2013-11-25 23:15:16.000000000 +0100 @@ -20,8 +20,7 @@ // add this function to trim user input of whitespace when needed String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ""); }; -// TODO: i18n?? -var page = Dialog.addPage( "pop3wizard.ui", "Personal Settings" ); +var page = Dialog.addPage( "pop3wizard.ui", qsTr("Personal Settings") ); var userChangedServerAddress = false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepim-runtime-4.11.90/resources/shared/filestore/abstractlocalstore.cpp new/kdepim-runtime-4.11.97/resources/shared/filestore/abstractlocalstore.cpp --- old/kdepim-runtime-4.11.90/resources/shared/filestore/abstractlocalstore.cpp 2013-11-13 14:12:56.000000000 +0100 +++ new/kdepim-runtime-4.11.97/resources/shared/filestore/abstractlocalstore.cpp 2013-11-25 23:15:16.000000000 +0100 @@ -203,6 +203,11 @@ mItems = items; } + void clearItems() + { + mItems.clear(); + } + public: using JobProcessingAdaptor::visit; @@ -757,6 +762,7 @@ d->mItemsProcessedNotifier.setItems( items ); d->mCurrentJob->accept( &( d->mItemsProcessedNotifier ) ); + d->mItemsProcessedNotifier.clearItems(); // save memory } void FileStore::AbstractLocalStore::setTopLevelCollection( const Collection &collection ) -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
