Summary: | When an existing feeds directory is renamed, change does not save | ||
---|---|---|---|
Product: | [Applications] akregator | Reporter: | Matej Pivoluska <pivoluska> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Matej Pivoluska
2004-11-18 00:34:34 UTC
At least I can't confirm this. The new name is saved fine when I close my aKregator just after the change... I can confirm this for beta7, it's fixed in CVS. SVN commit 429576 by osterfeld: fix in-place renaming by connecting to both QListView::itemRenamed(QLI*, col, QString) and KListView::itemRenamed(QLI*, QString, col) signals The QListView version works for folders and feeds, the KListView version works for Tag nodes. super strange BUG: 102099 CCBUG: 96669, 93480 M +14 -27 feedlistview.cpp M +2 -1 feedlistview.h --- trunk/KDE/kdepim/akregator/src/feedlistview.cpp #429575:429576 @@ -267,6 +267,7 @@ connect( this, SIGNAL(dropped(QDropEvent*,QListViewItem*)), this, SLOT(slotDropped(QDropEvent*,QListViewItem*)) ); connect( this, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotSelectionChanged(QListViewItem*)) ); + connect( this, SIGNAL(itemRenamed(QListViewItem*, int, const QString&)), this, SLOT(slotItemRenamed(QListViewItem*, int, const QString&)) ); connect( this, SIGNAL(itemRenamed(QListViewItem*, const QString&, int)), this, SLOT(slotItemRenamed(QListViewItem*, const QString&, int)) ); connect( this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), this, SLOT(slotContextMenu(KListView*, QListViewItem*, const QPoint&)) ); connect( &(d->autoopentimer), SIGNAL( timeout() ), this, SLOT( openFolder() ) ); @@ -558,28 +559,6 @@ KListView::contentsDragMoveEvent(event); } -/* -void FeedListView::keyPressEvent(QKeyEvent* e) -{ - switch(e->key()) - { - case Key_Alt+Key_Up: - case Key_Alt+Key_Down: - case Key_Alt+Key_Left: - case Key_Alt+Key_Right: - KListView::keyPressEvent(e); - break; - case Key_Left: - case Key_Right: - case Key_Up: - case Key_Down: - e->ignore(); - break; - default: - KListView::keyPressEvent(e); - } -}*/ - bool FeedListView::acceptDrag(QDropEvent *e) const { if (!acceptDrops() || !itemsMovable()) @@ -815,16 +794,24 @@ emit signalNodeSelected(ni->node()); } -void FeedListView::slotItemRenamed(QListViewItem* item, const QString& text, int) +void FeedListView::slotItemRenamed(QListViewItem* item, int col, const QString& text) { - kdDebug() << "FeedListView::slotItemRenamed(): enter" << endl; TreeNodeItem* ni = dynamic_cast<TreeNodeItem*> (item); - if ( ni && ni->node() ) + if ( !ni || !ni->node() ) + return; + if (col == 0) { - kdDebug() << "renamed item to \"" << text << "\"" << endl; - ni->node()->setTitle(text); + if (text != ni->node()->title()) + { + kdDebug() << "renamed item to \"" << text << "\"" << endl; + ni->node()->setTitle(text); + } } } +void FeedListView::slotItemRenamed(QListViewItem* item, const QString& text, int col) +{ + slotItemRenamed(item, col, text); +} void FeedListView::slotContextMenu(KListView* list, QListViewItem* item, const QPoint& p) { --- trunk/KDE/kdepim/akregator/src/feedlistview.h #429575:429576 @@ -164,7 +164,8 @@ virtual void slotSelectionChanged(QListViewItem* item); virtual void slotContextMenu(KListView* list, QListViewItem* item, const QPoint& p); - virtual void slotItemRenamed(QListViewItem* item, const QString&, int); + virtual void slotItemRenamed(QListViewItem* item, int col, const QString& text); + virtual void slotItemRenamed(QListViewItem* item, const QString& text, int col); virtual void slotFeedFetchStarted(Feed* feed); virtual void slotFeedFetchAborted(Feed* feed); virtual void slotFeedFetchError(Feed* feed); |