diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-04-22 03:47:54 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@redhat.com> | 2002-04-22 03:47:54 +0000 |
commit | 23d7d60971b8428429f120cbf77f3fcf70304b67 (patch) | |
tree | fbe23e0aca7302112bfbd30a1c0dedde29396c65 /xembed/tests/qt-embedder.cpp | |
parent | 7bcfe52e21363072766a7ab428a9ab3e8552f6ff (diff) | |
download | xdg-specs-23d7d60971b8428429f120cbf77f3fcf70304b67.tar.xz |
Mon Apr 22 00:05:41 2002 Owen Taylor <otaylor@redhat.com>
* tests/*: Expand the tests to tests recursively
nested embedders.
Diffstat (limited to 'xembed/tests/qt-embedder.cpp')
-rw-r--r-- | xembed/tests/qt-embedder.cpp | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/xembed/tests/qt-embedder.cpp b/xembed/tests/qt-embedder.cpp index 66cd84b..e004204 100644 --- a/xembed/tests/qt-embedder.cpp +++ b/xembed/tests/qt-embedder.cpp @@ -2,12 +2,10 @@ #include <qmenubar.h> #include <qmessagebox.h> #include <qpopupmenu.h> -#include <qprocess.h> #include <qpushbutton.h> #include <qvbox.h> -#include <qxembed.h> - +#include "qt-common.h" #include "qt-embedder.h" XEmbedQtEmbedder::XEmbedQtEmbedder () @@ -41,34 +39,12 @@ XEmbedQtEmbedder::XEmbedQtEmbedder () QObject::connect (button, SIGNAL(clicked()), this, SLOT(removeChild())); } - void XEmbedQtEmbedder::addChild (bool active, bool isQt) { - QXEmbed *embedder = new QXEmbed (vbox_); - embedder->show (); - - embedders_.append (embedder); - - QProcess *proc = new QProcess (this); - - proc->setCommunication (QProcess::Stdout); - - if (isQt) - proc->addArgument ("./qt-client"); - else - proc->addArgument ("./gtk-client"); + XEmbedQtChildSite *site = new XEmbedQtChildSite (vbox_, active, isQt); - if (!active) - proc->addArgument (QString::number (embedder->winId ())); - - proc->start (); - - if (active) - { - QString pid_str = proc->readLineStdout (); - embedder->embed (pid_str.toLong ()); - } + embedders_.append (site); } void @@ -80,7 +56,7 @@ XEmbedQtEmbedder::addActiveGtkChild () void XEmbedQtEmbedder::addPassiveGtkChild () { - addChild (TRUE, FALSE); + addChild (FALSE, FALSE); } void |