summaryrefslogtreecommitdiffstats
path: root/src/server/mainwindow/mainwindow.cpp
diff options
context:
space:
mode:
authorManuel Schneider2014-05-20 16:05:02 +0200
committerManuel Schneider2014-05-20 16:05:02 +0200
commit04931d80789a860c912358fd8c706585bb82a613 (patch)
tree4d2f919f0b35dabe8db827d5f9445569afc18eb8 /src/server/mainwindow/mainwindow.cpp
parentRemvoe unneccesary membervariable _toClient and method buildErrorMessage (imp... (diff)
downloadpvs2-04931d80789a860c912358fd8c706585bb82a613.tar.gz
pvs2-04931d80789a860c912358fd8c706585bb82a613.tar.xz
pvs2-04931d80789a860c912358fd8c706585bb82a613.zip
Make vnc credentials completely private to client. Make VNCConnect work client-internally only. Drop Client::computerID() (equivalent to Client::ip() XD )
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r--src/server/mainwindow/mainwindow.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index 8ca00a0..608b8cf 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -251,7 +251,7 @@ void MainWindow::savePosition(ConnectionFrame *cf)
QPoint pos(cf->pos().x() / _tileWidth, cf->pos().y() / _tileHeight);
USER_SETTINGS(settings);
settings.beginGroup("client_position");
- settings.setValue(client->computerId(), pos);
+ settings.setValue(client->ip(), pos);
settings.endGroup();
}
@@ -742,7 +742,7 @@ void MainWindow::onClientAuthenticated(Client* client)
ConnectionFrame *existing = NULL;
for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it)
{
- if ((*it)->computerId() == client->computerId())
+ if ((*it)->computerId() == client->ip())
existing = *it;
if ((*it)->isTutor())
{
@@ -757,7 +757,7 @@ void MainWindow::onClientAuthenticated(Client* client)
for (int i = 0; i < _tutorList.size(); i++)
{
// Check if client is possible tutor
- if (client->computerId() == _tutorList[i])
+ if (client->ip() == _tutorList[i])
{
isTutor = true;
break;
@@ -777,11 +777,11 @@ void MainWindow::onClientAuthenticated(Client* client)
int x, y;
bool ok;
USER_SETTINGS(usr);
- ok = loadPosition(usr, client->computerId(), x, y);
+ ok = loadPosition(usr, client->ip(), x, y);
if (!ok)
{
SYSTEM_SETTINGS(sys);
- ok = loadPosition(sys, client->computerId(), x, y);
+ ok = loadPosition(sys, client->ip(), x, y);
}
if (x >= _tilesX || y >= _tilesY)
ok = false;
@@ -804,7 +804,7 @@ void MainWindow::onClientAuthenticated(Client* client)
cf->setTutor(isTutor);
// Assign client instance
cf->assignClient(client);
- // ################
+
// If clients are currently locked, tell this new client
if (ui->action_Lock->isChecked())
client->lockScreen(true);
@@ -815,7 +815,7 @@ void MainWindow::onClientAuthenticated(Client* client)
Client *c = (**it).client();
if (c != NULL && c != client && c->isActiveVncServer() && c->isProjectionSource())
{
- c->startVncClient(c->ip(), c->vncPort(), c->vncRoPass(), c->id(), c->name() + " @ " + c->host());
+ c->startVncClient(c);
client->setDesiredProjectionSource(c->id());
break;
}
@@ -832,7 +832,7 @@ void MainWindow::onVncServerStateChange(Client* client)
{
if (!isValidClient(client)) // Check here because this slot is connected queued
return;
- if (client->vncPort() > 0)
+ if (client->isActiveVncServer())
{
// VNC Server started on some client - start projection on all clients interested in that client's screen
for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it)
@@ -844,7 +844,7 @@ void MainWindow::onVncServerStateChange(Client* client)
continue; // Already watching this client
if (c->desiredProjectionSource() != client->id() && !client->isProjectionSource())
continue; // Not interested
- c->startVncClient(client->ip(), client->vncPort(), client->vncRoPass(), client->id(), client->name() + " @ " + client->host());
+ c->startVncClient(client);
}
}
else