fix: correct property check logic
Signed-off-by: ComixHe <heyuming@deepin.org>
This commit is contained in:
		@ -333,13 +333,13 @@ QString ApplicationService::id() const noexcept
 | 
			
		||||
bool ApplicationService::x_Flatpak() const noexcept
 | 
			
		||||
{
 | 
			
		||||
    auto val = findEntryValue(DesktopFileEntryKey, "X-flatpak", EntryValueType::String);
 | 
			
		||||
    return val.isNull();
 | 
			
		||||
    return !val.isNull();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool ApplicationService::x_linglong() const noexcept
 | 
			
		||||
{
 | 
			
		||||
    auto val = findEntryValue(DesktopFileEntryKey, "X-linglong", EntryValueType::String);
 | 
			
		||||
    return val.isNull();
 | 
			
		||||
    return !val.isNull();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
qulonglong ApplicationService::installedTime() const noexcept
 | 
			
		||||
 | 
			
		||||
@ -471,6 +471,7 @@ inline std::tuple<std::size_t, std::size_t, std::size_t> getFileTimeInfo(const Q
 | 
			
		||||
{
 | 
			
		||||
    struct stat buf;
 | 
			
		||||
 | 
			
		||||
    // TODO: use QFileInfo get timeInfo, and return a custom time structure.
 | 
			
		||||
    if (auto ret = stat(file.absoluteFilePath().toLocal8Bit().constData(), &buf); ret == -1) {
 | 
			
		||||
        qWarning() << "get file" << file.absoluteFilePath() << "state failed:" << std::strerror(errno);
 | 
			
		||||
        return std::make_tuple(0, 0, 0);
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user