diff -r 41300fa6a67c -r 3b1da2848fc7 tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp --- a/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp Tue Feb 02 00:43:10 2010 +0200 +++ b/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp Fri Feb 19 23:40:16 2010 +0200 @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** @@ -47,6 +47,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE @@ -208,6 +209,26 @@ .arg(f.pointSize()); } +QString QtPropertyBrowserUtils::dateFormat() +{ + QLocale loc; + return loc.dateFormat(QLocale::ShortFormat); +} + +QString QtPropertyBrowserUtils::timeFormat() +{ + QLocale loc; + // ShortFormat is missing seconds on UNIX. + return loc.timeFormat(QLocale::LongFormat); +} + +QString QtPropertyBrowserUtils::dateTimeFormat() +{ + QString format = dateFormat(); + format += QLatin1Char(' '); + format += timeFormat(); + return format; +} QtBoolEdit::QtBoolEdit(QWidget *parent) : QWidget(parent),