From e117e8427cd8bcd0ab1a74abdc5cd4ab12654194 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Tue, 13 Jan 2004 19:51:42 +0000 Subject: - add the static method int OProcess::processPID(const QString&) - add an example program for dealing with OProcess. This should be enhanced... --- (limited to 'libopie2/examples/opiecore/oprocessdemo') diff --git a/libopie2/examples/opiecore/oprocessdemo/.cvsignore b/libopie2/examples/opiecore/oprocessdemo/.cvsignore new file mode 100644 index 0000000..8f7300c --- a/dev/null +++ b/libopie2/examples/opiecore/oprocessdemo/.cvsignore @@ -0,0 +1,6 @@ +Makefile* +moc* +*moc +*.o +~* + diff --git a/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.cpp b/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.cpp new file mode 100644 index 0000000..0abf53e --- a/dev/null +++ b/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.cpp @@ -0,0 +1,11 @@ +#include +#include + +int main( int argc, char** argv ) +{ + printf( "my own PID seems to be '%d'\n", OProcess::processPID( "oprocessdemo" ) ); + printf( "the PID of process 'Mickey' seems to be '%d'\n\n", OProcess::processPID( "Mickey" ) ); + + return 0; +} + diff --git a/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.pro b/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.pro new file mode 100644 index 0000000..72dac7f --- a/dev/null +++ b/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.pro @@ -0,0 +1,12 @@ +TEMPLATE = app +CONFIG = qt warn_on debug +HEADERS = +SOURCES = oprocessdemo.cpp +INCLUDEPATH += $(OPIEDIR)/include +DEPENDPATH += $(OPIEDIR)/include +LIBS += -lopiecore2 +TARGET = oprocessdemo + +include ( $(OPIEDIR)/include.pro ) + + -- cgit v0.9.0.2