1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-19 04:52:12 +01:00

LP-10 Uncrustify

This commit is contained in:
Stefan Karlsson 2015-07-13 12:51:49 +02:00
parent f3b091ebc9
commit aea3fccf7b
11 changed files with 19 additions and 16 deletions

View File

@ -301,6 +301,7 @@ inline QStringList getPluginPaths()
QStringList rc;
QString pluginPath = QApplication::applicationDirPath();
pluginPath += QLatin1Char('/');
pluginPath += QLatin1String(PLUGIN_REL_PATH);
rc.push_back(pluginPath);

View File

@ -208,7 +208,7 @@ int main(int argc, char *argv[])
}
QByteArray fw;
dfu.DownloadFirmware(&fw, 0);
bool ret = dfu.SaveByteArrayToFile(file.toLatin1(), fw);
bool ret = dfu.SaveByteArrayToFile(file.toLatin1(), fw);
return ret;
} else if (action == OP_DFU::actionCompareCrc) {
dfu.CompareFirmware(file.toLatin1(), OP_DFU::crccompare, device);

View File

@ -1111,8 +1111,8 @@ int DFUObject::receiveData(void *data, int size)
qDebug() << "____timeout";
}
if (x > size - 1) {
qDebug() << "Error buffer overrun";
Q_ASSERT(false);
qDebug() << "Error buffer overrun";
Q_ASSERT(false);
}
return x;
}

View File

@ -487,7 +487,7 @@ QString UrlFactory::MakeReverseGeocoderUrl(internals::PointLatLng &pt, const QSt
#ifdef DEBUG_URLFACTORY
qDebug() << "Language: " << language;
#else
Q_UNUSED(language);
Q_UNUSED(language);
#endif
// CSV output has been depreciated. API key is no longer needed.
return QString("http://maps.googleapis.com/maps/api/geocode/xml?latlng=%1,%2").arg(QString::number(pt.Lat())).arg(QString::number(pt.Lng()));

View File

@ -41,6 +41,7 @@ namespace Utils {
QString GetDataPath()
{
QString dataPath = QApplication::applicationDirPath();
dataPath += QLatin1Char('/');
dataPath += QLatin1String(DATA_REL_PATH);
dataPath += QLatin1Char('/');

View File

@ -129,7 +129,7 @@ const char *const GO_FORWARD = "GCS.GoForward";
const char *const GOTOPREVIOUSGROUP = "GCS.GotoPreviousTabGroup";
const char *const GOTONEXTGROUP = "GCS.GotoNextTabGroup";
const char *const WINDOWSLIST = "GCS.WindowsList";
const char *const ABOUT_LIBREPILOTGCS = "GCS.AboutLibrePilotGCS";
const char *const ABOUT_LIBREPILOTGCS = "GCS.AboutLibrePilotGCS";
const char *const ABOUT_PLUGINS = "GCS.AboutPlugins";
const char *const ABOUT_AUTHORS = "GCS.AboutAuthors";
const char *const ABOUT_QT = "GCS.AboutQt";
@ -212,7 +212,7 @@ const char *const ICON_PLUGIN = ":/core/images/pluginicon.png";
const char *const ICON_EXIT = ":/core/images/exiticon.png";
const char *const ICON_OPTIONS = ":/core/images/optionsicon.png";
const char *const ICON_HELP = ":/core/images/helpicon.png";
const char *const ICON_LIBREPILOT = ":/core/images/librepiloticon.png";
const char *const ICON_LIBREPILOT = ":/core/images/librepiloticon.png";
// wizard kind

View File

@ -289,6 +289,7 @@ QString MainWindow::loadStyleSheet(QString fileName)
QString style;
// ...to open the file
QFile file(Utils::GetDataPath() + QString("stylesheets/") + fileName);
qDebug() << "Loading style sheet file" << file.fileName();
if (file.open(QFile::ReadOnly)) {
// QTextStream...

View File

@ -156,7 +156,7 @@ void opmap_edit_waypoint_dialog::setupModeWidgets()
ui->dsb_modeParam3->setVisible(false);
ui->dsb_modeParam4->setVisible(false);
break;
case MapDataDelegate::MODE_AUTOTAKEOFF:
case MapDataDelegate::MODE_AUTOTAKEOFF:
// FIXME: Do nothing?
break;
}

View File

@ -391,7 +391,7 @@ void ScopeGadgetWidget::addCurvePlot(QString objectName, QString fieldPlusSubFie
meanSamples, mathFunction, m_plotDataSize,
pen, antialiased);
} else {
Q_ASSERT(m_plotType == ChronoPlot);
Q_ASSERT(m_plotType == ChronoPlot);
plotData = new ChronoPlotData(object, field, element, scaleFactor,
meanSamples, mathFunction, m_plotDataSize,
pen, antialiased);

View File

@ -50,7 +50,7 @@
const char *VehicleTemplateExportDialog::EXPORT_FIXEDWING_NAME = "fixedwing";
const char *VehicleTemplateExportDialog::EXPORT_MULTI_NAME = "multirotor";
const char *VehicleTemplateExportDialog::EXPORT_HELI_NAME = "helicopter";
const char *VehicleTemplateExportDialog::EXPORT_HELI_NAME = "helicopter";
const char *VehicleTemplateExportDialog::EXPORT_SURFACE_NAME = "surface";
const char *VehicleTemplateExportDialog::EXPORT_CUSTOM_NAME = "custom";

View File

@ -164,16 +164,16 @@ void UsageTrackerPlugin::collectUsageParameters(QMap<QString, QString> &paramete
parameters["board_type"] = "0x" + QString::number(boardModel, 16).toLower();
parameters["board_serial"] = utilMngr->getBoardCPUSerial().toHex();
parameters["bl_version"] = QString::number(utilMngr->getBootloaderRevision());
parameters["fw_tag"] = devDesc.gitTag;
parameters["fw_hash"] = devDesc.gitHash;
parameters["fw_tag"] = devDesc.gitTag;
parameters["fw_hash"] = devDesc.gitHash;
#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
parameters["os_version"] = QSysInfo::prettyProductName() + " " + QSysInfo::currentCpuArchitecture();
parameters["os_version"] = QSysInfo::prettyProductName() + " " + QSysInfo::currentCpuArchitecture();
#else
parameters["os_version"] = "none";
parameters["os_version"] = "none";
#endif
parameters["os_threads"] = QString::number(QThread::idealThreadCount());
parameters["os_timezone"] = QTimeZone::systemTimeZoneId();
parameters["gcs_version"] = VersionInfo::revision();
parameters["os_threads"] = QString::number(QThread::idealThreadCount());
parameters["os_timezone"] = QTimeZone::systemTimeZoneId();
parameters["gcs_version"] = VersionInfo::revision();
// Configuration parameters
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();