-rw-r--r-- | libopie2/opiecore/oapplicationfactory.h | 2 | ||||
-rw-r--r-- | libopie2/opiecore/oprocess.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libopie2/opiecore/oapplicationfactory.h b/libopie2/opiecore/oapplicationfactory.h index cabaf79..8516565 100644 --- a/libopie2/opiecore/oapplicationfactory.h +++ b/libopie2/opiecore/oapplicationfactory.h @@ -178,97 +178,97 @@ template <> struct OPrivate <Opie::NullType, Opie::NullType > { inline static QWidget* multiFactory( const QString& , QWidget* , const char* , Qt::WFlags ) { return 0l; } inline static QStringList multiString( const QStringList& _list ) { return _list; } }; */ template <class Product, class ProductListTail> struct OPrivate< Opie::Core::Typelist<Product, ProductListTail> > { inline static QWidget* multiFactory( const QString& appName, QWidget* parent, const char* name, Qt::WFlags fl) { QWidget* wid = OPrivate<Product>::multiFactory( appName, parent, name, fl ); if (!wid ) wid = OPrivate<ProductListTail>::multiFactory( appName, parent, name, fl ); return wid; } inline static QStringList multiString( const QStringList& _list ) { QStringList list = _list; list = OPrivate<Product>::multiString( list ); list = OPrivate<ProductListTail>::multiString( list ); return list; } }; /* Internal END */ /* * If you want to export more than one Widget use that function * Make sure all your Widgets provide the appName() static method * otherwise you'll get a compiler error * - * typedef Opie::MakeTypeList<MyWidget, MyDialog, MyMediaPlayer >::Result MyTypes; + * typedef Opie::Core::MakeTypelist<MyWidget, MyDialog, MyMediaPlayer >::Result MyTypes; * OPIE_EXPORT_APP( OApplicationFactory<MyTypes> ) */ template<class Product, class ProductListTail> struct OApplicationFactory< Opie::Core::Typelist<Product, ProductListTail > > : ApplicationInterface { QRESULT queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { *iface = 0; if ( uuid == IID_QUnknown ) *iface = this; else if ( uuid ==IID_QtopiaApplication ) *iface = this; else return QS_FALSE; (*iface)->addRef(); return QS_OK; } QWidget* createMainWindow ( const QString& appName, QWidget* parent, const char* name, Qt::WFlags fl ) { qWarning("StringList is %s", applications().join(":").latin1() ); return OPrivate< Opie::Core::Typelist<Product, ProductListTail > >::multiFactory( appName, parent, name, fl ); } QStringList applications()const { QStringList _list; return OPrivate< Opie::Core::Typelist<Product, ProductListTail> >::multiString( _list ); } Q_REFCOUNT }; } } /* If the library version should be build */ #ifdef OPIE_APP_INTERFACE #define OPIE_EXPORT_APP( factory ) Q_EXPORT_INTERFACE() { Q_CREATE_INSTANCE( factory ) } #else #include <qpe/qpeapplication.h> #define OPIE_EXPORT_APP( Factory ) \ int main( int argc, char **argv ) { \ QPEApplication a(argc, argv ); \ QWidget *mw = 0;\ \ /* method from TT */ \ QString executableName = QString::fromLatin1( argv[0] ); \ executableName = executableName.right(executableName.length() \ - executableName.findRev('/') - 1); \ diff --git a/libopie2/opiecore/oprocess.h b/libopie2/opiecore/oprocess.h index ac6be98..23e9b10 100644 --- a/libopie2/opiecore/oprocess.h +++ b/libopie2/opiecore/oprocess.h @@ -56,97 +56,97 @@ class OProcessPrivate; * * @par General usage and features * *This class allows a KDE and OPIE application to start child processes without having *to worry about UN*X signal handling issues and zombie process reaping. * *@see KProcIO * *Basically, this class distinguishes three different ways of running *child processes: * *@li OProcess::DontCare -- The child process is invoked and both the child *process and the parent process continue concurrently. * *Starting a DontCare child process means that the application is *not interested in any notification to determine whether the *child process has already exited or not. * *@li OProcess::NotifyOnExit -- The child process is invoked and both the *child and the parent process run concurrently. * *When the child process exits, the OProcess instance *corresponding to it emits the Qt signal @ref processExited(). * *Since this signal is @em not emitted from within a UN*X *signal handler, arbitrary function calls can be made. * *Be aware: When the OProcess objects gets destructed, the child *process will be killed if it is still running! *This means in particular, that you cannot use a OProcess on the stack *with OProcess::NotifyOnExit. * *@li OProcess::Block -- The child process starts and the parent process *is suspended until the child process exits. (@em Really not recommended *for programs with a GUI.) * *OProcess also provides several functions for determining the exit status *and the pid of the child process it represents. * *Furthermore it is possible to supply command-line arguments to the process *in a clean fashion (no null -- terminated stringlists and such...) * *A small usage example: *<pre> *OProcess *proc = new OProcess; * **proc << "my_executable"; **proc << "These" << "are" << "the" << "command" << "line" << "args"; - *QApplication::connect(proc, SIGNAL(processExited(Opie::Core::OProcess *)), + *QObject::connect(proc, SIGNAL(processExited(Opie::Core::OProcess *)), * pointer_to_my_object, SLOT(my_objects_slot(Opie::Core::OProcess *))); *proc->start(); *</pre> * *This will start "my_executable" with the commandline arguments "These"... * *When the child process exits, the respective Qt signal will be emitted. * *@par Communication with the child process * *OProcess supports communication with the child process through *stdin/stdout/stderr. * *The following functions are provided for getting data from the child *process or sending data to the child's stdin (For more information, *have a look at the documentation of each function): * *@li bool @ref writeStdin(char *buffer, int buflen); *@li -- Transmit data to the child process's stdin. * *@li bool @ref closeStdin(); *@li -- Closes the child process's stdin (which causes it to see an feof(stdin)). *Returns false if you try to close stdin for a process that has been started *without a communication channel to stdin. * *@li bool @ref closeStdout(); *@li -- Closes the child process's stdout. *Returns false if you try to close stdout for a process that has been started *without a communication channel to stdout. * *@li bool @ref closeStderr(); *@li -- Closes the child process's stderr. *Returns false if you try to close stderr for a process that has been started *without a communication channel to stderr. * * *@par QT signals: * *@li void @ref receivedStdout(OProcess *proc, char *buffer, int buflen); *@li void @ref receivedStderr(OProcess *proc, char *buffer, int buflen); *@li -- Indicates that new data has arrived from either the *child process's stdout or stderr. * *@li void @ref wroteStdin(OProcess *proc); *@li -- Indicates that all data that has been sent to the child process *by a prior call to @ref writeStdin() has actually been transmitted to the *client . * |