[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdenetwork/kopete
From: Pali Rohár <pali.rohar () gmail ! com>
Date: 2013-06-04 19:29:59
Message-ID: 20130604192959.D2F21AC85D () svn ! kde ! org
[Download RAW message or body]
SVN commit 1356886 by pali:
One MimeTypeHandler::handleURL() function is enough
M +1 -17 libkopete/kopetemimetypehandler.cpp
M +0 -8 libkopete/kopetemimetypehandler.h
M +1 -1 protocols/irc/ircprotocol.cpp
M +1 -1 protocols/irc/ircprotocol.h
M +0 -5 protocols/jabber/jabberprotocol.cpp
M +0 -1 protocols/jabber/jabberprotocol.h
M +1 -1 protocols/oscar/aim/aimprotocol.cpp
M +1 -1 protocols/oscar/aim/aimprotocol.h
M +1 -5 protocols/skype/skypeprotocol.cpp
M +0 -1 protocols/skype/skypeprotocol.h
--- trunk/KDE/kdenetwork/kopete/libkopete/kopetemimetypehandler.cpp #1356885:1356886
@@ -128,7 +128,7 @@
if( mimeHandler )
{
- mimeHandler->handleURL( url );
+ mimeHandler->handleURL( QString(), url );
return true;
}
else
@@ -165,30 +165,19 @@
KUrl dest;
dest.setPath( file );
- if( !mimeType.isNull() )
handler->handleURL( mimeType, dest );
- else
- handler->handleURL( dest );
// for now, local-only handlers have to be synchronous
KIO::NetAccess::removeTempFile( file );
}
else
{
- if( !mimeType.isNull() )
handler->handleURL( mimeType, url );
- else
- handler->handleURL( url );
}
return true;
}
-void MimeTypeHandler::handleURL( const KUrl &url ) const
-{
- Q_UNUSED( url );
-}
-
void MimeTypeHandler::handleURL( const QString &mimeType, const KUrl &url ) const
{
Q_UNUSED( mimeType );
@@ -206,11 +195,6 @@
void EmoticonMimeTypeHandler::handleURL( const QString &, const KUrl &url ) const
{
- handleURL(url);
-}
-
-void EmoticonMimeTypeHandler::handleURL( const KUrl &url ) const
-{
Emoticons::self()->installTheme( url.toLocalFile() );
}
--- trunk/KDE/kdenetwork/kopete/libkopete/kopetemimetypehandler.h #1356885:1356886
@@ -67,13 +67,6 @@
bool canAcceptRemoteFiles() const;
/**
- * Handles the URL @p url
- *
- * @param url The url to handle
- */
- virtual void handleURL( const KUrl &url ) const;
-
- /**
* Handles the URL @p url, which has the mime type @p mimeType
*
* @param mimeType The mime type of the URL
@@ -126,7 +119,6 @@
const QStringList mimeTypes() const;
void handleURL( const QString &mimeType, const KUrl &url ) const;
- void handleURL( const KUrl &url ) const;
};
} // Kopete
--- trunk/KDE/kdenetwork/kopete/protocols/irc/ircprotocol.cpp #1356885:1356886
@@ -77,7 +77,7 @@
registerAsProtocolHandler(QString::fromLatin1("irc"));
}
-void IRCProtocolHandler::handleURL(const KUrl &url) const
+void IRCProtocolHandler::handleURL(const QString &, const KUrl &url) const
{
kDebug(14120) << url;
if (!url.isValid())
--- trunk/KDE/kdenetwork/kopete/protocols/irc/ircprotocol.h #1356885:1356886
@@ -52,7 +52,7 @@
IRCProtocolHandler();
- void handleURL( const KUrl &url ) const;
+ void handleURL( const QString &, const KUrl &url ) const;
};
static const QString CHAT_VIEW( QString::fromLatin1("kopete_chatwindow") );
--- trunk/KDE/kdenetwork/kopete/protocols/jabber/jabberprotocol.cpp #1356885:1356886
@@ -352,11 +352,6 @@
void JabberProtocol::handleURL(const QString&, const KUrl & kurl) const
{
- handleURL(kurl);
-}
-
-void JabberProtocol::handleURL(const KUrl & kurl) const
-{
QUrl url=kurl; //QUrl has better query handling.
if(url.scheme() != "xmpp" && !url.scheme().isEmpty() )
return;
--- trunk/KDE/kdenetwork/kopete/protocols/jabber/jabberprotocol.h #1356885:1356886
@@ -148,7 +148,6 @@
/**
* inherited from Kopete::MimeTypeHandler
*/
- virtual void handleURL( const KUrl & url ) const;
virtual void handleURL(const QString&, const KUrl & kurl) const;
private:
--- trunk/KDE/kdenetwork/kopete/protocols/oscar/aim/aimprotocol.cpp #1356885:1356886
@@ -43,7 +43,7 @@
registerAsProtocolHandler(QString::fromLatin1("aim"));
}
-void AIMProtocolHandler::handleURL(const KUrl &url) const
+void AIMProtocolHandler::handleURL(const QString&, const KUrl &url) const
{
/**
* Send a Message =================================================
--- trunk/KDE/kdenetwork/kopete/protocols/oscar/aim/aimprotocol.h #1356885:1356886
@@ -29,7 +29,7 @@
{
public:
AIMProtocolHandler();
- void handleURL( const KUrl & url ) const;
+ void handleURL( const QString&, const KUrl & url ) const;
};
class AIMProtocol : public OscarProtocol
--- trunk/KDE/kdenetwork/kopete/protocols/skype/skypeprotocol.cpp #1356885:1356886
@@ -46,7 +46,7 @@
registerAsProtocolHandler("tell");
}
-void SkypeProtocolHandler::handleURL(const KUrl &url) const {
+void SkypeProtocolHandler::handleURL(const QString &, const KUrl &url) const {
kDebug(SKYPE_DEBUG_GLOBAL);
if ( ! SkypeProtocol::protocol()->hasAccount() ) {
kDebug(SKYPE_DEBUG_GLOBAL) << "No Skype account registred";
@@ -55,10 +55,6 @@
SkypeProtocol::protocol()->account()->SkypeActionHandler(url.url());
}
-void SkypeProtocolHandler::handleURL(const QString &, const KUrl &url) const {
- handleURL(url);
-}
-
class SkypeProtocolPrivate {
private:
public:
--- trunk/KDE/kdenetwork/kopete/protocols/skype/skypeprotocol.h #1356885:1356886
@@ -36,7 +36,6 @@
{
public:
SkypeProtocolHandler();
- void handleURL(const KUrl &url) const;
void handleURL(const QString &, const KUrl &url) const;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic