Commit e3eba0b2 authored by Kurt Hindenburg's avatar Kurt Hindenburg

Fix bool implicit conversions

parent 86032fde
......@@ -669,7 +669,7 @@ void FileFilter::HotSpot::requestThumbnail(Qt::KeyboardModifiers modifiers, cons
void FileFilter::HotSpot::stopThumbnailGeneration()
{
_canGenerateThumbnail = false;
if (_previewJob) {
if (_previewJob != nullptr) {
_previewJob->deleteLater();
QToolTip::hideText();
}
......@@ -718,7 +718,7 @@ void FileFilter::HotSpot::thumbnailRequested() {
// Show a "Loading" if Preview takes a long time.
QTimer::singleShot(10, this, [this]{
if (!_previewJob) {
if (_previewJob == nullptr) {
return;
}
if (!_thumbnailFinished) {
......
......@@ -1032,7 +1032,7 @@ void SessionController::closeSession()
}
}
if (factory()) {
if (factory() != nullptr) {
factory()->removeClient(this);
}
}
......
......@@ -2413,7 +2413,7 @@ void TerminalDisplay::mouseMoveEvent(QMouseEvent* ev)
auto fileSpot = spot.dynamicCast<FileFilter::HotSpot>();
if (fileSpot != _currentlyHoveredHotspot) {
_currentlyHoveredHotspot = fileSpot;
if (fileSpot) {
if (fileSpot != nullptr) {
fileSpot->requestThumbnail(ev->modifiers(), ev->globalPos());
}
}
......@@ -3707,7 +3707,7 @@ void TerminalDisplay::keyPressEvent(QKeyEvent* event)
}
}
if (_currentlyHoveredHotspot) {
if (_currentlyHoveredHotspot != nullptr) {
auto fileHotspot = _currentlyHoveredHotspot.dynamicCast<FileFilter::HotSpot>();
if (!fileHotspot) {
return;
......
......@@ -258,13 +258,13 @@ QSplitter *TerminalHeaderBar::getTopLevelSplitter()
{
QWidget *p = parentWidget();
// This is expected.
if (qobject_cast<TerminalDisplay*>(p)) {
if (qobject_cast<TerminalDisplay*>(p) != nullptr) {
p = p->parentWidget();
}
// this is also expected.
auto *innerSplitter = qobject_cast<ViewSplitter*>(p);
if (!innerSplitter) {
if (innerSplitter == nullptr) {
return nullptr;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment