1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

Merge remote-tracking branch 'origin/cgudrian/OP-1664_clang_warnings' into next

This commit is contained in:
Fredrik Arvidsson 2014-12-30 08:54:51 +01:00
commit 0f756668bc
10 changed files with 14 additions and 14 deletions

View File

@ -15,7 +15,7 @@ class QTCREATOR_UTILS_EXPORT LogFile : public QIODevice {
public:
explicit LogFile(QObject *parent = 0);
qint64 bytesAvailable() const;
qint64 bytesToWrite()
qint64 bytesToWrite() const
{
return m_file.bytesToWrite();
};

View File

@ -85,7 +85,7 @@ public slots:
virtual void configurationChanged(IUAVGadgetConfiguration *) {}
virtual void configurationAdded(IUAVGadgetConfiguration *) {}
virtual void configurationToBeDeleted(IUAVGadgetConfiguration *) {}
virtual void configurationNameChanged(QString, QString) {}
virtual void configurationNameChanged(IUAVGadgetConfiguration *config, QString, QString) {}
private slots:
private:
QString m_classId;

View File

@ -69,7 +69,7 @@ public:
m_locked = locked;
}
virtual void saveConfig(QSettings * /*settings*/) const {};
virtual void saveConfig(QSettings * /*settings*/) const {}
virtual void saveConfig(QSettings *settings, UAVConfigInfo * /*configInfo*/) const
{
saveConfig(settings);

View File

@ -194,7 +194,7 @@ bool UAVConfigInfo::askToAbort(int compat, QString message)
return true;
default:
msgBox.setText("INTERNAL ERROR: " + message + tr(" Unknown compatibility level: " + compat));
msgBox.setText("INTERNAL ERROR: " + message + tr(" Unknown compatibility level: %1").arg(compat));
}
if (result == QMessageBox::Ok) {
return false;

View File

@ -26,7 +26,7 @@
*/
#ifndef FGSIMULATOR_H
#define FGSIMULATOR_H_H
#define FGSIMULATOR_H
#include <QObject>
#include "simulator.h"

View File

@ -25,7 +25,7 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef OPAMP_GADGETFACTORY_H_
#ifndef OPMAP_GADGETFACTORY_H_
#define OPMAP_GADGETFACTORY_H_
#include <coreplugin/iuavgadgetfactory.h>
@ -49,4 +49,4 @@ public:
IOptionsPage *createOptionsPage(IUAVGadgetConfiguration *config);
};
#endif // ifndef OPAMP_GADGETFACTORY_H_
#endif // ifndef OPMAP_GADGETFACTORY_H_

View File

@ -15,7 +15,7 @@
*/
#ifndef PFDQMLGADGET_H_
#define PFDQMLQMLGADGET_H_
#define PFDQMLGADGET_H_
#include <coreplugin/iuavgadget.h>
#include "pfdqmlgadgetwidget.h"
@ -51,4 +51,4 @@ private:
};
#endif // PFDQMLQMLGADGET_H_
#endif // PFDQMLGADGET_H_

View File

@ -26,7 +26,7 @@
*/
#ifndef QMLVIEWGADGET_H_
#define QMLVIEWQMLGADGET_H_
#define QMLVIEWGADGET_H_
#include <coreplugin/iuavgadget.h>
#include "qmlviewgadgetwidget.h"
@ -62,4 +62,4 @@ private:
};
#endif // QMLVIEWQMLGADGET_H_
#endif // QMLVIEWGADGET_H_

View File

@ -616,7 +616,7 @@ void ConfigTaskWidget::autoLoadWidgets()
uiRelation.url = str.mid(str.indexOf(":") + 1);
}
}
if (!uiRelation.buttonType == none) {
if (!(uiRelation.buttonType == none)) {
QPushButton *button = NULL;
switch (uiRelation.buttonType) {
case save_button:

View File

@ -299,7 +299,7 @@ OP_DFU::Status DFUObject::UploadDescription(QVariant desc)
cout << "Starting uploading description\n";
QByteArray array;
if (desc.type() == QMetaType::QString) {
if (desc.type() == QVariant::String) {
QString description = desc.toString();
if (description.length() % 4 != 0) {
int pad = description.length() / 4;
@ -310,7 +310,7 @@ OP_DFU::Status DFUObject::UploadDescription(QVariant desc)
description.append(padding);
}
array = description.toLatin1();
} else if (desc.type() == QMetaType::QByteArray) {
} else if (desc.type() == QVariant::ByteArray) {
array = desc.toByteArray();
}