mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kdecore: remove unused KProtocolInfo::isFilterProtocol() methods
opposite of KProtocolManager::isSourceProtocol() Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
bb23c25fb2
commit
f6b8759d51
2 changed files with 1 additions and 40 deletions
|
@ -198,16 +198,6 @@ QStringList KProtocolInfo::protocols()
|
|||
return KProtocolInfoFactory::self()->protocols();
|
||||
}
|
||||
|
||||
bool KProtocolInfo::isFilterProtocol(const QString &protocol)
|
||||
{
|
||||
// call the findProtocol directly (not via KProtocolManager) to bypass any proxy settings.
|
||||
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(protocol);
|
||||
if (!prot) {
|
||||
return false;
|
||||
}
|
||||
return !prot->m_isSourceProtocol;
|
||||
}
|
||||
|
||||
void KProtocolInfo::selectServiceOrHelper(const QString &protocol, KProtocolInfo::Ptr &returnProtocol, KService::Ptr &returnService)
|
||||
{
|
||||
// have up to two sources of data:
|
||||
|
@ -369,11 +359,6 @@ KProtocolInfo::FileNameUsedForCopying KProtocolInfo::fileNameUsedForCopying() co
|
|||
return d->fileNameUsedForCopying;
|
||||
}
|
||||
|
||||
bool KProtocolInfo::isFilterProtocol(const KUrl &url)
|
||||
{
|
||||
return isFilterProtocol(url.protocol());
|
||||
}
|
||||
|
||||
bool KProtocolInfo::isHelperProtocol(const KUrl &url)
|
||||
{
|
||||
return isHelperProtocol(url.protocol());
|
||||
|
@ -383,7 +368,7 @@ bool KProtocolInfo::isHelperProtocol(const QString &protocol)
|
|||
{
|
||||
// call the findProtocol directly (not via KProtocolManager) to bypass any proxy settings.
|
||||
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(protocol);
|
||||
if ( prot ) {
|
||||
if (prot) {
|
||||
return prot->m_isHelperProtocol;
|
||||
}
|
||||
const KService::Ptr service = KMimeTypeTrader::self()->preferredService(QString::fromLatin1("x-scheme-handler/") + protocol);
|
||||
|
|
|
@ -110,30 +110,6 @@ public:
|
|||
*/
|
||||
static bool isHelperProtocol(const QString &protocol);
|
||||
|
||||
/**
|
||||
* Returns whether the protocol can act as a filter protocol.
|
||||
*
|
||||
* A filter protocol can operate on data that is passed to it
|
||||
* but does not retrieve/store data itself, like sftp.
|
||||
* A filter protocol is the opposite of a source protocol.
|
||||
*
|
||||
* The "source=" field in the protocol description file determines
|
||||
* whether a protocol is a source protocol or a filter protocol.
|
||||
* Valid values for this field are "true" (default) for source protocol or
|
||||
* "false" for filter protocol.
|
||||
*
|
||||
* @param url the url to check
|
||||
* @return true if the protocol is a filter (e.g. sftp), false if the
|
||||
* protocol is a helper or source
|
||||
*/
|
||||
static bool isFilterProtocol(const KUrl &url);
|
||||
|
||||
/**
|
||||
* Same as above except you can supply just the protocol instead of
|
||||
* the whole URL.
|
||||
*/
|
||||
static bool isFilterProtocol(const QString &protocol);
|
||||
|
||||
/**
|
||||
* Returns the name of the icon, associated with the specified protocol.
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue