1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-02 10:24:11 +01:00

Uncrustify

This commit is contained in:
Oleg Semyonov 2013-06-22 14:24:47 +03:00
parent 54eb5d8894
commit 8325cc3be7
8 changed files with 23 additions and 28 deletions

View File

@ -196,6 +196,7 @@ void ConfigStabilizationWidget::onBoardConnected()
{
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
UAVObjectUtilManager *utilMngr = pm->getObject<UAVObjectUtilManager>();
Q_ASSERT(utilMngr);
// If Revolution board enable misc tab, otherwise disable it

View File

@ -39,7 +39,6 @@ class QWidget;
QT_END_NAMESPACE
namespace Core {
class CORE_EXPORT IOptionsPage : public QObject {
Q_OBJECT
@ -89,13 +88,11 @@ public:
public slots:
virtual void updateState()
{
};
{};
private:
QIcon m_icon;
};
} // namespace Core
#endif // IOPTIONSPAGE_H

View File

@ -179,6 +179,7 @@ Q_DECLARE_METATYPE(::PageData) SettingsDialog::SettingsDialog(QWidget *parent, c
// add plugin pages
foreach(IOptionsPage * page, pluginPages) {
QTreeWidgetItem *item = addPage(page);
// automatically expand all plugin categories
item->parent()->setExpanded(true);
if (page->id() == initialPage && page->category() == initialCategory) {
@ -289,6 +290,7 @@ QTreeWidgetItem *SettingsDialog::addPage(IOptionsPage *page)
void SettingsDialog::onItemSelected()
{
QTreeWidgetItem *item = pageTree->currentItem();
if (!item) {
return;
}
@ -297,8 +299,7 @@ void SettingsDialog::onItemSelected()
if (item->childCount() == 1) {
// single child : category will not be expanded
item = item->child(0);
}
else if (item->childCount() > 1) {
} else if (item->childCount() > 1) {
// multiple children : expand category and select 1st child
emit categoryItemSelected();
return;
@ -331,6 +332,7 @@ void SettingsDialog::onItemSelected()
void SettingsDialog::onCategorySelected()
{
QTreeWidgetItem *item = pageTree->currentItem();
if (item->childCount() > 1) {
item->setExpanded(true);
pageTree->setCurrentItem(item->child(0), 0, QItemSelectionModel::SelectCurrent);

View File

@ -41,7 +41,6 @@ class PluginManager;
}
namespace Core {
namespace Internal {
class SettingsDialog;
}
@ -120,7 +119,6 @@ private:
void readConfigs_1_1_0(QSettings *qs);
void readConfigs_1_2_0(QSettings *qs);
};
} // namespace Core
#endif // UAVGADGETINSTANCEMANAGER_H

View File

@ -35,7 +35,6 @@ PfdQmlGadgetConfiguration::PfdQmlGadgetConfiguration(QString classId, QSettings
m_speedFactor(1.0),
m_altitudeFactor(1.0)
{
m_speedMap[1.0] = "m/s";
m_speedMap[3.6] = "km/h";
m_speedMap[2.2369] = "mph";

View File

@ -64,16 +64,14 @@ QWidget *PfdQmlGadgetOptionsPage::createPage(QWidget *parent)
// Setup units combos
QMapIterator<double, QString> iter = m_config->speedMapIterator();
while(iter.hasNext())
{
while (iter.hasNext()) {
iter.next();
options_page->speedUnitCombo->addItem(iter.value(), iter.key());
}
options_page->speedUnitCombo->setCurrentIndex(options_page->speedUnitCombo->findData(m_config->speedFactor()));
iter = m_config->altitudeMapIterator();
while(iter.hasNext())
{
while (iter.hasNext()) {
iter.next();
options_page->altUnitCombo->addItem(iter.value(), iter.key());
}