diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-02-02 12:46:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-02-02 12:46:32 +0300 |
commit | 11caa7aeeb3a7b40823da8573576d2354b7504b5 (patch) | |
tree | fe34c20ea973e65104747b59675acf6363e7b5d2 /src/gui/widgets/scrollarea.cpp | |
parent | 0c4ed5a9594b849b436fca13c6992dee923915ed (diff) | |
download | plus-11caa7aeeb3a7b40823da8573576d2354b7504b5.tar.gz plus-11caa7aeeb3a7b40823da8573576d2354b7504b5.tar.bz2 plus-11caa7aeeb3a7b40823da8573576d2354b7504b5.tar.xz plus-11caa7aeeb3a7b40823da8573576d2354b7504b5.zip |
Add missing const and static into gui classes.
Diffstat (limited to 'src/gui/widgets/scrollarea.cpp')
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index 6d7695198..a260142a1 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -96,23 +96,19 @@ ScrollArea::~ScrollArea() delete getContent(); instances--; - const Theme *const theme = Theme::instance(); - if (theme) + if (instances == 0) { - if (instances == 0) + Theme::unloadRect(background); + Theme::unloadRect(vMarker); + Theme::unloadRect(vMarkerHi); + Theme::unloadRect(vBackground); + Theme::unloadRect(hBackground); + for (int i = 0; i < 2; i ++) { - theme->unloadRect(background); - theme->unloadRect(vMarker); - theme->unloadRect(vMarkerHi); - theme->unloadRect(vBackground); - theme->unloadRect(hBackground); - for (int i = 0; i < 2; i ++) + for (int f = UP; f < BUTTONS_DIR; f ++) { - for (int f = UP; f < BUTTONS_DIR; f ++) - { - if (buttons[f][i]) - buttons[f][i]->decRef(); - } + if (buttons[f][i]) + buttons[f][i]->decRef(); } } } |