mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
cleanup inheritance QThread --> QObject and includes
IPC is actually not running in a thread; And if, QThread should not be inherited.
This commit is contained in:
parent
42a917fc58
commit
5ddfc2eefe
|
@ -19,8 +19,9 @@
|
||||||
|
|
||||||
#include "src/ipc.h"
|
#include "src/ipc.h"
|
||||||
#include "src/persistence/settings.h"
|
#include "src/persistence/settings.h"
|
||||||
#include <QDebug>
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QThread>
|
||||||
#include <random>
|
#include <random>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
|
11
src/ipc.h
11
src/ipc.h
|
@ -21,20 +21,19 @@
|
||||||
#ifndef IPC_H
|
#ifndef IPC_H
|
||||||
#define IPC_H
|
#define IPC_H
|
||||||
|
|
||||||
|
#include <ctime>
|
||||||
|
#include <functional>
|
||||||
|
#include <QMap>
|
||||||
|
#include <QObject>
|
||||||
#include <QSharedMemory>
|
#include <QSharedMemory>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QObject>
|
|
||||||
#include <QThread>
|
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
#include <QMap>
|
|
||||||
#include <functional>
|
|
||||||
#include <ctime>
|
|
||||||
|
|
||||||
using IPCEventHandler = std::function<bool (const QByteArray&)>;
|
using IPCEventHandler = std::function<bool (const QByteArray&)>;
|
||||||
|
|
||||||
#define IPC_PROTOCOL_VERSION "2"
|
#define IPC_PROTOCOL_VERSION "2"
|
||||||
|
|
||||||
class IPC : public QThread
|
class IPC : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
IPC();
|
IPC();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user