[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/akonadi/migration/kres
From: Volker Krause <vkrause () kde ! org>
Date: 2008-10-31 23:49:11
Message-ID: 1225496951.111653.19707.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 878356 by vkrause:
Detect unsupported types before creating the dialog (which in case that
only unsupported types have been specified cannot even be closed).
M +5 -2 main.cpp
--- trunk/KDE/kdepim/akonadi/migration/kres/main.cpp #878355:878356
@@ -60,7 +60,8 @@
options.add( "bridge-only", ki18n("Only migrate to Akonadi KResource bridges") );
options.add( "contacts-only", ki18n("Only migrate contact resources") );
options.add( "calendar-only", ki18n("Only migrate calendar resources") );
- options.add( "type <type>", ki18n("Only migrate the specified types (supported: \
contact, calendar)" ), "contact,calendar" ); + options.add( "type <type>", \
ki18n("Only migrate the specified types (supported: contact, calendar)" ), + \
supportedTypes.join( "," ).toLatin1() ); options.add( "interactive", ki18n( "Show \
reporting dialog") ); options.add( "interactive-on-change", ki18n("Show report only \
if changes were made") ); KCmdLineArgs::addCmdLineOptions( options );
@@ -68,7 +69,9 @@
QStringList typesToMigrate;
foreach ( const QString &type, args->getOption( "type" ).split( ',' ) ) {
- if ( !QDBusConnection::sessionBus().registerService( \
"org.kde.Akonadi.KResMigrator." + type ) ) + if ( !supportedTypes.contains( type ) \
) + kWarning() << "Unknown resource type: " << type;
+ else if ( !QDBusConnection::sessionBus().registerService( \
"org.kde.Akonadi.KResMigrator." + type ) )
kWarning() << "Migrator instance already running for type " << type;
else
typesToMigrate << type;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic