KIO

kurifilter.cpp
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 2000 Yves Arrouye <[email protected]>
4  SPDX-FileCopyrightText: 2000, 2010 Dawit Alemayehu <adawit at kde.org>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 
9 #include "kurifilter.h"
10 
11 #include "hostinfo.h"
12 
13 #include <KIconLoader>
14 #include <KService>
15 #include <kio/global.h>
16 
17 #include <KPluginMetaData>
18 
19 #include <QHashIterator>
20 #include <QHostAddress>
21 #include <QHostInfo>
22 
25 
26 static QString lookupIconNameFor(const QUrl &url, KUriFilterData::UriTypes type)
27 {
28  QString iconName;
29 
30  switch (type) {
31  case KUriFilterData::NetProtocol:
32  iconName = KIO::iconNameForUrl(url);
33  break;
34  case KUriFilterData::Executable: {
35  QString exeName = url.path();
36  exeName.remove(0, exeName.lastIndexOf(QLatin1Char('/')) + 1); // strip path if given
38  if (service && service->icon() != QLatin1String("unknown")) {
39  iconName = service->icon();
40  }
41  // Try to find an icon with the same name as the binary (useful for non-kde apps)
42  // Use iconPath rather than loadIcon() as the latter uses QPixmap (not threadsafe)
43  else if (!KIconLoader::global()->iconPath(exeName, KIconLoader::NoGroup, true).isNull()) {
44  iconName = exeName;
45  } else
46  // not found, use default
47  {
48  iconName = QStringLiteral("system-run");
49  }
50  break;
51  }
52  case KUriFilterData::Help: {
53  iconName = QStringLiteral("khelpcenter");
54  break;
55  }
56  case KUriFilterData::Shell: {
57  iconName = QStringLiteral("konsole");
58  break;
59  }
60  case KUriFilterData::Error:
61  case KUriFilterData::Blocked: {
62  iconName = QStringLiteral("error");
63  break;
64  }
65  default:
66  break;
67  }
68 
69  return iconName;
70 }
71 
72 class Q_DECL_HIDDEN KUriFilterSearchProvider::KUriFilterSearchProviderPrivate
73 {
74 public:
75  KUriFilterSearchProviderPrivate()
76  {
77  }
78  KUriFilterSearchProviderPrivate(const KUriFilterSearchProviderPrivate &other)
79  : desktopEntryName(other.desktopEntryName)
80  , iconName(other.iconName)
81  , name(other.name)
82  , keys(other.keys)
83  {
84  }
85 
86  QString desktopEntryName;
87  QString iconName;
88  QString name;
89  QStringList keys;
90 };
91 
93  : d(new KUriFilterSearchProvider::KUriFilterSearchProviderPrivate)
94 {
95 }
96 
98  : d(new KUriFilterSearchProvider::KUriFilterSearchProviderPrivate(*(other.d)))
99 {
100 }
101 
103 {
104  delete d;
105 }
106 
108 {
109  return d->desktopEntryName;
110 }
111 
113 {
114  return d->iconName;
115 }
116 
118 {
119  return d->name;
120 }
121 
123 {
124  return d->keys;
125 }
126 
128 {
129  if (d->keys.isEmpty()) {
130  return QString();
131  }
132 
133  return d->keys.first();
134 }
135 
137 {
138  d->desktopEntryName = other.d->desktopEntryName;
139  d->iconName = other.d->iconName;
140  d->keys = other.d->keys;
141  d->name = other.d->name;
142  return *this;
143 }
144 
145 void KUriFilterSearchProvider::setDesktopEntryName(const QString &desktopEntryName)
146 {
147  d->desktopEntryName = desktopEntryName;
148 }
149 
150 void KUriFilterSearchProvider::setIconName(const QString &iconName)
151 {
152  d->iconName = iconName;
153 }
154 
155 void KUriFilterSearchProvider::setName(const QString &name)
156 {
157  d->name = name;
158 }
159 
160 void KUriFilterSearchProvider::setKeys(const QStringList &keys)
161 {
162  d->keys = keys;
163 }
164 
165 class KUriFilterDataPrivate
166 {
167 public:
168  explicit KUriFilterDataPrivate(const QUrl &u, const QString &typedUrl)
169  : checkForExecs(true)
170  , wasModified(true)
171  , uriType(KUriFilterData::Unknown)
172  , searchFilterOptions(KUriFilterData::SearchFilterOptionNone)
174  , typedString(typedUrl)
175  {
176  }
177 
178  ~KUriFilterDataPrivate()
179  {
180  }
181 
182  void setData(const QUrl &u, const QString &typedUrl)
183  {
184  checkForExecs = true;
185  wasModified = true;
186  uriType = KUriFilterData::Unknown;
187  searchFilterOptions = KUriFilterData::SearchFilterOptionNone;
188 
190  typedString = typedUrl;
191 
192  errMsg.clear();
193  iconName.clear();
194  absPath.clear();
195  args.clear();
196  searchTerm.clear();
197  searchProvider.clear();
198  searchTermSeparator = QChar();
199  alternateDefaultSearchProvider.clear();
200  alternateSearchProviders.clear();
201  searchProviderMap.clear();
202  defaultUrlScheme.clear();
203  }
204 
205  KUriFilterDataPrivate(KUriFilterDataPrivate *data)
206  {
207  wasModified = data->wasModified;
208  checkForExecs = data->checkForExecs;
209  uriType = data->uriType;
210  searchFilterOptions = data->searchFilterOptions;
211 
212  url = data->url;
213  typedString = data->typedString;
214 
215  errMsg = data->errMsg;
216  iconName = data->iconName;
217  absPath = data->absPath;
218  args = data->args;
219  searchTerm = data->searchTerm;
220  searchTermSeparator = data->searchTermSeparator;
221  searchProvider = data->searchProvider;
222  alternateDefaultSearchProvider = data->alternateDefaultSearchProvider;
223  alternateSearchProviders = data->alternateSearchProviders;
224  searchProviderMap = data->searchProviderMap;
225  defaultUrlScheme = data->defaultUrlScheme;
226  }
227 
228  bool checkForExecs;
229  bool wasModified;
230  KUriFilterData::UriTypes uriType;
231  KUriFilterData::SearchFilterOptions searchFilterOptions;
232 
233  QUrl url;
234  QString typedString;
235  QString errMsg;
237  QString absPath;
238  QString args;
239  QString searchTerm;
240  QString searchProvider;
241  QString alternateDefaultSearchProvider;
242  QString defaultUrlScheme;
243  QChar searchTermSeparator;
244 
245  QStringList alternateSearchProviders;
246  QStringList searchProviderList;
247  SearchProviderMap searchProviderMap;
248 };
249 
251  : d(new KUriFilterDataPrivate(QUrl(), QString()))
252 {
253 }
254 
256  : d(new KUriFilterDataPrivate(url, url.toString()))
257 {
258 }
259 
261  : d(new KUriFilterDataPrivate(QUrl::fromUserInput(url), url))
262 {
263 }
264 
266  : d(new KUriFilterDataPrivate(other.d))
267 {
268 }
269 
271 {
272  delete d;
273 }
274 
276 {
277  return d->url;
278 }
279 
281 {
282  return d->errMsg;
283 }
284 
286 {
287  return d->uriType;
288 }
289 
291 {
292  return d->absPath;
293 }
294 
296 {
297  return !d->absPath.isEmpty();
298 }
299 
301 {
302  return d->args;
303 }
304 
306 {
307  return !d->args.isEmpty();
308 }
309 
311 {
312  return d->checkForExecs;
313 }
314 
316 {
317  return d->typedString;
318 }
319 
321 {
322  return d->searchTerm;
323 }
324 
326 {
327  return d->searchTermSeparator;
328 }
329 
331 {
332  return d->searchProvider;
333 }
334 
336 {
337  return d->searchProviderList;
338 }
339 
341 {
342  const KUriFilterSearchProvider *searchProvider = d->searchProviderMap.value(provider);
343 
344  if (searchProvider) {
345  return *(searchProvider);
346  }
347 
348  return KUriFilterSearchProvider();
349 }
350 
352 {
353  const KUriFilterSearchProvider *searchProvider = d->searchProviderMap.value(provider);
354  if (searchProvider) {
355  return (searchProvider->defaultKey() % searchTermSeparator() % searchTerm());
356  }
357  return QString();
358 }
359 
361 {
362  const KUriFilterSearchProvider *searchProvider = d->searchProviderMap.value(provider);
363  if (searchProvider) {
364  return searchProvider->keys();
365  }
366  return QStringList();
367 }
368 
370 {
371  const KUriFilterSearchProvider *searchProvider = d->searchProviderMap.value(provider);
372  if (searchProvider) {
373  return searchProvider->iconName();
374  }
375  return QString();
376 }
377 
379 {
380  return d->alternateSearchProviders;
381 }
382 
384 {
385  return d->alternateDefaultSearchProvider;
386 }
387 
389 {
390  return d->defaultUrlScheme;
391 }
392 
394 {
395  return d->searchFilterOptions;
396 }
397 
399 {
400  if (d->wasModified) {
401  d->iconName = lookupIconNameFor(d->url, d->uriType);
402  d->wasModified = false;
403  }
404 
405  return d->iconName;
406 }
407 
409 {
410  d->setData(url, url.toString());
411 }
412 
414 {
415  d->setData(QUrl(url), url);
416 }
417 
419 {
420  // Since a malformed URL could possibly be a relative
421  // URL we tag it as a possible local resource...
422  if ((d->url.scheme().isEmpty() || d->url.isLocalFile())) {
423  d->absPath = absPath;
424  return true;
425  }
426  return false;
427 }
428 
430 {
431  d->checkForExecs = check;
432 }
433 
435 {
436  d->alternateSearchProviders = providers;
437 }
438 
440 {
441  d->alternateDefaultSearchProvider = provider;
442 }
443 
445 {
446  d->defaultUrlScheme = scheme;
447 }
448 
450 {
451  d->searchFilterOptions = options;
452 }
453 
455 {
456  d->setData(url, url.toString());
457  return *this;
458 }
459 
461 {
462  d->setData(QUrl(url), url);
463  return *this;
464 }
465 
466 /************************* KUriFilterPlugin ******************************/
467 
469  : QObject(parent)
470  , d(nullptr)
471 {
472  setObjectName(name);
473 }
474 
475 // KF6 TODO
476 // KUriFilterPlugin::~KUriFilterPlugin()
477 //{
478 //}
479 
481 {
482  return nullptr;
483 }
484 
486 {
487  return objectName();
488 }
489 
491 {
492  data.d->url = uri.adjusted(QUrl::NormalizePathSegments);
493  data.d->wasModified = true;
494  // qDebug() << "Got filtered to:" << uri;
495 }
496 
497 void KUriFilterPlugin::setErrorMsg(KUriFilterData &data, const QString &errmsg) const
498 {
499  data.d->errMsg = errmsg;
500 }
501 
503 {
504  data.d->uriType = type;
505  data.d->wasModified = true;
506 }
507 
509 {
510  data.d->args = args;
511 }
512 
513 void KUriFilterPlugin::setSearchProvider(KUriFilterData &data, const QString &provider, const QString &term, const QChar &separator) const
514 {
515  data.d->searchProvider = provider;
516  data.d->searchTerm = term;
517  data.d->searchTermSeparator = separator;
518 }
519 
521 {
522  data.d->searchProviderList.reserve(data.d->searchProviderList.size() + providers.size());
523  for (KUriFilterSearchProvider *searchProvider : providers) {
524  data.d->searchProviderList << searchProvider->name();
525  data.d->searchProviderMap.insert(searchProvider->name(), searchProvider);
526  }
527 }
528 
530 {
531  return lookupIconNameFor(url, type);
532 }
533 
534 QHostInfo KUriFilterPlugin::resolveName(const QString &hostname, unsigned long timeout) const
535 {
536  return KIO::HostInfo::lookupHost(hostname, timeout);
537 }
538 
539 /******************************* KUriFilter ******************************/
540 
541 class KUriFilterPrivate
542 {
543 public:
544  KUriFilterPrivate()
545  {
546  }
547  ~KUriFilterPrivate()
548  {
549  qDeleteAll(pluginList);
550  pluginList.clear();
551  }
552  QVector<KUriFilterPlugin *> pluginList;
553 };
554 
555 class KUriFilterSingleton
556 {
557 public:
558  KUriFilter instance;
559 };
560 
561 Q_GLOBAL_STATIC(KUriFilterSingleton, m_self)
562 
564 {
565  return &m_self()->instance;
566 }
567 
569  : d(new KUriFilterPrivate())
570 {
571  loadPlugins();
572 }
573 
575 {
576  delete d;
577 }
578 
580 {
581  bool filtered = false;
582 
583  for (KUriFilterPlugin *plugin : qAsConst(d->pluginList)) {
584  // If no specific filters were requested, iterate through all the plugins.
585  // Otherwise, only use available filters.
586  if (filters.isEmpty() || filters.contains(plugin->objectName())) {
587  if (plugin->filterUri(data)) {
588  filtered = true;
589  }
590  }
591  }
592 
593  return filtered;
594 }
595 
596 bool KUriFilter::filterUri(QUrl &uri, const QStringList &filters)
597 {
598  KUriFilterData data(uri);
599  bool filtered = filterUri(data, filters);
600  if (filtered) {
601  uri = data.uri();
602  }
603  return filtered;
604 }
605 
606 bool KUriFilter::filterUri(QString &uri, const QStringList &filters)
607 {
608  KUriFilterData data(uri);
609  bool filtered = filterUri(data, filters);
610  if (filtered) {
611  uri = data.uri().toString();
612  }
613  return filtered;
614 }
615 
616 QUrl KUriFilter::filteredUri(const QUrl &uri, const QStringList &filters)
617 {
618  KUriFilterData data(uri);
619  filterUri(data, filters);
620  return data.uri();
621 }
622 
624 {
625  KUriFilterData data(uri);
626  filterUri(data, filters);
627  return data.uri().toString();
628 }
629 
630 #if KIOWIDGETS_BUILD_DEPRECATED_SINCE(4, 6)
632 {
633  return filterSearchUri(data, (NormalTextFilter | WebShortcutFilter));
634 }
635 #endif
636 
638 {
639  QStringList filters;
640 
641  if (types & WebShortcutFilter) {
642  filters << QStringLiteral("kurisearchfilter");
643  }
644 
645  if (types & NormalTextFilter) {
646  filters << QStringLiteral("kuriikwsfilter");
647  }
648 
649  return filterUri(data, filters);
650 }
651 
653 {
654  QStringList res;
655  res.reserve(d->pluginList.size());
656  std::transform(d->pluginList.constBegin(), d->pluginList.constEnd(), std::back_inserter(res), [](const KUriFilterPlugin *plugin) {
657  return plugin->objectName();
658  });
659  return res;
660 }
661 
663 {
664  QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("kf5/urifilters"));
665  const QString prefKey = QStringLiteral("X-KDE-InitialPreference");
666  // Sort the plugins by order of priority
667  std::sort(plugins.begin(), plugins.end(), [prefKey](const KPluginMetaData &a, const KPluginMetaData &b) {
668  return a.rawData().value(prefKey).toInt() > b.rawData().value(prefKey).toInt();
669  });
670 
672  pluginNames.reserve(plugins.count());
673 
674  for (const KPluginMetaData &pluginMetaData : qAsConst(plugins)) {
675  const QString fileName = pluginMetaData.fileName().section(QLatin1Char('/'), -1);
676  if (!pluginNames.contains(fileName)) {
677  pluginNames << fileName;
678  KPluginFactory *factory = qobject_cast<KPluginFactory *>(pluginMetaData.instantiate());
679  if (factory) {
680  KUriFilterPlugin *plugin = factory->create<KUriFilterPlugin>(nullptr);
681  if (plugin) {
682  d->pluginList << plugin;
683  }
684  }
685  }
686  }
687 }
QString searchProvider() const
Returns the name of the search service provider, e.g.
Definition: kurifilter.cpp:330
NormalizePathSegments
Base class for URI filter plugins.
Definition: kurifilter.h:632
bool checkForExecutables() const
Definition: kurifilter.cpp:310
QString errorMsg() const
Returns an error message.
Definition: kurifilter.cpp:280
QString queryForPreferredSearchProvider(const QString &provider) const
Returns the web shortcut url for the given preferred search provider.
Definition: kurifilter.cpp:351
void setAlternateSearchProviders(const QStringList &providers)
Sets a list of search providers to use in case no preferred search providers are available.
Definition: kurifilter.cpp:434
QString name(const QVariant &location)
QChar searchTermSeparator() const
Returns the character that is used to separate the search term from the keyword.
Definition: kurifilter.cpp:325
KUriFilterSearchProvider & operator=(const KUriFilterSearchProvider &)
Assignment operator.
Definition: kurifilter.cpp:136
bool hasAbsolutePath() const
Checks whether the supplied data had an absolute path.
Definition: kurifilter.cpp:295
void setAlternateDefaultSearchProvider(const QString &provider)
Sets the search provider to use in case no default provider is available.
Definition: kurifilter.cpp:439
QVector::iterator begin()
static Ptr serviceByDesktopName(const QString &_name)
QString desktopEntryName() const
Returns the desktop filename of the search provider without any extension.
Definition: kurifilter.cpp:107
T * create(QObject *parent=nullptr, const QVariantList &args=QVariantList())
void reserve(int alloc)
QString argsAndOptions() const
Returns the command line options and arguments for a local resource when present. ...
Definition: kurifilter.cpp:300
QString name() const
Returns the descriptive name of the search provider, e.g.
Definition: kurifilter.cpp:117
QHostInfo resolveName(const QString &hostname, unsigned long timeout) const
Performs a DNS lookup for hostname and returns the result.
Definition: kurifilter.cpp:534
bool contains(const QString &str, Qt::CaseSensitivity cs) const const
KUriFilterSearchProvider()
Default constructor.
Definition: kurifilter.cpp:92
QString searchTerm() const
Returns the search term portion of the typed string.
Definition: kurifilter.cpp:320
QStringList keys() const
Returns all the web shortcut keys associated with this search provider.
Definition: kurifilter.cpp:122
QString alternateDefaultSearchProvider() const
Returns the search provider to use when a default provider is not available.
Definition: kurifilter.cpp:383
KIOCORE_EXPORT void lookupHost(const QString &hostName, QObject *receiver, const char *member)
Definition: hostinfo.cpp:241
void setArguments(KUriFilterData &data, const QString &args) const
Sets the arguments and options string in data to args if any were found during filtering.
Definition: kurifilter.cpp:508
KUriFilterPlugin(const QString &name, QObject *parent=nullptr)
Constructs a filter plugin with a given name.
Definition: kurifilter.cpp:468
QString & remove(int position, int n)
QString iconName()
The name of the icon that matches the current filtered URL.
Definition: kurifilter.cpp:398
QString toString(QUrl::FormattingOptions options) const const
void setDefaultUrlScheme(const QString &)
Sets the default scheme used when filtering potentially valid url inputs.
Definition: kurifilter.cpp:444
QStringList allQueriesForSearchProvider(const QString &provider) const
Returns all the query urls for the given search provider.
Definition: kurifilter.cpp:360
QString iconNameForPreferredSearchProvider(const QString &provider) const
Returns the icon associated with the given preferred search provider.
Definition: kurifilter.cpp:369
KUriFilter()
Constructor.
Definition: kurifilter.cpp:568
int size() const const
int lastIndexOf(QChar ch, int from, Qt::CaseSensitivity cs) const const
void clear()
int toInt(int defaultValue) const const
QString defaultKey() const
Returns the default web shortcut key for this search provider.
Definition: kurifilter.cpp:127
bool filterUri(KUriFilterData &data, const QStringList &filters=QStringList())
Filters data using the specified filters.
Definition: kurifilter.cpp:579
QUrl filteredUri(const QUrl &uri, const QStringList &filters=QStringList())
Returns the filtered URI.
Definition: kurifilter.cpp:616
Class that holds information about a search provider.
Definition: kurifilter.h:38
void setSearchProviders(KUriFilterData &data, const QList< KUriFilterSearchProvider * > &providers) const
Sets the information about the search providers in data.
Definition: kurifilter.cpp:520
bool isEmpty() const const
void setObjectName(const QString &name)
void loadPlugins()
Loads all allowed plugins.
Definition: kurifilter.cpp:662
QUrl uri() const
Returns the filtered or the original URL.
Definition: kurifilter.cpp:275
QString path(QUrl::ComponentFormattingOptions options) const const
virtual QString configName() const
Returns the name of the configuration module for the filter.
Definition: kurifilter.cpp:485
QJsonObject rawData() const
UriTypes
Describes the type of the URI that was filtered.
Definition: kurifilter.h:171
void setFilteredUri(KUriFilterData &data, const QUrl &uri) const
Sets the URL in data to uri.
Definition: kurifilter.cpp:490
static KIconLoader * global()
KUriFilter applies a number of filters to a URI and returns a filtered version if any filter matches...
Definition: kurifilter.h:852
This class is a basic messaging class used to exchange filtering information between the filter plugi...
Definition: kurifilter.h:152
QString icon() const
~KUriFilter()
Destructor.
Definition: kurifilter.cpp:574
QStringList pluginNames() const
Return a list of the names of all loaded plugins.
Definition: kurifilter.cpp:652
void setData(const QUrl &url)
Same as above except the argument is a URL.
Definition: kurifilter.cpp:408
QString absolutePath() const
Returns the absolute path if one has already been set.
Definition: kurifilter.cpp:290
QStringList preferredSearchProviders() const
Returns a list of the names of preferred or available search providers.
Definition: kurifilter.cpp:335
QStringList alternateSearchProviders() const
Returns the list of alternate search providers.
Definition: kurifilter.cpp:378
KUriFilterSearchProvider queryForSearchProvider(const QString &provider) const
Returns information about provider.
Definition: kurifilter.cpp:340
virtual ~KUriFilterSearchProvider()
Destructor.
Definition: kurifilter.cpp:102
~KUriFilterData()
Destructor.
Definition: kurifilter.cpp:270
SearchFilterOptions searchFilteringOptions() const
Returns the specified search filter options.
Definition: kurifilter.cpp:393
void setSearchProvider(KUriFilterData &data, const QString &provider, const QString &term, const QChar &separator) const
Sets the name of the search provider, the search term and keyword/term separator in data...
Definition: kurifilter.cpp:513
virtual QString iconName() const
Returns the icon name associated with the search provider when available.
Definition: kurifilter.cpp:112
QUrl adjusted(QUrl::FormattingOptions options) const const
KUriFilterData()
Default constructor.
Definition: kurifilter.cpp:250
int count(const T &value) const const
bool hasArgsAndOptions() const
Checks whether the current data is a local resource with command line options and arguments...
Definition: kurifilter.cpp:305
QString section(QChar sep, int start, int end, QString::SectionFlags flags) const const
QJsonValue value(const QString &key) const const
virtual KCModule * configModule(QWidget *, const char *) const
Creates a configuration module for the filter.
Definition: kurifilter.cpp:480
bool filterSearchUri(KUriFilterData &data)
See filterSearchUri(KUriFilterData&, SearchFilterTypes)
Definition: kurifilter.cpp:631
void setSearchFilteringOptions(SearchFilterOptions options)
Sets the options used by search filter plugins to filter requests.
Definition: kurifilter.cpp:449
static QVector< KPluginMetaData > findPlugins(const QString &directory, std::function< bool(const KPluginMetaData &)> filter=std::function< bool(const KPluginMetaData &)>())
UriTypes uriType() const
Returns the URI type.
Definition: kurifilter.cpp:285
QString iconNameFor(const QUrl &url, KUriFilterData::UriTypes type) const
Returns the icon name for the given url and URI type.
Definition: kurifilter.cpp:529
void setErrorMsg(KUriFilterData &data, const QString &errmsg) const
Sets the error message in data to errormsg.
Definition: kurifilter.cpp:497
QVector::iterator end()
void setCheckForExecutables(bool check)
Check whether the provided uri is executable or not.
Definition: kurifilter.cpp:429
void setUriType(KUriFilterData &data, KUriFilterData::UriTypes type) const
Sets the URI type in data to type.
Definition: kurifilter.cpp:502
KUriFilterData & operator=(const QUrl &url)
Overloaded assignment operator.
Definition: kurifilter.cpp:454
QString typedString() const
The string as typed by the user, before any URL processing is done.
Definition: kurifilter.cpp:315
bool setAbsolutePath(const QString &abs_path)
Sets the absolute path to be used whenever the supplied data is a relative local URL.
Definition: kurifilter.cpp:418
QString defaultUrlScheme() const
Returns the default protocol to use when filtering potentially valid url inputs.
Definition: kurifilter.cpp:388
KIOCORE_EXPORT QString iconNameForUrl(const QUrl &url)
Return the icon name for a URL.
Definition: global.cpp:212
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon May 10 2021 23:00:31 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.