Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
9d75f9ed
Commit
9d75f9ed
authored
Oct 10, 2020
by
Martin Tobias Holmedahl Sandsmark
Committed by
Kurt Hindenburg
Oct 10, 2020
Browse files
Fix invalid cast and simplify method
Part of !209
parent
2285d4ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/widgets/ViewContainer.cpp
View file @
9d75f9ed
...
...
@@ -176,7 +176,7 @@ void TabbedViewContainer::moveTabToWindow(int index, QWidget *window)
auto
controller
=
splitter
->
activeTerminalDisplay
()
->
sessionController
();
container
->
currentSessionControllerChanged
(
controller
);
forgetView
(
splitter
);
forgetView
();
}
void
TabbedViewContainer
::
konsoleConfigChanged
()
...
...
@@ -392,17 +392,17 @@ void TabbedViewContainer::disconnectTerminalDisplay(TerminalDisplay *display)
void
TabbedViewContainer
::
viewDestroyed
(
QObject
*
view
)
{
auto
widget
=
static_cast
<
ViewSplitter
*>
(
view
);
const
auto
idx
=
indexOf
(
widget
);
QWidget
*
widget
=
qobject_cast
<
QWidget
*>
(
view
);
Q_ASSERT
(
widget
);
const
int
idx
=
indexOf
(
widget
);
removeTab
(
idx
);
forgetView
(
widget
);
forgetView
();
_tabIconState
.
remove
(
widget
);
}
void
TabbedViewContainer
::
forgetView
(
ViewSplitter
*
view
)
void
TabbedViewContainer
::
forgetView
()
{
Q_UNUSED
(
view
)
if
(
count
()
==
0
)
{
emit
empty
(
this
);
}
...
...
src/widgets/ViewContainer.h
View file @
9d75f9ed
...
...
@@ -222,7 +222,7 @@ private Q_SLOTS:
void
konsoleConfigChanged
();
private:
void
forgetView
(
ViewSplitter
*
view
);
void
forgetView
();
struct
TabIconState
{
TabIconState
()
:
readOnly
(
false
),
broadcast
(
false
),
notification
(
Session
::
NoNotification
)
{}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment