summaryrefslogtreecommitdiffstats
path: root/src/server/mainwindow/mainwindow.cpp
diff options
context:
space:
mode:
authorSimon Rettberg2016-10-10 17:02:22 +0200
committerSimon Rettberg2016-10-10 17:02:22 +0200
commit420f2894746d21938083f6785d58c869ad2c3901 (patch)
treed351360859b53be91011f28fdbf3710172540f2a /src/server/mainwindow/mainwindow.cpp
parentFix build by removing ref to TRANSLATION in res files (diff)
downloadpvs2-420f2894746d21938083f6785d58c869ad2c3901.tar.gz
pvs2-420f2894746d21938083f6785d58c869ad2c3901.tar.xz
pvs2-420f2894746d21938083f6785d58c869ad2c3901.zip
[server] Remove loadPosition() as it's pointless with per-room layouts
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r--src/server/mainwindow/mainwindow.cpp46
1 files changed, 2 insertions, 44 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index 59e47a4..6a244fb 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -358,29 +358,6 @@ ConnectionFrame* MainWindow::createFrame(QString computerId, QPoint pxCoord, QPo
return cf;
}
-
-/***************************************************************************//**
- * Load position.
- * @param settings
- * @param id
- * @param x
- * @param y
- * @return If loadPosition was successfull.
- */
-bool MainWindow::loadPosition(QSharedPointer<QSettings> settings, const QString& id, int& x, int& y)
-{
- settings->beginGroup("client_position");
- const QVariant retval = (settings->value(id));
- settings->endGroup();
- if (retval.type() != QVariant::Point)
- return false;
- const QPoint point(retval.toPoint());
- x = point.x();
- y = point.y();
- return true;
-}
-
-
/***************************************************************************//**
* Tells the new client the current situation in class room.
* Set the specific parameters like projection source or lock screen.
@@ -1271,27 +1248,8 @@ void MainWindow::onClientAuthenticated(Client* client)
// New one, create
ConnectionFrame *cf = createFrame();
- // Try to load last known position
- int x, y;
- bool ok;
-
- QSharedPointer<QSettings> sys = serverApp->getSettings();
- ok = loadPosition(sys, client->ip(), x, y);
-
- if (x >= _tilesX || y >= _tilesY)
- ok = false;
- if (ok) {
- if (x < 0)
- x = 0;
- if (y < 0)
- y = 0;
- qDebug("Move E");
- cf->move(x * getTileWidthPx(), y * getTileHeightPx());
- onPlaceFrame(true, cf);
- } else {
- // Move to any free tile
- placeFrameInFreeSlot(cf);
- }
+ // Move to any free tile
+ placeFrameInFreeSlot(cf);
// Set Tutor option
cf->setTutor(isTutor);
// Assign client instance