SVN commit 1212254 by vkrause: When guessing the catalog name from the executable, consider Windows as well and strip off the .exe suffix. M +3 -6 agentbase.cpp M +3 -6 resourcebase.cpp --- trunk/KDE/kdepimlibs/akonadi/agentbase.cpp #1212253:1212254 @@ -515,12 +515,9 @@ exit( 1 ); } - QByteArray catalog; - char *p = strrchr( argv[0], '/' ); - if ( p ) - catalog = QByteArray( p + 1 ); - else - catalog = QByteArray( argv[0] ); + const QFileInfo fi( QString::fromLocal8Bit( argv[0] ) ); + // strip off full path and possible .exe suffix + const QByteArray catalog = fi.baseName().toLatin1(); KCmdLineArgs::init( argc, argv, identifier.toLatin1(), catalog, ki18n( "Akonadi Agent" ), "0.1", ki18n( "Akonadi Agent" ) ); --- trunk/KDE/kdepimlibs/akonadi/resourcebase.cpp #1212253:1212254 @@ -366,12 +366,9 @@ exit( 1 ); } - QByteArray catalog; - char *p = strrchr( argv[0], '/' ); - if ( p ) - catalog = QByteArray( p + 1 ); - else - catalog = QByteArray( argv[0] ); + const QFileInfo fi( QString::fromLocal8Bit( argv[0] ) ); + // strip off full path and possible .exe suffix + const QByteArray catalog = fi.baseName().toLatin1(); KCmdLineArgs::init( argc, argv, identifier.toLatin1(), catalog, ki18nc( "@title application name", "Akonadi Resource" ), "0.1",