[KPhotoAlbum] image decoding priorities & multithreading

Henner Zeller h.zeller at acm.org
Sun Jun 29 10:01:19 BST 2008


Hi,
On Fri, Jun 27, 2008 at 6:26 PM, Jan Kundrát <jkt at gentoo.org> wrote:
> Henner Zeller wrote:
>> Re: container
>> Instead of having a new stl container (std::priority_queue) here
>> (which Jesper probably would like to avoid), can't we just use the
>> QSet (as before) that is just sorted by priority ? I just had just a
>> quick look right now, so I might be missing something.
>>
>> Re: addRequest
>> Does it suffice to change the priority and priority_queue does take
>> care of the proper sorting ? Then using std::priority_queue seems to
>> be actually the way to go ;-)
>
> Actually nope, my bad, I misunderstood what the manual said. I'll
> probably rework the patch to work with multiple "old fashioned queues".

Yeah, sounds simpler.

>
>> Re: typedef
>> I'd name the tupe QueueType or something not _queueType. From my
>> perspective, a type should be an uppercase name. Underscores should
>> only be used in member variables (however, this is only my quick take
>> not knowing the details yet of coding conventions in KPA)
>
> We use CamelCapsStartingInUppercase for type names, and usually
> _prefixedVariables as private member variables. So I should probably go
> for _QueueType :).

Yep, the type should be uppercase.
But: they should not have an underscore.

First, the 'soft' explanation: Underscores are used in instance
variable names to distinguish them from local variables/parameters of
methods (I am fine with that), but underscores in types don't really
make a difference here (how many local types in a method you usually
define ?).

The 'hard' explanation is at follows:
C standard, section 7.1.3 (Reserved identifiers)
"All identifiers that begin with an underscore and either an uppercase
letter or another underscore are always reserved for any use."

So: this naming must not be used.

cheers,
  -h



More information about the Kphotoalbum mailing list