Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Konsole
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
20
Merge Requests
20
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Utilities
Konsole
Commits
4ba5682d
Commit
4ba5682d
authored
Mar 30, 2017
by
Kurt Hindenburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use qobject_cast instead static_cast; use static_cast instead c casts
parent
5bc0b561
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
src/TerminalDisplay.cpp
src/TerminalDisplay.cpp
+2
-2
src/TerminalDisplayAccessible.cpp
src/TerminalDisplayAccessible.cpp
+1
-1
src/ViewContainer.cpp
src/ViewContainer.cpp
+1
-1
src/ViewContainerTabBar.cpp
src/ViewContainerTabBar.cpp
+1
-1
No files found.
src/TerminalDisplay.cpp
View file @
4ba5682d
...
...
@@ -3458,7 +3458,7 @@ bool AutoScrollHandler::eventFilter(QObject* watched, QEvent* event)
switch
(
event
->
type
())
{
case
QEvent
::
MouseMove
:
{
QMouseEvent
*
mouseEvent
=
(
QMouseEvent
*
)
event
;
QMouseEvent
*
mouseEvent
=
static_cast
<
QMouseEvent
*>
(
event
)
;
bool
mouseInWidget
=
widget
()
->
rect
().
contains
(
mouseEvent
->
pos
());
if
(
mouseInWidget
)
{
if
(
_timerId
)
...
...
@@ -3473,7 +3473,7 @@ bool AutoScrollHandler::eventFilter(QObject* watched, QEvent* event)
break
;
}
case
QEvent
::
MouseButtonRelease
:
{
QMouseEvent
*
mouseEvent
=
(
QMouseEvent
*
)
event
;
QMouseEvent
*
mouseEvent
=
static_cast
<
QMouseEvent
*>
(
event
)
;
if
(
_timerId
&&
(
mouseEvent
->
buttons
()
&
~
Qt
::
LeftButton
))
{
killTimer
(
_timerId
);
_timerId
=
0
;
...
...
src/TerminalDisplayAccessible.cpp
View file @
4ba5682d
...
...
@@ -177,5 +177,5 @@ QString TerminalDisplayAccessible::text(int startOffset, int endOffset) const
TerminalDisplay
*
TerminalDisplayAccessible
::
display
()
const
{
return
static
_cast
<
TerminalDisplay
*>
(
widget
());
return
qobject
_cast
<
TerminalDisplay
*>
(
widget
());
}
src/ViewContainer.cpp
View file @
4ba5682d
...
...
@@ -151,7 +151,7 @@ void ViewContainer::addView(QWidget* view , ViewProperties* item, int index)
}
void
ViewContainer
::
viewDestroyed
(
QObject
*
object
)
{
QWidget
*
widget
=
static
_cast
<
QWidget
*>
(
object
);
QWidget
*
widget
=
qobject
_cast
<
QWidget
*>
(
object
);
forgetView
(
widget
);
}
...
...
src/ViewContainerTabBar.cpp
View file @
4ba5682d
...
...
@@ -136,7 +136,7 @@ void ViewContainerTabBar::dropEvent(QDropEvent* event)
const
int
index
=
dropIndex
(
event
->
pos
());
bool
success
=
false
;
ViewContainerTabBar
*
sourceContainerTabBar
=
static
_cast
<
ViewContainerTabBar
*>
(
event
->
source
());
ViewContainerTabBar
*
sourceContainerTabBar
=
qobject
_cast
<
ViewContainerTabBar
*>
(
event
->
source
());
// check if the moved tab is the last of source view.
if
(
sourceContainerTabBar
->
count
()
==
1
)
{
...
...
Write
Preview
Markdown
is supported
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