blob: e6b79618ab36bf157f06c97aabbe010393c6ca9a (
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
|
// -*- c++ -*-
#ifndef KSPY_H
#define KSPY_H
#include <klibloader.h>
/**
* Loader for the TQObject debugging tool. The usage is simple, just call
* KSpy::invoke(), then use the spy window to examine the state of your
* TQObjects.
*
* @author Richard Moore, rich@kde.org
* @version $Id$
*/
class KSpy
{
public:
/**
* Loads and invokes the KSpy utility.
*/
static void invoke() {
KLibLoader *loader = KLibLoader::self();
KLibrary *lib = loader->library( "libkspy" );
if ( !lib ) {
qWarning( "Unable to load KSpy library\n" );
return;
}
lib->factory(); // Ensure the factory is loaded
// We don't need to do any more, KSpy is fired up by the loader hook
// in the shared library.
}
private:
// Prevent instantiation.
KSpy() {}
~KSpy() {}
};
#endif // KSPY_H
|