kde4support: kstandarddirs_unittest fix

Alex Merry kde at randomguy3.me.uk
Sat Dec 21 23:48:54 UTC 2013


On 21/12/13 11:23, Alex Merry wrote:
> On 21/12/13 00:19, David Faure wrote:
>> On Friday 20 December 2013 23:07:08 Alex Merry wrote:
>>> The one bit that is still failing is testSetXdgDataDirs() and
>>> testRestrictedResources(), which both fail for the same reason.
>>>
>>> Basically, the test checks that
>>>  CMAKE_INSTALL_PREFIX "/share/applications/"
>>> is in the xdgdata-apps resource.  However, KStandardDirs puts
>>>  CMAKE_INSTALL_PREFIX "/share/applications/kde5/"
>>> in the xdgdata-apps resource.
>>>
>>> Which is right: the test or KStandardDirs?
> 
> KStandardDirs does not add directories that do not exist, UNLESS they
> are the directory returned by installPrefix().  kde4support does not
> install anything in share/applications, therefore if you install
> kde4support in its own prefix, $PREFIX/share/applications does not get
> added to the resource dirs regardless of what you might set
> XDG_DATA_DIRS to.

Conclusion: we should check for the kde5 version in the test, since that
is the only one that can be guaranteed to exist.

My version of the tests (that use local, uninstalled data) should
probably additionally have an applications folder in the "test" data
directory and check that appears in the list.

David: do you agree with this?

Alex


More information about the Kde-frameworks-devel mailing list