[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepimlibs/akonadi
From: Volker Krause <vkrause () kde ! org>
Date: 2011-01-06 10:43:13
Message-ID: 20110106104313.6C9BBAC8B0 () svn ! kde ! org
[Download RAW message or body]
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",
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic