[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/kjots
From: Stephen Kelly <steveire () gmail ! com>
Date: 2010-06-16 12:35:00
Message-ID: 20100616123500.36DE1AC8D4 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1138653 by skelly:
Use a random string for the collection.name(), and the user visible book name in the \
displayAttr.
M +3 -1 kjotswidget.cpp
M +3 -1 localresourcecreator.cpp
--- trunk/KDE/kdepim/kjots/kjotswidget.cpp #1138652:1138653
@@ -100,6 +100,7 @@
#include <memory>
#include "kjotslockattribute.h"
#include "localresourcecreator.h"
+#include <krandom.h>
Q_DECLARE_METATYPE(QTextDocument*)
Q_DECLARE_METATYPE(QTextCursor)
@@ -731,11 +732,12 @@
newCollection.setParentCollection( col );
QString title = i18nc( "The default name for new books.", "New Book" );
- newCollection.setName( title );
+ newCollection.setName( KRandom::randomString( 10 ) );
newCollection.setContentMimeTypes( QStringList() << \
Akonadi::Collection::mimeType() << Note::mimeType() );
Akonadi::EntityDisplayAttribute *eda = new Akonadi::EntityDisplayAttribute();
eda->setIconName( "x-office-address-book" );
+ eda->setDisplayName( title );
newCollection.addAttribute( eda );
Akonadi::CollectionCreateJob *job = new Akonadi::CollectionCreateJob( \
newCollection );
--- trunk/KDE/kdepim/kjots/localresourcecreator.cpp #1138652:1138653
@@ -190,11 +190,13 @@
Akonadi::Collection collection;
collection.setParentCollection( Akonadi::Collection(id) );
- collection.setName( i18nc( "The default name for new books.", "New Book" ) );
+ QString title = i18nc( "The default name for new books.", "New Book" );
+ collection.setName( KRandom::randomString( 10 ) );
collection.setContentMimeTypes( QStringList() << Akonadi::Collection::mimeType() \
<< Note::mimeType() );
Akonadi::EntityDisplayAttribute *eda = new Akonadi::EntityDisplayAttribute();
eda->setIconName( "x-office-address-book" );
+ eda->setDisplayName( title );
collection.addAttribute(eda);
Akonadi::CollectionCreateJob *createJob = new Akonadi::CollectionCreateJob( \
collection, this );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic