From 23d7d60971b8428429f120cbf77f3fcf70304b67 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Mon, 22 Apr 2002 03:47:54 +0000 Subject: Mon Apr 22 00:05:41 2002 Owen Taylor * tests/*: Expand the tests to tests recursively nested embedders. --- xembed/tests/qt-common.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 xembed/tests/qt-common.cpp (limited to 'xembed/tests/qt-common.cpp') diff --git a/xembed/tests/qt-common.cpp b/xembed/tests/qt-common.cpp new file mode 100644 index 0000000..9021d7e --- /dev/null +++ b/xembed/tests/qt-common.cpp @@ -0,0 +1,30 @@ +#include "qt-common.h" + +#include + +XEmbedQtChildSite::XEmbedQtChildSite (QWidget *parent, bool active, bool isQt) + : QXEmbed (parent) +{ + show (); + + QProcess *proc = new QProcess (this); + + proc->setCommunication (QProcess::Stdout); + + if (isQt) + proc->addArgument ("./qt-client"); + else + proc->addArgument ("./gtk-client"); + + if (active) + proc->addArgument (QString::number (winId ())); + + proc->start (); + + if (!active) + { + QString pid_str = proc->readLineStdout (); + embed (pid_str.toLong ()); + } +} + -- cgit v1.2.3-70-g09d2