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
618a7508
Commit
618a7508
authored
Dec 01, 2020
by
Kurt Hindenburg
Browse files
Fix bool implicit conversions
parent
7342cbea
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/MainWindow.cpp
View file @
618a7508
...
...
@@ -134,7 +134,7 @@ MainWindow::MainWindow() :
// KXMLGui is making the status bar always visible, we need to fix in a proper way.
if
(
statusBar
())
{
if
(
statusBar
()
!=
nullptr
)
{
statusBar
()
->
installEventFilter
(
this
);
}
}
...
...
@@ -926,7 +926,7 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event)
default:
;
}
}
if
(
qobject_cast
<
QStatusBar
*>
(
obj
))
{
if
(
qobject_cast
<
QStatusBar
*>
(
obj
)
!=
nullptr
)
{
switch
(
event
->
type
())
{
case
QEvent
::
Show
:
statusBar
()
->
hide
();
break
;
default:
return
true
;
...
...
src/filterHotSpots/EscapeSequenceUrlFilter.cpp
View file @
618a7508
...
...
@@ -22,7 +22,7 @@ EscapeSequenceUrlFilter::EscapeSequenceUrlFilter(Session* session, TerminalDispl
void
EscapeSequenceUrlFilter
::
process
()
{
if
(
!
_window
->
screenWindow
()
&&
_window
->
screenWindow
()
->
screen
())
{
if
(
(
_window
->
screenWindow
()
==
nullptr
)
&&
(
_window
->
screenWindow
()
->
screen
()
!=
nullptr
)
)
{
return
;
}
auto
sWindow
=
_window
->
screenWindow
();
...
...
src/filterHotSpots/FileFilterHotspot.cpp
View file @
618a7508
...
...
@@ -76,7 +76,7 @@ void FileFilterHotSpot::activate(QObject *)
// The file path without the ":123" ... etc bits
const
QString
path
=
_filePath
.
mid
(
0
,
match
.
capturedStart
(
0
));
if
(
!
_session
)
{
if
(
_session
==
nullptr
)
{
openUrl
(
path
);
return
;
}
...
...
@@ -116,7 +116,7 @@ void FileFilterHotSpot::activate(QObject *)
// already part of editorCmd
auto
*
job
=
new
KIO
::
ApplicationLauncherJob
(
service
);
connect
(
job
,
&
KJob
::
result
,
this
,
[
path
,
job
,
openUrl
]()
{
if
(
job
->
error
())
{
if
(
job
->
error
()
!=
0
)
{
// TODO: use KMessageWidget (like the "terminal is read-only" message)
KMessageBox
::
sorry
(
QApplication
::
activeWindow
(),
i18n
(
"Could not open file with the text editor specified in the profile settings;
\n
"
...
...
src/filterHotSpots/FilterChain.cpp
View file @
618a7508
...
...
@@ -155,7 +155,7 @@ void FilterChain::keyReleaseEvent(TerminalDisplay *td, QKeyEvent *ev, int charLi
}
auto
spot
=
hotSpotAt
(
charLine
,
charColumn
);
if
(
spot
)
{
if
(
spot
!=
nullptr
)
{
spot
->
keyReleaseEvent
(
td
,
ev
);
}
}
...
...
@@ -186,7 +186,7 @@ bool FilterChain::keyPressEvent(TerminalDisplay *td, QKeyEvent *ev, int charLine
}
auto
spot
=
hotSpotAt
(
charLine
,
charColumn
);
if
(
spot
)
{
if
(
spot
!=
nullptr
)
{
spot
->
keyPressEvent
(
td
,
ev
);
}
return
false
;
...
...
@@ -196,16 +196,16 @@ void FilterChain::mouseMoveEvent(TerminalDisplay *td, QMouseEvent *ev, int char
{
auto
spot
=
hotSpotAt
(
charLine
,
charColumn
);
if
(
_hotSpotUnderMouse
!=
spot
)
{
if
(
_hotSpotUnderMouse
)
{
if
(
_hotSpotUnderMouse
!=
nullptr
)
{
_hotSpotUnderMouse
->
mouseLeaveEvent
(
td
,
ev
);
}
_hotSpotUnderMouse
=
spot
;
if
(
_hotSpotUnderMouse
)
{
if
(
_hotSpotUnderMouse
!=
nullptr
)
{
_hotSpotUnderMouse
->
mouseEnterEvent
(
td
,
ev
);
}
}
if
(
spot
)
{
if
(
spot
!=
nullptr
)
{
spot
->
mouseMoveEvent
(
td
,
ev
);
}
}
...
...
src/settings/ConfigDialogButtonGroupManager.cpp
View file @
618a7508
...
...
@@ -54,7 +54,7 @@ void ConfigDialogButtonGroupManager::add(const QButtonGroup *obj)
bool
ConfigDialogButtonGroupManager
::
hasChanged
()
const
{
for
(
const
QButtonGroup
*
group
:
qAsConst
(
_groups
))
{
if
(
!
group
->
checkedButton
())
{
if
(
group
->
checkedButton
()
==
nullptr
)
{
continue
;
}
int
value
=
buttonToEnumValue
(
group
->
checkedButton
());
...
...
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