From 7eeb8dba6aeba09aa3dfa7fa5f0b00840d4d8317 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafael=20Fern=C3=A1ndez=20L=C3=B3pez?= Date: Mon, 15 Mar 2010 10:08:32 +0000 Subject: [PATCH] =?utf8?q?Get=20back=20names,=20and=20use=20"using"=20keyw?= =?utf8?q?ord=20to=20keep=20GCC=20silent=20on=20"method=20foo=20on=20base?= =?utf8?q?=20class=20hidden=20y=20method=20foo=20on=20derived=20class".=20?= =?utf8?q?Thanks=20to=20Andr=C3=A9=20for=20pointing=20out=20this=20trick.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit CCMAIL: Woebbeking@kde.org CCMAIL: peter.penz@gmx.at svn path=/trunk/KDE/kdebase/apps/; revision=1103527 --- src/dolphincategorydrawer.cpp | 4 ++-- src/dolphincategorydrawer.h | 20 +++++++------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/dolphincategorydrawer.cpp b/src/dolphincategorydrawer.cpp index 303edf174..59743b7f5 100644 --- a/src/dolphincategorydrawer.cpp +++ b/src/dolphincategorydrawer.cpp @@ -286,7 +286,7 @@ int DolphinCategoryDrawer::categoryHeight(const QModelIndex &index, const QStyle return heightWithoutIcon + 5; } -void DolphinCategoryDrawer::buttonPressed(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event) +void DolphinCategoryDrawer::mouseButtonPressed(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event) { if (!index.isValid()) { event->ignore(); @@ -319,7 +319,7 @@ void DolphinCategoryDrawer::buttonPressed(const QModelIndex &index, const QRect event->ignore(); } -void DolphinCategoryDrawer::buttonReleased(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event) +void DolphinCategoryDrawer::mouseButtonReleased(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event) { if (!index.isValid() || hotSpotPressed == NoneHotSpot || categoryPressed != index) { event->ignore(); diff --git a/src/dolphincategorydrawer.h b/src/dolphincategorydrawer.h index 38b0b33b2..d9849727e 100644 --- a/src/dolphincategorydrawer.h +++ b/src/dolphincategorydrawer.h @@ -31,6 +31,9 @@ class LIBDOLPHINPRIVATE_EXPORT DolphinCategoryDrawer : public KCategoryDrawerV3 { public: + using KCategoryDrawerV2::mouseButtonPressed; + using KCategoryDrawerV2::mouseButtonReleased; + enum Action { SelectAll = 0, UnselectAll @@ -49,19 +52,10 @@ public: virtual int categoryHeight(const QModelIndex &index, const QStyleOption &option) const; - /** - * @warning You explicitly have to determine whether the event has been accepted or not. You - * have to call event->accept() or event->ignore() at all possible case branches in - * your code. - */ - virtual void buttonPressed(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event); - - /** - * @warning You explicitly have to determine whether the event has been accepted or not. You - * have to call event->accept() or event->ignore() at all possible case branches in - * your code. - */ - virtual void buttonReleased(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event); +protected: + virtual void mouseButtonPressed(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event); + + virtual void mouseButtonReleased(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event); virtual void mouseMoved(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event); -- 2.47.3