openPilotLog
Opl::Db Namespace Reference

Detailed Description

The opl::db namespace provides string literals to programatically access the database

Example usage, do: newData.insert(opl::db::FLIGHTS_DEP, ui->deptLocLineEdit->text()); newData.value(opl::db::AIRCRAFT_MULTIPILOT);

instead of: newData.insert("dept", ui->deptLocLineEdit->text()); newData.value("multipilot");

Declaring these literals here avoids memory allocation at runtime for construction of temporary qstrings like ("dept"). See https://doc.qt.io/qt-5/qstring.html#QStringLiteral and ensures uniform use throughout the application.