[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/messagelist
From: Laurent Montel <montel () kde ! org>
Date: 2010-08-10 9:53:07
Message-ID: 20100810095307.185E8AC7E8 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1161537 by mlaurent:
Fix bug #240089
Add tooltip to show fullpath of collection in tabwidget
BUG: 240089
M +8 -0 pane.cpp
--- trunk/KDE/kdepim/messagelist/pane.cpp #1161536:1161537
@@ -318,6 +318,7 @@
QString label;
QIcon icon = KIcon( "folder" );
+ QString toolTip;
foreach ( const QModelIndex &index, s->selectedRows() ) {
label+= index.data( Qt::DisplayRole ).toString()+", ";
}
@@ -328,11 +329,18 @@
icon = QIcon();
} else if ( s->selectedRows().size()==1 ) {
icon = s->selectedRows().first().data( Qt::DecorationRole ).value<QIcon>();
+ QModelIndex idx = s->selectedRows().first().parent();
+ toolTip = label;
+ while ( idx != QModelIndex() ) {
+ toolTip = idx.data().toString() + '/' + toolTip;
+ idx = idx.parent();
}
+ }
int index = q->indexOf( w );
q->setTabText( index, label );
q->setTabIcon( index, icon );
+ q->setTabToolTip( index, toolTip);
}
void Pane::Private::onNewTabClicked()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic