Skip to content

Commit 4b57b71

Browse files
committed
documentation, const correctness
1 parent f91bfb2 commit 4b57b71

File tree

4 files changed

+9
-19
lines changed

4 files changed

+9
-19
lines changed

src/Librarian.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,9 @@ bool Librarian::contains(const Navigation::Aircraft& acft)
392392
}
393393

394394

395-
bool Librarian::contains(QObject* obj)
395+
bool Librarian::contains(const QObject* obj)
396396
{
397-
auto* route = qobject_cast<Navigation::FlightRoute*>(obj);
397+
auto* route = qobject_cast<const Navigation::FlightRoute*>(obj);
398398
if (route == nullptr)
399399
{
400400
return false;

src/Librarian.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,16 @@ class Librarian : public QObject {
8080
*/
8181
[[nodiscard]] Q_INVOKABLE static bool contains(const Navigation::Aircraft& acft);
8282

83-
/*! \brief Check if an object exists in the library
83+
/*! \brief Check if a flight route exists in the library
8484
*
8585
* At the moment, only flight routes are supported.
8686
*
87-
* @param object Pointer to an object
87+
* @param route Pointer to the route
8888
*
8989
* @returns True if the object is of type Navigation::FlightRoute and
9090
* exists in the library.
9191
*/
92-
[[nodiscard]] Q_INVOKABLE static bool contains(QObject* route);
92+
[[nodiscard]] Q_INVOKABLE static bool contains(const QObject* route);
9393

9494
/*! \brief Name of the directory containing the given
9595
*

src/navigation/FlightRoute.h

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -390,21 +390,11 @@ namespace Navigation
390390
*/
391391
[[nodiscard]] Q_INVOKABLE QString toVfrFlightPlan() const;
392392

393-
/*! \brief Exports to route to VFR Flight Plan Format.
393+
/*! \brief Check for equality
394394
*
395-
* This method serialises the current flight route as a simplified VFR flight plan
396-
* route string following standard aviation format:
395+
* @param other Flight route to compare with
397396
*
398-
* Format: [departure] DCT [waypoint1] DCT [waypoint2] DCT ... DCT [destination]
399-
* Example: EDPC DCT EDDM DCT 4620N07805W DCT EDML DCT EDTF
400-
*
401-
* Waypoint formatting rules:
402-
* - Airfields (type "AD"): Use ICAO codes (e.g., EDPC, EDDM, EDTF)
403-
* - Navigation Aids (type "NAV"): Use ICAO codes (e.g., VOR, NDB, DME)
404-
* - Reporting Points (type "WP"): Use coordinate format "4620N07805W" (degrees and minutes)
405-
* - User Waypoints (type "WP"): Use coordinate format "4620N07805W" (degrees and minutes)
406-
*
407-
* @returns QString containing the VFR flight plan route string
397+
* @returns True on equality
408398
*/
409399
[[nodiscard]] Q_INVOKABLE bool operator==(const Navigation::FlightRoute& other) const
410400
{

src/platform/FileExchange_Abstract.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public slots:
142142
*
143143
* @param path File name
144144
*
145-
* @param unmigledFilename Unmingled filename
145+
* @param unmingledFilename Unmingled filename
146146
*/
147147
virtual void processFileOpenRequest(const QString& path, const QString& unmingledFilename);
148148

0 commit comments

Comments
 (0)