fix tricky regression noticed by Vyacheslav Tokarev on Google Reader.
[kdelibs.git] / kde3support / tests / k3prociotest.h
blobc456312d1eaeb61dba067ab38dd47d0d3d8d00c8
1 //
2 // DUMMY -- A dummy class with a slot to demonstrate K3Process signals
3 //
4 // version 0.2, Aug 2nd 1997
5 //
6 // Copyright 1997 Christian Czezatke <e9025461@student.tuwien.ac.at>
7 //
10 #ifndef DUMMY_H
11 #define DUMMY_H
13 #include <stdio.h>
14 #include <QtCore/QObject>
15 #include "k3procio.h"
17 class Dummy : public QObject
19 Q_OBJECT
21 public Q_SLOTS:
22 void printMessage(K3Process *proc)
24 printf("Process %d exited!\n", (int)proc->pid());
27 void gotOutput(K3ProcIO*proc)
29 QString line;
30 while(true) {
31 int result = proc->readln(line);
32 if (result == -1) return;
33 printf("OUTPUT>> [%d] '%s'\n", result, qPrintable(line));
39 #endif