Fix some warnings

This commit is contained in:
thalieht 2018-09-07 14:12:38 +03:00 committed by sledgehammer999
parent 84f0dbecfe
commit 5251d93b3d
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2
29 changed files with 48 additions and 50 deletions

View file

@ -1036,7 +1036,7 @@ void MainWindow::on_actionCloseWindow_triggered()
QWidget *MainWindow::currentTabWidget() const
{
if (isMinimized() || !isVisible())
return 0;
return nullptr;
if (m_tabs->currentIndex() == 0)
return m_transferListWidget;
return m_tabs->currentWidget();
@ -1437,7 +1437,7 @@ void MainWindow::loadPreferences(bool configureSession)
#else
const bool newSystrayIntegration = pref->systrayIntegration();
m_ui->actionLock->setVisible(newSystrayIntegration);
if (newSystrayIntegration != (m_systrayIcon != 0)) {
if (newSystrayIntegration != (m_systrayIcon != nullptr)) {
if (newSystrayIntegration) {
// create the trayicon
if (!QSystemTrayIcon::isSystemTrayAvailable()) {