Hello community,
here is the log from the commit of package kdepimlibs4 for openSUSE:Factory
checked in at Thu Oct 7 22:34:29 CEST 2010.
--------
--- KDE/kdepimlibs4/kdepimlibs4.changes 2010-08-27 13:37:09.000000000 +0200
+++ /mounts/work_src_done/STABLE/kdepimlibs4/kdepimlibs4.changes 2010-09-30 23:43:53.000000000 +0200
@@ -1,0 +2,6 @@
+Thu Sep 30 23:43:51 CEST 2010 - dmueller@suse.de
+
+- update to 4.5.2
+ * see http://kde.org/announcements/changelogs/changelog4_5_1to4_5_2.php for details
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
kdepimlibs-4.5.1.tar.bz2
New:
----
kdepimlibs-4.5.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kdepimlibs4.spec ++++++
--- /var/tmp/diff_new_pack.MOwmfh/_old 2010-10-07 22:31:07.000000000 +0200
+++ /var/tmp/diff_new_pack.MOwmfh/_new 2010-10-07 22:31:07.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package kdepimlibs4 (Version 4.5.1)
+# spec file for package kdepimlibs4 (Version 4.5.2)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -23,7 +23,7 @@
Group: System/GUI/KDE
Summary: KDE PIM Libraries
Url: http://www.kde.org
-Version: 4.5.1
+Version: 4.5.2
Release: 1
Source0: kdepimlibs-%version.tar.bz2
Patch0: 4_5_BRANCH.diff
++++++ kdepimlibs-4.5.1.tar.bz2 -> kdepimlibs-4.5.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/CMakeLists.txt new/kdepimlibs-4.5.2/CMakeLists.txt
--- old/kdepimlibs-4.5.1/CMakeLists.txt 2010-08-27 10:09:27.000000000 +0200
+++ new/kdepimlibs-4.5.2/CMakeLists.txt 2010-09-30 23:19:17.000000000 +0200
@@ -11,7 +11,7 @@
############### The kdepimlibs version (used e.g. in KdepimLibsConfig.cmake) ###############
set(KDEPIMLIBS_VERSION_MAJOR 4)
set(KDEPIMLIBS_VERSION_MINOR 5)
-set(KDEPIMLIBS_VERSION_PATCH 1)
+set(KDEPIMLIBS_VERSION_PATCH 2)
set(KDEPIMLIBS_VERSION ${KDEPIMLIBS_VERSION_MAJOR}.${KDEPIMLIBS_VERSION_MINOR}.${KDEPIMLIBS_VERSION_PATCH})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/akonadi/kdescendantsproxymodel.cpp new/kdepimlibs-4.5.2/akonadi/kdescendantsproxymodel.cpp
--- old/kdepimlibs-4.5.1/akonadi/kdescendantsproxymodel.cpp 2010-08-27 10:09:27.000000000 +0200
+++ new/kdepimlibs-4.5.2/akonadi/kdescendantsproxymodel.cpp 2010-09-30 23:19:17.000000000 +0200
@@ -640,12 +640,36 @@
const QModelIndex oldIndex = q->sourceModel()->index(rowCount - 1 - difference, column, parent);
Q_ASSERT(m_mapping.leftContains(oldIndex));
- // oldIndex is E in the source. proxyRow is 4.
- const int proxyRow = m_mapping.takeLeft(oldIndex);
const QModelIndex newIndex = q->sourceModel()->index(rowCount - 1, column, parent);
+ QModelIndex indexAbove = oldIndex;
+
+ if (start > 0) {
+ // If we have something like this:
+ //
+ // - A
+ // - - B
+ // - - C
+ //
+ // and we then insert D as a sibling of A below it, we need to remove the mapping for A,
+ // and the row number used for D must take into account the descendants of A.
+
+ while (q->sourceModel()->hasChildren(indexAbove)) {
+ Q_ASSERT(q->sourceModel()->rowCount(indexAbove) > 0);
+ indexAbove = q->sourceModel()->index(q->sourceModel()->rowCount(indexAbove) - 1, column, indexAbove);
+ }
+ Q_ASSERT(q->sourceModel()->rowCount(indexAbove) == 0);
+ }
+
+ Q_ASSERT(m_mapping.leftContains(indexAbove));
+
+ const int newProxyRow = m_mapping.leftToRight(indexAbove) + difference;
+
+ // oldIndex is E in the source. proxyRow is 4.
+ m_mapping.removeLeft(oldIndex);
+
// newIndex is J. (proxyRow + difference) is 5.
- m_mapping.insert(newIndex, proxyRow + difference);
+ m_mapping.insert(newIndex, newProxyRow);
}
for (int row = start; row <= end; ++row)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/akonadi/monitor.h new/kdepimlibs-4.5.2/akonadi/monitor.h
--- old/kdepimlibs-4.5.1/akonadi/monitor.h 2010-07-07 19:08:53.000000000 +0200
+++ new/kdepimlibs-4.5.2/akonadi/monitor.h 2010-09-30 23:19:17.000000000 +0200
@@ -40,6 +40,24 @@
* The Monitor emits signals if some of these objects are changed or
* removed or new ones are added to the Akonadi storage.
*
+ * There are various ways to filter these notifications. There are three types of filter
+ * evaluation:
+ * - (-) removal-only filter, ie. if the filter matches the notification is dropped,
+ * if not filter evaluation continues with the next one
+ * - (+) pass-exit filter, ie. if the filter matches the notification is delivered,
+ * if not evaluation is continued
+ * - (f) final filter, ie. evaluation ends here if the corresponding filter criteria is set,
+ * the notification is delievered depending on the result, evaluation is only continued
+ * if no filter criteria is defined
+ *
+ * The following filter are available, listed in evaluation order:
+ * (1) ignored sessions (-)
+ * (2) monitor everything (+)
+ * (3a) resource and mimetype filters (f) (items only)
+ * (3b) resource filters (f) (collections only)
+ * (4) item is monitored (+)
+ * (5) collection is monitored (+)
+ *
* Optionally, the changed objects can be fetched automatically from the server.
* To enable this, see itemFetchScope() and collectionFetchScope().
*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/akonadi/monitor_p.cpp new/kdepimlibs-4.5.2/akonadi/monitor_p.cpp
--- old/kdepimlibs-4.5.1/akonadi/monitor_p.cpp 2010-07-23 23:11:01.000000000 +0200
+++ new/kdepimlibs-4.5.2/akonadi/monitor_p.cpp 2010-09-30 23:19:17.000000000 +0200
@@ -126,26 +126,51 @@
bool MonitorPrivate::acceptNotification( const NotificationMessage & msg )
{
- if ( isSessionIgnored( msg.sessionId() ) )
+ // session is ignored
+ if ( sessions.contains( msg.sessionId() ) )
return false;
+ // corresponding signal is not connected
if ( isLazilyIgnored( msg ) )
return false;
+ // user requested everything
+ if ( monitorAll )
+ return true;
+
switch ( msg.type() ) {
case NotificationMessage::InvalidType:
kWarning() << "Received invalid change notification!";
return false;
+
case NotificationMessage::Item:
- return isItemMonitored( msg.uid(), msg.parentCollection(), msg.parentDestCollection(), msg.mimeType(), msg.resource() )
- || isCollectionMonitored( msg.parentCollection(), msg.resource() )
- || isCollectionMonitored( msg.parentDestCollection(), msg.resource() )
- || isMoveDestinationResourceMonitored( msg );
+ // we have a resource or mimetype filter
+ if ( !resources.isEmpty() || !mimetypes.isEmpty() ) {
+ if ( isMimeTypeMonitored( msg.mimeType() ) || resources.contains( msg.resource() ) || isMoveDestinationResourceMonitored( msg ) )
+ return true;
+ return false;
+ }
+
+ // we explicitly monitor that item or the collections it's in
+ return items.contains( msg.uid() )
+ || isCollectionMonitored( msg.parentCollection() )
+ || isCollectionMonitored( msg.parentDestCollection() );
+
case NotificationMessage::Collection:
- return isCollectionMonitored( msg.uid(), msg.resource() )
- || isCollectionMonitored( msg.parentCollection(), msg.resource() )
- || isCollectionMonitored( msg.parentDestCollection(), msg.resource() )
- || isMoveDestinationResourceMonitored( msg );
+ // we have a resource filter
+ if ( !resources.isEmpty() ) {
+ const bool resourceMatches = resources.contains( msg.resource() ) || isMoveDestinationResourceMonitored( msg );
+ // a bit hacky, but match the behaviour from the item case,
+ // if resource is the only thing we are filtering on, stop here, and if the resource filter matched, of course
+ if ( mimetypes.isEmpty() || resourceMatches )
+ return resourceMatches;
+ // else continue
+ }
+
+ // we explicitly monitor that colleciton, or all of them
+ return isCollectionMonitored( msg.uid() )
+ || isCollectionMonitored( msg.parentCollection() )
+ || isCollectionMonitored( msg.parentDestCollection() );
}
Q_ASSERT( false );
return false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/akonadi/monitor_p.h new/kdepimlibs-4.5.2/akonadi/monitor_p.h
--- old/kdepimlibs-4.5.1/akonadi/monitor_p.h 2010-07-23 23:11:01.000000000 +0200
+++ new/kdepimlibs-4.5.2/akonadi/monitor_p.h 2010-09-30 23:19:17.000000000 +0200
@@ -70,36 +70,6 @@
bool fetchCollection;
bool fetchCollectionStatistics;
- bool isCollectionMonitored( Collection::Id collection, const QByteArray &resource ) const
- {
- if ( monitorAll || isCollectionMonitored( collection ) || resources.contains( resource ) )
- return true;
- return false;
- }
-
- bool isItemMonitored( Item::Id item, Collection::Id collection, Collection::Id collectionDest,
- const QString &mimetype, const QByteArray &resource ) const
- {
- if ( monitorAll || isCollectionMonitored( collection ) ||
- isCollectionMonitored( collectionDest ) ||items.contains( item ) ||
- resources.contains( resource ) || isMimeTypeMonitored( mimetype ) )
- return true;
- return false;
- }
-
- bool isSessionIgnored( const QByteArray &sessionId ) const
- {
- return sessions.contains( sessionId );
- }
-
- bool isMoveDestinationResourceMonitored( const NotificationMessage &msg )
- {
- if ( msg.operation() != NotificationMessage::Move || msg.itemParts().isEmpty() )
- return false;
- const QByteArray res = *(msg.itemParts().begin());
- return resources.contains( res );
- }
-
// Virtual so it can be overridden in FakeMonitor.
virtual bool connectToNotificationManager();
bool acceptNotification( const NotificationMessage &msg );
@@ -224,6 +194,14 @@
return false;
}
+ bool isMoveDestinationResourceMonitored( const NotificationMessage &msg )
+ {
+ if ( msg.operation() != NotificationMessage::Move || msg.itemParts().isEmpty() )
+ return false;
+ const QByteArray res = *(msg.itemParts().begin());
+ return resources.contains( res );
+ }
+
void fetchStatistics( Collection::Id colId )
{
CollectionStatisticsJob *job = new CollectionStatisticsJob( Collection( colId ), session );
@@ -232,7 +210,7 @@
void notifyCollectionStatisticsWatchers( Collection::Id collection, const QByteArray &resource )
{
- if ( collection > 0 && isCollectionMonitored( collection, resource ) ) {
+ if ( collection > 0 && (monitorAll || isCollectionMonitored( collection ) || resources.contains( resource ) ) ) {
if (recentlyChangedCollections.empty() )
QTimer::singleShot( 500, q_ptr, SLOT( slotFlushRecentlyChangedCollections() ) );
recentlyChangedCollections.insert( collection );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/akonadi/resourcebase.h new/kdepimlibs-4.5.2/akonadi/resourcebase.h
--- old/kdepimlibs-4.5.1/akonadi/resourcebase.h 2010-05-16 22:05:09.000000000 +0200
+++ new/kdepimlibs-4.5.2/akonadi/resourcebase.h 2010-09-30 23:19:17.000000000 +0200
@@ -418,6 +418,12 @@
* Stops the execution of the current task and continues with the next one.
* The current task will be tried again later.
*
+ * This can be used to delay the task processing until the resource has reached a safe
+ * state, e.g. login to a server succeeded.
+ *
+ * @note This does not change the order of tasks so if there is no task with higher priority
+ * e.g. a custom task added with #Prepend the deferred task will be processed again.
+ *
* @since 4.3
*/
void deferTask();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/akonadi/resourcescheduler.cpp new/kdepimlibs-4.5.2/akonadi/resourcescheduler.cpp
--- old/kdepimlibs-4.5.1/akonadi/resourcescheduler.cpp 2010-06-24 18:26:25.000000000 +0200
+++ new/kdepimlibs-4.5.2/akonadi/resourcescheduler.cpp 2010-09-30 23:19:17.000000000 +0200
@@ -36,6 +36,7 @@
ResourceScheduler::ResourceScheduler( QObject *parent ) :
QObject( parent ),
+ mCurrentTasksQueue( -1 ),
mOnline( false )
{
}
@@ -151,6 +152,8 @@
QueueType queueType = GenericTaskQueue;
if ( priority == ResourceBase::AfterChangeReplay )
queueType = AfterChangeReplayQueue;
+ else if ( priority == ResourceBase::Prepend )
+ queueType = PrependTaskQueue;
TaskList& queue = mTaskList[ queueType ];
if ( queue.contains( t ) )
@@ -182,11 +185,15 @@
}
mCurrentTask = Task();
+ mCurrentTasksQueue = -1;
scheduleNext();
}
void ResourceScheduler::deferTask()
{
+ if ( mCurrentTask.type == Invalid )
+ return;
+
if ( s_resourcetracker ) {
QList<QVariant> argumentList;
argumentList << QString::number( mCurrentTask.serial )
@@ -196,7 +203,11 @@
Task t = mCurrentTask;
mCurrentTask = Task();
- mTaskList[GenericTaskQueue] << t;
+
+ Q_ASSERT( mCurrentTasksQueue >= 0 && mCurrentTasksQueue < NQueueCount );
+ mTaskList[mCurrentTasksQueue].prepend( t );
+ mCurrentTasksQueue = -1;
+
signalTaskToTracker( t, "DeferedTask" );
scheduleNext();
@@ -226,6 +237,7 @@
for ( int i = 0; i < NQueueCount; ++i ) {
if ( !mTaskList[ i ].isEmpty() ) {
mCurrentTask = mTaskList[ i ].takeFirst();
+ mCurrentTasksQueue = i;
break;
}
}
@@ -293,6 +305,7 @@
// abort running task
queueForTaskType( mCurrentTask.type ).prepend( mCurrentTask );
mCurrentTask = Task();
+ mCurrentTasksQueue = -1;
}
// abort pending synchronous tasks, might take longer until the resource goes online again
TaskList& itemFetchQueue = queueForTaskType( FetchItem );
@@ -395,6 +408,7 @@
queue.clear();
}
mCurrentTask = Task();
+ mCurrentTasksQueue = -1;
}
static const char s_taskTypes[][25] = {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/akonadi/resourcescheduler_p.h new/kdepimlibs-4.5.2/akonadi/resourcescheduler_p.h
--- old/kdepimlibs-4.5.1/akonadi/resourcescheduler_p.h 2010-06-16 14:02:27.000000000 +0200
+++ new/kdepimlibs-4.5.2/akonadi/resourcescheduler_p.h 2010-09-30 23:19:17.000000000 +0200
@@ -204,6 +204,7 @@
// * then ItemFetch tasks, because they are made by blocking DBus calls
// * then everything else.
enum QueueType {
+ PrependTaskQueue,
ChangeReplayQueue, // one task at most
AfterChangeReplayQueue, // also one task at most, currently
ItemFetchQueue,
@@ -218,6 +219,7 @@
TaskList mTaskList[ NQueueCount ];
Task mCurrentTask;
+ int mCurrentTasksQueue; // queue mCurrentTask came from
bool mOnline;
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/akonadi/tests/imapparsertest.cpp new/kdepimlibs-4.5.2/akonadi/tests/imapparsertest.cpp
--- old/kdepimlibs-4.5.1/akonadi/tests/imapparsertest.cpp 2010-03-24 14:19:51.000000000 +0100
+++ new/kdepimlibs-4.5.2/akonadi/tests/imapparsertest.cpp 2010-09-30 23:19:17.000000000 +0200
@@ -280,6 +280,12 @@
binaryEncoded += '\000';
binaryEncoded += '"';
QTest::newRow( "binary" ) << binaryNonEncoded << binaryEncoded;
+
+ QTest::newRow( "LF" ) << QByteArray( "\n" ) << QByteArray( "\"\\n\"" );
+ QTest::newRow( "CR" ) << QByteArray( "\r" ) << QByteArray( "\"\\r\"" );
+ QTest::newRow( "double quote" ) << QByteArray( "\"" ) << QByteArray( "\"\\\"\"" );
+ QTest::newRow( "mixed 1" ) << QByteArray( "a\nb\\c" ) << QByteArray( "\"a\\nb\\\\c\"" );
+ QTest::newRow( "mixed 2" ) << QByteArray( "\"a\rb\"" ) << QByteArray( "\"\\\"a\\rb\\\"\"" );
}
void ImapParserTest::testQuote()
@@ -548,4 +554,21 @@
delete parser;
}
+void ImapParserTest::testJoin_data()
+{
+ QTest::addColumn( "list" );
+ QTest::addColumn<QByteArray>( "joined" );
+ QTest::newRow( "empty" ) << QList<QByteArray>() << QByteArray();
+ QTest::newRow( "one" ) << (QList<QByteArray>() << "abab") << QByteArray( "abab" );
+ QTest::newRow( "two" ) << (QList<QByteArray>() << "abab" << "cdcd") << QByteArray( "abab cdcd" );
+ QTest::newRow( "three" ) << (QList<QByteArray>() << "abab" << "cdcd" << "efef") << QByteArray( "abab cdcd efef" );
+}
+
+void ImapParserTest::testJoin()
+{
+ QFETCH( QList<QByteArray>, list );
+ QFETCH( QByteArray, joined );
+ QCOMPARE( ImapParser::join( list, " " ), joined );
+}
+
#include "imapparsertest.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/akonadi/tests/imapparsertest.h new/kdepimlibs-4.5.2/akonadi/tests/imapparsertest.h
--- old/kdepimlibs-4.5.1/akonadi/tests/imapparsertest.h 2009-10-26 10:14:12.000000000 +0100
+++ new/kdepimlibs-4.5.2/akonadi/tests/imapparsertest.h 2010-09-30 23:19:17.000000000 +0200
@@ -42,6 +42,8 @@
void testParseDateTime();
void testBulkParser_data();
void testBulkParser();
+ void testJoin_data();
+ void testJoin();
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/akonadi/tests/monitorfiltertest.cpp new/kdepimlibs-4.5.2/akonadi/tests/monitorfiltertest.cpp
--- old/kdepimlibs-4.5.1/akonadi/tests/monitorfiltertest.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/kdepimlibs-4.5.2/akonadi/tests/monitorfiltertest.cpp 2010-09-30 23:19:17.000000000 +0200
@@ -0,0 +1,337 @@
+/*
+ Copyright (c) 2010 Volker Krause
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ This library is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to the
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+*/
+
+#include
+
+#include "monitor_p.h"
+#include
+#include
+#include <QtTest>
+
+using namespace Akonadi;
+
+Q_DECLARE_METATYPE( Akonadi::NotificationMessage::Operation )
+Q_DECLARE_METATYPE( Akonadi::NotificationMessage::Type )
+Q_DECLARE_METATYPE( QSet<QByteArray> )
+
+class MonitorFilterTest : public QObject
+{
+ Q_OBJECT
+ private Q_SLOTS:
+ void initTestCase()
+ {
+ qRegisterMetaTypeAkonadi::Item();
+ qRegisterMetaTypeAkonadi::Collection();
+ qRegisterMetaType();
+ }
+
+ void filterConnected_data()
+ {
+ QTest::addColumnAkonadi::NotificationMessage::Operation( "op" );
+ QTest::addColumn<QByteArray>( "signalName" );
+
+ QTest::newRow( "itemAdded" ) << NotificationMessage::Add << QByteArray( SIGNAL(itemAdded(Akonadi::Item,Akonadi::Collection)) );
+ QTest::newRow( "itemChanged" ) << NotificationMessage::Modify << QByteArray( SIGNAL(itemChanged(Akonadi::Item,QSet<QByteArray>)) );
+ QTest::newRow( "itemRemoved" ) << NotificationMessage::Remove << QByteArray( SIGNAL(itemRemoved(Akonadi::Item)) );
+ QTest::newRow( "itemMoved" ) << NotificationMessage::Move << QByteArray( SIGNAL(itemMoved(Akonadi::Item,Akonadi::Collection,Akonadi::Collection)) );
+ QTest::newRow( "itemLinked" ) << NotificationMessage::Link << QByteArray( SIGNAL(itemLinked(Akonadi::Item,Akonadi::Collection)) );
+ QTest::newRow( "itemUnlinked" ) << NotificationMessage::Unlink << QByteArray( SIGNAL(itemUnlinked(Akonadi::Item,Akonadi::Collection)) );
+ }
+
+ void filterConnected()
+ {
+ QFETCH( NotificationMessage::Operation, op );
+ QFETCH( QByteArray, signalName );
+
+ Monitor dummyMonitor;
+ MonitorPrivate m( &dummyMonitor );
+
+ NotificationMessage msg;
+ msg.setUid( 1 );
+ msg.setOperation( op );
+ msg.setType( Akonadi::NotificationMessage::Item );
+
+ QVERIFY( !m.acceptNotification( msg ) );
+ m.monitorAll = true;
+ QVERIFY( !m.acceptNotification( msg ) );
+ QSignalSpy spy( &dummyMonitor, signalName );
+ QVERIFY( spy.isValid() );
+ QVERIFY( m.acceptNotification( msg ) );
+ m.monitorAll = false;
+ QVERIFY( !m.acceptNotification( msg ) );
+ }
+
+ void filterSession()
+ {
+ Monitor dummyMonitor;
+ MonitorPrivate m( &dummyMonitor );
+ m.monitorAll = true;
+ QSignalSpy spy( &dummyMonitor, SIGNAL(itemAdded(Akonadi::Item,Akonadi::Collection)) );
+ QVERIFY( spy.isValid() );
+
+ NotificationMessage msg;
+ msg.setUid( 1 );
+ msg.setOperation( NotificationMessage::Add );
+ msg.setType( Akonadi::NotificationMessage::Item );
+ msg.setSessionId( "foo" );
+
+ QVERIFY( m.acceptNotification( msg ) );
+ m.sessions.append( "bar" );
+ QVERIFY( m.acceptNotification( msg ) );
+ m.sessions.append( "foo" );
+ QVERIFY( !m.acceptNotification( msg ) );
+ }
+
+ void filterResource_data()
+ {
+ QTest::addColumnAkonadi::NotificationMessage::Operation( "op" );
+ QTest::addColumnAkonadi::NotificationMessage::Type( "type" );
+ QTest::addColumn<QByteArray>( "signalName" );
+
+ QTest::newRow( "itemAdded" ) << NotificationMessage::Add << NotificationMessage::Item << QByteArray( SIGNAL(itemAdded(Akonadi::Item,Akonadi::Collection)) );
+ QTest::newRow( "itemChanged" ) << NotificationMessage::Modify << NotificationMessage::Item << QByteArray( SIGNAL(itemChanged(Akonadi::Item,QSet<QByteArray>)) );
+ QTest::newRow( "itemRemoved" ) << NotificationMessage::Remove << NotificationMessage::Item << QByteArray( SIGNAL(itemRemoved(Akonadi::Item)) );
+ QTest::newRow( "itemMoved" ) << NotificationMessage::Move << NotificationMessage::Item << QByteArray( SIGNAL(itemMoved(Akonadi::Item,Akonadi::Collection,Akonadi::Collection)) );
+ QTest::newRow( "itemLinked" ) << NotificationMessage::Link << NotificationMessage::Item << QByteArray( SIGNAL(itemLinked(Akonadi::Item,Akonadi::Collection)) );
+ QTest::newRow( "itemUnlinked" ) << NotificationMessage::Unlink << NotificationMessage::Item << QByteArray( SIGNAL(itemUnlinked(Akonadi::Item,Akonadi::Collection)) );
+
+ QTest::newRow( "colAdded" ) << NotificationMessage::Add << NotificationMessage::Collection << QByteArray( SIGNAL(collectionAdded(Akonadi::Collection,Akonadi::Collection)) );
+ QTest::newRow( "colChanged" ) << NotificationMessage::Modify << NotificationMessage::Collection << QByteArray( SIGNAL(collectionChanged(Akonadi::Collection,QSet<QByteArray>)) );
+ QTest::newRow( "colRemoved" ) << NotificationMessage::Remove << NotificationMessage::Collection << QByteArray( SIGNAL(collectionRemoved(Akonadi::Collection)) );
+ QTest::newRow( "colMoved" ) << NotificationMessage::Move << NotificationMessage::Collection << QByteArray( SIGNAL(collectionMoved(Akonadi::Collection,Akonadi::Collection,Akonadi::Collection)) );
+ QTest::newRow( "colSubscribed" ) << NotificationMessage::Subscribe << NotificationMessage::Collection << QByteArray( SIGNAL(collectionSubscribed(Akonadi::Collection,Akonadi::Collection)) );
+ QTest::newRow( "colSubscribed" ) << NotificationMessage::Unsubscribe << NotificationMessage::Collection << QByteArray( SIGNAL(collectionUnsubscribed(Akonadi::Collection)) );
+ }
+
+ void filterResource()
+ {
+ QFETCH( NotificationMessage::Operation, op );
+ QFETCH( NotificationMessage::Type, type );
+ QFETCH( QByteArray, signalName );
+
+ Monitor dummyMonitor;
+ MonitorPrivate m( &dummyMonitor );
+ QSignalSpy spy( &dummyMonitor, signalName );
+ QVERIFY( spy.isValid() );
+
+ NotificationMessage msg;
+ msg.setUid( 1 );
+ msg.setOperation( op );
+ msg.setParentCollection( 2 );
+ msg.setType( type );
+ msg.setResource( "foo" );
+ msg.setSessionId( "mysession" );
+
+ // using the right resource makes it pass
+ QVERIFY( !m.acceptNotification( msg ) );
+ m.resources.insert( "bar" );
+ QVERIFY( !m.acceptNotification( msg ) );
+ m.resources.insert( "foo" );
+ QVERIFY( m.acceptNotification( msg ) );
+
+ // filtering out the session overwrites the resource
+ m.sessions.append( "mysession" );
+ QVERIFY( !m.acceptNotification( msg ) );
+ }
+
+ void filterDestinationResource_data()
+ {
+ QTest::addColumnAkonadi::NotificationMessage::Operation( "op" );
+ QTest::addColumnAkonadi::NotificationMessage::Type( "type" );
+ QTest::addColumn<QByteArray>( "signalName" );
+
+ QTest::newRow( "itemMoved" ) << NotificationMessage::Move << NotificationMessage::Item << QByteArray( SIGNAL(itemMoved(Akonadi::Item,Akonadi::Collection,Akonadi::Collection)) );
+ QTest::newRow( "colMoved" ) << NotificationMessage::Move << NotificationMessage::Collection << QByteArray( SIGNAL(collectionMoved(Akonadi::Collection,Akonadi::Collection,Akonadi::Collection)) );
+ }
+
+ void filterDestinationResource()
+ {
+ QFETCH( NotificationMessage::Operation, op );
+ QFETCH( NotificationMessage::Type, type );
+ QFETCH( QByteArray, signalName );
+
+ Monitor dummyMonitor;
+ MonitorPrivate m( &dummyMonitor );
+ QSignalSpy spy( &dummyMonitor, signalName );
+ QVERIFY( spy.isValid() );
+
+ NotificationMessage msg;
+ msg.setOperation( op );
+ msg.setType( type );
+ msg.setResource( "foo" );
+ msg.setItemParts( QSet<QByteArray>() << "bar" );
+ msg.setSessionId( "mysession" );
+
+ // using the right resource makes it pass
+ QVERIFY( !m.acceptNotification( msg ) );
+ m.resources.insert( "bla" );
+ QVERIFY( !m.acceptNotification( msg ) );
+ m.resources.insert( "bar" );
+ QVERIFY( m.acceptNotification( msg ) );
+
+ // filtering out the mimetype does not overwrite resources
+ msg.setMimeType( "your/type" );
+ m.mimetypes.insert( "my/type" );
+ QVERIFY( m.acceptNotification( msg ) );
+
+ // filtering out the session overwrites the resource
+ m.sessions.append( "mysession" );
+ QVERIFY( !m.acceptNotification( msg ) );
+ }
+
+ void filterMimeType_data()
+ {
+ QTest::addColumnAkonadi::NotificationMessage::Operation( "op" );
+ QTest::addColumnAkonadi::NotificationMessage::Type( "type" );
+ QTest::addColumn<QByteArray>( "signalName" );
+
+ QTest::newRow( "itemAdded" ) << NotificationMessage::Add << NotificationMessage::Item << QByteArray( SIGNAL(itemAdded(Akonadi::Item,Akonadi::Collection)) );
+ QTest::newRow( "itemChanged" ) << NotificationMessage::Modify << NotificationMessage::Item << QByteArray( SIGNAL(itemChanged(Akonadi::Item,QSet<QByteArray>)) );
+ QTest::newRow( "itemRemoved" ) << NotificationMessage::Remove << NotificationMessage::Item << QByteArray( SIGNAL(itemRemoved(Akonadi::Item)) );
+ QTest::newRow( "itemMoved" ) << NotificationMessage::Move << NotificationMessage::Item << QByteArray( SIGNAL(itemMoved(Akonadi::Item,Akonadi::Collection,Akonadi::Collection)) );
+ QTest::newRow( "itemLinked" ) << NotificationMessage::Link << NotificationMessage::Item << QByteArray( SIGNAL(itemLinked(Akonadi::Item,Akonadi::Collection)) );
+ QTest::newRow( "itemUnlinked" ) << NotificationMessage::Unlink << NotificationMessage::Item << QByteArray( SIGNAL(itemUnlinked(Akonadi::Item,Akonadi::Collection)) );
+
+ QTest::newRow( "colAdded" ) << NotificationMessage::Add << NotificationMessage::Collection << QByteArray( SIGNAL(collectionAdded(Akonadi::Collection,Akonadi::Collection)) );
+ QTest::newRow( "colChanged" ) << NotificationMessage::Modify << NotificationMessage::Collection << QByteArray( SIGNAL(collectionChanged(Akonadi::Collection,QSet<QByteArray>)) );
+ QTest::newRow( "colRemoved" ) << NotificationMessage::Remove << NotificationMessage::Collection << QByteArray( SIGNAL(collectionRemoved(Akonadi::Collection)) );
+ QTest::newRow( "colMoved" ) << NotificationMessage::Move << NotificationMessage::Collection << QByteArray( SIGNAL(collectionMoved(Akonadi::Collection,Akonadi::Collection,Akonadi::Collection)) );
+ QTest::newRow( "colSubscribed" ) << NotificationMessage::Subscribe << NotificationMessage::Collection << QByteArray( SIGNAL(collectionSubscribed(Akonadi::Collection,Akonadi::Collection)) );
+ QTest::newRow( "colSubscribed" ) << NotificationMessage::Unsubscribe << NotificationMessage::Collection << QByteArray( SIGNAL(collectionUnsubscribed(Akonadi::Collection)) );
+ }
+
+ void filterMimeType()
+ {
+ QFETCH( NotificationMessage::Operation, op );
+ QFETCH( NotificationMessage::Type, type );
+ QFETCH( QByteArray, signalName );
+
+ Monitor dummyMonitor;
+ MonitorPrivate m( &dummyMonitor );
+ QSignalSpy spy( &dummyMonitor, signalName );
+ QVERIFY( spy.isValid() );
+
+ NotificationMessage msg;
+ msg.setUid( 1 );
+ msg.setOperation( op );
+ msg.setParentCollection( 2 );
+ msg.setType( type );
+ msg.setResource( "foo" );
+ msg.setSessionId( "mysession" );
+ msg.setMimeType( "my/type" );
+
+ // using the right resource makes it pass
+ QVERIFY( !m.acceptNotification( msg ) );
+ m.mimetypes.insert( "your/type" );
+ QVERIFY( !m.acceptNotification( msg ) );
+ m.mimetypes.insert( "my/type" );
+ QCOMPARE( m.acceptNotification( msg ), type == NotificationMessage::Item );
+
+ // filter out the resource does not overwrite mimetype
+ m.resources.insert( "bar" );
+ QCOMPARE( m.acceptNotification( msg ), type == NotificationMessage::Item );
+
+ // filtering out the session overwrites the mimetype
+ m.sessions.append( "mysession" );
+ QVERIFY( !m.acceptNotification( msg ) );
+ }
+
+ void filterCollection_data()
+ {
+ QTest::addColumnAkonadi::NotificationMessage::Operation( "op" );
+ QTest::addColumnAkonadi::NotificationMessage::Type( "type" );
+ QTest::addColumn<QByteArray>( "signalName" );
+
+ QTest::newRow( "itemAdded" ) << NotificationMessage::Add << NotificationMessage::Item << QByteArray( SIGNAL(itemAdded(Akonadi::Item,Akonadi::Collection)) );
+ QTest::newRow( "itemChanged" ) << NotificationMessage::Modify << NotificationMessage::Item << QByteArray( SIGNAL(itemChanged(Akonadi::Item,QSet<QByteArray>)) );
+ QTest::newRow( "itemRemoved" ) << NotificationMessage::Remove << NotificationMessage::Item << QByteArray( SIGNAL(itemRemoved(Akonadi::Item)) );
+ QTest::newRow( "itemMoved" ) << NotificationMessage::Move << NotificationMessage::Item << QByteArray( SIGNAL(itemMoved(Akonadi::Item,Akonadi::Collection,Akonadi::Collection)) );
+ QTest::newRow( "itemLinked" ) << NotificationMessage::Link << NotificationMessage::Item << QByteArray( SIGNAL(itemLinked(Akonadi::Item,Akonadi::Collection)) );
+ QTest::newRow( "itemUnlinked" ) << NotificationMessage::Unlink << NotificationMessage::Item << QByteArray( SIGNAL(itemUnlinked(Akonadi::Item,Akonadi::Collection)) );
+
+ QTest::newRow( "colAdded" ) << NotificationMessage::Add << NotificationMessage::Collection << QByteArray( SIGNAL(collectionAdded(Akonadi::Collection,Akonadi::Collection)) );
+ QTest::newRow( "colChanged" ) << NotificationMessage::Modify << NotificationMessage::Collection << QByteArray( SIGNAL(collectionChanged(Akonadi::Collection,QSet<QByteArray>)) );
+ QTest::newRow( "colRemoved" ) << NotificationMessage::Remove << NotificationMessage::Collection << QByteArray( SIGNAL(collectionRemoved(Akonadi::Collection)) );
+ QTest::newRow( "colMoved" ) << NotificationMessage::Move << NotificationMessage::Collection << QByteArray( SIGNAL(collectionMoved(Akonadi::Collection,Akonadi::Collection,Akonadi::Collection)) );
+ QTest::newRow( "colSubscribed" ) << NotificationMessage::Subscribe << NotificationMessage::Collection << QByteArray( SIGNAL(collectionSubscribed(Akonadi::Collection,Akonadi::Collection)) );
+ QTest::newRow( "colSubscribed" ) << NotificationMessage::Unsubscribe << NotificationMessage::Collection << QByteArray( SIGNAL(collectionUnsubscribed(Akonadi::Collection)) );
+ }
+
+ void filterCollection()
+ {
+ QFETCH( NotificationMessage::Operation, op );
+ QFETCH( NotificationMessage::Type, type );
+ QFETCH( QByteArray, signalName );
+
+ Monitor dummyMonitor;
+ MonitorPrivate m( &dummyMonitor );
+ QSignalSpy spy( &dummyMonitor, signalName );
+ QVERIFY( spy.isValid() );
+
+ NotificationMessage msg;
+ msg.setUid( 1 );
+ msg.setOperation( op );
+ msg.setParentCollection( 2 );
+ msg.setType( type );
+ msg.setResource( "foo" );
+ msg.setSessionId( "mysession" );
+ msg.setMimeType( "my/type" );
+
+ // using the right resource makes it pass
+ QVERIFY( !m.acceptNotification( msg ) );
+ m.collections.append( Collection( 3 ) );
+ QVERIFY( !m.acceptNotification( msg ) );
+
+ for ( int colId = 0; colId < 3; ++colId ) { // 0 == root, 1 == this, 2 == parent
+ if ( colId == 1 && type == NotificationMessage::Item )
+ continue;
+
+ m.collections.clear();
+ m.collections.append( Collection( colId ) );
+
+ QVERIFY( m.acceptNotification( msg ) );
+
+ // filter out the resource does overwrite collection
+ m.resources.insert( "bar" );
+ QVERIFY( !m.acceptNotification( msg ) );
+ m.resources.clear();
+
+ // filter out the mimetype does overwrite collection, for item operations (mimetype filter has no effect on collections)
+ m.mimetypes.insert( "your/type" );
+ QCOMPARE( !m.acceptNotification( msg ), type == NotificationMessage::Item );
+ m.mimetypes.clear();
+
+ // filtering out the session overwrites the mimetype
+ m.sessions.append( "mysession" );
+ QVERIFY( !m.acceptNotification( msg ) );
+ m.sessions.clear();
+
+ // filter non-matching resource and matching mimetype make it pass
+ m.resources.insert( "bar" );
+ m.mimetypes.insert( "my/type" );
+ QVERIFY( m.acceptNotification( msg ) );
+ m.resources.clear();
+ m.mimetypes.clear();
+ }
+ }
+};
+
+QTEST_KDEMAIN( MonitorFilterTest, NoGUI )
+
+#include "monitorfiltertest.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/cmake/modules/FindLibical.cmake new/kdepimlibs-4.5.2/cmake/modules/FindLibical.cmake
--- old/kdepimlibs-4.5.1/cmake/modules/FindLibical.cmake 2010-03-10 11:42:13.000000000 +0100
+++ new/kdepimlibs-4.5.2/cmake/modules/FindLibical.cmake 2010-09-30 23:19:17.000000000 +0200
@@ -70,6 +70,9 @@
set(LIBICAL_INCLUDE_DIRS "")
set(LIBICAL_LIBRARIES "")
endif(NOT LIBICAL_VERSION_OK)
+ if((LIBICAL_VERSION VERSION_EQUAL 0.46) OR (LIBICAL_VERSION VERSION_GREATER 0.46))
+ set(USE_ICAL_0_46 TRUE)
+ endif()
else(COMPILE_RESULT AND RUN_RESULT EQUAL 1)
message(FATAL_ERROR "Unable to compile or run the libical version detection program.")
endif(COMPILE_RESULT AND RUN_RESULT EQUAL 1)
Files old/kdepimlibs-4.5.1/doc/kcontrol/kresources/index.cache.bz2 and new/kdepimlibs-4.5.2/doc/kcontrol/kresources/index.cache.bz2 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/doc/kcontrol/kresources/index.docbook new/kdepimlibs-4.5.2/doc/kcontrol/kresources/index.docbook
--- old/kdepimlibs-4.5.1/doc/kcontrol/kresources/index.docbook 2010-08-04 21:13:04.000000000 +0200
+++ new/kdepimlibs-4.5.2/doc/kcontrol/kresources/index.docbook 2010-09-30 23:19:17.000000000 +0200
@@ -6,6 +6,7 @@
]>
<article lang="&language;">
+<title>&kde; Resources</title>
<articleinfo>
<authorgroup>
@@ -26,8 +27,6 @@
<keyword>notes</keyword>
</keywordset>
</articleinfo>
-<sect1 id="kde-resources">
-<title>&kde; Resources</title>
<para>This module is a configuration tool for managing the resources used by different &kde; applications.
It allows you to add, deleted or modify the resources for <guilabel>Alarms</guilabel>,
@@ -90,6 +89,4 @@
will not be able to select it.
</para>
-</sect1>
-
</article>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/kcal/CMakeLists.txt new/kdepimlibs-4.5.2/kcal/CMakeLists.txt
--- old/kdepimlibs-4.5.1/kcal/CMakeLists.txt 2010-05-16 22:05:07.000000000 +0200
+++ new/kdepimlibs-4.5.2/kcal/CMakeLists.txt 2010-09-30 23:19:17.000000000 +0200
@@ -9,6 +9,11 @@
add_definitions(-DWANT_DEPRECATED_KABC_API)
add_definitions(-DWANT_DEPRECATED_KRESOURCE_API)
+# Workaround a SIC change in libical 0.46
+if(USE_ICAL_0_46)
+ add_definitions(-DUSE_ICAL_0_46)
+endif()
+
include (ConfigureChecks.cmake)
if(KDE4_BUILD_TESTS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/kcal/icalformat_p.cpp new/kdepimlibs-4.5.2/kcal/icalformat_p.cpp
--- old/kdepimlibs-4.5.1/kcal/icalformat_p.cpp 2010-05-27 19:22:10.000000000 +0200
+++ new/kdepimlibs-4.5.2/kcal/icalformat_p.cpp 2010-09-30 23:19:17.000000000 +0200
@@ -784,7 +784,11 @@
if ( att->isUri() ) {
attach = icalattach_new_from_url( att->uri().toUtf8().data() );
} else {
+#ifdef USE_ICAL_0_46
+ attach = icalattach_new_from_data ( ( const char * )att->data(), 0, 0 );
+#else
attach = icalattach_new_from_data ( ( unsigned char * )att->data(), 0, 0 );
+#endif
}
icalproperty *p = icalproperty_new_attach( attach );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/kholidays/holidays/plan2/holiday_hr_hr new/kdepimlibs-4.5.2/kholidays/holidays/plan2/holiday_hr_hr
--- old/kdepimlibs-4.5.1/kholidays/holidays/plan2/holiday_hr_hr 1970-01-01 01:00:00.000000000 +0100
+++ new/kdepimlibs-4.5.2/kholidays/holidays/plan2/holiday_hr_hr 2010-09-30 23:19:17.000000000 +0200
@@ -0,0 +1,86 @@
+::
+:: Country: Croatia
+::
+:: Language: Croatian
+::
+:: Author: Marko Dimjašević
+::
+:: Updated: 2010-09-13
+::
+:: Source: Hrvatski sabor: Zakon o blagdanima, spomendanima i neradnim danima
+:: u Republici Hrvatskoj
+:: http://narodne-novine.nn.hr/clanci/sluzbeni/309949.html
+:: Hrvatski sabor: Zakon o izmjenama i dopunama zakona o blagdanima,
+:: spomendanima i neradnim danima u Republici Hrvatskoj
+:: http://narodne-novine.nn.hr/clanci/sluzbeni/339400.html
+::
+
+:: Metadata
+country "HR"
+language "hr"
+:name "optional - defaults to country name"
+:description "Datoteka s blagdanima, spomendanima i neradnim danima u Hrvatskoj"
+
+:: Public Holidays
+"Nova godina" weekend on january 1
+"Sveta tri kralja" weekend on january 6
+"Uskrsni ponedjeljak" weekend on easter plus 1 day
+"Tijelovo" weekend on easter plus 60 days
+"Praznik rada" weekend on may 1
+"Dan antifašističke borbe" weekend on june 22
+"Dan državnosti" weekend on june 25
+"Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja" weekend on august 5
+"Velika Gospa" weekend on august 15
+"Dan neovisnosti" weekend on october 8
+"Svi sveti" weekend on november 1
+"Božić" weekend on december 25
+"Sveti Stjepan" weekend on december 26
+
+:: Religious Holidays
+"Uskrs" on easter
+"Pepelnica" on easter minus 46 days
+"Veliki četvrtak" on easter minus 3 days
+"Veliki petak" on easter minus 2 days
+"Velika subota" on easter minus 1 day
+"Duhovi" on easter plus 49 days
+"Presveto Trojstvo" on easter plus 56 days
+
+:: Financial
+
+:: Cultural
+"Valentinovo" on february 14
+"Međunarodni dan žena" on march 8
+"Svjetski dan kazališta" on march 27
+"Dan slobode dokumenata" on last wednesday in march
+"Prvotravanjska šala" on april 1
+"Svjetski dan smijeha" on first sunday in may
+"Majčin dan" on second sunday in may
+"Dan očeva" on third sunday in june
+"Međunarodni dan mladih" on august 12
+"Dan slobodnog softvera" on third saturday in september
+"Dan sjećanja na Vukovar" on november 18
+"Dan hrvatskog kazališta" on november 24
+"Međunarodni dan volontera" on december 5
+"Sveti Nikola" on december 6
+
+:: School
+"Početak školske godine" on september 1
+"Međunarodni dan pismenosti (UNESCO)" on september 8
+"Europski dan jezika" on september 26
+"Međunarodni dan učitelja" on october 5
+"Međunarodni dan školskih knjižnica" on october 24
+
+:: Daylight Saving
+"Ljetno računanje vremena" on last sunday in march
+"Zimsko računanje vremena" on last sunday in october
+
+:: Seasons
+"Proljetna ravnodnevica (ekvinocij)" on march 20
+"Ljetna dugodnevica (solsticij)" on june 21
+"Jesenska ravnodnevica (ekvinocij)" on september 22
+"Zimska kratkodnevica (solsticij)" on december 21
+
+:: Name Days
+
+:: To be sorted
+"Dan Hrvatskoga sabora" on may 30
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/kholidays/parsers/plan2/holidayparserdriverplan.cpp new/kdepimlibs-4.5.2/kholidays/parsers/plan2/holidayparserdriverplan.cpp
--- old/kdepimlibs-4.5.1/kholidays/parsers/plan2/holidayparserdriverplan.cpp 2010-06-24 18:26:25.000000000 +0200
+++ new/kdepimlibs-4.5.2/kholidays/parsers/plan2/holidayparserdriverplan.cpp 2010-09-30 23:19:17.000000000 +0200
@@ -52,7 +52,8 @@
HolidayParserDriverPlan::HolidayParserDriverPlan( const QString &planFilePath )
:HolidayParserDriver( planFilePath ),
m_traceParsing( false ),
- m_traceScanning( false )
+ m_traceScanning( false ),
+ m_parseMetadataOnly( false )
{
QFile holidayFile( filePath() );
if ( holidayFile.open( QIODevice::ReadOnly ) ) {
@@ -89,10 +90,8 @@
void HolidayParserDriverPlan::parse()
{
- // Parse the file using every available calendar system, even if not defined in file
- // TODO this will not scale as more systems are added over time, either move to AST model
- // or have this driven via pre-scan or file metadata to determine requied calendar systems
- foreach( QString calendar, KCalendarSystem::calendarSystems() ) {
+ // Parse the file using every calendar system in the file
+ foreach( QString calendar, m_fileCalendarTypes ) {
// Cater for events defined in other Calendar Systems where request year could cover 2 or 3 event years
// Perhaps also parse year before and year after to allow events to span years or shift to other year?
@@ -117,10 +116,13 @@
void HolidayParserDriverPlan::parseMetadata()
{
+ m_parseMetadataOnly = true;
m_fileCountryCode.clear();
m_fileLanguageCode.clear();
m_fileName.clear();
m_fileDescription.clear();
+ m_fileCalendarTypes.clear();
+ m_fileCalendarTypes.append( "gregorian" );
// Default to files internal metadata
setParseCalendar( "gregorian" );
@@ -155,7 +157,7 @@
}
}
-
+ m_parseMetadataOnly = false;
}
QString HolidayParserDriverPlan::filePath()
@@ -404,7 +406,10 @@
void HolidayParserDriverPlan::setEventCalendarType( const QString &calendarType )
{
- m_eventCalendarType = calendarType;
+ m_eventCalendarType = calendarType;
+ if ( m_parseMetadataOnly && !m_fileCalendarTypes.contains( calendarType ) ) {
+ m_fileCalendarTypes.append( calendarType );
+ }
}
void HolidayParserDriverPlan::setEventDate( int eventYear, int eventMonth, int eventDay )
@@ -431,8 +436,8 @@
void HolidayParserDriverPlan::setFromWeekdayInMonth( int occurrence, int weekday, int month, int offset, int duration )
{
- // Don't set if calendar for event rule is not the current parse calendar
- if ( m_eventCalendarType != m_parseCalendar->calendarType() ) {
+ // Don't set if only parsing metadata or calendar for event rule is not the current parse calendar
+ if ( m_parseMetadataOnly || m_eventCalendarType != m_parseCalendar->calendarType() ) {
return;
}
@@ -484,8 +489,8 @@
void HolidayParserDriverPlan::setFromRelativeWeekday( int occurrence, int weekday, int offset, int duration )
{
- // Don't set if calendar for event rule is not the current parse calendar
- if ( m_eventCalendarType != m_parseCalendar->calendarType() ) {
+ // Don't set if only parsing metadata or calendar for event rule is not the current parse calendar
+ if ( m_parseMetadataOnly || m_eventCalendarType != m_parseCalendar->calendarType() ) {
return;
}
@@ -572,8 +577,8 @@
void HolidayParserDriverPlan::setFromDate( int offset, int condition, int duration )
{
- // Don't set if calendar for event rule is not the current parse calendar
- if ( m_eventCalendarType != m_parseCalendar->calendarType() ) {
+ // Don't set if only parsing metadata or calendar for event rule is not the current parse calendar
+ if ( m_parseMetadataOnly || m_eventCalendarType != m_parseCalendar->calendarType() ) {
return;
}
@@ -632,8 +637,8 @@
void HolidayParserDriverPlan::setFromEaster( int offset, int duration )
{
- // Don't set if calendar for event rule is not the current parse calendar
- if ( m_eventCalendarType != m_parseCalendar->calendarType() ) {
+ // Don't set if only parsing metadata or calendar for event rule is not the current parse calendar
+ if ( m_parseMetadataOnly || m_eventCalendarType != m_parseCalendar->calendarType() ) {
return;
}
@@ -652,8 +657,8 @@
void HolidayParserDriverPlan::setFromPascha( int offset, int duration )
{
- // Don't set if calendar for event rule is not the current parse calendar
- if ( m_eventCalendarType != m_parseCalendar->calendarType() ) {
+ // Don't set if only parsing metadata or calendar for event rule is not the current parse calendar
+ if ( m_parseMetadataOnly || m_eventCalendarType != m_parseCalendar->calendarType() ) {
return;
}
@@ -667,8 +672,8 @@
// Set the event if it falls inside the requested date range
void HolidayParserDriverPlan::setEvent( int jd, int observeOffset, int duration )
{
- // Don't set if calendar for event rule is not the current parse calendar
- if ( m_eventCalendarType != m_parseCalendar->calendarType() ) {
+ // Don't set if only parsing metadata or calendar for event rule is not the current parse calendar
+ if ( m_parseMetadataOnly || m_eventCalendarType != m_parseCalendar->calendarType() ) {
return;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/kholidays/parsers/plan2/holidayparserdriverplan_p.h new/kdepimlibs-4.5.2/kholidays/parsers/plan2/holidayparserdriverplan_p.h
--- old/kdepimlibs-4.5.1/kholidays/parsers/plan2/holidayparserdriverplan_p.h 2010-06-16 14:02:26.000000000 +0200
+++ new/kdepimlibs-4.5.2/kholidays/parsers/plan2/holidayparserdriverplan_p.h 2010-09-30 23:19:17.000000000 +0200
@@ -25,6 +25,7 @@
#include <fstream>
#include <QByteArray>
+#include <QStringList>
#include "../holidayparserdriver_p.h"
@@ -141,12 +142,15 @@
QByteArray m_scanData; // Holiday file stored as a string
+ QStringList m_fileCalendarTypes; // List of all Calendar Systems used in file
+
bool m_traceParsing; // Bison C++ skeleton enable tracing in Bison parser class
HolidayParserPlan *m_parser; // Bison C++ skeleton Bison parser class implementation
bool m_traceScanning; // Flex C++ enable tracing in Flex scanner class
HolidayScannerPlan *m_scanner; // Flex C++ scanner class implementation
+ bool m_parseMetadataOnly; // Only parse file for metadata
QDate m_parseYearStart; // First day of year being parsed
QDate m_parseYearEaster; // Easter in the parse year, Gregorian only
QDate m_parseYearPascha; // Orthodox Easter in the parse year, Gregorian only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/kimap/sessionthread.cpp new/kdepimlibs-4.5.2/kimap/sessionthread.cpp
--- old/kdepimlibs-4.5.1/kimap/sessionthread.cpp 2010-08-27 10:09:26.000000000 +0200
+++ new/kdepimlibs-4.5.2/kimap/sessionthread.cpp 2010-09-30 23:19:17.000000000 +0200
@@ -49,7 +49,10 @@
{
// don't call quit() directly, this will deadlock in wait() if exec() hasn't run yet
QMetaObject::invokeMethod( this, "quit" );
- wait();
+ if ( !wait( 10 * 1000 ) ) {
+ kWarning() << "Session thread refuses to die, killing harder...";
+ terminate();
+ }
}
void SessionThread::sendData( const QByteArray &payload )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/kmime/kmime_content.cpp new/kdepimlibs-4.5.2/kmime/kmime_content.cpp
--- old/kdepimlibs-4.5.1/kmime/kmime_content.cpp 2010-08-27 10:09:26.000000000 +0200
+++ new/kdepimlibs-4.5.2/kmime/kmime_content.cpp 2010-09-30 23:19:17.000000000 +0200
@@ -513,7 +513,6 @@
// Add to new content.
main->setHeader( *it );
// Remove from this content.
- delete (*it);
it = h_eaders.erase( it );
} else {
++it;
@@ -576,7 +575,6 @@
foreach( Headers::Base *h, main->h_eaders ) {
setHeader( h ); // Will remove the old one if present.
}
- qDeleteAll( main->h_eaders );
main->h_eaders.clear();
// Move the body.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/kpimtextedit/textedit.cpp new/kdepimlibs-4.5.2/kpimtextedit/textedit.cpp
--- old/kdepimlibs-4.5.1/kpimtextedit/textedit.cpp 2010-07-28 23:04:07.000000000 +0200
+++ new/kdepimlibs-4.5.2/kpimtextedit/textedit.cpp 2010-09-30 23:19:17.000000000 +0200
@@ -352,11 +352,11 @@
}
block = block.next();
}
-
+
// Remove the last superfluous newline added above
if ( temp.endsWith( QLatin1Char( '\n' ) ) )
temp.chop( 1 );
-
+
d->fixupTextEditString( temp );
return temp;
}
@@ -559,14 +559,19 @@
return result;
}
+void TextEdit::insertImage( const QImage &image, const QFileInfo&fileInfo )
+{
+ QString imageName = fileInfo.baseName().isEmpty() ? i18nc( "Start of the filename for an image", "image" ) : fileInfo.baseName();
+ d->addImageHelper( imageName, image );
+}
+
void TextEdit::insertFromMimeData( const QMimeData *source )
{
// Add an image if that is on the clipboard
if ( textMode() == KRichTextEdit::Rich && source->hasImage() && d->imageSupportEnabled ) {
QImage image = qvariant_cast<QImage>( source->imageData() );
QFileInfo fi( source->text() );
- QString imageName = fi.baseName().isEmpty() ? i18nc( "Start of the filename for an image", "image" ) : fi.baseName();
- d->addImageHelper( imageName, image );
+ insertImage( image, fi );
return;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/kpimtextedit/textedit.h new/kdepimlibs-4.5.2/kpimtextedit/textedit.h
--- old/kdepimlibs-4.5.1/kpimtextedit/textedit.h 2010-07-23 23:11:00.000000000 +0200
+++ new/kdepimlibs-4.5.2/kpimtextedit/textedit.h 2010-09-30 23:19:17.000000000 +0200
@@ -31,7 +31,9 @@
#include
#include <memory>
+#include <QFileInfo>
+#define FIX_KMAIL_INSERT_IMAGE 1
class KUrl;
namespace KPIMTextEdit {
@@ -258,6 +260,11 @@
* @since 4.5
*/
QString configFile() const;
+ /*
+ * @since 4.6
+ */
+ void insertImage( const QImage &image, const QFileInfo&info );
+
protected:
/**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/mailtransport/addtransportdialog.cpp new/kdepimlibs-4.5.2/mailtransport/addtransportdialog.cpp
--- old/kdepimlibs-4.5.1/mailtransport/addtransportdialog.cpp 2010-02-09 15:29:36.000000000 +0100
+++ new/kdepimlibs-4.5.2/mailtransport/addtransportdialog.cpp 2010-09-30 23:19:17.000000000 +0200
@@ -131,7 +131,7 @@
}
transport->setHost( cjob->instance().identifier() );
}
- transport->setName( d->ui.name->text() );
+ transport->setName( d->ui.name->text().trimmed() );
transport->forceUniqueName();
if( TransportManager::self()->configureTransport( transport, this ) ) {
// The user clicked OK and the transport settings were saved.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/mailtransport/transport.cpp new/kdepimlibs-4.5.2/mailtransport/transport.cpp
--- old/kdepimlibs-4.5.1/mailtransport/transport.cpp 2010-05-16 22:05:08.000000000 +0200
+++ new/kdepimlibs-4.5.2/mailtransport/transport.cpp 2010-09-30 23:19:17.000000000 +0200
@@ -79,8 +79,7 @@
{
if ( !d->passwordLoaded && requiresAuthentication() && storePassword() &&
d->password.isEmpty() ) {
- TransportManager::self()->loadPasswords();
- d->password = TransportManager::self()->transportById( id(), false )->password();
+ readPassword();
}
return d->password;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.5.1/mailtransport/transportmanager.cpp new/kdepimlibs-4.5.2/mailtransport/transportmanager.cpp
--- old/kdepimlibs-4.5.1/mailtransport/transportmanager.cpp 2010-01-06 17:59:13.000000000 +0100
+++ new/kdepimlibs-4.5.2/mailtransport/transportmanager.cpp 2010-09-30 23:19:17.000000000 +0200
@@ -628,10 +628,11 @@
}
// flush the wallet queue
- foreach ( TransportJob *job, d->walletQueue ) {
+ const QList copy = d->walletQueue;
+ d->walletQueue.clear();
+ foreach ( TransportJob *job, copy ) {
job->start();
}
- d->walletQueue.clear();
emit passwordsChanged();
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org