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

OP-1628 Uncrustify

This commit is contained in:
m_thread 2015-01-20 00:01:03 +01:00
parent fe404f1e33
commit e313d1ec67
4 changed files with 9 additions and 7 deletions

View File

@ -498,11 +498,12 @@ void SetupWizard::pageChanged(int currId)
void SetupWizard::reboot() const void SetupWizard::reboot() const
{ {
SetupWizard *wiz = const_cast<SetupWizard *>(this); SetupWizard *wiz = const_cast<SetupWizard *>(this);
wiz->setWindowFlags(wiz->windowFlags() & ~Qt::WindowStaysOnTopHint); wiz->setWindowFlags(wiz->windowFlags() & ~Qt::WindowStaysOnTopHint);
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
Q_ASSERT(pm); Q_ASSERT(pm);
UploaderGadgetFactory *uploader = pm->getObject<UploaderGadgetFactory>(); UploaderGadgetFactory *uploader = pm->getObject<UploaderGadgetFactory>();
Q_ASSERT(uploader); Q_ASSERT(uploader);
uploader->reboot(); uploader->reboot();

View File

@ -33,7 +33,7 @@ RebootDialog::RebootDialog(UploaderGadgetWidget *uploader) :
ui(new Ui::RebootDialog), m_uploader(uploader) ui(new Ui::RebootDialog), m_uploader(uploader)
{ {
setWindowFlags(((windowFlags() | Qt::CustomizeWindowHint) setWindowFlags(((windowFlags() | Qt::CustomizeWindowHint)
& ~Qt::WindowCloseButtonHint & ~Qt::WindowMinMaxButtonsHint)); & ~Qt::WindowCloseButtonHint & ~Qt::WindowMinMaxButtonsHint));
ui->setupUi(this); ui->setupUi(this);
connect(this, SIGNAL(reboot()), m_uploader, SLOT(systemReboot())); connect(this, SIGNAL(reboot()), m_uploader, SLOT(systemReboot()));
ui->rebootProgressBar->setVisible(true); ui->rebootProgressBar->setVisible(true);
@ -67,9 +67,9 @@ void RebootDialog::progressUpdate(uploader::ProgressStep progress, QVariant mess
ui->rebootProgressBar->setVisible(false); ui->rebootProgressBar->setVisible(false);
ui->okButton->setVisible(true); ui->okButton->setVisible(true);
ui->label->setText(tr("<font color='red'>Reboot failed!</font><p> Please perform a manual reboot by power cycling the board.<br>" ui->label->setText(tr("<font color='red'>Reboot failed!</font><p> Please perform a manual reboot by power cycling the board.<br>"
"To power cycle the controller remove all batteries and the USB cable for at least 30 seconds.<br>" "To power cycle the controller remove all batteries and the USB cable for at least 30 seconds.<br>"
"After 30 seconds, plug in the board again and wait for it to connect, this can take a few seconds.<br>" "After 30 seconds, plug in the board again and wait for it to connect, this can take a few seconds.<br>"
"Then press Ok.")); "Then press Ok."));
QDialog::exec(); QDialog::exec();
} else { } else {
accept(); accept();

View File

@ -35,8 +35,7 @@ namespace Ui {
class RebootDialog; class RebootDialog;
} }
class RebootDialog : public QDialog class RebootDialog : public QDialog {
{
Q_OBJECT Q_OBJECT
public: public:

View File

@ -552,6 +552,7 @@ void UploaderGadgetWidget::systemEraseBoot()
void UploaderGadgetWidget::rebootWithDialog() void UploaderGadgetWidget::rebootWithDialog()
{ {
RebootDialog dialog(this); RebootDialog dialog(this);
dialog.exec(); dialog.exec();
} }
@ -1014,6 +1015,7 @@ void UploaderGadgetWidget::autoUpdateStatus(uploader::ProgressStep status, QVari
{ {
QString msg; QString msg;
int remaining; int remaining;
switch (status) { switch (status) {
case uploader::WAITING_DISCONNECT: case uploader::WAITING_DISCONNECT:
m_config->autoUpdateLabel->setText(tr("Waiting for all OpenPilot boards to be disconnected from USB.")); m_config->autoUpdateLabel->setText(tr("Waiting for all OpenPilot boards to be disconnected from USB."));