mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
patch from Kornel: fix qt font names
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8883 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cfed2612eb
commit
943d71e5aa
@ -1,3 +1,12 @@
|
||||
2004-08-12 Kornel Benko <kornel.benko@berlin.de>
|
||||
|
||||
* QPrefs.C (setComboxFont): Use fromqstr() instead of latin1() for
|
||||
font name comparison since latin1() can return NULL
|
||||
* lyx_gui.C (roman_font_name): convert return value with fromqstr()
|
||||
instead of latin1() since latin1() can return NULL
|
||||
(sans_font_name): ditto
|
||||
(typewriter_font_name): ditto
|
||||
|
||||
2004-08-09 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* FileDialog.C: #define USE_NATIVE_FILEDIALOG under LyX/Mac
|
||||
|
@ -418,7 +418,7 @@ void setComboxFont(QComboBox * cb, string const & family, string const & foundry
|
||||
|
||||
for (int i = 0; i < cb->count(); ++i) {
|
||||
lyxerr << "Looking at " << fromqstr(cb->text(i)) << endl;
|
||||
if (compare_no_case(cb->text(i).latin1(), info.family().latin1()) == 0) {
|
||||
if (compare_no_case(fromqstr(cb->text(i)), fromqstr(info.family())) == 0) {
|
||||
cb->setCurrentItem(i);
|
||||
return;
|
||||
}
|
||||
|
@ -328,8 +328,7 @@ string const roman_font_name()
|
||||
font.setStyleHint(QFont::Serif);
|
||||
font.setFamily("serif");
|
||||
|
||||
QString name = QFontInfo(font).family().latin1();
|
||||
return name;
|
||||
return fromqstr(QFontInfo(font).family());
|
||||
}
|
||||
|
||||
|
||||
@ -342,8 +341,7 @@ string const sans_font_name()
|
||||
font.setStyleHint(QFont::SansSerif);
|
||||
font.setFamily("sans");
|
||||
|
||||
QString name = QFontInfo(font).family().latin1();
|
||||
return name;
|
||||
return fromqstr(QFontInfo(font).family());
|
||||
}
|
||||
|
||||
|
||||
@ -356,8 +354,7 @@ string const typewriter_font_name()
|
||||
font.setStyleHint(QFont::TypeWriter);
|
||||
font.setFamily("monospace");
|
||||
|
||||
QString name = QFontInfo(font).family().latin1();
|
||||
return name;
|
||||
return fromqstr(QFontInfo(font).family());
|
||||
}
|
||||
|
||||
}; // namespace lyx_gui
|
||||
|
Loading…
Reference in New Issue
Block a user