mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 07:57:22 -06:00
Avoid repeating the return type
This commit is contained in:
@@ -227,7 +227,7 @@ namespace
|
||||
return path;
|
||||
}
|
||||
|
||||
return QString();
|
||||
return {};
|
||||
}
|
||||
#endif // Q_OS_WIN
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ QPoint Utils::Misc::screenCenter(const QWidget *w)
|
||||
QDesktopWidget *desktop = QApplication::desktop();
|
||||
int scrn = desktop->screenNumber(parent); // fallback to `primaryScreen` when parent is invalid
|
||||
QRect r = desktop->availableGeometry(scrn);
|
||||
return QPoint(r.x() + (r.width() - w->frameSize().width()) / 2, r.y() + (r.height() - w->frameSize().height()) / 2);
|
||||
return {r.x() + (r.width() - w->frameSize().width()) / 2, r.y() + (r.height() - w->frameSize().height()) / 2};
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace Utils
|
||||
QSslKey key {data, QSsl::Rsa};
|
||||
if (!key.isNull())
|
||||
return key;
|
||||
return QSslKey(data, QSsl::Ec);
|
||||
return {data, QSsl::Ec};
|
||||
}
|
||||
|
||||
bool isSSLKeyValid(const QByteArray &data)
|
||||
|
||||
Reference in New Issue
Block a user