Skip to content

Commit 307d654

Browse files
committed
remove unused method
1 parent 7988f0f commit 307d654

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

src/core/desktopentry.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -453,29 +453,6 @@ void DesktopEntryManager::handleFileChanges() {
453453
QThreadPool::globalInstance()->start(scanner);
454454
}
455455

456-
QString DesktopEntryManager::extractIdFromPath(const QString& path) {
457-
const auto fi = QFileInfo(path);
458-
const auto canon = fi.canonicalFilePath();
459-
const auto actual = canon.isEmpty() ? fi.absoluteFilePath() : canon;
460-
for (const auto& rootPath: DesktopEntryManager::desktopPaths()) {
461-
auto root = QDir(rootPath);
462-
const auto rel = root.relativeFilePath(actual);
463-
if (!rel.startsWith("../")) {
464-
auto relInfo = QFileInfo(rel);
465-
auto id = QString();
466-
if (relInfo.path() != "." && !relInfo.path().isEmpty()) {
467-
id = relInfo.path();
468-
id.replace('/', '-');
469-
id += '-' + relInfo.completeBaseName();
470-
} else {
471-
id = relInfo.completeBaseName();
472-
}
473-
return id;
474-
}
475-
}
476-
return fi.completeBaseName();
477-
}
478-
479456
const QStringList& DesktopEntryManager::desktopPaths() {
480457
static const auto paths = []() {
481458
auto dataPaths = QStringList();

src/core/desktopentry.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ class DesktopEntryManager: public QObject {
261261

262262
static DesktopEntryManager* instance();
263263

264-
static QString extractIdFromPath(const QString& path);
265264
static const QStringList& desktopPaths();
266265

267266
signals:

0 commit comments

Comments
 (0)