1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-18 08:54:15 +01:00

Remove some comments and unused variables

This commit is contained in:
James Cotton 2012-09-08 15:29:38 -05:00
parent 65ef8a59b4
commit 19eaa77a15
2 changed files with 3 additions and 10 deletions

View File

@ -103,8 +103,6 @@ bool ConnectionManager::connectDevice()
// check if opening the device worked
if (!io_dev->isOpen()) {
qDebug() << "Error: io_dev->isOpen() returned FALSE .. could not open connection to " << connection_device.devName
<< ": " << io_dev->errorString();
return false;
}
@ -145,7 +143,7 @@ bool ConnectionManager::disconnectDevice()
m_connectionDevice.connection->closeDevice(m_connectionDevice.getConName());
}
} catch (...) { // handle exception
qDebug() << "Exception: m_connectionDevice.connection->closeDevice(" << m_connectionDevice.devName << ")";
qDebug() << "Exception: m_connectionDevice.connection->closeDevice(" << m_connectionDevice.getConName() << ")";
}
m_connectionDevice.connection = NULL;
@ -166,9 +164,6 @@ void ConnectionManager::objectAdded(QObject *obj)
IConnection *connection = Aggregation::query<IConnection>(obj);
if (!connection) return;
//qDebug() << "Connection object registered:" << connection->connectionName();
//qDebug() << connection->availableDevices();
//register devices and populate CB
devChanged(connection);
@ -200,7 +195,6 @@ void ConnectionManager::aboutToRemoveObject(QObject *obj)
void ConnectionManager::onConnectionDestroyed(QObject *obj)
{
Q_UNUSED(obj)
//onConnectionClosed(obj);
disconnectDevice();
}

View File

@ -73,7 +73,6 @@ void IPConnection::onOpenDevice(QString HostName, int Port, bool UseTCP)
{
QAbstractSocket *ipSocket;
const int Timeout = 5 * 1000;
int state;
ipConMutex.lock();
if (UseTCP) {
@ -175,7 +174,7 @@ QList <Core::IConnection::device> IPconnectionConnection::availableDevices()
return list;
}
QIODevice *IPconnectionConnection::openDevice(const QString &deviceName)
QIODevice *IPconnectionConnection::openDevice(const QString &)
{
QString HostName;
int Port;
@ -209,7 +208,7 @@ QIODevice *IPconnectionConnection::openDevice(const QString &deviceName)
return ipSocket;
}
void IPconnectionConnection::closeDevice(const QString &deviceName)
void IPconnectionConnection::closeDevice(const QString &)
{
if (ipSocket){
ipConMutex.lock();