summaryrefslogtreecommitdiffstats
path: root/src/client/vnc
diff options
context:
space:
mode:
authorSimon Rettberg2016-11-15 12:13:40 +0100
committerSimon Rettberg2016-11-15 12:13:40 +0100
commiteaebc23452813a8709d2bbb4d17fddb1b4f29d91 (patch)
tree956155fc2fc5b58498a4c494cc59b7adc68bc76a /src/client/vnc
parent[server] Rewrite positioning logic of connection frames (diff)
downloadpvs2-eaebc23452813a8709d2bbb4d17fddb1b4f29d91.tar.gz
pvs2-eaebc23452813a8709d2bbb4d17fddb1b4f29d91.tar.xz
pvs2-eaebc23452813a8709d2bbb4d17fddb1b4f29d91.zip
Increase compiler warnings, fix a lot of those instances
- Add explicit casts - Comment out unused params - Remove ignored const return types
Diffstat (limited to 'src/client/vnc')
-rw-r--r--src/client/vnc/vncserver.cpp8
-rw-r--r--src/client/vnc/vncthread.h2
-rw-r--r--src/client/vnc/vncwindow.cpp4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/client/vnc/vncserver.cpp b/src/client/vnc/vncserver.cpp
index 496a84d..165ba6d 100644
--- a/src/client/vnc/vncserver.cpp
+++ b/src/client/vnc/vncserver.cpp
@@ -34,7 +34,7 @@ static QString makePassword(int len = 10)
{
char pass[len];
for (int i = 0; i < len; ++i)
- pass[i] = 43 + qrand() % 80;
+ pass[i] = (char)(43 + qrand() % 80);
return QString::fromUtf8(pass, len);
}
@@ -167,7 +167,7 @@ void VncServer::stop()
* after 3 seconds...
* @param event
*/
-void VncServer::timerEvent(QTimerEvent *event)
+void VncServer::timerEvent(QTimerEvent * /* event */ )
{
// Error timeout (3s), tell server that vnc setup failed
this->stop();
@@ -222,7 +222,7 @@ void VncServer::onStdErr()
* @brief VncServer::onError
* @param error
*/
-void VncServer::onError(QProcess::ProcessError error)
+void VncServer::onError(QProcess::ProcessError /* error */ )
{
this->stop();
emit started(0, _ropass, _rwpass);
@@ -232,7 +232,7 @@ void VncServer::onError(QProcess::ProcessError error)
* @brief VncServer::onFinished
* @param exitCode
*/
-void VncServer::onFinished(int exitCode)
+void VncServer::onFinished(int /* exitCode */ )
{
this->stop();
emit started(0, _ropass, _rwpass);
diff --git a/src/client/vnc/vncthread.h b/src/client/vnc/vncthread.h
index a75ca0f..afdb92a 100644
--- a/src/client/vnc/vncthread.h
+++ b/src/client/vnc/vncthread.h
@@ -76,7 +76,7 @@ public:
const QImage& getImage() const { if (_srcStepX > 1 || _srcStepY > 1) return _imgScaled; return _img; }
const QSize& getSourceSize() const { return _clientSize; }
const QString getDesktopName() const;
- const bool isConnected() const { return _connected; }
+ bool isConnected() { return _connected; }
void stop() { _run = false; }
void setTargetSize(const QSize size);
void run();
diff --git a/src/client/vnc/vncwindow.cpp b/src/client/vnc/vncwindow.cpp
index 8cd7534..b7690b8 100644
--- a/src/client/vnc/vncwindow.cpp
+++ b/src/client/vnc/vncwindow.cpp
@@ -92,7 +92,7 @@ void VncWindow::draw(const int x, const int y, const int w, const int h)
* @param caption caption of window (only visible if not running in fullscreen mode)
* @param clientId the ID of the client we're connecting to (echoed back to server, not used locally)
*/
-void VncWindow::open(const QString& host, int port, const QString& passwd, bool ro, bool fullscreen, const QString& caption, const int clientId, const QByteArray& rawThumb)
+void VncWindow::open(const QString& host, int port, const QString& passwd, bool /* ro */ , bool fullscreen, const QString& caption, const int clientId, const QByteArray& rawThumb)
{
this->terminateVncThread();
_clientId = clientId;
@@ -139,7 +139,7 @@ void VncWindow::open(const QString& host, int port, const QString& passwd, bool
*
* @param e close event data
*/
-void VncWindow::closeEvent(QCloseEvent *e)
+void VncWindow::closeEvent(QCloseEvent * /* e */ )
{
qDebug("Closing VNC viewer window.");
this->terminateVncThread();