[kservice] autotests: autotests: check that mimetypes defined by kcoreaddons are available

Ben Cooksley bcooksley at kde.org
Tue Sep 3 18:48:03 BST 2019


On Tue, Sep 3, 2019 at 9:17 PM David Faure <null at kde.org> wrote:
>
> Git commit d8cc2c16711a48ed470a04a92b96388a65467091 by David Faure.
> Committed on 03/09/2019 at 09:13.
> Pushed by dfaure into branch 'master'.
>
> autotests: check that mimetypes defined by kcoreaddons are available
>
> Clearly they are not, on Windows, in CI (this commit just makes the error
> clearer).
>
> Was a solution found for the problem of finding mimetypes (using
> GenericDataLocation) in custom prefixes? I wasn't able to get QT_DATA_DIRS into
> Qt, but this is another case where it would have helped...

Since Qt 5.10 the version of Qt shipped by Craft has been patched to
include qstandardpaths-extra-dirs.patch, which adds in QT_DATA_DIRS
for all binaries produced by Craft.

The fix in this case is to make sure the CI tooling sets QT_DATA_DIRS,
which i've just pushed a fix for now :)

>
> CCMAIL: kde-windows at kde.org
>
> M  +10   -0    autotests/kmimeassociationstest.cpp
>
> https://commits.kde.org/kservice/d8cc2c16711a48ed470a04a92b96388a65467091
>
> diff --git a/autotests/kmimeassociationstest.cpp b/autotests/kmimeassociationstest.cpp
> index 45abcc0..c1836a9 100644
> --- a/autotests/kmimeassociationstest.cpp
> +++ b/autotests/kmimeassociationstest.cpp
> @@ -417,6 +417,16 @@ private Q_SLOTS:
>          // #178560: Removing ark from interface/x-winamp-skin didn't work
>          // Using application/x-kns (another zip-derived mimetype) nowadays.
>          const QString mime = QStringLiteral("application/x-kns");
> +
> +        // That mimetype comes from kcoreaddons, let's make sure it's properly installed
> +        {
> +            QMimeDatabase db;
> +            QMimeType mime = db.mimeTypeForName(QStringLiteral("application/x-kns"));
> +            QVERIFY(mime.isValid());
> +            QCOMPARE(mime.name(), QStringLiteral("application/x-kns"));
> +            QVERIFY(mime.inherits(QStringLiteral("application/zip")));
> +        }
> +
>          KService::List offers = KMimeTypeTrader::self()->query(mime);
>          QVERIFY(offerListHasService(offers, fakeArkApplication, true));
>


More information about the Kde-windows mailing list