mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-22 16:37:28 +00:00
Prevent invocation of std::string(0);
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9391 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5dc46fafb1
commit
3dd565beae
@ -1,3 +1,8 @@
|
||||
2004-12-16 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* qt_helpers.C (fromqstr): Don't use std::string(0) to construct
|
||||
a string. Bad things will happen.
|
||||
|
||||
2004-12-14 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* qgridview.h (class QGridView): remove invalid Q_EXPORT declaration
|
||||
|
@ -142,10 +142,9 @@ QString const qt_(string const & str)
|
||||
|
||||
string const fromqstr(QString const & str)
|
||||
{
|
||||
QTextCodec * codec = QTextCodec::codecForLocale();
|
||||
QCString tmpstr = codec->fromUnicode(str);
|
||||
char const * tmpcstr = tmpstr;
|
||||
return tmpcstr;
|
||||
QTextCodec const * const codec = QTextCodec::codecForLocale();
|
||||
QCString const tmpstr = codec->fromUnicode(str);
|
||||
return tmpstr.isEmpty() ? string() : string(tmpstr);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user