-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Montag, 17. Mai 2004 15:14, Jean-Marc Lasgouttes wrote: > >>>>> "Maurizio" == Maurizio Monge <[EMAIL PROTECTED]> writes: > > Maurizio> Hello. I compiled lyx cvs (lyx-devel) on and amd64-pc-linux, > Maurizio> with gcc-3.4, latest binutils and qt font-end (qt-3.3.2). > > Maurizio> I get: > > Maurizio> terminate called after throwing an instance of > Maurizio> 'std::logic_error' what(): basic_string::_S_construct NULL > Maurizio> not valid Aborted > > The problem seems to be related to the use of the "sans" font family > which is unknown from qt. Could you try the attached patch which has > been send by Kornel Benko a while ago? > > Before applying this patch, though, I would like to understand why we > have those font values now, and why they do not work. Anyone has > ideas? > > JMarc
The patch I am using now without any crash is attached. The selected fonts may have some unwanted default value, but at least you are then able to select your own font with the lyx-UI. Kornel - -- Kornel Benko [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFAqU4IjEH+780+qtIRAgE6AKCLvL9LQMmT47qFK9YLgyihRGq9fgCdGdWd OhOaXcQ07gncW95MqJ3L/qE= =q8HG -----END PGP SIGNATURE-----
Index: lyx_gui.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/frontends/qt2/lyx_gui.C,v retrieving revision 1.62 diff -u -p -r1.62 lyx_gui.C --- lyx_gui.C 2004/04/03 08:37:10 1.62 +++ lyx_gui.C 2004/05/17 23:34:59 @@ -323,7 +323,7 @@ string const roman_font_name() QFont font; font.setStyleHint(QFont::Serif); font.setFamily("serif"); - return QFontInfo(font).family().latin1(); + return fromqstr(QFontInfo(font).family()); } @@ -335,7 +335,7 @@ string const sans_font_name() QFont font; font.setStyleHint(QFont::SansSerif); font.setFamily("sans"); - return QFontInfo(font).family().latin1(); + return fromqstr(QFontInfo(font).family()); } @@ -347,7 +347,7 @@ string const typewriter_font_name() QFont font; font.setStyleHint(QFont::TypeWriter); font.setFamily("monospace"); - return QFontInfo(font).family().latin1(); + return fromqstr(QFontInfo(font).family()); } }; // namespace lyx_gui Index: QPrefs.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/frontends/qt2/QPrefs.C,v retrieving revision 1.56 diff -u -p -r1.56 QPrefs.C --- QPrefs.C 2004/04/20 08:51:11 1.56 +++ QPrefs.C 2004/05/17 23:35:00 @@ -409,7 +409,7 @@ void setComboxFont(QComboBox * cb, strin 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; }