From 798defd12d6da38c922674ba74a5f169db7f52ad Mon Sep 17 00:00:00 2001 From: Corvus Corax Date: Sun, 31 Aug 2014 20:15:01 +0200 Subject: [PATCH] OP-1222 uncrustify --- .../cfg_vehicletypes/configfixedwingwidget.cpp | 1 - .../config/cfg_vehicletypes/configfixedwingwidget.h | 1 - .../src/plugins/welcome/welcomemode.cpp | 21 ++++++++------------- .../openpilotgcs/src/plugins/welcome/welcomemode.h | 7 +++---- 4 files changed, 11 insertions(+), 19 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configfixedwingwidget.cpp b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configfixedwingwidget.cpp index 887bf5fdf..5a0069de1 100644 --- a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configfixedwingwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configfixedwingwidget.cpp @@ -176,7 +176,6 @@ void ConfigFixedWingWidget::setupUI(QString frameType) scene->setSceneRect(planeimg->boundingRect()); m_aircraft->planeShape->fitInView(planeimg, Qt::KeepAspectRatio); m_aircraft->planeShape->setScene(scene); - } void ConfigFixedWingWidget::registerWidgets(ConfigTaskWidget &parent) diff --git a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configfixedwingwidget.h b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configfixedwingwidget.h index e4bc8f115..7955e7b9c 100644 --- a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configfixedwingwidget.h +++ b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configfixedwingwidget.h @@ -71,7 +71,6 @@ protected: private slots: virtual void setupUI(QString airframeType); virtual bool throwConfigError(QString airframeType); - }; #endif // CONFIGFIXEDWINGWIDGET_H diff --git a/ground/openpilotgcs/src/plugins/welcome/welcomemode.cpp b/ground/openpilotgcs/src/plugins/welcome/welcomemode.cpp index 090a77d85..a451e2115 100644 --- a/ground/openpilotgcs/src/plugins/welcome/welcomemode.cpp +++ b/ground/openpilotgcs/src/plugins/welcome/welcomemode.cpp @@ -80,20 +80,17 @@ WelcomeMode::WelcomeMode() : m_d->quickView->setSource(QUrl("qrc:/welcome/qml/main.qml")); m_container = NULL; - QNetworkAccessManager* networkAccessManager = new QNetworkAccessManager; + QNetworkAccessManager *networkAccessManager = new QNetworkAccessManager; // Only attempt to request our version info if the network is accessible - if(networkAccessManager->networkAccessible() == QNetworkAccessManager::Accessible) - { - connect(networkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkResponseReady(QNetworkReply*))); + if (networkAccessManager->networkAccessible() == QNetworkAccessManager::Accessible) { + connect(networkAccessManager, SIGNAL(finished(QNetworkReply *)), this, SLOT(networkResponseReady(QNetworkReply *))); // This will delete the network access manager instance when we're done - connect(networkAccessManager, SIGNAL(finished(QNetworkReply*)), networkAccessManager, SLOT(deleteLater())); + connect(networkAccessManager, SIGNAL(finished(QNetworkReply *)), networkAccessManager, SLOT(deleteLater())); networkAccessManager->get(QNetworkRequest(QUrl("http://www.openpilot.org/opver"))); - } - else - { + } else { // No network, can delete this now as we don't need it. delete networkAccessManager; } @@ -158,17 +155,15 @@ void WelcomeMode::triggerAction(const QString &actionId) Core::ModeManager::instance()->triggerAction(actionId); } -void WelcomeMode::networkResponseReady(QNetworkReply* reply) +void WelcomeMode::networkResponseReady(QNetworkReply *reply) { - if(reply != NULL) - { + if (reply != NULL) { QString version(reply->readAll()); version = version.trimmed(); reply->deleteLater(); - if(version != VersionInfo::tagOrHash8()) - { + if (version != VersionInfo::tagOrHash8()) { m_newVersionText = tr("(Update Available: %1)").arg(version); emit newVersionTextChanged(); } diff --git a/ground/openpilotgcs/src/plugins/welcome/welcomemode.h b/ground/openpilotgcs/src/plugins/welcome/welcomemode.h index ab85912b9..a51cf3909 100644 --- a/ground/openpilotgcs/src/plugins/welcome/welcomemode.h +++ b/ground/openpilotgcs/src/plugins/welcome/welcomemode.h @@ -45,8 +45,7 @@ namespace Welcome { struct WelcomeModePrivate; class WELCOME_EXPORT WelcomeMode : public Core::IMode { - Q_OBJECT - Q_PROPERTY(QString versionString READ versionString) + Q_OBJECT Q_PROPERTY(QString versionString READ versionString) Q_PROPERTY(QString newVersionText READ newVersionText NOTIFY newVersionTextChanged) public: @@ -92,8 +91,8 @@ private: int m_priority; QString m_newVersionText; - private slots: - void networkResponseReady(QNetworkReply* reply); +private slots: + void networkResponseReady(QNetworkReply *reply); }; } // namespace Welcome -- 2.11.4.GIT