Browse Source

Simplify null pointer check

adaptive-webui-19844
Chocobo1 5 years ago
parent
commit
bf264b983a
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 2
      src/gui/rss/htmlbrowser.cpp
  2. 2
      src/gui/transferlistfilterswidget.cpp

2
src/gui/rss/htmlbrowser.cpp

@ -65,7 +65,7 @@ QVariant HtmlBrowser::loadResource(int type, const QUrl &name)
url.setScheme("http"); url.setScheme("http");
QIODevice *dev = m_diskCache->data(url); QIODevice *dev = m_diskCache->data(url);
if (dev != nullptr) { if (dev) {
qDebug() << "HtmlBrowser::loadResource() cache " << url.toString(); qDebug() << "HtmlBrowser::loadResource() cache " << url.toString();
QByteArray res = dev->readAll(); QByteArray res = dev->readAll();
delete dev; delete dev;

2
src/gui/transferlistfilterswidget.cpp

@ -354,7 +354,7 @@ void TrackerFiltersList::removeItem(const QString &tracker, const QString &hash)
updateGeometry(); updateGeometry();
return; return;
} }
if (trackerItem != nullptr) if (trackerItem)
trackerItem->setText(QString("%1 (%2)").arg(host).arg(tmp.size())); trackerItem->setText(QString("%1 (%2)").arg(host).arg(tmp.size()));
} }
else { else {

Loading…
Cancel
Save