Skip to content

Commit

Permalink
use QStandardPaths::ApplicationsLocation for open with
Browse files Browse the repository at this point in the history
  • Loading branch information
rardiol committed Jul 9, 2024
1 parent ccb5a27 commit 7664d21
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/tools/launcher/applauncherwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,14 @@ AppLauncherWidget::AppLauncherWidget(const QPixmap& p, QWidget* parent)
m_parser.processDirectory(allUserAppsFolder);
}
#else
QString dirLocal = QDir::homePath() + "/.local/share/applications/";
QDir appsDirLocal(dirLocal);
m_parser.processDirectory(appsDirLocal);
QStringList appsLocations =
QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation);

for (auto appsLocation : appsLocations) {
QDir appsDir(appsLocation);
m_parser.processDirectory(QDir(appsDir));
}

QString dir = QStringLiteral("/usr/share/applications/");
QDir appsDir(dir);
m_parser.processDirectory(appsDir);
#endif

initAppMap();
Expand Down

0 comments on commit 7664d21

Please sign in to comment.