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

OP-1222 uncrustify

This commit is contained in:
Corvus Corax 2014-08-31 20:15:01 +02:00
parent 5707459074
commit 798defd12d
4 changed files with 11 additions and 19 deletions

View File

@ -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)

View File

@ -71,7 +71,6 @@ protected:
private slots:
virtual void setupUI(QString airframeType);
virtual bool throwConfigError(QString airframeType);
};
#endif // CONFIGFIXEDWINGWIDGET_H

View File

@ -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();
}

View File

@ -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