From d1e0537f704ea67483ccbdf7461e636490aba0cf Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 31 Dec 2013 08:41:16 +0100 Subject: meta: get rid of Initialize(), now RAII --- ftnoir_tracker_udp/ftnoir_tracker_udp.h | 3 --- ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp | 23 ----------------------- 2 files changed, 26 deletions(-) (limited to 'ftnoir_tracker_udp') diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp.h b/ftnoir_tracker_udp/ftnoir_tracker_udp.h index c7e9decf..7157f064 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp.h +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp.h @@ -49,9 +49,6 @@ public: explicit TrackerControls(); ~TrackerControls(); - void showEvent (QShowEvent *); - - void Initialize(QWidget *parent); void registerTracker(ITracker *) {} void unRegisterTracker() {} diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp index e17d5c32..707abf37 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp @@ -60,34 +60,11 @@ TrackerControls::~TrackerControls() { qDebug() << "~TrackerControls() says: started"; } -// -// Initialize tracker-client-dialog -// -void TrackerControls::Initialize(QWidget *parent) { - - QPoint offsetpos(100, 100); - if (parent) { - this->move(parent->pos() + offsetpos); - } - show(); -} - -// -// OK clicked on server-dialog -// void TrackerControls::doOK() { save(); this->close(); } -// override show event -void TrackerControls::showEvent ( QShowEvent * ) { - loadSettings(); -} - -// -// Cancel clicked on server-dialog -// void TrackerControls::doCancel() { // // Ask if changed Settings should be saved -- cgit v1.2.3 From 4411f8aa4508f2759c29181b668ebf949dc3bc8c Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 31 Dec 2013 13:06:30 +0100 Subject: udp: use settings framework --- ftnoir_tracker_udp/ftnoir_tracker_udp.cpp | 119 +++-------------------- ftnoir_tracker_udp/ftnoir_tracker_udp.h | 58 +++++------ ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp | 105 +++----------------- ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp | 21 ---- 4 files changed, 52 insertions(+), 251 deletions(-) (limited to 'ftnoir_tracker_udp') diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp index e70bfdc7..02ae21f0 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp @@ -25,18 +25,8 @@ #include "ftnoir_tracker_udp.h" #include "facetracknoir/global-settings.h" -FTNoIR_Tracker::FTNoIR_Tracker() +FTNoIR_Tracker::FTNoIR_Tracker() : should_quit(false) { - inSocket = 0; - outSocket = 0; - - bEnableRoll = true; - bEnablePitch = true; - bEnableYaw = true; - bEnableX = true; - bEnableY = true; - bEnableZ = true; - portAddress = 5551; should_quit = false; for (int i = 0; i < 6; i++) @@ -47,127 +37,46 @@ FTNoIR_Tracker::~FTNoIR_Tracker() { should_quit = true; wait(); - if (inSocket) { - inSocket->close(); - delete inSocket; - } - - if (outSocket) { - outSocket->close(); - delete outSocket; - } } /** QThread run @override **/ void FTNoIR_Tracker::run() { - -QHostAddress sender; -quint16 senderPort; - - // - // Read the data that was received. - // forever { if (should_quit) break; - if (inSocket != 0) { - while (inSocket->hasPendingDatagrams()) { - + while (inSocket.hasPendingDatagrams()) { + QMutexLocker foo(&mutex); QByteArray datagram; - datagram.resize(inSocket->pendingDatagramSize()); - mutex.lock(); - inSocket->readDatagram( (char * ) &newHeadPose, sizeof(newHeadPose), &sender, &senderPort); - mutex.unlock(); - } - } - else { - break; - } - + datagram.resize(sizeof(newHeadPose)); + inSocket.readDatagram((char * ) newHeadPose, sizeof(double[6])); + } usleep(10000); } } void FTNoIR_Tracker::StartTracker(QFrame*) { - loadSettings(); - // - // Create UDP-sockets if they don't exist already. - // They must be created here, because they must be in the new thread (FTNoIR_Tracker::run()) - // - if (inSocket == 0) { - qDebug() << "FTNoIR_Tracker::Initialize() creating insocket"; - inSocket = new QUdpSocket(); - // Connect the inSocket to the port, to receive messages - - if (!inSocket->bind(QHostAddress::Any, (int) portAddress, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint)) { - QMessageBox::warning(0,"FaceTrackNoIR Error", "Unable to bind UDP-port",QMessageBox::Ok,QMessageBox::NoButton); - delete inSocket; - inSocket = 0; - } - } + (void) inSocket.bind(QHostAddress::Any, (int) s.port, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint); start(); - return; } void FTNoIR_Tracker::GetHeadPoseData(double *data) { - mutex.lock(); - if (bEnableX) { + QMutexLocker foo(&mutex); + if (s.enable_x) data[TX] = newHeadPose[TX]; - } - if (bEnableX) { + if (s.enable_y) data[TY] = newHeadPose[TY]; - } - if (bEnableX) { + if (s.enable_z) data[TZ] = newHeadPose[TZ]; - } - if (bEnableYaw) { + if (s.enable_yaw) data[Yaw] = newHeadPose[Yaw]; - } - if (bEnablePitch) { + if (s.enable_pitch) data[Pitch] = newHeadPose[Pitch]; - } - if (bEnableRoll) { + if (s.enable_roll) data[Roll] = newHeadPose[Roll]; - } - mutex.unlock(); } -// -// Load the current Settings from the currently 'active' INI-file. -// -void FTNoIR_Tracker::loadSettings() { - - qDebug() << "FTNoIR_Tracker::loadSettings says: Starting "; - QSettings settings("opentrack"); // Registry settings (in HK_USER) - - QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/settings/default.ini" ).toString(); - QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file) - - qDebug() << "FTNoIR_Tracker::loadSettings says: iniFile = " << currentFile; - - iniFile.beginGroup ( "FTNClient" ); - bEnableRoll = iniFile.value ( "EnableRoll", 1 ).toBool(); - bEnablePitch = iniFile.value ( "EnablePitch", 1 ).toBool(); - bEnableYaw = iniFile.value ( "EnableYaw", 1 ).toBool(); - bEnableX = iniFile.value ( "EnableX", 1 ).toBool(); - bEnableY = iniFile.value ( "EnableY", 1 ).toBool(); - bEnableZ = iniFile.value ( "EnableZ", 1 ).toBool(); - portAddress = (float) iniFile.value ( "PortNumber", 5550 ).toInt(); - iniFile.endGroup (); -} - - -//////////////////////////////////////////////////////////////////////////////// -// Factory function that creates instances if the Tracker object. - -// Export both decorated and undecorated names. -// GetTracker - Undecorated name, which can be easily used with GetProcAddress -// Win32 API function. -// _GetTracker@0 - Common name decoration for __stdcall functions in C language. -//#pragma comment(linker, "/export:GetTracker=_GetTracker@0") - extern "C" FTNOIR_TRACKER_BASE_EXPORT ITracker* CALLING_CONVENTION GetConstructor() { return new FTNoIR_Tracker; diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp.h b/ftnoir_tracker_udp/ftnoir_tracker_udp.h index 7157f064..140a935d 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp.h +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp.h @@ -8,37 +8,43 @@ #include #include #include "facetracknoir/global-settings.h" +#include "facetracknoir/options.h" +using namespace options; + +struct settings { + pbundle b; + value port; + value enable_roll, enable_pitch, enable_yaw, + enable_x, enable_y, enable_z; + settings() : + b(bundle("udp-tracker")), + port(b, "port", 4242), + enable_roll(b, "enable-roll", true), + enable_pitch(b, "enable-pitch", true), + enable_yaw(b, "enable-yaw", true), + enable_x(b, "enable-x", true), + enable_y(b, "enable-y", true), + enable_z(b, "enable-y", true) + {} +}; class FTNoIR_Tracker : public ITracker, public QThread { public: FTNoIR_Tracker(); - ~FTNoIR_Tracker(); - + ~FTNoIR_Tracker(); void StartTracker(QFrame *); void GetHeadPoseData(double *data); - void loadSettings(); volatile bool should_quit; protected: void run(); // qthread override run method - private: - // UDP socket-variables - QUdpSocket *inSocket; // Receive from ... - QUdpSocket *outSocket; // Send to ... - QHostAddress destIP; // Destination IP-address - QHostAddress srcIP; // Source IP-address - - double newHeadPose[6]; // Structure with new headpose - - float portAddress; // Port-number - bool bEnableRoll; - bool bEnablePitch; - bool bEnableYaw; - bool bEnableX; - bool bEnableY; - bool bEnableZ; + QUdpSocket inSocket; + QHostAddress destIP; + QHostAddress srcIP; + double newHeadPose[6]; QMutex mutex; + settings s; }; // Widget that has controls for FTNoIR protocol client-settings. @@ -48,23 +54,14 @@ class TrackerControls: public QWidget, public ITrackerDialog public: explicit TrackerControls(); - ~TrackerControls(); void registerTracker(ITracker *) {} void unRegisterTracker() {} - private: Ui::UICFTNClientControls ui; - void loadSettings(); - void save(); - - /** helper **/ - bool settingsDirty; - + settings s; private slots: void doOK(); void doCancel(); - void settingChanged() { settingsDirty = true; }; - void settingChanged(int) { settingsDirty = true; }; }; //******************************************************************************************************* @@ -73,9 +70,6 @@ private slots: class FTNoIR_TrackerDll : public Metadata { public: - FTNoIR_TrackerDll(); - ~FTNoIR_TrackerDll(); - void getFullName(QString *strToBeFilled); void getShortName(QString *strToBeFilled); void getDescription(QString *strToBeFilled); diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp index 707abf37..59026288 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp @@ -25,61 +25,38 @@ #include "ftnoir_tracker_udp.h" #include "facetracknoir/global-settings.h" -//******************************************************************************************************* -// FaceTrackNoIR Client Settings-dialog. -//******************************************************************************************************* - -// -// Constructor for server-settings-dialog -// TrackerControls::TrackerControls() : QWidget() { ui.setupUi( this ); - // Connect Qt signals to member-functions connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK())); connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel())); - connect(ui.spinPortNumber, SIGNAL(valueChanged(int)), this, SLOT(settingChanged())); - - connect(ui.chkEnableRoll, SIGNAL(stateChanged(int)), this, SLOT(settingChanged(int))); - connect(ui.chkEnablePitch, SIGNAL(stateChanged(int)), this, SLOT(settingChanged(int))); - connect(ui.chkEnableYaw, SIGNAL(stateChanged(int)), this, SLOT(settingChanged(int))); - connect(ui.chkEnableX, SIGNAL(stateChanged(int)), this, SLOT(settingChanged(int))); - connect(ui.chkEnableY, SIGNAL(stateChanged(int)), this, SLOT(settingChanged(int))); - connect(ui.chkEnableZ, SIGNAL(stateChanged(int)), this, SLOT(settingChanged(int))); - - // Load the settings from the current .INI-file - loadSettings(); -} -// -// Destructor for server-dialog -// -TrackerControls::~TrackerControls() { - qDebug() << "~TrackerControls() says: started"; + tie_setting(s.enable_x, ui.chkEnableX); + tie_setting(s.enable_y, ui.chkEnableY); + tie_setting(s.enable_z, ui.chkEnableZ); + tie_setting(s.enable_yaw, ui.chkEnableYaw); + tie_setting(s.enable_pitch, ui.chkEnablePitch); + tie_setting(s.enable_roll, ui.chkEnableRoll); + tie_setting(s.port, ui.spinPortNumber); } void TrackerControls::doOK() { - save(); + s.b->save(); this->close(); } void TrackerControls::doCancel() { - // - // Ask if changed Settings should be saved - // - if (settingsDirty) { - int ret = QMessageBox::question ( this, "Settings have changed", "Do you want to save the settings?", QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Discard ); - - qDebug() << "doCancel says: answer =" << ret; - + if (s.b->modifiedp()) { + int ret = QMessageBox::question ( this, "Settings have changed", "Do you want to save the settings?", QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel); switch (ret) { case QMessageBox::Save: - save(); + s.b->save(); this->close(); break; case QMessageBox::Discard: + s.b->revert(); this->close(); break; case QMessageBox::Cancel: @@ -95,64 +72,6 @@ void TrackerControls::doCancel() { } } - -// -// Load the current Settings from the currently 'active' INI-file. -// -void TrackerControls::loadSettings() { - -// qDebug() << "loadSettings says: Starting "; - QSettings settings("opentrack"); // Registry settings (in HK_USER) - - QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/settings/default.ini" ).toString(); - QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file) - -// qDebug() << "loadSettings says: iniFile = " << currentFile; - - iniFile.beginGroup ( "FTNClient" ); - ui.chkEnableRoll->setChecked(iniFile.value ( "EnableRoll", 1 ).toBool()); - ui.chkEnablePitch->setChecked(iniFile.value ( "EnablePitch", 1 ).toBool()); - ui.chkEnableYaw->setChecked(iniFile.value ( "EnableYaw", 1 ).toBool()); - ui.chkEnableX->setChecked(iniFile.value ( "EnableX", 1 ).toBool()); - ui.chkEnableY->setChecked(iniFile.value ( "EnableY", 1 ).toBool()); - ui.chkEnableZ->setChecked(iniFile.value ( "EnableZ", 1 ).toBool()); - - ui.spinPortNumber->setValue( iniFile.value ( "PortNumber", 5550 ).toInt() ); - iniFile.endGroup (); - - settingsDirty = false; -} - -// -// Save the current Settings to the currently 'active' INI-file. -// -void TrackerControls::save() { - QSettings settings("opentrack"); // Registry settings (in HK_USER) - - QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/settings/default.ini" ).toString(); - QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file) - - iniFile.beginGroup ( "FTNClient" ); - iniFile.setValue ( "EnableRoll", ui.chkEnableRoll->isChecked() ); - iniFile.setValue ( "EnablePitch", ui.chkEnablePitch->isChecked() ); - iniFile.setValue ( "EnableYaw", ui.chkEnableYaw->isChecked() ); - iniFile.setValue ( "EnableX", ui.chkEnableX->isChecked() ); - iniFile.setValue ( "EnableY", ui.chkEnableY->isChecked() ); - iniFile.setValue ( "EnableZ", ui.chkEnableZ->isChecked() ); - iniFile.setValue ( "PortNumber", ui.spinPortNumber->value() ); - iniFile.endGroup (); - - settingsDirty = false; -} -//////////////////////////////////////////////////////////////////////////////// -// Factory function that creates instances if the Tracker-settings dialog object. - -// Export both decorated and undecorated names. -// GetTrackerDialog - Undecorated name, which can be easily used with GetProcAddress -// Win32 API function. -// _GetTrackerDialog@0 - Common name decoration for __stdcall functions in C language. -//#pragma comment(linker, "/export:GetTrackerDialog=_GetTrackerDialog@0") - extern "C" FTNOIR_TRACKER_BASE_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) { return new TrackerControls; diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp index 7d7b7c81..6732b599 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp @@ -26,18 +26,6 @@ #include #include "facetracknoir/global-settings.h" -FTNoIR_TrackerDll::FTNoIR_TrackerDll() { - //populate the description strings - trackerFullName = "UDP"; - trackerShortName = "UDP"; - trackerDescription = "opentrack UDP client"; -} - -FTNoIR_TrackerDll::~FTNoIR_TrackerDll() -{ - -} - void FTNoIR_TrackerDll::getFullName(QString *strToBeFilled) { *strToBeFilled = trackerFullName; @@ -58,15 +46,6 @@ void FTNoIR_TrackerDll::getIcon(QIcon *icon) *icon = QIcon(":/images/facetracknoir.png"); } -//////////////////////////////////////////////////////////////////////////////// -// Factory function that creates instances if the Tracker object. - -// Export both decorated and undecorated names. -// GetTrackerDll - Undecorated name, which can be easily used with GetProcAddress -// Win32 API function. -// _GetTrackerDll@0 - Common name decoration for __stdcall functions in C language. -//#pragma comment(linker, "/export:GetTrackerDll=_GetTrackerDll@0") - extern "C" FTNOIR_TRACKER_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata() { return new FTNoIR_TrackerDll; -- cgit v1.2.3 From c2e56bd21ee40501dab53b3647c8bdd1f370dba3 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 1 Jan 2014 11:28:59 +0100 Subject: don't reference QSettings anymore --- ftnoir_protocol_ftn/ftnoir_protocol_ftn.h | 1 - ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.h | 1 - ftnoir_protocol_wine/ftnoir_protocol_wine.h | 1 - ftnoir_tracker_hatire/ftnoir_tracker_hat.h | 1 - ftnoir_tracker_ht/stdafx.h | 1 - ftnoir_tracker_hydra/ftnoir_tracker_hydra.h | 1 - ftnoir_tracker_rift/ftnoir_tracker_rift.h | 1 - ftnoir_tracker_udp/ftnoir_tracker_udp.h | 1 - 8 files changed, 8 deletions(-) (limited to 'ftnoir_tracker_udp') diff --git a/ftnoir_protocol_ftn/ftnoir_protocol_ftn.h b/ftnoir_protocol_ftn/ftnoir_protocol_ftn.h index d5dc2cfe..99e6c6a1 100644 --- a/ftnoir_protocol_ftn/ftnoir_protocol_ftn.h +++ b/ftnoir_protocol_ftn/ftnoir_protocol_ftn.h @@ -33,7 +33,6 @@ #include #include #include -#include #include #include "facetracknoir/global-settings.h" #include "facetracknoir/options.h" diff --git a/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.h b/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.h index 5df59919..f92bb7bb 100644 --- a/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.h +++ b/ftnoir_protocol_libevdev/ftnoir_protocol_libevdev.h @@ -9,7 +9,6 @@ #include "ui_ftnoir_libevdev_controls.h" #include -#include #include "facetracknoir/global-settings.h" extern "C" { diff --git a/ftnoir_protocol_wine/ftnoir_protocol_wine.h b/ftnoir_protocol_wine/ftnoir_protocol_wine.h index e84dbd69..50d2bc0c 100644 --- a/ftnoir_protocol_wine/ftnoir_protocol_wine.h +++ b/ftnoir_protocol_wine/ftnoir_protocol_wine.h @@ -33,7 +33,6 @@ #include "ftnoir_csv/csv.h" #include "ui_ftnoir_winecontrols.h" #include -#include #include #include #include diff --git a/ftnoir_tracker_hatire/ftnoir_tracker_hat.h b/ftnoir_tracker_hatire/ftnoir_tracker_hat.h index 57ead58d..0dbc4c8c 100644 --- a/ftnoir_tracker_hatire/ftnoir_tracker_hat.h +++ b/ftnoir_tracker_hatire/ftnoir_tracker_hat.h @@ -16,7 +16,6 @@ #include #include #include -#include #define VER_FILEVERSION_STR "Version 2.0.7\0" diff --git a/ftnoir_tracker_ht/stdafx.h b/ftnoir_tracker_ht/stdafx.h index 0e532c9f..6f1539b7 100644 --- a/ftnoir_tracker_ht/stdafx.h +++ b/ftnoir_tracker_ht/stdafx.h @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include diff --git a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h index e569efab..05a8b076 100644 --- a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h +++ b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h @@ -1,7 +1,6 @@ #include "ftnoir_tracker_base/ftnoir_tracker_base.h" #include "ui_ftnoir_hydra_clientcontrols.h" #include -#include #include #include #include "facetracknoir/global-settings.h" diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift.h b/ftnoir_tracker_rift/ftnoir_tracker_rift.h index dd673308..7162b7ca 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift.h +++ b/ftnoir_tracker_rift/ftnoir_tracker_rift.h @@ -2,7 +2,6 @@ #include "ftnoir_tracker_base/ftnoir_tracker_base.h" #include "ui_ftnoir_rift_clientcontrols.h" #include -#include #include #include #include "facetracknoir/global-settings.h" diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp.h b/ftnoir_tracker_udp/ftnoir_tracker_udp.h index 140a935d..20d4f742 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp.h +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp.h @@ -3,7 +3,6 @@ #include #include #include -#include #include #include #include -- cgit v1.2.3 From a154845c21a58891f9368c560cfe26602b19ff10 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 1 Jan 2014 11:35:35 +0100 Subject: UDP: fill in description strings --- ftnoir_tracker_udp/ftnoir_tracker_udp.h | 5 ----- ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) (limited to 'ftnoir_tracker_udp') diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp.h b/ftnoir_tracker_udp/ftnoir_tracker_udp.h index 20d4f742..62eb67df 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp.h +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp.h @@ -73,10 +73,5 @@ public: void getShortName(QString *strToBeFilled); void getDescription(QString *strToBeFilled); void getIcon(QIcon *icon); - -private: - QString trackerFullName; // Trackers' name and description - QString trackerShortName; - QString trackerDescription; }; diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp index 6732b599..22dc7daa 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp @@ -28,17 +28,17 @@ void FTNoIR_TrackerDll::getFullName(QString *strToBeFilled) { - *strToBeFilled = trackerFullName; + *strToBeFilled = "UDP"; } void FTNoIR_TrackerDll::getShortName(QString *strToBeFilled) { - *strToBeFilled = trackerShortName; + *strToBeFilled = "UDP"; } void FTNoIR_TrackerDll::getDescription(QString *strToBeFilled) { - *strToBeFilled = trackerDescription; + *strToBeFilled = "UDP"; } void FTNoIR_TrackerDll::getIcon(QIcon *icon) -- cgit v1.2.3