Commit a62c8975 authored by David Faure's avatar David Faure
Browse files

Adjust caption handling after the switch from ReadOnlyPart to Part.

KParts::ReadOnlyPart::guiActivateEvent is no longer called, so nothing
clears the window title anymore. Just detect that the plugin didn't
touch it.

OpenQA rocks (as well as Fabian for submitting bug reports when OpenQA
detects a regression).

BUG: 420364
parent 8bccbc32
......@@ -656,13 +656,14 @@ void MainWindow::selectPlugin(KontactInterface::Plugin *plugin)
newAction = plugin->newActions().at(0);
const QString oldWindowTitle = windowTitle();
// KParts's guiActivateEvent emptied the caption when leaving the old part,
// and only some parts (like kmail) set it in guiActivateEvent when being activated.
// Only some parts (like kmail) set a caption in guiActivateEvent when being activated.
// For others, this is the default caption:
if (windowTitle().isEmpty()) {
if (windowTitle() == oldWindowTitle) {
setCaption(i18nc("@title:window Plugin dependent window title",
"%1 - Kontact", plugin->title()));
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