More refactoring.

This commit is contained in:
kevin 2019-06-23 13:30:01 -04:00
parent ad3fc52f43
commit 39235f1df3
5 changed files with 7 additions and 15 deletions

View File

@ -82,7 +82,7 @@ QString hgx11::_parseColorArr(QString value, bool isInt)
if (values.size() != 3) { if (values.size() != 3) {
return ""; return "";
} }
QString retVal = "["; value = "[";
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
if (isInt && (values.at(i).toInt() < 0 || values.at(i).toInt() > 255)) { if (isInt && (values.at(i).toInt() < 0 || values.at(i).toInt() > 255)) {
return ""; return "";
@ -90,12 +90,12 @@ QString hgx11::_parseColorArr(QString value, bool isInt)
if (!isInt && (values.at(i).toDouble() < 0.0 || values.at(i).toDouble() > 1.0)) { if (!isInt && (values.at(i).toDouble() < 0.0 || values.at(i).toDouble() > 1.0)) {
return ""; return "";
} }
retVal.append(values.at(i)); value.append(values.at(i));
retVal.append(","); value.append(",");
} }
retVal.chop(1); value.chop(1);
retVal.append("]"); value.append("]");
return retVal; return value;
} }
// private slots // private slots

View File

@ -23,8 +23,6 @@ private:
QTimer *_timer_p; QTimer *_timer_p;
int _inactiveTime_m = 0; int _inactiveTime_m = 0;
QString _destWidth_m;
QString _destHeight_m;
QString _parseColorArr(QString, bool); QString _parseColorArr(QString, bool);

View File

@ -4,7 +4,6 @@
#include <QThread> #include <QThread>
#include <QDebug> #include <QDebug>
#include <X11/extensions/Xdamage.h> #include <X11/extensions/Xdamage.h>
#include <X11/Xlib.h>
class hgx11damage : public QThread class hgx11damage : public QThread
{ {

View File

@ -3,7 +3,6 @@
#include <QObject> #include <QObject>
#include <QDebug> #include <QDebug>
#include <X11/Xlib.h>
#include <X11/extensions/Xrender.h> #include <X11/extensions/Xrender.h>
#include <X11/extensions/XShm.h> #include <X11/extensions/XShm.h>
#include <sys/shm.h> #include <sys/shm.h>

View File

@ -2,10 +2,6 @@
#define HGX11NET_H #define HGX11NET_H
#include <QTcpSocket> #include <QTcpSocket>
#include <QAbstractSocket>
#include <QString>
#include <QObject>
#include <QByteArray>
class hgx11net : public QObject class hgx11net : public QObject
{ {