2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Trying to get rid of unused variables...

This commit is contained in:
Ilya Fedin
2021-03-14 00:08:07 +04:00
committed by John Preston
parent 12e306dd7b
commit ae0b9141dd
16 changed files with 8 additions and 19 deletions

View File

@@ -658,8 +658,8 @@ void MainWindow::savePosition(Qt::WindowState state) {
auto centerY = realPosition.y + realPosition.h / 2;
int minDelta = 0;
QScreen *chosen = nullptr;
auto screens = QGuiApplication::screens();
for (auto screen : QGuiApplication::screens()) {
const auto screens = QGuiApplication::screens();
for (auto screen : screens) {
auto delta = (screen->geometry().center() - QPoint(centerX, centerY)).manhattanLength();
if (!chosen || delta < minDelta) {
minDelta = delta;