reimplement Q_DISABLE_COPY_MOVE for full compatibility with versions < 5.13

I was under the impression Q_DISABLE_COPY_MOVE was a much older function than
it is. Since we historically target 5.6 and these functions are small
convenience functions, I just implemented them in the actual codebase.
This commit is contained in:
itsmattkc
2019-11-24 14:57:57 +09:00
parent ba191399ff
commit d5b1768d70
8 changed files with 34 additions and 8 deletions
@@ -23,6 +23,7 @@
#include <QOpenGLContext>
#include "common/constructors.h"
#include "opengltexture.h"
class OpenGLFramebuffer : public QObject
@@ -32,7 +33,7 @@ public:
OpenGLFramebuffer();
virtual ~OpenGLFramebuffer() override;
Q_DISABLE_COPY_MOVE(OpenGLFramebuffer)
DISABLE_COPY_MOVE(OpenGLFramebuffer)
void Create(QOpenGLContext *ctx);
+2 -1
View File
@@ -24,6 +24,7 @@
#include <memory>
#include <QOpenGLFunctions>
#include "common/constructors.h"
#include "decoder/frame.h"
#include "render/pixelformat.h"
@@ -42,7 +43,7 @@ public:
OpenGLTexture();
virtual ~OpenGLTexture() override;
Q_DISABLE_COPY_MOVE(OpenGLTexture)
DISABLE_COPY_MOVE(OpenGLTexture)
void Create(QOpenGLContext* ctx, int width, int height, const olive::PixelFormat &format, void *data = nullptr);
void Create(QOpenGLContext* ctx, int width, int height, const olive::PixelFormat &format, const Type& type, void *data = nullptr);
+2 -1
View File
@@ -3,6 +3,7 @@
#include <QLinkedList>
#include "common/constructors.h"
#include "decodercache.h"
#include "node/graph.h"
#include "node/output/viewer/viewer.h"
@@ -14,7 +15,7 @@ class RenderBackend : public QObject
public:
RenderBackend(QObject* parent = nullptr);
Q_DISABLE_COPY_MOVE(RenderBackend)
DISABLE_COPY_MOVE(RenderBackend)
bool Init();
+2 -1
View File
@@ -3,6 +3,7 @@
#include <QObject>
#include "common/constructors.h"
#include "node/block/block.h"
#include "node/node.h"
#include "decodercache.h"
@@ -13,7 +14,7 @@ class RenderWorker : public QObject
public:
RenderWorker(DecoderCache* decoder_cache, QObject* parent = nullptr);
Q_DISABLE_COPY_MOVE(RenderWorker)
DISABLE_COPY_MOVE(RenderWorker)
bool Init();