Commit 5ce56e6b authored by Sergio Carlavilla's avatar Sergio Carlavilla Committed by Nathaniel Graham
Browse files

Correction with the & problem in tabs

BUG: 382512

KSysGuard does not render the ampersand character in tab titles

Test Plan:
Tested on Arch Linux with Plasma 5.11.5 and Qt 5.10

I added a tab with an & in the title and I checked that the & displays correctly.
I added a tab with two and more & and I checked that all the & displays correctly.
Also works when open a saved tab.

Reviewers: mlaurent, ngraham

Reviewed By: ngraham

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision:
parent 39ab39a0
......@@ -139,7 +139,7 @@ void Workspace::newWorkSheet()
WorkSheet* sheet = new WorkSheet( dlg.rows(), dlg.columns(), dlg.interval(), 0 );
sheet->setTitle( dlg.sheetTitle() );
sheet->setFileName( sheetName + ".sgrd" );
insertTab(-1, sheet, dlg.sheetTitle() );
insertTab(-1, sheet, dlg.sheetTitle().replace("&", "&&") );
mSheetList.append( sheet );
setCurrentIndex(indexOf( sheet ));
connect( sheet, &WorkSheet::titleChanged,
......@@ -341,7 +341,7 @@ bool Workspace::restoreWorkSheet( const QString &fileName, bool switchToTab)
connect( sheet, &WorkSheet::titleChanged,
this, &Workspace::updateSheetTitle);
insertTab(-1, sheet, sheet->translatedTitle() );
insertTab(-1, sheet, sheet->translatedTitle().replace("&", "&&") );
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment