KBibTeX in KDE Review

Albert Astals Cid aacid at kde.org
Tue Apr 8 23:59:38 BST 2014


El Dimarts, 8 d'abril de 2014, a les 20:48:25, Thomas Fischer va escriure:
> Hello Albert,
> 
> On 04/07/2014 11:55 PM, Albert Astals Cid wrote:
> > El Dimecres, 26 de març de 2014, a les 19:37:02, Thomas Fischer va 
escriure:
> >> Hello,
> >> 
> >> KBibTeX is a BibTeX editor to edit bibliographies used with LaTeX.
> >> 
> >> [ text cut ]
> > 
> > You don't need the extract-messages.sh file do you?
> 
> It was used when .po files were still managed inside the source
> code. I guess now that translations are managed centrally, it is no
> longer necessary. File removed as of commit 2487a34.
> 
> > Stuff like
> > ./src/io/config/bibtexfields.h:47:        foreach(const QString & key,
> > other.width.keys()) width.insert(key, other.width[key]);
> > Is ultra slow. I guess other.width is not a huge map?
> 
> According to Qt4's documentation, an insert into a QMap takes O(log
> n), so it is not really that bad (or do I miss something?). It is
> safe to assume that n<100.
> Anyway, it turns out this constructor is no longer called, so I
> removed it as of revision 88538fe.

Oh, it's not the insertion that is long, it's iterating over the keys and then 
consuntling th value of the map, which basically makes it nlogn instead of 
just n of a proper iteration.

> > Any reason you're using noMerge="1" in some of the menus of your ui.rc
> > files? Using noMerge is usually "a bad idea" since it means your menus
> > will be a bit different from the standard.
> 
> It looks like it stems all the way back to the KParts tutorial:
> http://techbase.kde.org/Development/Tutorials/Using_KParts
> I can fix all  noMerge="1"  to  noMerge="0", but is it explained
> somewhere why it is so bad? Given that it is used in the tutorial
> examples ...

Basically by specifiying noMerge (you should basically not have it). You are 
saying "I don't want to follow the standard orders of menus defined by KDE, 
i'll define my own".

Which is usually not what you want.

Cheers,
  Albert

> 
> Bye,
> Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20140409/dd8585c6/attachment.sig>


More information about the kde-core-devel mailing list