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:
parent
5707459074
commit
798defd12d
@ -176,7 +176,6 @@ void ConfigFixedWingWidget::setupUI(QString frameType)
|
|||||||
scene->setSceneRect(planeimg->boundingRect());
|
scene->setSceneRect(planeimg->boundingRect());
|
||||||
m_aircraft->planeShape->fitInView(planeimg, Qt::KeepAspectRatio);
|
m_aircraft->planeShape->fitInView(planeimg, Qt::KeepAspectRatio);
|
||||||
m_aircraft->planeShape->setScene(scene);
|
m_aircraft->planeShape->setScene(scene);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigFixedWingWidget::registerWidgets(ConfigTaskWidget &parent)
|
void ConfigFixedWingWidget::registerWidgets(ConfigTaskWidget &parent)
|
||||||
|
@ -71,7 +71,6 @@ protected:
|
|||||||
private slots:
|
private slots:
|
||||||
virtual void setupUI(QString airframeType);
|
virtual void setupUI(QString airframeType);
|
||||||
virtual bool throwConfigError(QString airframeType);
|
virtual bool throwConfigError(QString airframeType);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CONFIGFIXEDWINGWIDGET_H
|
#endif // CONFIGFIXEDWINGWIDGET_H
|
||||||
|
@ -80,20 +80,17 @@ WelcomeMode::WelcomeMode() :
|
|||||||
m_d->quickView->setSource(QUrl("qrc:/welcome/qml/main.qml"));
|
m_d->quickView->setSource(QUrl("qrc:/welcome/qml/main.qml"));
|
||||||
m_container = NULL;
|
m_container = NULL;
|
||||||
|
|
||||||
QNetworkAccessManager* networkAccessManager = new QNetworkAccessManager;
|
QNetworkAccessManager *networkAccessManager = new QNetworkAccessManager;
|
||||||
|
|
||||||
// Only attempt to request our version info if the network is accessible
|
// Only attempt to request our version info if the network is accessible
|
||||||
if(networkAccessManager->networkAccessible() == QNetworkAccessManager::Accessible)
|
if (networkAccessManager->networkAccessible() == QNetworkAccessManager::Accessible) {
|
||||||
{
|
connect(networkAccessManager, SIGNAL(finished(QNetworkReply *)), this, SLOT(networkResponseReady(QNetworkReply *)));
|
||||||
connect(networkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkResponseReady(QNetworkReply*)));
|
|
||||||
|
|
||||||
// This will delete the network access manager instance when we're done
|
// 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")));
|
networkAccessManager->get(QNetworkRequest(QUrl("http://www.openpilot.org/opver")));
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
// No network, can delete this now as we don't need it.
|
// No network, can delete this now as we don't need it.
|
||||||
delete networkAccessManager;
|
delete networkAccessManager;
|
||||||
}
|
}
|
||||||
@ -158,17 +155,15 @@ void WelcomeMode::triggerAction(const QString &actionId)
|
|||||||
Core::ModeManager::instance()->triggerAction(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());
|
QString version(reply->readAll());
|
||||||
version = version.trimmed();
|
version = version.trimmed();
|
||||||
|
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
|
|
||||||
if(version != VersionInfo::tagOrHash8())
|
if (version != VersionInfo::tagOrHash8()) {
|
||||||
{
|
|
||||||
m_newVersionText = tr("(Update Available: %1)").arg(version);
|
m_newVersionText = tr("(Update Available: %1)").arg(version);
|
||||||
emit newVersionTextChanged();
|
emit newVersionTextChanged();
|
||||||
}
|
}
|
||||||
|
@ -45,8 +45,7 @@ namespace Welcome {
|
|||||||
struct WelcomeModePrivate;
|
struct WelcomeModePrivate;
|
||||||
|
|
||||||
class WELCOME_EXPORT WelcomeMode : public Core::IMode {
|
class WELCOME_EXPORT WelcomeMode : public Core::IMode {
|
||||||
Q_OBJECT
|
Q_OBJECT Q_PROPERTY(QString versionString READ versionString)
|
||||||
Q_PROPERTY(QString versionString READ versionString)
|
|
||||||
Q_PROPERTY(QString newVersionText READ newVersionText NOTIFY newVersionTextChanged)
|
Q_PROPERTY(QString newVersionText READ newVersionText NOTIFY newVersionTextChanged)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -92,8 +91,8 @@ private:
|
|||||||
int m_priority;
|
int m_priority;
|
||||||
QString m_newVersionText;
|
QString m_newVersionText;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void networkResponseReady(QNetworkReply* reply);
|
void networkResponseReady(QNetworkReply *reply);
|
||||||
};
|
};
|
||||||
} // namespace Welcome
|
} // namespace Welcome
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user