1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

Get rid of yet more compile-time warnings.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2124 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
edouard 2010-11-14 15:25:14 +00:00 committed by edouard
parent 37a1f602b2
commit ecb5c719d2
17 changed files with 40 additions and 19 deletions

View File

@ -280,8 +280,9 @@ void ConfigAHRSWidget::incrementProgress()
*/
void ConfigAHRSWidget::calibPhase2()
{
UAVObject *obj = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("AHRSCalibration")));
UAVObjectField *field = obj->getField(QString("measure_var"));
// UAVObjectField *field = obj->getField(QString("measure_var"));
// This is a bit weird, but it is because we are expecting an update from the
// OP board with the correct calibration values, and those only arrive on the object update
@ -326,7 +327,7 @@ void ConfigAHRSWidget::attitudeRawUpdated(UAVObject * obj)
UAVObjectField *gyro_field = obj->getField(QString("gyros_filtered"));
UAVObjectField *mag_field = obj->getField(QString("magnetometers"));
Q_ASSERT(gyro_field != 0 && accel_field != 0 & mag_field != 0);
Q_ASSERT(gyro_field != 0 && accel_field != 0 && mag_field != 0);
// This is necessary to prevent a race condition on disconnect signal and another update
if (collectingData == true) {

View File

@ -29,6 +29,7 @@
ConfigGadgetConfiguration::ConfigGadgetConfiguration(QString classId, QSettings* qSettings, QObject *parent) :
IUAVGadgetConfiguration(classId, parent)
{
Q_UNUSED(qSettings);
}
@ -40,4 +41,5 @@ IUAVGadgetConfiguration *ConfigGadgetConfiguration::clone()
void ConfigGadgetConfiguration::saveConfig(QSettings* settings) const {
Q_UNUSED(settings)
}

View File

@ -31,11 +31,14 @@
ConfigGadgetOptionsPage::ConfigGadgetOptionsPage(ConfigGadgetConfiguration *config, QObject *parent)
{
//todo:implement
Q_UNUSED(config);
Q_UNUSED(parent);
}
QWidget *ConfigGadgetOptionsPage::createPage(QWidget *parent)
{
//todo:implement
Q_UNUSED(parent);
return new QWidget;
}

View File

@ -939,8 +939,10 @@ void ConfigServoWidget::updateChannels(UAVObject* controlCommand)
}
void ConfigServoWidget::updateChannelSlider(QSlider* slider, QLabel* min, QLabel* max, QCheckBox* rev, int value) {
void ConfigServoWidget::updateChannelSlider(QSlider* slider, QLabel* min, QLabel* max, QCheckBox* rev, int value)
{
Q_UNUSED(rev);
if (firstUpdate) {
// Reset all the min/max values of the sliders since we are
// starting the calibration.

View File

@ -34,7 +34,7 @@
#include <math.h>
static const double Pi = 3.14159265358979323846264338327950288419717;
static double TwoPi = 2.0 * Pi;
// static double TwoPi = 2.0 * Pi;
Edge::Edge(Node *sourceNode, Node *destNode)
: arrowSize(10)

View File

@ -53,6 +53,8 @@ ConnectionManager::ConnectionManager(Internal::MainWindow *mainWindow, Internal:
m_connectBtn(0),
m_ioDev(NULL)
{
Q_UNUSED(mainWindow);
QVBoxLayout *top = new QVBoxLayout;
top->setSpacing(0);
top->setMargin(0);
@ -121,6 +123,7 @@ void ConnectionManager::objectAdded(QObject *obj)
void ConnectionManager::aboutToRemoveObject(QObject *obj)
{
Q_UNUSED(obj);
}
/**
@ -129,26 +132,22 @@ void ConnectionManager::aboutToRemoveObject(QObject *obj)
*/
bool ConnectionManager::disconnectDevice()
{
// Check if we are currently connected or not
if(!m_ioDev)
{
return false; // We were not connected
}
else
{
//signal interested plugins that we are disconnecting the device
emit deviceDisconnected();
if(m_connectionDevice.connection)
{
m_connectionDevice.connection->closeDevice(m_connectionDevice.devName);
m_ioDev = NULL;
m_connectionDevice.connection = NULL;
}
m_connectBtn->setText("Connect");
m_availableDevList->setEnabled(true);
//signal interested plugins that we are disconnecting the device
emit deviceDisconnected();
if(m_connectionDevice.connection)
{
m_connectionDevice.connection->closeDevice(m_connectionDevice.devName);
m_ioDev = NULL;
m_connectionDevice.connection = NULL;
}
m_connectBtn->setText("Connect");
m_availableDevList->setEnabled(true);
return true;
}

View File

@ -155,6 +155,7 @@ void WorkspaceSettings::finish()
void WorkspaceSettings::textEdited(QString name)
{
Q_UNUSED(name);
m_page->workspaceComboBox->setItemText(m_currentIndex, m_page->nameEdit->text());
}

View File

@ -48,6 +48,7 @@ DialGadgetOptionsPage::DialGadgetOptionsPage(DialGadgetConfiguration *config, QO
QWidget *DialGadgetOptionsPage::createPage(QWidget *parent)
{
Q_UNUSED(parent);
options_page = new Ui::DialGadgetOptionsPage();
//main widget
QWidget *optionsPageWidget = new QWidget;

View File

@ -429,6 +429,7 @@ void DialGadgetWidget::paintEvent(QPaintEvent *event)
// nature of SVG dials.
void DialGadgetWidget::resizeEvent(QResizeEvent *event)
{
Q_UNUSED(event);
fitInView(m_background, Qt::KeepAspectRatio );
}

View File

@ -48,6 +48,7 @@ LineardialGadgetOptionsPage::LineardialGadgetOptionsPage(LineardialGadgetConfigu
QWidget *LineardialGadgetOptionsPage::createPage(QWidget *parent)
{
Q_UNUSED(parent);
options_page = new Ui::LineardialGadgetOptionsPage();
//main widget
QWidget *optionsPageWidget = new QWidget;

View File

@ -388,6 +388,7 @@ void LineardialGadgetWidget::paintEvent(QPaintEvent *event)
// nature of SVG dials.
void LineardialGadgetWidget::resizeEvent(QResizeEvent *event)
{
Q_UNUSED(event);
fitInView(background, Qt::KeepAspectRatio );
}

View File

@ -378,6 +378,7 @@ void SoundNotifyPlugin::expireTimerHandler()
void SoundNotifyPlugin::stateChanged(Phonon::State newstate, Phonon::State oldstate)
{
Q_UNUSED(oldstate)
if((newstate == Phonon::PausedState) ||
(newstate == Phonon::StoppedState))
{

View File

@ -43,6 +43,7 @@ SystemHealthGadgetOptionsPage::SystemHealthGadgetOptionsPage(SystemHealthGadgetC
QWidget *SystemHealthGadgetOptionsPage::createPage(QWidget *parent)
{
Q_UNUSED(parent);
options_page = new Ui::SystemHealthGadgetOptionsPage();
//main widget
QWidget *optionsPageWidget = new QWidget;

View File

@ -159,5 +159,6 @@ void SystemHealthGadgetWidget::paintEvent(QPaintEvent *event)
// nature of SVG dials.
void SystemHealthGadgetWidget::resizeEvent(QResizeEvent *event)
{
Q_UNUSED(event);
fitInView(background, Qt::KeepAspectRatio );
}

View File

@ -37,6 +37,7 @@ QWidget *BrowserItemDelegate::createEditor(QWidget *parent,
const QStyleOptionViewItem & option ,
const QModelIndex & index ) const
{
Q_UNUSED(option)
FieldTreeItem *item = static_cast<FieldTreeItem*>(index.internalPointer());
QWidget *editor = item->createEditor(parent);
Q_ASSERT(editor);
@ -68,5 +69,7 @@ void BrowserItemDelegate::updateEditorGeometry(QWidget *editor,
QSize BrowserItemDelegate::sizeHint(const QStyleOptionViewItem & option, const QModelIndex &index) const
{
Q_UNUSED(option);
Q_UNUSED(index);
return QSpinBox().sizeHint();
}

View File

@ -164,6 +164,8 @@ void UAVObjectBrowserWidget::updateObjectPersistance(ObjectPersistence::Operatio
void UAVObjectBrowserWidget::currentChanged(const QModelIndex &current, const QModelIndex &previous)
{
Q_UNUSED(previous);
TreeItem *item = static_cast<TreeItem*>(current.internalPointer());
bool enable = true;
if (current == QModelIndex())

View File

@ -312,6 +312,7 @@ QVariant UAVObjectTreeModel::data(const QModelIndex &index, int role) const
bool UAVObjectTreeModel::setData(const QModelIndex &index, const QVariant & value, int role)
{
Q_UNUSED(role)
TreeItem *item = static_cast<TreeItem*>(index.internalPointer());
item->setData(value, index.column());
return true;