[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    createGUI() and relative paths
From:       Jonathan Grenier <jgrenier () linuxdevelopers ! ca>
Date:       2004-07-19 7:39:11
Message-ID: B9F937BC-D956-11D8-B832-000393CDBBD8 () linuxdevelopers ! ca
[Download RAW message or body]

Hello everyone,

This is probably an easy one. I recently started developing my first 
KDE application and am using the XULUI framework to create the KActions 
for the menu and toolbars. It works great, but there's one thing that's 
been bugging me and I haven't been able to find the answer.

createUI() takes a parameter with the name of the UI file 
(appnameui.rc). Looking at the source of a few standard apps, I can see 
that they seem to be doing a simple createUI() without any parameters, 
which makes the application search for it in the standard place. The 
problem is, this doesn't work if you don't do a make install first. 
What's the best way to handle this for development ?

I'm using KDevelop on KDE 3.2.3 and so far, what I've done is that I 
have a #ifdef DEBUG that makes has the path to the rc file hardcoded. 
That would be fine I guess, but even if the doc says the path can be 
relative, I haven't been able to make it work, so I have to hardcode 
the path in the source file! I've tried to set a relative path from the 
executable, the "run" directory, etc. to no avail.

Needless to say, I have to change this :) What's the best way to handle 
this ? Or am I simply missing something obvious ?

Thank you

Jonathan
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic