[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepimlibs
From: Will Stephenson <wstephenson () kde ! org>
Date: 2010-11-22 11:05:07
Message-ID: 20101122110507.31D98AC8A0 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1199674 by wstephens:
Compile with -DKDE_ENABLE_FINAL=1 again
M +14 -15 akonadi/agentactionmanager.cpp
M +3 -3 akonadi/contact/actions/dialphonenumberaction.cpp
M +2 -2 akonadi/contact/actions/sendsmsaction.cpp
A akonadi/metatypes.h [License: LGPL (v2+)]
M +21 -22 akonadi/standardactionmanager.cpp
M +1 -1 gpgme++/CMakeLists.txt
M +5 -5 kcalcore/icalformat_p.cpp
M +5 -5 kcalcore/vcalformat.cpp
--- trunk/KDE/kdepimlibs/akonadi/agentactionmanager.cpp #1199673:1199674
@@ -24,6 +24,7 @@
#include "agentinstancemodel.h"
#include "agentmanager.h"
#include "agenttypedialog.h"
+#include "metatypes.h"
#include <KAction>
#include <KActionCollection>
@@ -36,8 +37,6 @@
#include <boost/static_assert.hpp>
-Q_DECLARE_METATYPE(QModelIndex)
-
using namespace Akonadi;
//@cond PRIVATE
@@ -48,14 +47,14 @@
const char *icon;
int shortcut;
const char* slot;
-} actionData[] = {
+} agentActionData[] = {
{ "akonadi_agentinstance_create", I18N_NOOP( "&New Agent Instance..." ), \
"folder-new", 0, SLOT( slotCreateAgentInstance() ) }, { \
"akonadi_agentinstance_delete", I18N_NOOP( "&Delete Agent Instance" ), "edit-delete", \
0, SLOT( slotDeleteAgentInstance() ) }, { "akonadi_agentinstance_configure", \
I18N_NOOP( "&Configure Agent Instance" ), "configure", 0, SLOT( \
slotConfigureAgentInstance() ) } };
-static const int numActionData = sizeof actionData / sizeof *actionData;
+static const int numAgentActionData = sizeof agentActionData / sizeof \
*agentActionData;
-BOOST_STATIC_ASSERT( numActionData == AgentActionManager::LastType );
+BOOST_STATIC_ASSERT( numAgentActionData == AgentActionManager::LastType );
/**
* @internal
@@ -248,22 +247,22 @@
KAction* AgentActionManager::createAction( Type type )
{
Q_ASSERT( type >= 0 && type < LastType );
- Q_ASSERT( actionData[ type ].name );
+ Q_ASSERT( agentActionData[ type ].name );
if ( d->mActions[ type ] )
return d->mActions[ type ];
KAction *action = new KAction( d->mParentWidget );
- action->setText( i18n( actionData[ type ].label ) );
+ action->setText( i18n( agentActionData[ type ].label ) );
- if ( actionData[ type ].icon )
- action->setIcon( KIcon( QString::fromLatin1( actionData[ type ].icon ) ) );
+ if ( agentActionData[ type ].icon )
+ action->setIcon( KIcon( QString::fromLatin1( agentActionData[ type ].icon ) ) );
- action->setShortcut( actionData[ type ].shortcut );
+ action->setShortcut( agentActionData[ type ].shortcut );
- if ( actionData[ type ].slot )
- connect( action, SIGNAL( triggered() ), actionData[ type ].slot );
+ if ( agentActionData[ type ].slot )
+ connect( action, SIGNAL( triggered() ), agentActionData[ type ].slot );
- d->mActionCollection->addAction( QString::fromLatin1( actionData[ type ].name), \
action ); + d->mActionCollection->addAction( QString::fromLatin1( agentActionData[ \
type ].name), action ); d->mActions[ type ] = action;
d->updateActions();
@@ -292,9 +291,9 @@
return;
if ( intercept )
- disconnect( action, SIGNAL( triggered() ), this, actionData[ type ].slot );
+ disconnect( action, SIGNAL( triggered() ), this, agentActionData[ type ].slot );
else
- connect( action, SIGNAL( triggered() ), actionData[ type ].slot );
+ connect( action, SIGNAL( triggered() ), agentActionData[ type ].slot );
}
AgentInstance::List AgentActionManager::selectedAgentInstances() const
--- trunk/KDE/kdepimlibs/akonadi/contact/actions/dialphonenumberaction.cpp \
#1199673:1199674 @@ -33,7 +33,7 @@
using namespace Akonadi;
-static QString strippedNumber( const QString &number )
+static QString strippedDialNumber( const QString &number )
{
QString result;
@@ -54,7 +54,7 @@
// we handle skype separated
if ( ContactActionsSettings::self()->dialPhoneNumberAction() == \
ContactActionsSettings::UseSkype ) { QSkypeDialer dialer( QLatin1String( \
"AkonadiContacts" ) );
- if ( !dialer.dialNumber( strippedNumber( number.number().trimmed() ) ) ) {
+ if ( !dialer.dialNumber( strippedDialNumber( number.number().trimmed() ) ) ) {
KMessageBox::sorry( 0, dialer.errorMessage() );
}
return;
@@ -72,7 +72,7 @@
* %n the number with all additional non-number characters removed
*/
command = command.replace( QLatin1String( "%N" ), number.number() );
- command = command.replace( QLatin1String( "%n" ), strippedNumber( \
number.number().trimmed() ) ); + command = command.replace( QLatin1String( "%n" ), \
strippedDialNumber( number.number().trimmed() ) );
KRun::runCommand( command, 0 );
}
--- trunk/KDE/kdepimlibs/akonadi/contact/actions/sendsmsaction.cpp #1199673:1199674
@@ -30,7 +30,7 @@
#include <kmessagebox.h>
#include <krun.h>
-static QString strippedNumber( const QString &number )
+static QString strippedSmsNumber( const QString &number )
{
QString result;
@@ -79,7 +79,7 @@
* %n the number with all additional non-number characters removed
*/
command = command.replace( QLatin1String( "%N" ), phoneNumber.number() );
- command = command.replace( QLatin1String( "%n" ), strippedNumber( number ) );
+ command = command.replace( QLatin1String( "%n" ), strippedSmsNumber( number ) );
command = command.replace( QLatin1String( "%t" ), dlg.message() );
KRun::runCommand( command, 0 );
--- trunk/KDE/kdepimlibs/akonadi/standardactionmanager.cpp #1199673:1199674
@@ -33,6 +33,7 @@
#include "favoritecollectionsmodel.h"
#include "itemdeletejob.h"
#include "itemmodel.h"
+#include "metatypes.h"
#include "pastehelper_p.h"
#include "specialcollectionattribute_p.h"
#ifndef Q_OS_WINCE
@@ -57,8 +58,6 @@
#include <boost/static_assert.hpp>
-Q_DECLARE_METATYPE(QModelIndex)
-
using namespace Akonadi;
//@cond PRIVATE
@@ -77,7 +76,7 @@
int shortcut;
const char* slot;
ActionType actionType;
-} actionData[] = {
+} standardActionData[] = {
{ "akonadi_collection_create", I18N_NOOP( "&New Folder..." ), "folder-new", 0, \
SLOT( slotCreateCollection() ), NormalAction }, { "akonadi_collection_copy", 0, \
"edit-copy", 0, SLOT( slotCopyCollections() ), NormalAction }, { \
"akonadi_collection_delete", I18N_NOOP( "&Delete Folder" ), "edit-delete", 0, SLOT( \
slotDeleteCollection() ), NormalAction }, @@ -106,9 +105,9 @@
{ "akonadi_item_copy_to_dialog", I18N_NOOP( "Copy Item To..." ), "edit-copy", 0, \
SLOT( slotCopyItemTo() ), NormalAction }, { "akonadi_item_move_to_dialog", \
I18N_NOOP( "Move Item To..." ), "go-jump", 0, SLOT( slotMoveItemTo() ), NormalAction \
} };
-static const int numActionData = sizeof actionData / sizeof *actionData;
+static const int numStandardActionData = sizeof standardActionData / sizeof \
*standardActionData;
-BOOST_STATIC_ASSERT( numActionData == StandardActionManager::LastType );
+BOOST_STATIC_ASSERT( numStandardActionData == StandardActionManager::LastType );
static bool canCreateCollection( const Collection &collection )
{
@@ -1151,11 +1150,11 @@
KAction* StandardActionManager::createAction( Type type )
{
Q_ASSERT( type < LastType );
- Q_ASSERT( actionData[type].name );
+ Q_ASSERT( standardActionData[type].name );
if ( d->actions[type] )
return d->actions[type];
KAction *action = 0;
- switch ( actionData[type].actionType ) {
+ switch ( standardActionData[type].actionType ) {
case NormalAction:
action = new KAction( d->parentWidget );
break;
@@ -1169,28 +1168,28 @@
if ( d->pluralLabels.contains( type ) && !d->pluralLabels.value( type ).isEmpty() \
)
action->setText( d->pluralLabels.value( type ).subs( 1 ).toString() );
- else if ( actionData[type].label )
- action->setText( i18n( actionData[type].label ) );
+ else if ( standardActionData[type].label )
+ action->setText( i18n( standardActionData[type].label ) );
- if ( actionData[type].icon )
- action->setIcon( KIcon( QString::fromLatin1( actionData[type].icon ) ) );
+ if ( standardActionData[type].icon )
+ action->setIcon( KIcon( QString::fromLatin1( standardActionData[type].icon ) ) \
);
- action->setShortcut( actionData[type].shortcut );
+ action->setShortcut( standardActionData[type].shortcut );
- if ( actionData[type].slot ) {
- switch ( actionData[type].actionType ) {
+ if ( standardActionData[type].slot ) {
+ switch ( standardActionData[type].actionType ) {
case NormalAction:
- connect( action, SIGNAL( triggered() ), actionData[type].slot );
+ connect( action, SIGNAL( triggered() ), standardActionData[type].slot );
break;
case MenuAction:
{
KActionMenu *actionMenu = qobject_cast<KActionMenu*>( action );
- connect( actionMenu->menu(), SIGNAL( triggered( QAction* ) ), \
actionData[type].slot ); + connect( actionMenu->menu(), SIGNAL( triggered( \
QAction* ) ), standardActionData[type].slot ); }
break;
case ToggleAction:
{
- connect( action, SIGNAL( triggered( bool ) ), actionData[type].slot );
+ connect( action, SIGNAL( triggered( bool ) ), \
standardActionData[type].slot ); }
break;
}
@@ -1198,14 +1197,14 @@
if ( type == ToggleWorkOffline ) {
// inititalize the action state with information from config file
- disconnect( action, SIGNAL( triggered( bool ) ), this, actionData[type].slot );
+ disconnect( action, SIGNAL( triggered( bool ) ), this, \
standardActionData[type].slot ); action->setChecked( workOffline() );
- connect( action, SIGNAL( triggered( bool ) ), this, actionData[type].slot );
+ connect( action, SIGNAL( triggered( bool ) ), this, \
standardActionData[type].slot );
//TODO: find a way to check for updates to the config file
}
- d->actionCollection->addAction( QString::fromLatin1(actionData[type].name), action \
); + d->actionCollection->addAction( \
QString::fromLatin1(standardActionData[type].name), action ); d->actions[type] = \
action; d->updateActions();
return action;
@@ -1240,9 +1239,9 @@
return;
if ( intercept )
- disconnect( action, SIGNAL( triggered() ), this, actionData[type].slot );
+ disconnect( action, SIGNAL( triggered() ), this, standardActionData[type].slot \
); else
- connect( action, SIGNAL( triggered() ), actionData[type].slot );
+ connect( action, SIGNAL( triggered() ), standardActionData[type].slot );
}
Collection::List StandardActionManager::selectedCollections() const
--- trunk/KDE/kdepimlibs/gpgme++/CMakeLists.txt #1199673:1199674
@@ -1,5 +1,5 @@
project( gpgmepp )
-KDE4_NO_ENABLE_FINAL(gpgmepp)
+#KDE4_NO_ENABLE_FINAL(gpgmepp)
if (MINGW)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mms-bitfields")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mms-bitfields")
--- trunk/KDE/kdepimlibs/kcalcore/icalformat_p.cpp #1199673:1199674
@@ -69,7 +69,7 @@
//@cond PRIVATE
template <typename K>
-void removeAll( QVector< QSharedPointer<K> > &c, const QSharedPointer<K> &x )
+void removeAllICal( QVector< QSharedPointer<K> > &c, const QSharedPointer<K> &x )
{
Q_ASSERT( c.count( x ) == 1 );
c.remove( c.indexOf( x ) );
@@ -2573,11 +2573,11 @@
if ( deleted ) {
// kDebug()<<"Todo " << todo->uid() << " already deleted2";
cal->deleteTodo( old ); // move old to deleted
- removeAll( d->mTodosRelate, old );
+ removeAllICal( d->mTodosRelate, old );
} else if ( todo->revision() > old->revision() ) {
// kDebug() << "Replacing old todo " << old.data() << " with this one " << \
todo.data(); cal->deleteTodo( old ); // move old to deleted
- removeAll( d->mTodosRelate, old );
+ removeAllICal( d->mTodosRelate, old );
cal->addTodo( todo ); // and replace it with this one
}
} else if ( deleted ) {
@@ -2607,10 +2607,10 @@
qDebug() << "OLD EVENT" << old->uid();
if ( deleted ) {
cal->deleteEvent( old ); // move old to deleted
- removeAll( d->mEventsRelate, old );
+ removeAllICal( d->mEventsRelate, old );
} else if ( event->revision() > old->revision() ) {
cal->deleteEvent( old ); // move old to deleted
- removeAll( d->mEventsRelate, old );
+ removeAllICal( d->mEventsRelate, old );
cal->addEvent( event ); // and replace it with this one
}
} else if ( deleted ) {
--- trunk/KDE/kdepimlibs/kcalcore/vcalformat.cpp #1199673:1199674
@@ -57,7 +57,7 @@
*/
//@cond PRIVATE
template <typename K>
-void removeAll( QVector< QSharedPointer<K> > &c, const QSharedPointer<K> &x )
+void removeAllVCal( QVector< QSharedPointer<K> > &c, const QSharedPointer<K> &x )
{
Q_ASSERT( c.count( x ) == 1 );
c.remove( c.indexOf( x ) );
@@ -2021,10 +2021,10 @@
if ( old ) {
if ( deleted ) {
d->mCalendar->deleteEvent( old ); // move old to deleted
- removeAll( d->mEventsRelate, old );
+ removeAllVCal( d->mEventsRelate, old );
} else if ( anEvent->revision() > old->revision() ) {
d->mCalendar->deleteEvent( old ); // move old to deleted
- removeAll( d->mEventsRelate, old );
+ removeAllVCal( d->mEventsRelate, old );
d->mCalendar->addEvent( anEvent ); // and replace it with this one
}
} else if ( deleted ) {
@@ -2063,10 +2063,10 @@
if ( old ) {
if ( deleted ) {
d->mCalendar->deleteTodo( old ); // move old to deleted
- removeAll( d->mTodosRelate, old );
+ removeAllVCal( d->mTodosRelate, old );
} else if ( aTodo->revision() > old->revision() ) {
d->mCalendar->deleteTodo( old ); // move old to deleted
- removeAll( d->mTodosRelate, old );
+ removeAllVCal( d->mTodosRelate, old );
d->mCalendar->addTodo( aTodo ); // and replace it with this one
}
} else if ( deleted ) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic