[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Desperately need help with Mozilla/KDE plugin
From: Waldo Bastian <bastian () kde ! org>
Date: 2003-04-03 17:51:58
[Download RAW message or body]
On Thursday 03 April 2003 19:36, John Lange wrote:
> The code to launch the application is very straight forward:
>
> sprintf(target, "/tmp/test.txt");
> KURL url(target);
> ( void ) new KRun( url );
>
> Works fine in the stand-alone application but when I put that code into
> a mozilla plugin it causes mozilla to segfault.
KRun needs a K/QApplication in order to work, I don't think that's something
you want to do in a plugin.
The following is slightly slower but much easier since you don't need to link
against any KDE code:
system("kfmclient exec /tmp/test.txt");
Make sure you properly quote/escape the filename so that you don't run into
problems if the file happens to be named rm -rf ~
Cheers,
Waldo
--
bastian@kde.org -=|[ SuSE, The Linux Desktop Experts ]|=- bastian@suse.com
>> 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