Warning, /office/kmymoney/3rdparty/ext_frameworks/kservice.diff is written in an unsupported language. File is not indexed.
0001 diff -Npru kservice-5.51.0.orig/src/sycoca/kbuildservicefactory.cpp kservice-5.51.0/src/sycoca/kbuildservicefactory.cpp 0002 --- kservice-5.51.0.orig/src/sycoca/kbuildservicefactory.cpp 2018-10-08 10:21:25.000000000 +0200 0003 +++ kservice-5.51.0/src/sycoca/kbuildservicefactory.cpp 2018-11-04 08:51:59.529451519 +0100 0004 @@ -93,11 +93,17 @@ KSycocaEntry *KBuildServiceFactory::crea 0005 if (QDir::isAbsolutePath(file)) { // vfolder sends us full paths for applications 0006 serv = new KService(file); 0007 } else { // we get relative paths for services 0008 + const QString appImageDesktopFile = QCoreApplication::applicationDirPath() + QLatin1String("/../share/") + QStringLiteral("kservices5/") + file; 0009 + if (QFile::exists(appImageDesktopFile)) { 0010 + KDesktopFile desktopFile(appImageDesktopFile); 0011 + serv = new KService(&desktopFile, appImageDesktopFile); 0012 + } else { 0013 KDesktopFile desktopFile(QStandardPaths::GenericDataLocation, QStringLiteral("kservices5/") + file); 0014 // Note that the second arg below MUST be 'file', unchanged. 0015 // If the entry path doesn't match the 'file' parameter to createEntry, reusing old entries 0016 // (via time dict, which uses the entry path as key) cannot work. 0017 serv = new KService(&desktopFile, file); 0018 + } 0019 } 0020 0021 //qCDebug(SYCOCA) << "Creating KService from" << file << "entryPath=" << serv->entryPath(); 0022 diff -Npru kservice-5.51.0.orig/src/sycoca/kbuildsycoca.cpp kservice-5.51.0/src/sycoca/kbuildsycoca.cpp 0023 --- kservice-5.51.0.orig/src/sycoca/kbuildsycoca.cpp 2018-10-08 10:21:25.000000000 +0200 0024 +++ kservice-5.51.0/src/sycoca/kbuildsycoca.cpp 2018-11-04 08:53:04.976953937 +0100 0025 @@ -201,7 +201,11 @@ bool KBuildSycoca::build() 0026 m_resource = it1.value(); 0027 0028 QSet<QString> relFiles; 0029 - const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, m_resourceSubdir, QStandardPaths::LocateDirectory); 0030 + QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, m_resourceSubdir, QStandardPaths::LocateDirectory); 0031 + const QString appImageDir = QCoreApplication::applicationDirPath() + QLatin1String("/../share/") + m_resourceSubdir; 0032 + if (QFile::exists(appImageDir)) 0033 + dirs.append(appImageDir); 0034 + 0035 qCDebug(SYCOCA) << "Looking for subdir" << m_resourceSubdir << "=>" << dirs; 0036 Q_FOREACH (const QString &dir, dirs) { 0037 QDirIterator it(dir, QDirIterator::Subdirectories); 0038 @@ -626,7 +630,11 @@ quint32 KBuildSycoca::calcResourceHash(c 0039 if (!QDir::isRelativePath(filename)) { 0040 return updateHash(filename, hash); 0041 } 0042 - const QStringList files = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, resourceSubDir + QLatin1Char('/') + filename); 0043 + QStringList files = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, resourceSubDir + QLatin1Char('/') + filename); 0044 + const QString appImageFile = QCoreApplication::applicationDirPath() + QLatin1String("/../share/") + resourceSubDir + QLatin1Char('/') + filename; 0045 + if (QFile::exists(appImageFile)) 0046 + files.append(appImageFile); 0047 + 0048 Q_FOREACH (const QString &file, files) { 0049 hash = updateHash(file, hash); 0050 } 0051 diff -Npru kservice-5.51.0.orig/src/sycoca/ksycoca.cpp kservice-5.51.0/src/sycoca/ksycoca.cpp 0052 --- kservice-5.51.0.orig/src/sycoca/ksycoca.cpp 2018-10-08 10:21:25.000000000 +0200 0053 +++ kservice-5.51.0/src/sycoca/ksycoca.cpp 2018-11-04 08:56:33.977171556 +0100 0054 @@ -596,6 +596,14 @@ KSycocaHeader KSycocaPrivate::readSycoca 0055 0056 str->device()->seek(oldPos); 0057 0058 + // this clause must be before timeStamp = header.timeStamp 0059 + qDebug() << "applications name: " << qAppName(); 0060 + const QString appImageShare = QCoreApplication::applicationDirPath() + QLatin1String("/../share"); 0061 + addLocalResourceDir(appImageShare + QLatin1String("/kservices5")); 0062 + addLocalResourceDir(appImageShare + QLatin1String("/kservicetypes5")); 0063 + addLocalResourceDir(appImageShare + QLatin1String("/mime")); 0064 + addLocalResourceDir(appImageShare + QLatin1String("/applications")); 0065 + 0066 timeStamp = header.timeStamp; 0067 0068 // for the useless public accessors. KF6: remove these two lines, the accessors and the vars.