summaryrefslogtreecommitdiffstats
path: root/dcop/tests/test.cpp
blob: a224dc1fcc98d7b52a6188ab1f73f5cd459f3980 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include "test.h"
#include <kapplication.h>
#include <iostream>
#include <dcopclient.h>
#include <kcmdlineargs.h>



Test::~Test()
{
}

#include "definitions.generated"

using namespace std;

void batch()
{
	TQTextStream output(  fopen( "batch.returns", "w" ) , IO_WriteOnly );	
	Test* object = new Test;
#include "batch.generated"
}

#ifdef Q_OS_WIN
# define main kdemain
#endif

int main(int argc, char** argv)
{
	if ( argc > 1 ) {
		batch();
		return 0;
	}
	KCmdLineArgs::init( argc, argv, argv[0], "TestApp", "Tests the dcop familly of tools + libraries", "1.0" ); // FIXME
	KApplication app (/*stylesEnabled=*/ false, /*GUIEnabled=*/ false);
	if(!app.dcopClient()->attach(  ))
		return 1;

	app.dcopClient()->registerAs( "TestApp" );
	new Test;
	return app.exec();
}