mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-19 11:26:11 +00:00
1f36c55f6a
- use -h& command so the thread does end - set the QRCore in the constructor - try to disable the websever with =h-
34 lines
513 B
C++
34 lines
513 B
C++
#ifndef WEBSERVERTHREAD_H
|
|
#define WEBSERVERTHREAD_H
|
|
|
|
#include <QThread>
|
|
#include <QMutex>
|
|
|
|
class QRCore;
|
|
|
|
class WebServerThread : public QThread
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
|
|
explicit WebServerThread(QRCore *core, QObject *parent = 0);
|
|
~WebServerThread();
|
|
|
|
void startServer();
|
|
void stopServer();
|
|
|
|
bool isStarted() const;
|
|
|
|
private:
|
|
void run();
|
|
using QThread::start;
|
|
|
|
void toggleWebServer();
|
|
|
|
mutable QMutex mutex;
|
|
QRCore *core;
|
|
bool started;
|
|
};
|
|
|
|
#endif // WEBSERVERTHREAD_H
|