Diffstat (limited to 'core/tools/hotplug-qcop/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/tools/hotplug-qcop/main.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/core/tools/hotplug-qcop/main.cpp b/core/tools/hotplug-qcop/main.cpp index bd5431d..9c585ce 100644 --- a/core/tools/hotplug-qcop/main.cpp +++ b/core/tools/hotplug-qcop/main.cpp | |||
@@ -33,3 +33,5 @@ | |||
33 | /* QT */ | 33 | /* QT */ |
34 | #include <qapplication.h> | ||
34 | #include <qstring.h> | 35 | #include <qstring.h> |
36 | #include <qstringlist.h> | ||
35 | 37 | ||
@@ -37,2 +39,5 @@ | |||
37 | #include <stdlib.h> | 39 | #include <stdlib.h> |
40 | #include <unistd.h> | ||
41 | |||
42 | extern char **environ; | ||
38 | 43 | ||
@@ -41,3 +46,20 @@ int main( int argc, char** argv ) | |||
41 | qDebug( "NOTE: hotplug-qcop started" ); | 46 | qDebug( "NOTE: hotplug-qcop started" ); |
42 | qDebug( "... now doing something meaningful ..." ); | 47 | QString event( argc > 1 ? QString( argv[1] ) : QString::null ); |
48 | |||
49 | QStringList list; | ||
50 | int i = 0; | ||
51 | while( environ[i] ) | ||
52 | { | ||
53 | qDebug( "NOTE: hotplug-qcop adding '%s'", environ[i] ); | ||
54 | list += environ[i++]; | ||
55 | } | ||
56 | |||
57 | QApplication app( argc, argv ); | ||
58 | |||
59 | if ( 1 ) | ||
60 | { | ||
61 | QCopEnvelope e( "QPE/System", "HotPlugEvent(QString, QStringList)" ); | ||
62 | e << event << list; | ||
63 | } | ||
64 | |||
43 | qDebug( "NOTE: hotplug-qcop ended" ); | 65 | qDebug( "NOTE: hotplug-qcop ended" ); |