Re: Highlighting and spellchecking

2012-08-16 Thread laurent Montel
Le jeudi 16 août 2012 02:09:11 Aleix Pol a écrit :
> Hi KDE Devels!
> In KDevelop we have a QTextEdit that is used to fill the commit
> message, before committing. This QTextEdit has syntax highlighting for
> git, so that you'll get some error notifications in case you fill the
> second line or you exceed the maximum line length.
> 
> One of the things I added to my to-do list is to add spell-checking
> there. The problem is that I planned to use KTextEdit with
> spell-checking on but that wouldn't work, if I setCheckSpelling(true)
> then the highlighter won't work.
> 
> Now here's the question: is this a bug? Am I expected to create a
> highlighter that will care both about spell-checking and the syntax
> highlighting? Is there any similar use case I could get inspired to?

kmail.
Look at :
kdepimlibs/kpimtextedit/emailquotehighlighter.cpp

We have in kmail editor spell checking + hightlighting (quote)

Regards

> Thanks in advance!!
> Aleix
> 
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe
> >> <<
-- 
Laurent Montel | laurent.mon...@kdab.com | KDE/Qt Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: Call for Projects: University Collaboration in Toulouse

2012-08-16 Thread Kevin Ottens
Hello,

As a reminder: I need to close the list of projects real soon now. If you did
send me your proposal yet please do so NOW!

I'm especially looking at the ones who told me in private they wanted to
participate but sent nothing. You know who you are. ;-)
Of course if you didn't contact me yet, you still can send me a proposal, I'll
gladly add it to the list.

Regards.

On Tuesday 07 August 2012 19:08:18 Kevin Ottens wrote:
> Hello all,
>
> I have very good news, if everything goes well, I will have the opportunity
> to setup student projects at the University in collaboration with KDE
> again! We had a one year hiatus, and I have to admit I miss those projects
> dearly, so it'd be nice to resume the effort... I'd quite some work ahead
> as its a reboot and not much of my previous efforts is left.
>
> Anyway, if you are part of a KDE team, and you'd like to get some help from
> a small team of students (not more than four or five) for a few months,
> here is your chance! The requirements on your side if you volunteer are the
> following: * Two mentors from your team (one will kind of play the customer
> to the students, the other one more on the technical mentoring side);
>  * A list of features the students would have to work on (not more than a
> dozen, not less than five).
>
> If you are interested, please contact me in private with the info mentionned
> above (mentors + feature list with some details). Don't wait! I'll finalize
> the list of chosen projects end of next week (and then push it to the
> university), and I might have a few questions for you before picking your
> proposal or not.
>
> Regards.
--
Kévin Ottens, http://ervin.ipsquad.net

KDAB - proud patron of KDE, http://www.kdab.com


signature.asc
Description: This is a digitally signed message part.

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: Call for Projects: University Collaboration in Toulouse

2012-08-16 Thread Torsten Rahn

Hello,

On Donnerstag, 16. August 2012 12:12:12 Kevin Ottens wrote:
> Hello,
> 
> As a reminder: I need to close the list of projects real soon now. If you
> did send me your proposal yet please do so NOW!

On behalf of the Marble Team I'd like to express our highest interest in 
participation! 

The two mentors we'd provide are Dennis and me.

We have a very interesting topic going on that has a lot to offer for students 
with different aspects of interest and varying capabilities:

"OpenStreetMap Vector Rendering"

We had Ander successfully working on a prototype and first implementation 
related to this topic during GSoC 2012: 

You can read all about it in his blog:

http://blogs.deusto.es/gsoc-deustotech/

But there's still a lot of work left with different aspects/features that 
could be done either isolated on a per-student basis or by the full team.

Our OpenStreetMap Vector Rendering Feature Topics include:

- Street Label placement for Marble OpenStreetMap vector rendering (very 
important aspect and has lots of render-, algorithm-, optimization- and 
usability-issues involved that one could work on): Currently Marble doesn't 
render street names in .OSM vector rendering. Of course street names should 
always be rendered in a visible place along the streets and shouldn't overlap 
- oh and they should always render quickly. 

- Development of a dedicated file format for storing OpenStreetMap vector 
tiles. Right now we are using some JS-based file format. See e.g. 
http://blogs.deusto.es/gsoc-deustotech/first-vector-tiles-rendering/ 

- Related to the former topic: Setting up a vector tile server and setting up 
/ developing the software for it for Marble 

- PBF File Format support for Marble. This would be the efficient binary 
incarnation of the .OSM file format .

- Improvements to our vector rendering pipeline ("GeoGraphicsView"). This is 
more an architecture-refactoring and optimization topic
  
- Vector Map Styling support: Improvement of the current styling mechanism for 
streets and points of interests + possible evaluation of usage of mapcss + its 
implementation in Marble


Of course other topics for Marble work are welcome as well. Possible 
alternatives could cover Space + Astronomy, Historic Maps, Routing, 
GeoCaching, Natural Earth vector tile rendering (topographic map), Time & 
Animation KML enhancements, etc.
But we are also interested in other subjects students could come up with.


You can get in touch with us here:

http://edu.kde.org/marble/support.php

Compiling Marble is easy: 

http://edu.kde.org/marble/obtain.php

and the same applies for getting started with Marble development:

http://techbase.kde.org/Projects/Marble/MarbleCPlusPlus


Best Regards,
Torsten
 



 
> I'm especially looking at the ones who told me in private they wanted to
> participate but sent nothing. You know who you are. ;-)
> Of course if you didn't contact me yet, you still can send me a proposal,
> I'll gladly add it to the list.
> 
> Regards.
> 
> On Tuesday 07 August 2012 19:08:18 Kevin Ottens wrote:
> > Hello all,
> > 
> > I have very good news, if everything goes well, I will have the
> > opportunity to setup student projects at the University in collaboration
> > with KDE again! We had a one year hiatus, and I have to admit I miss
> > those projects dearly, so it'd be nice to resume the effort... I'd quite
> > some work ahead as its a reboot and not much of my previous efforts is
> > left.
> > 
> > Anyway, if you are part of a KDE team, and you'd like to get some help
> > from a small team of students (not more than four or five) for a few
> > months, here is your chance! The requirements on your side if you
> > volunteer are the following: * Two mentors from your team (one will kind
> > of play the customer to the students, the other one more on the
> > technical mentoring side);
> > 
> >  * A list of features the students would have to work on (not more than a
> > 
> > dozen, not less than five).
> > 
> > If you are interested, please contact me in private with the info
> > mentionned above (mentors + feature list with some details). Don't wait!
> > I'll finalize the list of chosen projects end of next week (and then
> > push it to the university), and I might have a few questions for you
> > before picking your proposal or not.
> > 
> > Regards.

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


How to construct the DBus identifier for current app?

2012-08-16 Thread Milian Wolff
Hey there,

see for context: http://git.reviewboard.kde.org/r/105917/#review17551

tl;dr; I need to construct the DBus identifier of the currently running app, 
e.g. "org.kdevelop.kdevelop-$pid" - from inside a library.

I found KAboutData, which could be obtained via KCmdLineArgs::aboutData(). 
There, I have organizationDomain() and appName(), which I could concatenate to 
the DBUS identifier like:

id = "%1.%2-%3".arg(orgDomain, appName, pid)

Does that sound OK or is there a better, more direct approach, to find the 
DBus identifier for the currently running app?

Cheers
-- 
Milian Wolff
m...@milianw.de
http://milianw.de

signature.asc
Description: This is a digitally signed message part.

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: How to construct the DBus identifier for current app?

2012-08-16 Thread Kevin Krammer
On Thursday, 2012-08-16, Milian Wolff wrote:
> Hey there,
> 
> see for context: http://git.reviewboard.kde.org/r/105917/#review17551
> 
> tl;dr; I need to construct the DBus identifier of the currently running
> app, e.g. "org.kdevelop.kdevelop-$pid" - from inside a library.
> 
> I found KAboutData, which could be obtained via KCmdLineArgs::aboutData().
> There, I have organizationDomain() and appName(), which I could concatenate
> to the DBUS identifier like:
> 
> id = "%1.%2-%3".arg(orgDomain, appName, pid)
> 
> Does that sound OK or is there a better, more direct approach, to find the
> DBus identifier for the currently running app?

A D-Bus connection, which means also the Default connection to the session 
bus, can have any number of "nice" names (it will always have a unique name, 
e.g. :1.90).

What do you want to achieve, i.e. what do you need that KDE application name 
for?

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring


signature.asc
Description: This is a digitally signed message part.

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Application specific cache

2012-08-16 Thread Milian Wolff
Hey there,

where should an app store it's cache data? I see that KStandardDirs notes 
"cache", but how would one actually use that?

I.e. if I want to write a file to the app's cache dir, I need a path to said 
dir. ::findDirs would not return anything for these tests:

  qDebug() << KGlobal::dirs()->findDirs("cache", "kdevelop");
  qDebug() << KGlobal::dirs()->findDirs("cache", "kdevelop/foo/bar");
  qDebug() << KGlobal::dirs()->findDirs("data", "kdevelop/foo/bar");

Apparently, only existing directories are returned (if I create e.g. 
~/.kde/cache-$host/kdevelop the first call will return the path to that 
folder).

So how do I figure out the recommended path for cache data? Should I use 
KStandardDirs::resourceDirs("cache") and pick the first item in the returned 
list? Could more than one directory be returned?

Thanks
-- 
Milian Wolff
m...@milianw.de
http://milianw.de

signature.asc
Description: This is a digitally signed message part.

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: Application specific cache

2012-08-16 Thread Kevin Krammer
On Thursday, 2012-08-16, Milian Wolff wrote:
> Hey there,
> 
> where should an app store it's cache data? I see that KStandardDirs notes
> "cache", but how would one actually use that?
> 
> I.e. if I want to write a file to the app's cache dir, I need a path to
> said dir. ::findDirs would not return anything for these tests:
> 
>   qDebug() << KGlobal::dirs()->findDirs("cache", "kdevelop");
>   qDebug() << KGlobal::dirs()->findDirs("cache", "kdevelop/foo/bar");
>   qDebug() << KGlobal::dirs()->findDirs("data", "kdevelop/foo/bar");
> 
> Apparently, only existing directories are returned (if I create e.g.
> ~/.kde/cache-$host/kdevelop the first call will return the path to that
> folder).
> 
> So how do I figure out the recommended path for cache data? Should I use
> KStandardDirs::resourceDirs("cache") and pick the first item in the
> returned list? Could more than one directory be returned?

Try KStandardDirs::saveLocation()

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring


signature.asc
Description: This is a digitally signed message part.

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: How to construct the DBus identifier for current app?

2012-08-16 Thread Milian Wolff
On Thursday 16 August 2012 23:12:16 Kevin Krammer wrote:
> On Thursday, 2012-08-16, Milian Wolff wrote:
> > Hey there,
> > 
> > see for context: http://git.reviewboard.kde.org/r/105917/#review17551
> > 
> > tl;dr; I need to construct the DBus identifier of the currently running
> > app, e.g. "org.kdevelop.kdevelop-$pid" - from inside a library.
> > 
> > I found KAboutData, which could be obtained via KCmdLineArgs::aboutData().
> > There, I have organizationDomain() and appName(), which I could
> > concatenate
> > to the DBUS identifier like:
> > 
> > id = "%1.%2-%3".arg(orgDomain, appName, pid)
> > 
> > Does that sound OK or is there a better, more direct approach, to find the
> > DBus identifier for the currently running app?
> 
> A D-Bus connection, which means also the Default connection to the session
> bus, can have any number of "nice" names (it will always have a unique name,
> e.g. :1.90).
> 
> What do you want to achieve, i.e. what do you need that KDE application name
> for?

See the reviewboard code for an example. In KDevelop we have sessions, which 
can only be opened in one kdevelop instance. If the user opens an existing 
session, we thus first have to make sure that no other KDevelop instance is 
currently opened for that session.

That is achieved via a KLockFile. Now, that is not optimal, if KDevelop 
crashes, the power dies, or something similar, the lock file will stick 
around. Now when you restart KDevelop, it could happen that another app was 
created with the $pid stored in the lock file.

To gracefully handle this case, we query the kdevelop instance for that pid 
via DBUS. If the DBUS call doesn't work, we can quite safely assume that the 
lock file is stale and offer the user a way to remove the stale lock file.

If the DBUS call works we can bring the existing KDevelop instance to focus 
and cancel the opening of another instance for that session.

Now, the above is nice and shiny, but only works as long as the DBUS-query 
lives in kdevelop. Now we want to make it resuable by putting it into 
kdevplatform, but there I can no longer hard code the DBUS path to e.g. 
org.kdevelop.kdevelop. This could also be quanta, or anything else.

Note: Sessions are not shared between different kdevplatform users, so it 
would be OK to just build the query based on the current app's KAboutData as 
explained in my first email. I merely wanted to ask whether that sounds OK or 
whether there is a better, more direct getter for the DBUS name of the 
currently running application (minus pid).

Cheers
-- 
Milian Wolff
m...@milianw.de
http://milianw.de

signature.asc
Description: This is a digitally signed message part.

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: How to construct the DBus identifier for current app?

2012-08-16 Thread Thiago Macieira
On quinta-feira, 16 de agosto de 2012 23.57.08, Milian Wolff wrote:
> Note: Sessions are not shared between different kdevplatform users, so it
> would be OK to just build the query based on the current app's KAboutData as
> explained in my first email. I merely wanted to ask whether that sounds OK
> or whether there is a better, more direct getter for the DBUS name of the
> currently running application (minus pid).

Store the connection's unique name. Those are never reused.-
-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
  PGP/GPG: 0x6EF45358; fingerprint:
  E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358


signature.asc
Description: This is a digitally signed message part.

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: How to construct the DBus identifier for current app?

2012-08-16 Thread Kevin Krammer
On Thursday, 2012-08-16, Milian Wolff wrote:
> On Thursday 16 August 2012 23:12:16 Kevin Krammer wrote:
> > On Thursday, 2012-08-16, Milian Wolff wrote:
> > > Hey there,
> > > 
> > > see for context: http://git.reviewboard.kde.org/r/105917/#review17551
> > > 
> > > tl;dr; I need to construct the DBus identifier of the currently running
> > > app, e.g. "org.kdevelop.kdevelop-$pid" - from inside a library.
> > > 
> > > I found KAboutData, which could be obtained via
> > > KCmdLineArgs::aboutData(). There, I have organizationDomain() and
> > > appName(), which I could concatenate
> > > to the DBUS identifier like:
> > > 
> > > id = "%1.%2-%3".arg(orgDomain, appName, pid)
> > > 
> > > Does that sound OK or is there a better, more direct approach, to find
> > > the DBus identifier for the currently running app?
> > 
> > A D-Bus connection, which means also the Default connection to the
> > session bus, can have any number of "nice" names (it will always have a
> > unique name, e.g. :1.90).
> > 
> > What do you want to achieve, i.e. what do you need that KDE application
> > name for?
> 
> See the reviewboard code for an example. In KDevelop we have sessions,
> which can only be opened in one kdevelop instance. If the user opens an
> existing session, we thus first have to make sure that no other KDevelop
> instance is currently opened for that session.
> 
> That is achieved via a KLockFile. Now, that is not optimal, if KDevelop
> crashes, the power dies, or something similar, the lock file will stick
> around. Now when you restart KDevelop, it could happen that another app was
> created with the $pid stored in the lock file.
> 
> To gracefully handle this case, we query the kdevelop instance for that pid
> via DBUS. If the DBUS call doesn't work, we can quite safely assume that
> the lock file is stale and offer the user a way to remove the stale lock
> file.
> 
> If the DBUS call works we can bring the existing KDevelop instance to focus
> and cancel the opening of another instance for that session.

You could consider using a D-Bus "lock" instead of a lock file.

Basically when opening a session you register a D-Bus name which includes the 
session identifier.
Only one process can have that name registered and the registration is undone 
no matter how the process exits.

The name can also be used to send the other KDevelop instance the request to 
regain focus.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring


signature.asc
Description: This is a digitally signed message part.

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<