summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElvis Angelaccio <elvis.angelaccio@kde.org>2016-11-19 14:42:34 (GMT)
committerElvis Angelaccio <elvis.angelaccio@kde.org>2016-11-19 14:50:01 (GMT)
commit47e45e73ea6d9559951b2e0dd2b8368b99f63749 (patch)
tree7ff82a7bfe7cd29b0f62a896a69f4d6f3bb68fed
parentebae4b1ca046fc96f14847f03943bb8b831e08ef (diff)
part: stop changing the window title when the toolbar gets edited
KParts::ReadOnlyPart::guiActivateEvent(), which emits `setWindowCaption` with url().toDisplayString() as argument, gets called when the toolbar gets changed. We don't want this behavior, so we override guiActivateEvent() with an empty implementation that does nothing. BUG: 357660 FIXED-IN: 16.12.0
-rw-r--r--part/part.cpp6
-rw-r--r--part/part.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/part/part.cpp b/part/part.cpp
index 3906d7d..991f121 100644
--- a/part/part.cpp
+++ b/part/part.cpp
@@ -281,6 +281,12 @@ void Part::extractSelectedFilesTo(const QString& localPath)
job->start();
}
+void Part::guiActivateEvent(KParts::GUIActivateEvent *event)
+{
+ // #357660: prevent parent's implementation from changing the window title.
+ Q_UNUSED(event)
+}
+
void Part::setupView()
{
m_view->setContextMenuPolicy(Qt::CustomContextMenu);
diff --git a/part/part.h b/part/part.h
index 2e51d34..0168ea7 100644
--- a/part/part.h
+++ b/part/part.h
@@ -93,6 +93,9 @@ public:
public slots:
void extractSelectedFilesTo(const QString& localPath);
+protected:
+ void guiActivateEvent(KParts::GUIActivateEvent *event) Q_DECL_OVERRIDE;
+
private slots:
void slotLoadingStarted();
void slotLoadingFinished(KJob *job);