Albert S
47874b3706
Crashes were observed, faulting in libQtNetwork. Those were rather rare. We also have no traces. Probably depends on some order signal/slots were processed. Remove shared states between connections, such as the IPCPreviewWorker and socket instance in IPCServer.
33 lines
632 B
C++
33 lines
632 B
C++
#ifndef IPCPREVIEWWORKER_H
|
|
#define IPCPREVIEWWORKER_H
|
|
#include <QLocalSocket>
|
|
#include <QFutureWatcher>
|
|
#include "renderconfig.h"
|
|
#include "rendertarget.h"
|
|
#include "previewgenerator.h"
|
|
|
|
class IPCPreviewWorker : public QObject
|
|
{
|
|
Q_OBJECT
|
|
private:
|
|
QFutureWatcher<QByteArray> previewWorkerWatcher;
|
|
QLocalSocket *peer;
|
|
bool cleaned = false;
|
|
|
|
public:
|
|
IPCPreviewWorker(QLocalSocket *peer);
|
|
void start(RenderConfig config, const QVector<RenderTarget> &targets);
|
|
void stop();
|
|
~IPCPreviewWorker()
|
|
{
|
|
delete this->peer;
|
|
}
|
|
private slots:
|
|
void shutdownSocket();
|
|
|
|
signals:
|
|
void finished();
|
|
};
|
|
|
|
#endif // IPCPREVIEWWORKER_H
|