KCoreAddons
knetworkmounts.cpp
32 const QString configFileName = QStringLiteral("%1/network_mounts").arg(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation));
35 for (const auto type : {KNetworkMounts::NfsPaths, KNetworkMounts::SmbPaths, KNetworkMounts::SymlinkDirectory, KNetworkMounts::SymlinkToNetworkMount}) {
77bool KNetworkMounts::isOptionEnabled(const KNetworkMountOption option, const bool defaultValue) const
93 {KNetworkMounts::NfsPaths, KNetworkMounts::SmbPaths, KNetworkMounts::SymlinkDirectory, KNetworkMounts::SymlinkToNetworkMount}) {
94 paths.append(d->m_settings->value(enumToString(networkMountType), QStringList()).toStringList());
static KNetworkMounts * self()
Returns (and creates if necessary) the singleton instance.
Definition knetworkmounts.cpp:23
void setEnabled(bool value)
Switch the performance optimizations on or off.
Definition knetworkmounts.cpp:72
bool isOptionEnabled(const KNetworkMountOption option, const bool defaultValue=false) const
Query a performance option.
Definition knetworkmounts.cpp:77
@ SymlinkToNetworkMount
Paths which are symbolic links to network mounts.
Definition knetworkmounts.h:106
@ SymlinkDirectory
Paths to directories which contain symbolic links to network mounts.
Definition knetworkmounts.h:105
bool isSlowPath(const QString &path, KNetworkMountsType type=Any)
Query if path is configured to be a slow path of type type.
Definition knetworkmounts.cpp:49
void setOption(const KNetworkMountOption option, const bool value)
Switch a performance option on or off.
Definition knetworkmounts.cpp:82
bool isOptionEnabledForPath(const QString &path, KNetworkMountOption option)
Query if path is configured to be a slow path and option is enabled.
Definition knetworkmounts.cpp:54
bool isEnabled() const
Query if the performance optimizations are switched on.
Definition knetworkmounts.cpp:67
void setPaths(const QStringList &paths, KNetworkMountsType type)
Set the paths for which optimizations are to take place.
Definition knetworkmounts.cpp:102
void addPath(const QString &path, KNetworkMountsType type)
Add a path for which optimizations are to take place.
Definition knetworkmounts.cpp:109
QStringList paths(KNetworkMountsType type=Any) const
Query the configured paths for which optimizations are to take place.
Definition knetworkmounts.cpp:87
void append(QList< T > &&value)
void reserve(qsizetype size)
ConfigLocation
QString writableLocation(StandardLocation type)
QString & append(QChar ch)
QString arg(Args &&... args) const const
void chop(qsizetype n)
bool endsWith(QChar c, Qt::CaseSensitivity cs) const const
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
QString & insert(qsizetype position, QChar ch)
bool isEmpty() const const
QString left(qsizetype n) const const
qsizetype length() const const
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
qsizetype size() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:24 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:24 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.