summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-01-17 18:20:02 +0300
committerAndrei Karas <akaras@inbox.ru>2017-01-17 18:20:02 +0300
commitf46644e0096ffa2ce57c23707d588b2c073eed55 (patch)
treed46af09d51968c9ced37e1551cd1ff95ee07d3a1 /src/gui/widgets
parentb99b796ff57b0da269fa67d7eb05670be0558589 (diff)
downloadplus-f46644e0096ffa2ce57c23707d588b2c073eed55.tar.gz
plus-f46644e0096ffa2ce57c23707d588b2c073eed55.tar.bz2
plus-f46644e0096ffa2ce57c23707d588b2c073eed55.tar.xz
plus-f46644e0096ffa2ce57c23707d588b2c073eed55.zip
Add missing A_DEFAULT_COPY / A_DELETE_COPY into gui.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/browserbox.cpp11
-rw-r--r--src/gui/widgets/browserbox.h2
-rw-r--r--src/gui/widgets/container.h2
-rw-r--r--src/gui/widgets/containerplacer.h16
-rw-r--r--src/gui/widgets/extendedlistboxitem.h3
-rw-r--r--src/gui/widgets/itemcontainer.cpp12
-rw-r--r--src/gui/widgets/layoutarray.h2
-rw-r--r--src/gui/widgets/layoutcell.h2
-rw-r--r--src/gui/widgets/linepart.h2
-rw-r--r--src/gui/widgets/linkhandler.h5
-rw-r--r--src/gui/widgets/serverslistbox.h2
-rw-r--r--src/gui/widgets/tabs/socialfriendsfunctor.h2
-rw-r--r--src/gui/widgets/widget2.h2
-rw-r--r--src/gui/widgets/windowcontainer.h2
14 files changed, 57 insertions, 8 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index 1b97de024..916ce76d7 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -70,15 +70,20 @@ namespace
{
struct MouseOverLink final
{
- MouseOverLink(const int x, const int y) :
+ MouseOverLink(const int x,
+ const int y) :
mX(x),
mY(y)
{ }
+ A_DEFAULT_COPY(MouseOverLink)
+
bool operator() (const BrowserLink &link) const
{
- return (mX >= link.x1 && mX < link.x2 &&
- mY >= link.y1 && mY < link.y2);
+ return (mX >= link.x1 &&
+ mX < link.x2 &&
+ mY >= link.y1 &&
+ mY < link.y2);
}
const int mX;
const int mY;
diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h
index c765e3850..80ec9cf75 100644
--- a/src/gui/widgets/browserbox.h
+++ b/src/gui/widgets/browserbox.h
@@ -47,6 +47,8 @@ struct BrowserLink final
{
}
+ A_DEFAULT_COPY(BrowserLink)
+
int x1;
int x2;
int y1;
diff --git a/src/gui/widgets/container.h b/src/gui/widgets/container.h
index 9530891f6..2d6e59001 100644
--- a/src/gui/widgets/container.h
+++ b/src/gui/widgets/container.h
@@ -39,6 +39,8 @@ class Container notfinal : public BasicContainer2
public:
explicit Container(const Widget2 *const widget);
+ A_DELETE_COPY(Container)
+
virtual ~Container();
bool safeRemove(Widget *const widget);
diff --git a/src/gui/widgets/containerplacer.h b/src/gui/widgets/containerplacer.h
index d9a0e326e..cd1e0221e 100644
--- a/src/gui/widgets/containerplacer.h
+++ b/src/gui/widgets/containerplacer.h
@@ -35,12 +35,14 @@ class Widget;
class ContainerPlacer final
{
public:
- explicit ContainerPlacer(BasicContainer2 *c = nullptr,
- LayoutCell *lc = nullptr) :
+ explicit ContainerPlacer(BasicContainer2 *const c = nullptr,
+ LayoutCell *const lc = nullptr) :
mContainer(c),
mCell(lc)
{}
+ A_DEFAULT_COPY(ContainerPlacer)
+
/**
* Gets the pointed cell.
*/
@@ -50,14 +52,18 @@ class ContainerPlacer final
/**
* Returns a placer for the same container but to an inner cell.
*/
- ContainerPlacer at(const int x, const int y) A_WARN_UNUSED;
+ ContainerPlacer at(const int x,
+ const int y) A_WARN_UNUSED;
/**
* Adds the given widget to the container and places it in the layout.
* @see LayoutArray::place
*/
- LayoutCell &operator()(const int x, const int y, Widget *const wg,
- const int w = 1, const int h = 1);
+ LayoutCell &operator()(const int x,
+ const int y,
+ Widget *const wg,
+ const int w = 1,
+ const int h = 1);
private:
BasicContainer2 *mContainer;
diff --git a/src/gui/widgets/extendedlistboxitem.h b/src/gui/widgets/extendedlistboxitem.h
index 0c2479a7e..dc2d8b459 100644
--- a/src/gui/widgets/extendedlistboxitem.h
+++ b/src/gui/widgets/extendedlistboxitem.h
@@ -37,6 +37,9 @@ struct ExtendedListBoxItem final
y(y0)
{
}
+
+ A_DEFAULT_COPY(ExtendedListBoxItem)
+
int row;
std::string text;
bool image;
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 720f81ab1..4ac331078 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -67,6 +67,8 @@ namespace
class ItemIdPair final
{
public:
+ A_DELETE_COPY(ItemIdPair)
+
ItemIdPair(const int id, Item *const item) :
mId(id), mItem(item)
{
@@ -79,6 +81,8 @@ namespace
class SortItemAlphaFunctor final
{
public:
+ A_DEFAULT_COPY(SortItemAlphaFunctor)
+
bool operator() (const ItemIdPair *const pair1,
const ItemIdPair *const pair2) const
{
@@ -103,6 +107,8 @@ namespace
class SortItemIdFunctor final
{
public:
+ A_DEFAULT_COPY(SortItemIdFunctor)
+
bool operator() (const ItemIdPair *const pair1,
const ItemIdPair *const pair2) const
{
@@ -123,6 +129,8 @@ namespace
class SortItemWeightFunctor final
{
public:
+ A_DEFAULT_COPY(SortItemWeightFunctor)
+
bool operator() (const ItemIdPair *const pair1,
const ItemIdPair *const pair2) const
{
@@ -151,6 +159,8 @@ namespace
class SortItemAmountFunctor final
{
public:
+ A_DEFAULT_COPY(SortItemAmountFunctor)
+
bool operator() (const ItemIdPair *const pair1,
const ItemIdPair *const pair2) const
{
@@ -179,6 +189,8 @@ namespace
class SortItemTypeFunctor final
{
public:
+ A_DEFAULT_COPY(SortItemTypeFunctor)
+
bool operator() (const ItemIdPair *const pair1,
const ItemIdPair *const pair2) const
{
diff --git a/src/gui/widgets/layoutarray.h b/src/gui/widgets/layoutarray.h
index a5424aa7b..2f5d766e7 100644
--- a/src/gui/widgets/layoutarray.h
+++ b/src/gui/widgets/layoutarray.h
@@ -40,6 +40,8 @@ class LayoutArray final
public:
LayoutArray();
+ A_DEFAULT_COPY(LayoutArray)
+
~LayoutArray();
/**
diff --git a/src/gui/widgets/layoutcell.h b/src/gui/widgets/layoutcell.h
index cecf7d44e..e6404cfde 100644
--- a/src/gui/widgets/layoutcell.h
+++ b/src/gui/widgets/layoutcell.h
@@ -41,6 +41,8 @@ class LayoutCell notfinal
friend class LayoutArray;
public:
+ A_DEFAULT_COPY(LayoutCell)
+
enum Alignment
{
LEFT = 0,
diff --git a/src/gui/widgets/linepart.h b/src/gui/widgets/linepart.h
index f1c182c0d..d88a6543e 100644
--- a/src/gui/widgets/linepart.h
+++ b/src/gui/widgets/linepart.h
@@ -85,6 +85,8 @@ class LinePart final
return *this;
}
+ A_DEFAULT_COPY(LinePart)
+
~LinePart();
int mX;
diff --git a/src/gui/widgets/linkhandler.h b/src/gui/widgets/linkhandler.h
index 2478a4847..3b46e9fd3 100644
--- a/src/gui/widgets/linkhandler.h
+++ b/src/gui/widgets/linkhandler.h
@@ -34,6 +34,11 @@
class LinkHandler notfinal
{
public:
+ LinkHandler()
+ { }
+
+ A_DELETE_COPY(LinkHandler)
+
virtual ~LinkHandler()
{ }
diff --git a/src/gui/widgets/serverslistbox.h b/src/gui/widgets/serverslistbox.h
index 3c0c4846d..f0815ba19 100644
--- a/src/gui/widgets/serverslistbox.h
+++ b/src/gui/widgets/serverslistbox.h
@@ -43,6 +43,8 @@ class ServersListBox final : public ListBox
mHighlightColor = getThemeColor(ThemeColorId::HIGHLIGHT);
}
+ A_DELETE_COPY(ServersListBox)
+
void draw(Graphics *const graphics) override final A_NONNULL(2)
{
if (!mListModel)
diff --git a/src/gui/widgets/tabs/socialfriendsfunctor.h b/src/gui/widgets/tabs/socialfriendsfunctor.h
index f4ed1e5e2..a15f566d6 100644
--- a/src/gui/widgets/tabs/socialfriendsfunctor.h
+++ b/src/gui/widgets/tabs/socialfriendsfunctor.h
@@ -30,6 +30,8 @@
class SortFriendsFunctor final
{
public:
+ A_DEFAULT_COPY(SortFriendsFunctor)
+
bool operator() (const Avatar *const m1,
const Avatar *const m2) const
{
diff --git a/src/gui/widgets/widget2.h b/src/gui/widgets/widget2.h
index da58affc5..d76bd696e 100644
--- a/src/gui/widgets/widget2.h
+++ b/src/gui/widgets/widget2.h
@@ -35,6 +35,8 @@ class Widget;
class Widget2 notfinal
{
public:
+ A_DEFAULT_COPY(Widget2)
+
virtual ~Widget2()
{
}
diff --git a/src/gui/widgets/windowcontainer.h b/src/gui/widgets/windowcontainer.h
index 0143127cc..5947994ab 100644
--- a/src/gui/widgets/windowcontainer.h
+++ b/src/gui/widgets/windowcontainer.h
@@ -36,6 +36,8 @@ class WindowContainer notfinal : public Container
public:
explicit WindowContainer(const Widget2 *const widget);
+ A_DELETE_COPY(WindowContainer)
+
void slowLogic();
/**