Ignore:
Timestamp:
Mar 3, 2010, 11:06:18 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

tests/widget: Extended locale test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/widget/widget.cpp

    r611 r625  
    535535int main(int argc, char **argv)
    536536{
    537 #if 1
     537#if 0
    538538    ////////////////////////////////////////////////////////////////////////////
    539539    // Text mode
     
    541541    QCoreApplication app(argc, argv);
    542542
    543 #if 1
     543#if 0
    544544    //--------------------------------------------------------------------------
    545545    // Simple QProcess test
     
    681681    app.setQuitOnLastWindowClosed(true);
    682682
    683 #if 0
     683#if 1
    684684    //--------------------------------------------------------------------------
    685685    // locale test
     
    690690    qWarning() << "";
    691691    qWarning() << "Available codecs :\n" << QTextCodec::availableCodecs();
     692    qWarning() << "";
     693    qWarning() << "System locale    :" << locale.name();
    692694    qWarning() << "";
    693695    qWarning() << "Codec for locale :" << QTextCodec::codecForLocale()->name();
     
    699701                                          << "[" << locale.language() << "]";
    700702    qWarning() << "";
     703    qWarning() << "Current date        :" << locale.toString(QDate::currentDate(), QLocale::ShortFormat);
     704    qWarning() << "Current date (long) :" << locale.toString(QDate::currentDate(), QLocale::LongFormat);
     705    qWarning() << "Current time        :" << locale.toString(QTime::currentTime(), QLocale::ShortFormat);
     706    qWarning() << "Current time (long) :" << locale.toString(QTime::currentTime(), QLocale::LongFormat);
     707    qWarning() << "Current date time   :" << locale.toString(QDateTime::currentDateTime(), QLocale::ShortFormat);
     708    qWarning() << "Current datetime (l):" << locale.toString(QDateTime::currentDateTime(), QLocale::LongFormat);
    701709
    702710    testCodec("First 3 months",
     
    778786        dlg.setFileMode(QFileDialog::ExistingFile);
    779787        //dlg.setFilter(QDir::Dirs | QDir::Files | QDir::Drives);
    780         dlg.setNameFilter("*.exe");
     788        dlg.setNameFilter("*.exe;;*");
    781789        dlg.selectFile("mplayer.exe");
    782790        dlg.exec();
Note: See TracChangeset for help on using the changeset viewer.