ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #03861
[Branch ~agateau/plasma-widget-message-indicator/trunk] Rev 144: Use removeRow() to remove the item instead of deleting it:
------------------------------------------------------------
revno: 144
fixes bug(s): https://launchpad.net/bugs/631794
committer: Aurelien Gateau <aurelien.gateau@xxxxxxxxxxxxx>
branch nick: trunk
timestamp: Wed 2011-08-31 18:13:39 +0200
message:
Use removeRow() to remove the item instead of deleting it:
Deleting an item does not remove the row.
modified:
src/listenermodel.cpp
--
lp:plasma-widget-message-indicator
https://code.launchpad.net/~agateau/plasma-widget-message-indicator/trunk
Your team ayatana-commits is subscribed to branch lp:plasma-widget-message-indicator.
To unsubscribe from this branch go to https://code.launchpad.net/~agateau/plasma-widget-message-indicator/trunk/+edit-subscription
=== modified file 'src/listenermodel.cpp'
--- src/listenermodel.cpp 2010-03-10 09:35:35 +0000
+++ src/listenermodel.cpp 2011-08-31 16:13:39 +0000
@@ -175,11 +175,12 @@
void removeAction(QAction* action)
{
ActionItem* item = findActionItemForAction(action);
- if (item) {
- delete item;
- } else {
+ if (!item) {
kWarning() << "No item for action" << action->text();
+ return;
}
+ removeRow(item->row());
+ mNextActionItemRow--;
}
ActionItem* findActionItemForAction(QAction* action) const