فهرست منبع

Added version makros

With Simulator logging done, the application would count as being complete in a basic sense, i.e. Version 0.1.

From then on, no more feature implementations until the basic functionality is stable.
Felix Turo 3 سال پیش
والد
کامیت
3d284d105c

+ 1 - 2
mainwindow.cpp

@@ -46,8 +46,7 @@ MainWindow::MainWindow(QWidget *parent)
     if (!database_file.exists()) {
         WARN(tr("Error: Database file not found."));
         db_invalid = true;
-    }
-    if (database_file.size() == 0) { // To Do: Check for database errors instead of just checking for empty
+    } else if (database_file.size() == 0) { // To Do: Check for database errors instead of just checking for empty
         WARN(tr("Database file invalid."));
         db_invalid = true;
     }

+ 1 - 1
mainwindow.ui

@@ -29,7 +29,7 @@
    </size>
   </property>
   <property name="windowTitle">
-   <string>openPilotLog v0.6</string>
+   <string>openPilotLog</string>
   </property>
   <property name="toolButtonStyle">
    <enum>Qt::ToolButtonTextUnderIcon</enum>

+ 1 - 1
src/gui/dialogues/newflightdialog.ui

@@ -11,7 +11,7 @@
    </rect>
   </property>
   <property name="windowTitle">
-   <string>Dialog</string>
+   <string>Add New Flight</string>
   </property>
   <layout class="QGridLayout" name="gridLayout_4">
    <item row="0" column="0">

+ 3 - 3
src/gui/dialogues/newpilot.ui

@@ -6,12 +6,12 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>230</width>
-    <height>252</height>
+    <width>250</width>
+    <height>260</height>
    </rect>
   </property>
   <property name="windowTitle">
-   <string>Dialog</string>
+   <string>Add New Pilot</string>
   </property>
   <layout class="QGridLayout" name="gridLayout">
    <item row="0" column="0">

+ 1 - 1
src/gui/dialogues/newsimdialog.ui

@@ -11,7 +11,7 @@
    </rect>
   </property>
   <property name="windowTitle">
-   <string>Dialog</string>
+   <string>Add New Simulator Session</string>
   </property>
   <layout class="QGridLayout" name="gridLayout">
    <item row="2" column="0">

+ 8 - 4
src/gui/widgets/settingswidget.cpp

@@ -334,7 +334,7 @@ void SettingsWidget::on_aboutPushButton_clicked()
     QString SQLITE_VERSION = aDB->sqliteVersion();
     QString text = QMessageBox::tr(
 
-                       "<h3><center>About openPilotLog</center></h3>"
+                       "<h3><center>About</center></h3>"
                        "<br>"
                        "&#169; 2020 - 2022 Felix Turowsky"
                        "<br>"
@@ -355,12 +355,16 @@ void SettingsWidget::on_aboutPushButton_clicked()
                        "along with this program.  If not, "
                        "please click <a href=\"https://%2\">here</a>.</p>"
 
+                       "<br>"
+                       "You are using openPilotLog version %3."
                        "<br>"
 
-                       "<p>This program uses <a href=\"http://%3/\">Qt</a> version %4 and "
-                       "<a href=\"https://%5/\">SQLite</a> version %6</p>"
-                   ).arg(QStringLiteral("github.com/fiffty-50/openpilotlog"),
+                       "<p>This program uses <a href=\"http://%4/\">Qt</a> version %5 and "
+                       "<a href=\"https://%6/\">SQLite</a> version %7</p>"
+                   ).arg(
+                         QStringLiteral("github.com/fiffty-50/openpilotlog"),
                          QStringLiteral("gnu.org/licenses/"),
+                         OPL_VERSION_STRING,
                          QStringLiteral("qt.io"),
                          QT_VERSION_STR,
                          QStringLiteral("sqlite.org/about.html"),

+ 4 - 0
src/opl.h

@@ -39,6 +39,10 @@
  */
 namespace Opl {
 
+#define OPL_VERSION 0
+#define OPL_SUBVERSION 1
+#define OPL_VERSION_STRING QString(QString::number(OPL_VERSION) + "." + QString::number(OPL_SUBVERSION))
+
 #if defined(__GNUC__) || defined(__clang__)
     #define FUNC_IDENT __PRETTY_FUNCTION__
 #elif defined(_MSC_VER)