[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdevplatform/5.0] shell: Fix behavior of main window caption
From:       Kevin Funk <kfunk () kde ! org>
Date:       2015-11-30 20:06:55
Message-ID: E1a3Uit-0003EQ-3d () scm ! kde ! org
[Download RAW message or body]

Git commit 566a324204cf2c77fbd5d97fe797253c6f83769c by Kevin Funk.
Committed on 30/11/2015 at 19:53.
Pushed by kfunk into branch '5.0'.

Fix behavior of main window caption

Make sure we control the caption of the main window, not the individual
parts

M  +9    -0    shell/mainwindow.cpp
M  +1    -1    shell/mainwindow.h

http://commits.kde.org/kdevplatform/566a324204cf2c77fbd5d97fe797253c6f83769c

diff --git a/shell/mainwindow.cpp b/shell/mainwindow.cpp
index 0cf2a5b..571bfba 100644
--- a/shell/mainwindow.cpp
+++ b/shell/mainwindow.cpp
@@ -93,6 +93,15 @@ void MainWindow::applyMainWindowSettings(const KConfigGr=
oup& config)
         KXmlGuiWindow::applyMainWindowSettings(config);
 }
 =

+void MainWindow::createGUI(KParts::Part* part)
+{
+    Sublime::MainWindow::createGUI(part);
+
+    // Don't let the Part control the main window caption -- we take care =
of that
+    disconnect(part, SIGNAL(setWindowCaption(QString)),
+               this, SLOT(setCaption(QString)));
+}
+
 MainWindow::MainWindow( Sublime::Controller *parent, Qt::WindowFlags flags=
 )
         : Sublime::MainWindow( parent, flags )
 {
diff --git a/shell/mainwindow.h b/shell/mainwindow.h
index ccccb77..e0cf3d1 100644
--- a/shell/mainwindow.h
+++ b/shell/mainwindow.h
@@ -88,7 +88,7 @@ protected:
     void dragEnterEvent( QDragEnterEvent* ) override;
     void dropEvent( QDropEvent* ) override;
     void applyMainWindowSettings(const KConfigGroup& config) override;
-
+    void createGUI(KParts::Part* part);
 =

 protected Q_SLOTS:
     virtual void tabContextMenuRequested(Sublime::View* , QMenu* ) overrid=
e;

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic