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

List:       kde-commits
Subject:    Re: kdegraphics/kpdf/kpdf [POSSIBLY UNSAFE]
From:       Albert Astals Cid <tsdgeos () terra ! es>
Date:       2004-09-14 17:31:22
Message-ID: 200409141931.22461.tsdgeos () terra ! es
[Download RAW message or body]

A Dimarts 14 Setembre 2004 13:35, vàreu escriure:
> On Tuesday 14 September 2004 00:20, Albert Astals Cid wrote:
> > CVS commit by aacid:
> >
> > Commiting first work on getting links to work.
> > ATM only links to web pages are tested, i would like to get pdf with some
> > weird links like the one that quits the app viewing it, or links to
> > external files, etc so i can test them.
> >
> >   M +26 -25    kpdf_pagewidget.cc   1.38
> >   M +240 -70   kpdf_part.cpp   1.78 [POSSIBLY UNSAFE: system]
> >   M +2 -2      kpdf_part.h   1.35
>
> I have strong doubts about this system() call in there. Can you elaborate
> on what it is supposed to do? 
There are links in pdf that contain a command and some parameters (i have no 
pdf with that, but is what i get from reading the xpdf code), in case the 
user agrees to execute the command + parameters i execute them using system 
(again is what xpdf does)

> If this is just about launching external links, can't you use KRun for 
those? Make sure to call KRun::setRunExecutables(false) in that case.

Web pages are launched using 

ptr = KServiceTypeProfile::preferredService("text/html", "Application");
lst.append(THE_URL);
KRun::run(*ptr, lst);

Other kind of links to files (.avi for example) are not yet handled but i plan 
to use KRun on them too, but if the link is specifically a command + 
parameters i don't think using system (after asking the user if he wants to 
execute it) is bad.

Albert

>
> Cheers,
> Waldo

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

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