kio: remove deprecated KSambaShare::smbConfPath() method

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-06-08 07:21:51 +03:00
parent f29e36edd0
commit cc54136858
2 changed files with 0 additions and 50 deletions

View file

@ -37,30 +37,13 @@
#include <kuser.h>
#include <kstandarddirs.h>
// Default smb.conf locations
// sorted by priority, most priority first
static const char * const DefaultSambaConfigFilePathList[] =
{
"/etc/samba/smb.conf",
"/etc/smb.conf",
"/usr/local/etc/smb.conf",
"/usr/local/samba/lib/smb.conf",
"/usr/samba/lib/smb.conf",
"/usr/lib/smb.conf",
"/usr/local/lib/smb.conf"
};
static const int DefaultSambaConfigFilePathListSize = sizeof(DefaultSambaConfigFilePathList)
/ sizeof(char*);
KSambaSharePrivate::KSambaSharePrivate(KSambaShare *parent)
: q_ptr(parent)
, data()
, smbConf()
, userSharePath()
, skipUserShare(false)
{
setUserSharePath();
findSmbConf();
sync();
}
@ -80,23 +63,6 @@ bool KSambaSharePrivate::isSambaInstalled()
return false;
}
// Try to find the samba config file path
// in several well-known paths
bool KSambaSharePrivate::findSmbConf()
{
for (int i = 0; i < DefaultSambaConfigFilePathListSize; ++i) {
const QString filePath(DefaultSambaConfigFilePathList[i]);
if (QFile::exists(filePath)) {
smbConf = filePath;
return true;
}
}
kWarning() << "KSambaShare: Could not find smb.conf!";
return false;
}
void KSambaSharePrivate::setUserSharePath()
{
const QString rawString = testparmParamValue(QLatin1String("usershare path"));
@ -461,12 +427,6 @@ KSambaShare::~KSambaShare()
delete d_ptr;
}
QString KSambaShare::smbConfPath() const
{
Q_D(const KSambaShare);
return d->smbConf;
}
bool KSambaShare::isDirectoryShared(const QString &path) const
{
Q_D(const KSambaShare);

View file

@ -104,16 +104,6 @@ public:
virtual ~KSambaShare();
/**
* Returns the path to the used smb.conf file
* or empty string if no file was found
*
* @return @c the path to the smb.conf file
*
* @deprecated
*/
KIO_DEPRECATED QString smbConfPath() const;
Q_SIGNALS:
/**
* Emitted when a share is updated, added or removed