Timestamp:
Aug 11, 2011, 11:00:15 PM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

tests: Add testing sync process access on a GUI thread.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/process/process-sync/process-sync.cpp

    r925 r970  
    88#include <QFile>
    99#include <QProcess>
     10
    1011
    1112int test_write(const QString &aFile)
     
    3132            {
    3233                //QByteArray ba = f.read (2048);
    33                 QByteArray ba = f.read (32768);
     34                //QByteArray ba = f.read (32768);
     35                QByteArray ba = f.read (65536);
    3436
    3537                p.write (ba);
     
    8082        if (p.waitForStarted())
    8183        {
    82             while (p.waitForReadyRead())
     84            while (p.waitForReadyRead())
    8385            {
    8486                QByteArray ba = p.read (p.bytesAvailable());
     
    210212int main( int argc, char *argv[] )
    211213{
    212     if (argc == 3)
    213     {
     214    if (argc >= 3)
     215    {
     216        QScopedPointer <QApplication> app;
     217        if (argc == 4 && qstrcmp (argv [3], "gui") == 0)
     218            app.reset (new QApplication (argc, argv));
     219         
    214220        if (qstrcmp (argv [1], "read_out") == 0)
    215221            return test_read (QLatin1String (argv [2]), false);
Note: See TracChangeset for help on using the changeset viewer.