[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 124129] Segmentation fault killing a bash session from another
From: Eike Hein <hein () kde ! org>
Date: 2006-10-29 15:42:15
Message-ID: 20061029154215.12648.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=124129
hein kde org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From hein kde org 2006-10-29 16:42 -------
SVN commit 600111 by hein:
Fix crash when kpart in a tab other than
the currently selected tab goes down.
BUG:124129
M +4 -0 ChangeLog
M +9 -5 src/main_window.cpp
M +1 -1 src/main_window.h
M +3 -0 src/shell_session.cpp
M +6 -0 src/shell_session.h
--- trunk/extragear/utils/yakuake/ChangeLog #600110:600111
@ -1,3 +1,7 @
+Changes since 2.7.5
+- Fix crash when kpart in a tab other than the currently selected tab
+ is destroyed.
+
Changes since 2.7.4
- Further translations have been added.
- Yakuake no longer spawns login shells in new sessions.
--- trunk/extragear/utils/yakuake/src/main_window.cpp #600110:600111
@ -487,7 +487,9 @
sessions_stack.insert(index, session);
- connect(session, SIGNAL(destroyed()), this, SLOT(slotSessionDestroyed()));
+ session->setId(index);
+
+ connect(session, SIGNAL(destroyed(int)), this, SLOT(slotSessionDestroyed(int)));
connect(session, SIGNAL(titleUpdated()), this, SLOT(slotUpdateTitle()));
return index;
@ -813,20 +815,22 @
** Recreates the konsole kpart
********************************/
-void MainWindow::slotSessionDestroyed()
+void MainWindow::slotSessionDestroyed(int id)
{
if (isShuttingDown)
return;
- QWidget* widget = widgets_stack->widget(selected_id);
+ int session_id = (id != -1) ? id : selected_id;
+ QWidget* widget = widgets_stack->widget(session_id);
+
if (widget == 0L)
return;
widgets_stack->removeWidget(widget);
- sessions_stack.remove(selected_id);
+ sessions_stack.remove(session_id);
- if (tabs_bar->removeItem(selected_id) == -1)
+ if (tabs_bar->removeItem(session_id) == -1)
slotAddSession();
}
--- trunk/extragear/utils/yakuake/src/main_window.h #600110:600111
@ -206,7 +206,7 @
void slotIncreaseHeight();
void slotDecreaseHeight();
- void slotSessionDestroyed();
+ void slotSessionDestroyed(int id = -1);
void slotSetAccessKey();
void slotSetControlKeys();
--- trunk/extragear/utils/yakuake/src/shell_session.cpp #600110:600111
@ -30,6 +30,7 @
session_title = "";
session_widget = NULL;
session_terminal = NULL;
+ session_id = -1;
if ((factory = KLibLoader::self()->factory("libkonsolepart")) != NULL)
@ -73,6 +74,8 @
void ShellSession::slotDestroySession()
{
+ emit destroyed(session_id);
+
delete this;
}
--- trunk/extragear/utils/yakuake/src/shell_session.h #600110:600111
@ -42,6 +42,9 @
{
Q_OBJECT
+private:
+ int session_id;
+
public:
//-- PRIVATE ATTRIBUTES ---------------------------------------------//
@ -67,6 +70,8 @
//-- PUBLIC METHODS -------------------------------------------------//
+ void setId(int id) { session_id = id; }
+ int id() { return session_id; }
public slots:
@ -83,6 +88,7 @
//-- SIGNALS DEFINITION ---------------------------------------------//
void titleUpdated();
+ void destroyed(int id);
};
#endif /* SHELL_SESSION_H */
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic