KProcess Nice level

Oswald Buddenhagen ossi at kde.org
Tue May 27 13:51:17 BST 2003


On Tue, May 27, 2003 at 02:31:00PM +0200, Harri Porten wrote:
> On Tue, 27 May 2003, Oswald Buddenhagen wrote:
> 
> > the Prio* constant name prefix is somewhat ominous, but "Priority" is
> > too long for my taste, and if i put it in a namespace to get names like
> > Priority::High as luis suggested, we once more risk name clashes because
> > some bonehead #defined High or something like that.
> 
> Given that setPriority() accepts all (valid) integer values instead of the
> enum type I don't see what benefit the enum has. IMO, either have
> setPriority(Priority p) or setPriority(int p) without any enum.
> 
that's my thinking, too, but to quote two mails from the thread on
kde-devel:

On Fri, May 23, 2003 at 08:41:14PM +0200, Luis Pedro Coelho wrote:
> Add a couple of priority constants as well (Priority::High,
> Priority::Normal, Priority::Low, Priority::VeryLow) since the standard
> 19 to -19 (or is it 20 to -19, or whatever) is not really friendly -
> there should be a way to specify the exact posix style value, of
> course.

On Tue, May 27, 2003 at 05:23:26AM +0200, Luis Pedro Coelho wrote:
> and I still think that it is a good solution. Unix-style values are a
> really bad interface, IMHO, especially if you use them in a magic
> number style. Why not just add an enum with the most important values?


greetings

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.




More information about the kde-core-devel mailing list