mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-14 01:22:33 +00:00
Fix display of release date with Qt 4.2.
In Qt 4.2, QLocale::toString(QDate, ...) returns an invalid but not empty date when QDate is invalid. So, check whether QDate is valid before conversion. (status.16x is already updated) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@28864 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3168d1e82f
commit
fb47d709ee
@ -94,10 +94,12 @@ static QString disclaimer()
|
||||
|
||||
static QString version()
|
||||
{
|
||||
QString loc_release_date;
|
||||
QDate date = release_date();
|
||||
if (date.isValid()) {
|
||||
QLocale loc;
|
||||
QString loc_release_date =
|
||||
loc.toString(release_date(), QLocale::LongFormat);
|
||||
if (loc_release_date.isEmpty()) {
|
||||
loc_release_date = loc.toString(date, QLocale::LongFormat);
|
||||
} else {
|
||||
if (QString(lyx_release_date) == "not released yet")
|
||||
loc_release_date = qt_("not released yet");
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user