summaryrefslogtreecommitdiff
path: root/include/vcl/salnativewidgets.hxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-07-26 14:02:37 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-07-27 08:26:45 +0200
commitd2a28ebd5878305b29d8dbfc3b537ddfaabd3625 (patch)
tree31cf4eead2c179466b5ae3e93b217780b70b3bc1 /include/vcl/salnativewidgets.hxx
parent739f746254853dbf6552b0fac9192bfd5ddd0118 (diff)
vcl: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)
...by explicitly defaulting the copy/move functions (and, where needed in turn, also a default ctor) for classes that have a user-declared dtor that does nothing other than an implicitly-defined one would do, but needs to be user- declared because it is virtual and potentially serves as a key function to emit the vtable, or is non-public, etc.; and by removing explicitly user- provided functions that do the same as their implicitly-defined counterparts, but may prevent implicitly declared copy functions from being defined as non- deleted in the future. (Even if such a user-provided function was declared non-inline in an include file, the apparently-used implicitly-defined copy functions are already include, so why bother with non-inline functions.) Change-Id: Ife5d8eb699b8b6c84b9229ae275dc386fa189bce Reviewed-on: https://gerrit.libreoffice.org/58105 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/vcl/salnativewidgets.hxx')
-rw-r--r--include/vcl/salnativewidgets.hxx44
1 files changed, 44 insertions, 0 deletions
diff --git a/include/vcl/salnativewidgets.hxx b/include/vcl/salnativewidgets.hxx
index cdc19718f46f..3f27365604b0 100644
--- a/include/vcl/salnativewidgets.hxx
+++ b/include/vcl/salnativewidgets.hxx
@@ -269,6 +269,11 @@ class VCL_DLLPUBLIC ImplControlValue
virtual ~ImplControlValue();
+ ImplControlValue(ImplControlValue const &) = default;
+ ImplControlValue(ImplControlValue &&) = default;
+ ImplControlValue & operator =(ImplControlValue const &) = default;
+ ImplControlValue & operator =(ImplControlValue &&) = default;
+
virtual ImplControlValue* clone() const;
ControlType getType() const { return mType; }
@@ -309,6 +314,11 @@ class VCL_DLLPUBLIC ScrollbarValue : public ImplControlValue
};
virtual ~ScrollbarValue() override;
virtual ScrollbarValue* clone() const override;
+
+ ScrollbarValue(ScrollbarValue const &) = default;
+ ScrollbarValue(ScrollbarValue &&) = default;
+ ScrollbarValue & operator =(ScrollbarValue const &) = default;
+ ScrollbarValue & operator =(ScrollbarValue &&) = default;
};
class VCL_DLLPUBLIC SliderValue : public ImplControlValue
@@ -326,6 +336,11 @@ class VCL_DLLPUBLIC SliderValue : public ImplControlValue
{}
virtual ~SliderValue() override;
virtual SliderValue* clone() const override;
+
+ SliderValue(SliderValue const &) = default;
+ SliderValue(SliderValue &&) = default;
+ SliderValue & operator =(SliderValue const &) = default;
+ SliderValue & operator =(SliderValue &&) = default;
};
/* TabitemValue:
@@ -362,6 +377,11 @@ class VCL_DLLPUBLIC TabitemValue : public ImplControlValue
virtual ~TabitemValue() override;
virtual TabitemValue* clone() const override;
+ TabitemValue(TabitemValue const &) = default;
+ TabitemValue(TabitemValue &&) = default;
+ TabitemValue & operator =(TabitemValue const &) = default;
+ TabitemValue & operator =(TabitemValue &&) = default;
+
bool isLeftAligned() const { return bool(mnAlignment & TabitemFlags::LeftAligned); }
bool isRightAligned() const { return bool(mnAlignment & TabitemFlags::RightAligned); }
bool isBothAligned() const { return isLeftAligned() && isRightAligned(); }
@@ -398,6 +418,11 @@ class VCL_DLLPUBLIC SpinbuttonValue : public ImplControlValue
virtual ~SpinbuttonValue() override;
virtual SpinbuttonValue* clone() const override;
+
+ SpinbuttonValue(SpinbuttonValue const &) = default;
+ SpinbuttonValue(SpinbuttonValue &&) = default;
+ SpinbuttonValue & operator =(SpinbuttonValue const &) = default;
+ SpinbuttonValue & operator =(SpinbuttonValue &&) = default;
};
/* Toolbarvalue:
@@ -411,6 +436,12 @@ public:
{ mbIsTopDockingArea = false; }
virtual ~ToolbarValue() override;
virtual ToolbarValue* clone() const override;
+
+ ToolbarValue(ToolbarValue const &) = default;
+ ToolbarValue(ToolbarValue &&) = default;
+ ToolbarValue & operator =(ToolbarValue const &) = default;
+ ToolbarValue & operator =(ToolbarValue &&) = default;
+
tools::Rectangle maGripRect;
bool mbIsTopDockingArea; // indicates that this is the top aligned dockingarea
// adjacent to the menubar, only used on Windows
@@ -427,6 +458,10 @@ public:
{ maTopDockingAreaHeight=0; }
virtual ~MenubarValue() override;
virtual MenubarValue* clone() const override;
+ MenubarValue(MenubarValue const &) = default;
+ MenubarValue(MenubarValue &&) = default;
+ MenubarValue & operator =(MenubarValue const &) = default;
+ MenubarValue & operator =(MenubarValue &&) = default;
int maTopDockingAreaHeight;
};
@@ -444,6 +479,10 @@ public:
{}
virtual ~MenupopupValue() override;
virtual MenupopupValue* clone() const override;
+ MenupopupValue(MenupopupValue const &) = default;
+ MenupopupValue(MenupopupValue &&) = default;
+ MenupopupValue & operator =(MenupopupValue const &) = default;
+ MenupopupValue & operator =(MenupopupValue &&) = default;
tools::Rectangle maItemRect;
};
@@ -460,6 +499,11 @@ public:
virtual ~PushButtonValue() override;
virtual PushButtonValue* clone() const override;
+ PushButtonValue(PushButtonValue const &) = default;
+ PushButtonValue(PushButtonValue &&) = default;
+ PushButtonValue & operator =(PushButtonValue const &) = default;
+ PushButtonValue & operator =(PushButtonValue &&) = default;
+
bool mbBevelButton:1; // only used on OSX
bool mbSingleLine:1; // only used on OSX
};