Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 43c17379 authored by Kurt Hindenburg's avatar Kurt Hindenburg

fix a few readability-implicit-bool-cast issues

parent 14589ca1
......@@ -1191,7 +1191,7 @@ QString Screen::text(int startIndex, int endIndex, const DecodingOptions options
PlainTextDecoder plainTextDecoder;
TerminalCharacterDecoder *decoder;
if(options & ConvertToHtml) {
if((options & ConvertToHtml) != 0u) {
decoder = &htmlDecoder;
} else {
decoder = &plainTextDecoder;
......@@ -1363,7 +1363,7 @@ int Screen::copyLineToStream(int line ,
}
}
if (options & TrimLeadingWhitespace) {
if ((options & TrimLeadingWhitespace) != 0u) {
int spacesCount = 0;
for (spacesCount = 0; spacesCount < count; spacesCount++) {
if (!QChar(characterBuffer[spacesCount].character).isSpace()) {
......
......@@ -3450,7 +3450,7 @@ void TerminalDisplay::dragEnterEvent(QDragEnterEvent* event)
// and pcmanfm
// That also applies in dropEvent()
const auto mimeData = event->mimeData();
if (mimeData
if ((mimeData != nullptr)
&& (mimeData->hasFormat(QStringLiteral("text/plain"))
|| mimeData->hasFormat(QStringLiteral("text/uri-list")))) {
event->acceptProposedAction();
......@@ -3460,7 +3460,7 @@ void TerminalDisplay::dragEnterEvent(QDragEnterEvent* event)
void TerminalDisplay::dropEvent(QDropEvent* event)
{
const auto mimeData = event->mimeData();
if (!mimeData) {
if (mimeData == nullptr) {
return;
}
auto urls = mimeData->urls();
......
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