tests/auto/qtextstream/tst_qtextstream.cpp
changeset 18 2f34d5167611
parent 0 1918ee327afb
child 30 5dc02b23752f
equal deleted inserted replaced
3:41300fa6a67c 18:2f34d5167611
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the test suite of the Qt Toolkit.
     7 ** This file is part of the test suite of the Qt Toolkit.
     8 **
     8 **
  4306 }
  4306 }
  4307 
  4307 
  4308 // ------------------------------------------------------------------------------
  4308 // ------------------------------------------------------------------------------
  4309 
  4309 
  4310 // like QTEST_APPLESS_MAIN, but initialising the locale on Unix
  4310 // like QTEST_APPLESS_MAIN, but initialising the locale on Unix
       
  4311 #if defined (Q_OS_UNIX) && !defined (Q_OS_SYMBIAN)
       
  4312 QT_BEGIN_NAMESPACE
       
  4313 extern bool qt_locale_initialized;
       
  4314 QT_END_NAMESPACE
       
  4315 #endif
       
  4316 
  4311 int main(int argc, char *argv[])
  4317 int main(int argc, char *argv[])
  4312 {
  4318 {
  4313 #if defined (Q_OS_UNIX) && !defined (Q_OS_SYMBIAN)
  4319 #if defined (Q_OS_UNIX) && !defined (Q_OS_SYMBIAN)
  4314     extern bool qt_locale_initialized;
       
  4315     ::setlocale(LC_ALL, "");
  4320     ::setlocale(LC_ALL, "");
  4316     qt_locale_initialized = true;
  4321     qt_locale_initialized = true;
  4317 #endif
  4322 #endif
  4318     tst_QTextStream tc;
  4323     tst_QTextStream tc;
  4319     return QTest::qExec(&tc, argc, argv);
  4324     return QTest::qExec(&tc, argc, argv);