The member function getValue does hot override the parent class's implemention
From: Erik Hovland <erik@hovland.org>
because it does not preserve the const-ness of the parent's implementation.
---
libs/libmyth/managedlist.h | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/libs/libmyth/managedlist.h b/libs/libmyth/managedlist.h
index e3e29f9..e91104d 100644
a
|
b
|
class MPUBLIC ManagedListSetting : public Setting, public SimpleDBStorage |
464 | 464 | } |
465 | 465 | } |
466 | 466 | |
467 | | virtual const QString getValue() { |
| 467 | virtual QString getValue() const { |
468 | 468 | if (listItem) |
469 | 469 | { |
470 | | syncDBFromItem(); |
| 470 | ManagedListSetting* th = const_cast<ManagedListSetting*>(this); |
| 471 | th->syncDBFromItem(); |
471 | 472 | return listItem->getValue(); |
472 | 473 | } |
473 | 474 | else |