qt4/qfont_loader.h: reverted to last version and added comment about pointer reference.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13927
a592a061-630c-0410-9148-
cb99ea01b6c8
/// Get font info (font + metrics) for the given LyX font.
QLFontInfo & fontinfo(LyXFont const & f) {
+ // fi is a reference to the pointer type (QLFontInfo *) in the
+ // fontinfo_ table.
QLFontInfo * & fi =
fontinfo_[f.family()][f.series()][f.realShape()][f.size()];
if (!fi)
/// Get font info (font + metrics) for the given LyX font.
QLFontInfo & fontinfo(LyXFont const & f) {
- QLFontInfo * fi =
+ // fi is a reference to the pointer type (QLFontInfo *) in the
+ // fontinfo_ table.
+ QLFontInfo * & fi =
fontinfo_[f.family()][f.series()][f.realShape()][f.size()];
- if (!fi) {
+ if (!fi)
fi = new QLFontInfo(f);
- fontinfo_[f.family()][f.series()][f.realShape()][f.size()]
- = fi;
- }
return *fi;
}