Changeset 209 for tests


Ignore:
Timestamp:
Oct 6, 2009, 6:13:43 PM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

tests: Play Qt rules in order to get separate output directories for object files (needed after discarding r200).

Location:
tests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • tests/common.pri

    r205 r209  
    11isEmpty(DEPTH):DEPTH = .
    2 os2:OBJECTS_DIR = $$DEPTH/obj/os2
    3 win32:OBJECTS_DIR = $$DEPTH/obj/win
    4 x11:OBJECTS_DIR = $$DEPTH/obj/x11
    52
     3os2:PLATFORM        = os2
     4else:win32:PLATFORM = win
     5else:x11:PLATFORM   = x11
     6else:PLATFORM       = unk
     7
     8# in debug_and_release, we need a -debug or -release suffix to get separate
     9# output paths (it will be replaced with the correct one at runtime)
     10debug_and_release:OUTPATH_SUFFIX = -debug
     11else:OUTPATH_SUFFIX =
     12
     13OBJECTS_DIR = $$DEPTH/obj/$${PLATFORM}$${OUTPATH_SUFFIX}
    614MOC_DIR = $$OBJECTS_DIR
    715DESTDIR = $$OBJECTS_DIR
    816
     17# target.path isn't there by default
    918QMAKE_DIR_REPLACE = OBJECTS_DIR MOC_DIR RCC_DIR target.path
    1019
    11 #release {
    12 #    os2:target.path = $$DEPTH/bin/os2-release
    13 #    win32:target.path = $$DEPTH/bin/os2-release
    14 #    x11:target.path = $$DEPTH/bin/os2-release
    15 
    16 os2:target.path = $$DEPTH/bin/os2
    17 win32:target.path = $$DEPTH/bin/win
    18 x11:target.path = $$DEPTH/bin/x11
    19 
     20target.path = $$DEPTH/bin/$${PLATFORM}$${OUTPATH_SUFFIX}
    2021INSTALLS += target
  • tests/process/process

    • Property svn:ignore
      •  

        old new  
        11Makefile
        22Makefile.*
         3vc*.pdb
  • tests/process/process/process.cpp

    r205 r209  
    2121public:
    2222
    23     MyWidget(QWidget *aParent) : QWidget(aParent)
     23    MyWidget(QWidget *aParent)
     24        : QWidget(aParent), mOtherProcess(0), mRedirectedToOtherProcess(false)
    2425    {
    2526        // children
     
    7475    }
    7576
     77    QProcess *process() const { return mProcess; }
     78    void setOtherProcess(QProcess *aOtherProcess) { mOtherProcess = aOtherProcess; }
     79
    7680private slots:
    7781
     
    200204                return;
    201205            }
     206
     207            if (!mRedirectedToOtherProcess)
     208            {
     209                mRedirectedToOtherProcess = true;
     210                mProcess->setStandardOutputProcess(mOtherProcess);
     211                mEditor->append(tr("> Redirected standard output to standard "
     212                                   "input of another process"));
     213            }
     214            else
     215            {
     216                mRedirectedToOtherProcess = false;
     217                mProcess->setStandardErrorFile(QString::null);
     218                mEditor->append(tr("> Canceled redirection of standard output"));
     219            }
    202220        }
    203221        else
     
    266284
    267285    QProcess *mProcess;
     286    QProcess *mOtherProcess;
     287    bool mRedirectedToOtherProcess;
     288
    268289    QTextEdit *mEditor;
    269290    QLineEdit *mLineEdit;
     
    284305
    285306        QTabWidget *tabs = new QTabWidget();
    286         tabs->addTab(new MyWidget(tabs), QLatin1String("Process 1"));
    287         tabs->addTab(new MyWidget(tabs), QLatin1String("Process 2"));
     307
     308        mWidget1 = new MyWidget(tabs);
     309        mWidget2 = new MyWidget(tabs);
     310
     311        mWidget1->setOtherProcess(mWidget2->process());
     312        mWidget2->setOtherProcess(mWidget1->process());
     313
     314        tabs->addTab(mWidget1, QLatin1String("Process 1"));
     315        tabs->addTab(mWidget2, QLatin1String("Process 2"));
    288316
    289317        // connections
     
    302330        // other
    303331    }
     332
     333private:
     334
     335    MyWidget *mWidget1;
     336    MyWidget *mWidget2;
    304337};
    305338
  • tests/process/test

    • Property svn:ignore
      •  

        old new  
        11Makefile
        22Makefile.*
         3vc*.pdb
Note: See TracChangeset for help on using the changeset viewer.