Changeset View
Changeset View
Standalone View
Standalone View
runners/recentdocuments/recentdocuments.cpp
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Line(s) | 72 | if (term.length() < 3) { | |||
---|---|---|---|---|---|
73 | return; | 73 | return; | ||
74 | } | 74 | } | ||
75 | 75 | | |||
76 | const QString homePath = QDir::homePath(); | 76 | const QString homePath = QDir::homePath(); | ||
77 | 77 | | |||
78 | // avoid duplicates | 78 | // avoid duplicates | ||
79 | QSet<QUrl> knownUrls; | 79 | QSet<QUrl> knownUrls; | ||
80 | 80 | | |||
81 | foreach (const QString &document, m_recentdocuments) { | 81 | for (const QString &document : qAsConst(m_recentdocuments)) { | ||
82 | if (!context.isValid()) { | 82 | if (!context.isValid()) { | ||
83 | return; | 83 | return; | ||
84 | } | 84 | } | ||
85 | 85 | | |||
86 | if (document.contains(term, Qt::CaseInsensitive)) { | 86 | if (document.contains(term, Qt::CaseInsensitive)) { | ||
87 | KDesktopFile config(document); | 87 | KDesktopFile config(document); | ||
88 | 88 | | |||
89 | const QUrl url = QUrl(config.readUrl()); | 89 | const QUrl url = QUrl(config.readUrl()); | ||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |