diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-12-01 16:34:51 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-12-01 16:34:51 +0100 |
commit | f56eff04ef4d23b62a6e095eca5d4b9f2b52e023 (patch) | |
tree | d7e5ccd335f4be09d11d3d6bb9c333fa6945516c /depends/groupview/src/categorizedview.cpp | |
parent | a3fbf05c7b77d513b107e34732b2d04045a05c3c (diff) | |
download | MultiMC-f56eff04ef4d23b62a6e095eca5d4b9f2b52e023.tar MultiMC-f56eff04ef4d23b62a6e095eca5d4b9f2b52e023.tar.gz MultiMC-f56eff04ef4d23b62a6e095eca5d4b9f2b52e023.tar.lz MultiMC-f56eff04ef4d23b62a6e095eca5d4b9f2b52e023.tar.xz MultiMC-f56eff04ef4d23b62a6e095eca5d4b9f2b52e023.zip |
Fix (hopefully) library dependency resolution.
Installing libs is now enabled, hardcoded.
Enable -Wall for all builds.
Fix many warnings and latent bugs.
Diffstat (limited to 'depends/groupview/src/categorizedview.cpp')
-rw-r--r-- | depends/groupview/src/categorizedview.cpp | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/depends/groupview/src/categorizedview.cpp b/depends/groupview/src/categorizedview.cpp index f4449949..1345205c 100644 --- a/depends/groupview/src/categorizedview.cpp +++ b/depends/groupview/src/categorizedview.cpp @@ -58,18 +58,6 @@ struct KCategorizedView::Private::Item struct KCategorizedView::Private::Block { - Block() - : topLeft ( QPoint() ) - , height ( -1 ) - , firstIndex ( QModelIndex() ) - , quarantineStart ( QModelIndex() ) - , items ( QList<Item>() ) - , outOfQuarantine ( false ) - , alternate ( false ) - , collapsed ( false ) - { - } - bool operator!= ( const Block &rhs ) const { return firstIndex != rhs.firstIndex; @@ -83,7 +71,7 @@ struct KCategorizedView::Private::Block } QPoint topLeft; - int height; + int height = -1; QPersistentModelIndex firstIndex; // if we have n elements on this block, and we inserted an element at position i. The quarantine // will start at index (i, column, parent). This means that for all elements j where i <= j <= n, the @@ -97,25 +85,16 @@ struct KCategorizedView::Private::Block // this affects the whole block, not items separately. items contain the topLeft point relative // to the block. Because of insertions or removals a whole block can be moved, so the whole block // will enter in quarantine, what is faster than moving all items in absolute terms. - bool outOfQuarantine; + bool outOfQuarantine = false; // should we alternate its color ? is just a hint, could not be used - bool alternate; - bool collapsed; + bool alternate = false; + bool collapsed = false; }; KCategorizedView::Private::Private ( KCategorizedView *q ) : q ( q ) - , proxyModel ( 0 ) - , categoryDrawer ( 0 ) - , categorySpacing ( 5 ) - , alternatingBlockColors ( false ) - , collapsibleBlocks ( false ) , hoveredBlock ( new Block() ) - , hoveredIndex ( QModelIndex() ) - , pressedPosition ( QPoint() ) - , rubberBandRect ( QRect() ) - , constantItemWidth( 0 ) { } |