diff --git a/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.cpp b/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.cpp index 67b3c28f6..2b631fa05 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.cpp +++ b/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.cpp @@ -61,9 +61,9 @@ AuthorsDialog::AuthorsDialog(QWidget *parent) setWindowIcon(QIcon(":/core/images/openpilot_logo_32.png")); setWindowTitle(tr("About OpenPilot")); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); - //This loads a QML doc containing a Tabbed view - QDeclarativeView *view = new QDeclarativeView(this); - view->setSource(QUrl("qrc:/core/qml/AboutDialog.qml")); + // This loads a QML doc containing a Tabbed view + QDeclarativeView *view = new QDeclarativeView(this); + view->setSource(QUrl("qrc:/core/qml/AboutDialog.qml")); @@ -71,52 +71,49 @@ AuthorsDialog::AuthorsDialog(QWidget *parent) version += QDate(2007, 25, 10).toString(Qt::SystemLocaleDate); QString ideRev; - #ifdef GCS_REVISION +#ifdef GCS_REVISION //: This gets conditionally inserted as argument %8 into the description string. ideRev = tr("From revision %1
").arg(QString::fromLatin1(GCS_REVISION_STR).left(10)); - #endif +#endif #ifdef UAVO_HASH //: This gets conditionally inserted as argument %11 into the description string. QByteArray uavoHashArray; QString uavoHash = QString::fromLatin1(Core::Constants::UAVOSHA1_STR); uavoHash.chop(2); - uavoHash.remove(0,2); - uavoHash=uavoHash.trimmed(); + uavoHash.remove(0, 2); + uavoHash = uavoHash.trimmed(); bool ok; - foreach(QString str,uavoHash.split(",")) - { - uavoHashArray.append(str.toInt(&ok,16)); + foreach(QString str, uavoHash.split(",")) { + uavoHashArray.append(str.toInt(&ok, 16)); } QString gcsUavoHashStr; - foreach(char i, uavoHashArray) - { - gcsUavoHashStr.append(QString::number(i,16).right(2)); + foreach(char i, uavoHashArray) { + gcsUavoHashStr.append(QString::number(i, 16).right(2)); } QString uavoHashStr = gcsUavoHashStr; - #else - QString uavoHashStr = "N/A"; - #endif - - const QString description = tr( - "

OpenPilot Ground Control Station

" - "GCS Revision: %1
" - "UAVO Hash: %2
" - "
" - "Built from %3
" - "Built on %4 at %5
" - "Based on Qt %6 (%7 bit)
" - "
" - "© %8, 2010-%9. All rights reserved.
" - "
" - "This program is free software; you can redistribute it and/or modify
" - "it under the terms of the GNU General Public License as published by
" - "the Free Software Foundation; either version 3 of the License, or
" - "(at your option) any later version.
" - "
" - "The program is provided AS IS with NO WARRANTY OF ANY KIND, " - "INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A " - "PARTICULAR PURPOSE.
" +#else + QString uavoHashStr = "N/A"; +#endif + const QString description = tr( + "

OpenPilot Ground Control Station

" + "GCS Revision: %1
" + "UAVO Hash: %2
" + "
" + "Built from %3
" + "Built on %4 at %5
" + "Based on Qt %6 (%7 bit)
" + "
" + "© %8, 2010-%9. All rights reserved.
" + "
" + "This program is free software; you can redistribute it and/or modify
" + "it under the terms of the GNU General Public License as published by
" + "the Free Software Foundation; either version 3 of the License, or
" + "(at your option) any later version.
" + "
" + "The program is provided AS IS with NO WARRANTY OF ANY KIND, " + "INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A " + "PARTICULAR PURPOSE.
" ).arg( QString::fromLatin1(GCS_REVISION_STR).left(60), // %1 uavoHashStr, // %2 @@ -128,7 +125,7 @@ AuthorsDialog::AuthorsDialog(QWidget *parent) QLatin1String(GCS_AUTHOR), // %8 QLatin1String(GCS_YEAR_STR) // %9 ); - //Expose the version description to the QML doc + // Expose the version description to the QML doc view->rootContext()->setContextProperty("version", description); }