diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-06-02 22:15:12 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-06-02 22:15:12 +0300 |
commit | 82644cd319e46e35a7b4e3b4a61fac2465a2ea66 (patch) | |
tree | d737e04b71ea583abe1e835ece785b147a6abfb9 /src/gui/widgets | |
parent | 37343e2b49466bb6cab33f8d1ca362a25f77a660 (diff) | |
download | plus-82644cd319e46e35a7b4e3b4a61fac2465a2ea66.tar.gz plus-82644cd319e46e35a7b4e3b4a61fac2465a2ea66.tar.bz2 plus-82644cd319e46e35a7b4e3b4a61fac2465a2ea66.tar.xz plus-82644cd319e46e35a7b4e3b4a61fac2465a2ea66.zip |
Add missing final/notfinal to classes.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 31 | ||||
-rw-r--r-- | src/gui/widgets/extendedlistboxitem.h | 4 | ||||
-rw-r--r-- | src/gui/widgets/guitable.h | 1 | ||||
-rw-r--r-- | src/gui/widgets/layoutcell.h | 2 | ||||
-rw-r--r-- | src/gui/widgets/linkhandler.h | 2 | ||||
-rw-r--r-- | src/gui/widgets/widget2.h | 2 |
6 files changed, 24 insertions, 18 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index f0a10c77c..f6f86a42d 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -47,6 +47,23 @@ #include "debug.h" +namespace +{ + struct MouseOverLink final + { + MouseOverLink(const int x, const int y) : + mX(x), mY(y) + { } + + bool operator() (const BrowserLink &link) const + { + return (mX >= link.x1 && mX < link.x2 && + mY >= link.y1 && mY < link.y2); + } + int mX, mY; + }; +} // namespace + ImageSet *BrowserBox::mEmotes = nullptr; int BrowserBox::mInstances = 0; @@ -409,20 +426,6 @@ void BrowserBox::clearRows() updateHeight(); } -struct MouseOverLink -{ - MouseOverLink(const int x, const int y) : - mX(x), mY(y) - { } - - bool operator() (const BrowserLink &link) const - { - return (mX >= link.x1 && mX < link.x2 && - mY >= link.y1 && mY < link.y2); - } - int mX, mY; -}; - void BrowserBox::mousePressed(MouseEvent &event) { if (!mLinkHandler) diff --git a/src/gui/widgets/extendedlistboxitem.h b/src/gui/widgets/extendedlistboxitem.h index 4fdc59633..81fd35a50 100644 --- a/src/gui/widgets/extendedlistboxitem.h +++ b/src/gui/widgets/extendedlistboxitem.h @@ -23,7 +23,9 @@ #include <string> -struct ExtendedListBoxItem +#include "localconsts.h" + +struct ExtendedListBoxItem final { ExtendedListBoxItem(const int row0, const std::string &text0, diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h index 64e0adae4..bea678706 100644 --- a/src/gui/widgets/guitable.h +++ b/src/gui/widgets/guitable.h @@ -29,6 +29,7 @@ #include "listeners/keylistener.h" #include "listeners/mouselistener.h" +#include "listeners/tablemodellistener.h" #include "gui/widgets/widget.h" diff --git a/src/gui/widgets/layoutcell.h b/src/gui/widgets/layoutcell.h index 7761e021c..ffc1f13a8 100644 --- a/src/gui/widgets/layoutcell.h +++ b/src/gui/widgets/layoutcell.h @@ -35,7 +35,7 @@ class Widget; * right, or centered in the cell. The process is similar for the vertical * alignment, except that top is represented by LEFT and bottom by RIGHT. */ -class LayoutCell +class LayoutCell notfinal { friend class Layout; friend class LayoutArray; diff --git a/src/gui/widgets/linkhandler.h b/src/gui/widgets/linkhandler.h index b373162a3..95fac1845 100644 --- a/src/gui/widgets/linkhandler.h +++ b/src/gui/widgets/linkhandler.h @@ -31,7 +31,7 @@ * A simple interface to windows that need to handle links from BrowserBox * widget. */ -class LinkHandler +class LinkHandler notfinal { public: virtual ~LinkHandler() diff --git a/src/gui/widgets/widget2.h b/src/gui/widgets/widget2.h index 7890fd648..c29376239 100644 --- a/src/gui/widgets/widget2.h +++ b/src/gui/widgets/widget2.h @@ -25,7 +25,7 @@ #include "render/renderers.h" -class Widget2 +class Widget2 notfinal { public: virtual ~Widget2() |