mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-17 02:52:12 +01:00
fixed indentation and clean up formatting
Signed-off-by: Kevin Vertucio <kevinv033@gmail.com>
This commit is contained in:
parent
c07142fa53
commit
e4d516424e
@ -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<br/>").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(
|
||||
"<h3>OpenPilot Ground Control Station</h3>"
|
||||
"GCS Revision: <b>%1</b><br/>"
|
||||
"UAVO Hash: %2<br/>"
|
||||
"<br/>"
|
||||
"Built from %3<br/>"
|
||||
"Built on %4 at %5<br/>"
|
||||
"Based on Qt %6 (%7 bit)<br/>"
|
||||
"<br/>"
|
||||
"© %8, 2010-%9. All rights reserved.<br/>"
|
||||
"<br/>"
|
||||
"<small>This program is free software; you can redistribute it and/or modify<br/>"
|
||||
"it under the terms of the GNU General Public License as published by<br/>"
|
||||
"the Free Software Foundation; either version 3 of the License, or<br/>"
|
||||
"(at your option) any later version.<br/>"
|
||||
"<br/>"
|
||||
"The program is provided AS IS with NO WARRANTY OF ANY KIND, "
|
||||
"INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A "
|
||||
"PARTICULAR PURPOSE.</small>"
|
||||
#else
|
||||
QString uavoHashStr = "N/A";
|
||||
#endif
|
||||
const QString description = tr(
|
||||
"<h3>OpenPilot Ground Control Station</h3>"
|
||||
"GCS Revision: <b>%1</b><br/>"
|
||||
"UAVO Hash: %2<br/>"
|
||||
"<br/>"
|
||||
"Built from %3<br/>"
|
||||
"Built on %4 at %5<br/>"
|
||||
"Based on Qt %6 (%7 bit)<br/>"
|
||||
"<br/>"
|
||||
"© %8, 2010-%9. All rights reserved.<br/>"
|
||||
"<br/>"
|
||||
"<small>This program is free software; you can redistribute it and/or modify<br/>"
|
||||
"it under the terms of the GNU General Public License as published by<br/>"
|
||||
"the Free Software Foundation; either version 3 of the License, or<br/>"
|
||||
"(at your option) any later version.<br/>"
|
||||
"<br/>"
|
||||
"The program is provided AS IS with NO WARRANTY OF ANY KIND, "
|
||||
"INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A "
|
||||
"PARTICULAR PURPOSE.</small>"
|
||||
).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);
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user