QtGui: Use Q_DISABLE_COPY_MOVE for QPA interface classes
Introduce Q_DISABLE_COPY_MOVE or replace existing Q_DISABLE_COPY and add default constructors where needed. Change-Id: Ibd14ee9d1d69e64f6289efe789d4b64a3d6cb998 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
parent
ac7265e950
commit
a0f3b2b503
@ -61,6 +61,9 @@ QT_BEGIN_NAMESPACE
|
||||
class Q_GUI_EXPORT QPlatformClipboard
|
||||
{
|
||||
public:
|
||||
Q_DISABLE_COPY_MOVE(QPlatformClipboard)
|
||||
|
||||
QPlatformClipboard() = default;
|
||||
virtual ~QPlatformClipboard();
|
||||
|
||||
virtual QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard);
|
||||
|
@ -78,6 +78,8 @@ private:
|
||||
|
||||
class Q_GUI_EXPORT QPlatformCursor : public QObject {
|
||||
public:
|
||||
Q_DISABLE_COPY_MOVE(QPlatformCursor)
|
||||
|
||||
enum Capability {
|
||||
OverrideCursor = 0x1
|
||||
};
|
||||
|
@ -91,6 +91,8 @@ class Q_GUI_EXPORT QPlatformDrag
|
||||
{
|
||||
Q_DECLARE_PRIVATE(QPlatformDrag)
|
||||
public:
|
||||
Q_DISABLE_COPY_MOVE(QPlatformDrag)
|
||||
|
||||
QPlatformDrag();
|
||||
virtual ~QPlatformDrag();
|
||||
|
||||
@ -108,8 +110,6 @@ public:
|
||||
|
||||
private:
|
||||
QPlatformDragPrivate *d_ptr;
|
||||
|
||||
Q_DISABLE_COPY(QPlatformDrag)
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -84,6 +84,8 @@ class QVulkanInstance;
|
||||
class Q_GUI_EXPORT QPlatformIntegration
|
||||
{
|
||||
public:
|
||||
Q_DISABLE_COPY_MOVE(QPlatformIntegration)
|
||||
|
||||
enum Capability {
|
||||
ThreadedPixmaps = 1,
|
||||
OpenGL,
|
||||
@ -199,6 +201,8 @@ public:
|
||||
#endif
|
||||
|
||||
protected:
|
||||
QPlatformIntegration() = default;
|
||||
|
||||
void screenAdded(QPlatformScreen *screen, bool isPrimary = false);
|
||||
void destroyScreen(QPlatformScreen *screen);
|
||||
void setPrimaryScreen(QPlatformScreen *newPrimary);
|
||||
|
@ -80,6 +80,8 @@ class Q_GUI_EXPORT QPlatformScreen
|
||||
Q_DECLARE_PRIVATE(QPlatformScreen)
|
||||
|
||||
public:
|
||||
Q_DISABLE_COPY_MOVE(QPlatformScreen)
|
||||
|
||||
enum SubpixelAntialiasingType { // copied from qfontengine_p.h since we can't include private headers
|
||||
Subpixel_None,
|
||||
Subpixel_RGB,
|
||||
@ -164,8 +166,6 @@ protected:
|
||||
QScopedPointer<QPlatformScreenPrivate> d_ptr;
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(QPlatformScreen)
|
||||
|
||||
friend class QScreenPrivate;
|
||||
};
|
||||
|
||||
|
@ -58,6 +58,8 @@ class QUrl;
|
||||
class Q_GUI_EXPORT QPlatformServices
|
||||
{
|
||||
public:
|
||||
Q_DISABLE_COPY_MOVE(QPlatformServices)
|
||||
|
||||
QPlatformServices();
|
||||
virtual ~QPlatformServices() { }
|
||||
|
||||
|
@ -64,6 +64,8 @@ QT_BEGIN_NAMESPACE
|
||||
class Q_GUI_EXPORT QPlatformSessionManager
|
||||
{
|
||||
public:
|
||||
Q_DISABLE_COPY_MOVE(QPlatformSessionManager)
|
||||
|
||||
explicit QPlatformSessionManager(const QString &id, const QString &key);
|
||||
virtual ~QPlatformSessionManager();
|
||||
|
||||
@ -101,8 +103,6 @@ private:
|
||||
QStringList m_restartCommand;
|
||||
QStringList m_discardCommand;
|
||||
QSessionManager::RestartHint m_restartHint;
|
||||
|
||||
Q_DISABLE_COPY(QPlatformSessionManager)
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -65,6 +65,8 @@ class QDebug;
|
||||
class Q_GUI_EXPORT QPlatformSurface
|
||||
{
|
||||
public:
|
||||
Q_DISABLE_COPY_MOVE(QPlatformSurface)
|
||||
|
||||
virtual ~QPlatformSurface();
|
||||
virtual QSurfaceFormat format() const = 0;
|
||||
|
||||
|
@ -76,6 +76,8 @@ class Q_GUI_EXPORT QPlatformTheme
|
||||
{
|
||||
Q_DECLARE_PRIVATE(QPlatformTheme)
|
||||
public:
|
||||
Q_DISABLE_COPY_MOVE(QPlatformTheme)
|
||||
|
||||
enum ThemeHint {
|
||||
CursorFlashTime,
|
||||
KeyboardInputInterval,
|
||||
@ -324,8 +326,6 @@ public:
|
||||
protected:
|
||||
explicit QPlatformTheme(QPlatformThemePrivate *priv);
|
||||
QScopedPointer<QPlatformThemePrivate> d_ptr;
|
||||
private:
|
||||
Q_DISABLE_COPY(QPlatformTheme)
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -71,6 +71,8 @@ class Q_GUI_EXPORT QPlatformWindow : public QPlatformSurface
|
||||
{
|
||||
Q_DECLARE_PRIVATE(QPlatformWindow)
|
||||
public:
|
||||
Q_DISABLE_COPY_MOVE(QPlatformWindow)
|
||||
|
||||
explicit QPlatformWindow(QWindow *window);
|
||||
~QPlatformWindow() override;
|
||||
|
||||
@ -164,8 +166,6 @@ protected:
|
||||
static QSize constrainWindowSize(const QSize &size);
|
||||
|
||||
QScopedPointer<QPlatformWindowPrivate> d_ptr;
|
||||
private:
|
||||
Q_DISABLE_COPY(QPlatformWindow)
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
Loading…
Reference in New Issue
Block a user