diff --git a/autotests/office2007extractortest.cpp b/autotests/office2007extractortest.cpp --- a/autotests/office2007extractortest.cpp +++ b/autotests/office2007extractortest.cpp @@ -48,7 +48,7 @@ QCOMPARE(result.properties().value(Property::Subject), QVariant(QStringLiteral("KFileMetaData Subject"))); QCOMPARE(result.properties().value(Property::Keywords), QVariant(QStringLiteral("KFileMetaData keyword"))); QCOMPARE(result.properties().value(Property::Comment), QVariant(QStringLiteral("KFileMetaData comment"))); - QCOMPARE(result.properties().value(Property::Langauge), QVariant(QStringLiteral("en-US"))); + QCOMPARE(result.properties().value(Property::Language), QVariant(QStringLiteral("en-US"))); QVERIFY(result.properties().value(Property::Generator).toString().contains(QStringLiteral("LibreOffice"))); QDateTime dt(QDate(2014, 07, 01), QTime(17, 37, 40)); diff --git a/autotests/taglibextractortest.cpp b/autotests/taglibextractortest.cpp --- a/autotests/taglibextractortest.cpp +++ b/autotests/taglibextractortest.cpp @@ -71,7 +71,7 @@ QCOMPARE(resultOpus.properties().value(Property::Ensemble), QVariant(QStringLiteral("Ensemble"))); QCOMPARE(resultOpus.properties().value(Property::Location), QVariant(QStringLiteral("Location"))); QCOMPARE(resultOpus.properties().value(Property::Performer), QVariant(QStringLiteral("Performer"))); - QCOMPARE(resultOpus.properties().value(Property::Langauge), QVariant(QStringLiteral("Language"))); + QCOMPARE(resultOpus.properties().value(Property::Language), QVariant(QStringLiteral("Language"))); QCOMPARE(resultOpus.properties().value(Property::Publisher), QVariant(QStringLiteral("Publisher"))); QCOMPARE(resultOpus.properties().value(Property::Label), QVariant(QStringLiteral("Label"))); QCOMPARE(resultOpus.properties().value(Property::Author), QVariant(QStringLiteral("Author"))); @@ -109,7 +109,7 @@ QCOMPARE(resultFlac.properties().value(Property::Ensemble), QVariant(QStringLiteral("Ensemble"))); QCOMPARE(resultFlac.properties().value(Property::Location), QVariant(QStringLiteral("Location"))); QCOMPARE(resultFlac.properties().value(Property::Performer), QVariant(QStringLiteral("Performer"))); - QCOMPARE(resultFlac.properties().value(Property::Langauge), QVariant(QStringLiteral("Language"))); + QCOMPARE(resultFlac.properties().value(Property::Language), QVariant(QStringLiteral("Language"))); QCOMPARE(resultFlac.properties().value(Property::Publisher), QVariant(QStringLiteral("Publisher"))); QCOMPARE(resultFlac.properties().value(Property::Label), QVariant(QStringLiteral("Label"))); QCOMPARE(resultFlac.properties().value(Property::Author), QVariant(QStringLiteral("Author"))); @@ -147,7 +147,7 @@ QCOMPARE(resultOgg.properties().value(Property::Ensemble), QVariant(QStringLiteral("Ensemble"))); QCOMPARE(resultOgg.properties().value(Property::Location), QVariant(QStringLiteral("Location"))); QCOMPARE(resultOgg.properties().value(Property::Performer), QVariant(QStringLiteral("Performer"))); - QCOMPARE(resultOgg.properties().value(Property::Langauge), QVariant(QStringLiteral("Language"))); + QCOMPARE(resultOgg.properties().value(Property::Language), QVariant(QStringLiteral("Language"))); QCOMPARE(resultOgg.properties().value(Property::Publisher), QVariant(QStringLiteral("Publisher"))); QCOMPARE(resultOgg.properties().value(Property::Label), QVariant(QStringLiteral("Label"))); QCOMPARE(resultOgg.properties().value(Property::Author), QVariant(QStringLiteral("Author"))); @@ -181,7 +181,7 @@ QCOMPARE(resultMp3.properties().value(Property::Lyricist), QVariant(QStringLiteral("Lyricist"))); QCOMPARE(resultMp3.properties().value(Property::Conductor), QVariant(QStringLiteral("Conductor"))); QCOMPARE(resultMp3.properties().value(Property::Publisher), QVariant(QStringLiteral("Publisher"))); - QCOMPARE(resultMp3.properties().value(Property::Langauge), QVariant(QStringLiteral("Language"))); + QCOMPARE(resultMp3.properties().value(Property::Language), QVariant(QStringLiteral("Language"))); QCOMPARE(resultMp3.properties().value(Property::Compilation), QVariant(QStringLiteral("Compilation"))); QCOMPARE(resultMp3.properties().value(Property::Lyrics), QVariant(QStringLiteral("Lyrics"))); QCOMPARE(resultMp3.properties().value(Property::TrackNumber).toInt(), 1); @@ -212,7 +212,7 @@ QCOMPARE(resultMpc.properties().value(Property::Ensemble), QVariant(QStringLiteral("Ensemble"))); QCOMPARE(resultMpc.properties().value(Property::Location), QVariant(QStringLiteral("Location"))); QCOMPARE(resultMpc.properties().value(Property::Performer), QVariant(QStringLiteral("Performer"))); - QCOMPARE(resultMpc.properties().value(Property::Langauge), QVariant(QStringLiteral("Language"))); + QCOMPARE(resultMpc.properties().value(Property::Language), QVariant(QStringLiteral("Language"))); QCOMPARE(resultMpc.properties().value(Property::Publisher), QVariant(QStringLiteral("Publisher"))); QCOMPARE(resultMpc.properties().value(Property::Label), QVariant(QStringLiteral("Label"))); QCOMPARE(resultMpc.properties().value(Property::Author), QVariant(QStringLiteral("Author"))); diff --git a/src/extractors/odfextractor.cpp b/src/extractors/odfextractor.cpp --- a/src/extractors/odfextractor.cpp +++ b/src/extractors/odfextractor.cpp @@ -112,7 +112,7 @@ } else if (localName == QLatin1String("creator")) { result->add(Property::Author, e.text()); } else if (localName == QLatin1String("language")) { - result->add(Property::Langauge, e.text()); + result->add(Property::Language, e.text()); } } // Meta Properties diff --git a/src/extractors/office2007extractor.cpp b/src/extractors/office2007extractor.cpp --- a/src/extractors/office2007extractor.cpp +++ b/src/extractors/office2007extractor.cpp @@ -117,7 +117,7 @@ if (!elem.isNull()) { QString str = elem.text(); if (!str.isEmpty()) { - result->add(Property::Langauge, str); + result->add(Property::Language, str); } } diff --git a/src/extractors/taglibextractor.cpp b/src/extractors/taglibextractor.cpp --- a/src/extractors/taglibextractor.cpp +++ b/src/extractors/taglibextractor.cpp @@ -833,7 +833,7 @@ QString languageString = convertWCharsToQString(data.language).trimmed(); QStringList languages = contactsFromString(languageString); foreach(const QString& arr, languages) { - result->add(Property::Langauge, arr); + result->add(Property::Language, arr); } QString licenseString = convertWCharsToQString(data.license).trimmed(); diff --git a/src/properties.h b/src/properties.h --- a/src/properties.h +++ b/src/properties.h @@ -161,13 +161,18 @@ */ LineCount, + /** + * Same as @c Language. + * @deprecated Since 5.50, use @c Language instead + */ + Langauge, /** * The language the document is written in. This directly maps to the * 'dc:language' tag from DublinCore. We do NOT employ any language * detection schemes on the text. + * @since 5.50 */ - //KF6 TODO: fix typo Langauge->Language - Langauge, + Language = Langauge, /** * The copyright of the file. Represented as a string. diff --git a/src/propertyinfo.cpp b/src/propertyinfo.cpp --- a/src/propertyinfo.cpp +++ b/src/propertyinfo.cpp @@ -182,7 +182,7 @@ d->shouldBeIndexed = false; break; - case Property::Langauge: + case Property::Language: d->name = QStringLiteral("language"); d->displayName = i18nc("@label", "Language"); d->valueType = QVariant::String; @@ -600,7 +600,7 @@ { QStringLiteral("pagecount"), Property::PageCount }, { QStringLiteral("wordcount"), Property::WordCount }, { QStringLiteral("linecount"), Property::LineCount }, - { QStringLiteral("language"), Property::Langauge }, + { QStringLiteral("language"), Property::Language }, { QStringLiteral("copyright"), Property::Copyright }, { QStringLiteral("publisher"), Property::Publisher }, { QStringLiteral("label"), Property::Label },