[Konsole-devel] [Bug 121782] Ampersand in title sets Accel

Kurt V.Hindenburg kurt.hindenburg at kdemail.net
Fri May 5 01:00:51 UTC 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=121782         




------- Additional Comments From kurt.hindenburg kdemail net  2006-05-05 03:00 -------
SVN commit 537528 by hindenburg:

Fix issue when there are ampersands in tab title.

CCBUG: 121782


 M  +9 -3      konsole.cpp  


--- trunk/KDE/kdebase/apps/konsole/konsole/konsole.cpp #537527:537528
 @ -1376,6 +1376,7  @
     else
       title = sessions.at(i)->Title();
 
+    title=title.replace('&',"&&");
     switch(mode) {
       case ShowIconAndText:
         tabwidget->setTabIcon( i, icon );
 @ -2148,7 +2149,7  @
   if (m_tabViewMode == ShowIconOnly)
     tabwidget->setTabText( se_index, QString() );
   else if (b_matchTabWinTitle)
-    tabwidget->setTabText( se_index, se->fullTitle() );
+    tabwidget->setTabText( se_index, se->fullTitle().replace('&', "&&") );
 }
 
 void Konsole::initSessionFont(QFont font) {
 @ -3092,7 +3093,9  @
   tabwidget->blockSignals(true);
   tabwidget->removePage(se->widget());
   tabwidget->blockSignals(false);
-  createSessionTab(se->widget(), iconSetForSession(se), se->Title(), position-1);
+  QString title = se->Title();
+  createSessionTab(se->widget(), iconSetForSession(se), 
+                   title.replace('&', "&&"), position-1);
   tabwidget->showPage(se->widget());
   tabwidget->setTabTextColor(tabwidget->indexOf(se->widget()),oldcolor);
   
 @ -3123,7 +3126,9  @
   tabwidget->blockSignals(true);
   tabwidget->removePage(se->widget());
   tabwidget->blockSignals(false);
-  createSessionTab(se->widget(), iconSetForSession(se), se->Title(), position+1);
+  QString title = se->Title();
+  createSessionTab(se->widget(), iconSetForSession(se), 
+                   title.replace('&', "&&"), position+1);
   tabwidget->showPage(se->widget());
   tabwidget->setTabTextColor(tabwidget->indexOf(se->widget()),oldcolor);
   
 @ -3639,6 +3644,7  @
   konsole->attachSession(_se);
   konsole->activateSession(_se);
   konsole->changeTabTextColor( _se, se_tabtextcolor.rgb() );//restore prev color
+  konsole->slotTabSetViewOptions(m_tabViewMode);
 
   if (_se==se) {
     if (se == se_previous)



More information about the konsole-devel mailing list