Commit f190194f authored by Yuri Chornoivan's avatar Yuri Chornoivan

Fix minor EBN issues and typos

parent 839863f7
......@@ -152,7 +152,7 @@ private Q_SLOTS:
postproc.process(result);
const auto postProcResult = JsonLdDocument::toJson(postproc.result());
if (postProcResult.isEmpty()) {
qDebug() << "Result discared in post processing:";
qDebug() << "Result discarded in post processing:";
qDebug().noquote() << QJsonDocument(jsonResult).toJson();
}
QVERIFY(!postProcResult.isEmpty());
......
......@@ -49,6 +49,7 @@ namespace CalendarHandler
/** Fills @p event with details of @p reservations.
* Can be used on new events or to update existing ones.
* @param reservations When passing more than one reservation here, those most be for the same multi-traveler trip.
* @param event The event.
* That is, MergeUtil::isSame() returns true for Reservation::reservationFor for each pair of values.
*/
KITINERARY_EXPORT void fillEvent(const QVector<QVariant> &reservations, const QSharedPointer<KCalCore::Event> &event);
......
......@@ -46,7 +46,7 @@ struct base_type {
static constexpr const bool is_valid = !std::is_same<type, T>::value;
};
// customization hook for comparisson for certain types
// customization hook for comparison for certain types
template <typename T> inline bool equals(typename parameter_type<T>::type lhs, typename parameter_type<T>::type rhs)
{
return lhs == rhs;
......
......@@ -87,7 +87,7 @@ class KITINERARY_EXPORT Place
/** Identifier.
* We use the following schemas currently:
* - 'uic:', UIC station code (see https://www.wikidata.org/wiki/Property:P722)
* - 'sncf:', Gares & Connextions ID, (see https://www.wikidata.org/wiki/Property:P3104), French train station identifier.
* - 'sncf:', Gares & Connexions ID, (see https://www.wikidata.org/wiki/Property:P3104), French train station identifier.
* - 'ibnr:', Internationale Bahnhofsnummer, (see https://www.wikidata.org/wiki/Property:P954), German train station identifier.
* @see http://schema.org/docs/datamodel.html#identifierBg
*/
......
......@@ -77,7 +77,7 @@ class KITINERARY_EXPORT LodgingReservation : public Reservation
class KITINERARY_EXPORT FlightReservation : public Reservation
{
KITINERARY_GADGET(FlightReservation)
/** Passenger sequnce number
/** Passenger sequence number
* Despite the name, do not expect this to be a number, infants without
* their own seat get vendor-defined codes here for example.
* @see https://schema.org/passengerSequenceNumber
......
......@@ -116,10 +116,10 @@ class PdfDocument;
* was received. This typically only needs a @c From: and @c Date: line, but can even be
* entirely empty (or non-existing) for structured data that does not need a custom extractor.
* This context information is applied to all tests in this folder.
* - @c <testname>.[txt|html|pdf|pkpass|ics|eml|mbox]: The input test data.
* - @c <testname.extension>.json: The expected JSON-LD output. If this file doesn't
* - @c \<testname\>.[txt|html|pdf|pkpass|ics|eml|mbox]: The input test data.
* - @c \<testname.extension\>.json: The expected JSON-LD output. If this file doesn't
* exists it is created by the test program.
* - @c <testname.extension>.skip: If this file is present the corresponding test
* - @c \<testname.extension\>.skip: If this file is present the corresponding test
* is skipped.
*/
class KITINERARY_EXPORT ExtractorEngine
......@@ -178,7 +178,7 @@ public:
*/
void setContextDate(const QDateTime &dt);
/** Perform the actual extration, and return the JSON-LD data
/** Perform the actual extraction, and return the JSON-LD data
* that has been found.
*/
QJsonArray extract();
......
......@@ -585,7 +585,7 @@ QVariantList ExtractorPostprocessorPrivate::processActions(QVariantList actions)
++it;
}
// normalize the order, so JSON comparisson still yields correct results
// normalize the order, so JSON comparison still yields correct results
std::sort(actions.begin(), actions.end(), [](const QVariant &lhs, const QVariant &rhs) {
return strcmp(lhs.typeName(), rhs.typeName()) < 0;
});
......
......@@ -57,7 +57,7 @@ class ExtractorPostprocessorPrivate;
*
* @section postproc_validation Validation
*
* At this point, all invalid elements are discared. The definition of invalid is fairly loose though,
* At this point, all invalid elements are discarded. The definition of invalid is fairly loose though,
* and typically only covers elements that are explicitly considered unusable. Examples:
* - A Flight missing a departure day or destination.
* - A LodigingReservation without an attached LodgingBusiness.
......
......@@ -39,7 +39,7 @@ enum {
MinSourceImageHeight = 10,
MinSourceImageWidth = 30,
// OEBB uses 1044x1044 for its UIC 918.3 Aztec code
MaxSourceImageHeight = 1100, // TODO what's a realisitic value here?
MaxSourceImageHeight = 1100, // TODO what's a realistic value here?
MaxSourceImageWidth = 2000,
// unit is 1/72 inch, assuming landscape orientation
MinTargetImageHeight = 30,
......@@ -61,7 +61,7 @@ void GenericPdfExtractor::extract(PdfDocument *doc, QJsonArray &result)
m_unrecognizedBarcodes.clear();
// stay away from documents that are atypically large for what we are looking for
// that's just unecessarily eating up resources
// that's just unnecessarily eating up resources
if (doc->pageCount() > MaxPageCount || doc->fileSize() > MaxFileSize) {
return;
}
......
......@@ -39,6 +39,7 @@ namespace IataBcbpParser
{
/** Parses the bar coded boarding pass message @p message into
* a list of FlightReservation instances.
* @param message The message.
* @param externalIssueDate The date the boarding pass was issued (or a sufficiently close approximation).
* This is necessary as by default the BCBP data only contains day and month of the flight, not the year.
*/
......
......@@ -37,7 +37,7 @@ class Context : public QObject
Q_OBJECT
/** The time the email containing the extracted data was sent.
* This can be useful if the extracted data only contains dates without
* specifying a year. The year can then be infered out of this context.
* specifying a year. The year can then be inferred out of this context.
*/
Q_PROPERTY(QDateTime senderDate MEMBER m_senderDate)
......
......@@ -165,7 +165,7 @@ static IataCode iataCodeForUniqueFragment(const QStringList &fragments)
static IataCode iataCodeForNonUniqueFragments(const QStringList &fragments)
{
// we we didn't find a unique name fragment, try the non-unique index
// we didn't find a unique name fragment, try the non-unique index
QSet<uint16_t> iataIdxs;
for (const auto &s : fragments) {
const auto it = std::lower_bound(std::begin(nameN_string_index), std::end(nameN_string_index), s.toUtf8(), [](const NameNIndex &lhs, const QByteArray &rhs) {
......
......@@ -72,6 +72,8 @@ enum Accuracy {
};
/** Returns @c true if the given locations are the same.
* @param lhs The left hand side in the location condition.
* @param rhs The right hand side in the location condition.
* @param accuracy Defines how closely the locations have to match.
*/
bool KITINERARY_EXPORT isSameLocation(const QVariant &lhs, const QVariant &rhs, Accuracy accuracy = Exact);
......
......@@ -48,7 +48,7 @@ KITINERARY_EXPORT bool isSame(const QVariant &lhs, const QVariant &rhs);
/**
* Checks if two Person objects refer to the same person.
*
* Essentially a case-insensitive comparisson of the name components.
* Essentially a case-insensitive comparison of the name components.
*/
KITINERARY_EXPORT bool isSamePerson(const Person &lhs, const Person &rhs);
......
......@@ -61,7 +61,7 @@ public:
/** Returns whether this is a valid RCT2 ticket layout block. */
bool isValid() const;
/** Date/time this ticket was first encounted, to recover possibly missing year numbers. */
/** Date/time this ticket was first encountered, to recover possibly missing year numbers. */
void setContextDate(const QDateTime &contextDt);
/** First day the ticket is valid. */
......@@ -89,7 +89,7 @@ public:
QDateTime outboundArrivalTime() const;
/** Departure station of the outbound segment. */
QString outboundDepartureStation() const;
/** Arrival station of the outbound segement. */
/** Arrival station of the outbound segment. */
QString outboundArrivalStation() const;
/** Class of the outbound segment. */
QString outboundClass() const;
......
......@@ -82,7 +82,7 @@ public:
Rct2Ticket rct2Ticket() const;
/** Quickly checks if @p might be UIC 918.3 content.
* This priorizes speed over correctness and is used in barcode content auto-detection.
* This prioritizes speed over correctness and is used in barcode content auto-detection.
*/
static bool maybeUic9183(const QByteArray &data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment