There is a bug in this function => added a comment

svn path=/branches/work/akonadi-ports/kdepim/; revision=1044286
wilder-work
Laurent Montel 17 years ago
parent 216466e049
commit 1f1c80fb96
  1. 13
      folderselectiontreeview.cpp
  2. 2
      folderselectiontreeview.h
  3. 4
      kmmainwidget.cpp

@ -116,6 +116,19 @@ FolderSelectionTreeView::~FolderSelectionTreeView()
}
void FolderSelectionTreeView::selectCollectionFolder( const Akonadi::Collection & col )
{
kDebug() << "AKONADI PORT: Bug in this code " << Q_FUNC_INFO;
QModelIndexList rows = d->collectionFolderView->model()->match(QModelIndex(), Akonadi::EntityTreeModel::CollectionIdRole, col.id());
if ( rows.size() < 1 )
return;
QModelIndex colIndex = rows.first();
d->collectionFolderView->selectionModel()->select(colIndex, QItemSelectionModel::SelectCurrent);
}
Akonadi::ChangeRecorder * FolderSelectionTreeView::monitorFolders()
{
return d->monitor;

@ -52,6 +52,8 @@ public:
Akonadi::ChangeRecorder *monitorFolders();
void selectCollectionFolder( const Akonadi::Collection & col );
void setSelectionMode( QAbstractItemView::SelectionMode mode );

@ -2354,7 +2354,6 @@ void KMMainWidget::slotJumpToFolder()
if ( dlg->exec() && dlg ) {
Akonadi::Collection collection = dlg->selectedCollection();
if ( collection.isValid() ) {
kDebug()<<" collection.name() :"<<collection.name();
selectCollectionFolder( collection );
}
}
@ -2362,9 +2361,8 @@ void KMMainWidget::slotJumpToFolder()
void KMMainWidget::selectCollectionFolder( const Akonadi::Collection & col )
{
kDebug() << "AKONADI PORT: Disabled code in " << Q_FUNC_INFO;
if ( mCollectionFolderView ) {
//mCollectionFolderView->setCurrentIndex( mEntityModel->indexForCollection( collection ) );
mCollectionFolderView->selectCollectionFolder( col );
}
}

Loading…
Cancel
Save