mirror of
https://github.com/KDE/konsole.git
synced 2026-05-03 20:26:45 -04:00
Add inline explanation for the casting
This commit is contained in:
@@ -727,9 +727,9 @@ void ViewManager::containerViewsChanged(QObject* container)
|
||||
|
||||
void ViewManager::viewCloseRequest(QWidget* view)
|
||||
{
|
||||
//FIXME Check that this cast is actually legal
|
||||
TerminalDisplay* display = (TerminalDisplay*)view;
|
||||
|
||||
// Note: the received QWidget has already been destroyed, so
|
||||
// using dynamic_cast<> or qobject_cast<> does not work here
|
||||
TerminalDisplay* display = static_cast<TerminalDisplay*>(view);
|
||||
Q_ASSERT(display);
|
||||
|
||||
// 1. detach view from session
|
||||
|
||||
Reference in New Issue
Block a user