File: debughelper.h

package info (click to toggle)
texstudio 2.11.2%2Bdebian-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 41,292 kB
  • ctags: 12,405
  • sloc: cpp: 93,072; xml: 10,217; ansic: 4,153; sh: 145; makefile: 56
file content (43 lines) | stat: -rw-r--r-- 717 bytes parent folder | download
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
#ifndef DEBUGHELPER_H
#define DEBUGHELPER_H

#include "modifiedQObject.h"
#include "smallUsefulFunctions.h"


QString print_backtrace(const QString &message);

void recover(); //defined in texmaker.cpp

void initCrashHandler(int mode);
QString getLastCrashInformation(bool &wasLoop);
void catchUnhandledException();


class Guardian: public SafeThread
{
	Q_OBJECT

public:
	Guardian(): SafeThread(), slowOperations(0) {}
	static void summon();
	static void calm();
	static void shutdown();

	static void continueEndlessLoop();

	static Guardian *instance();
	
protected:
	void run();

public slots:
	void slowOperationStarted();
	void slowOperationEnded();

private:
	int slowOperations;
};


#endif // DEBUGHELPER_H