[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kdelibs4-dbus/kio/kio
From: Thiago Macieira <thiago () kde ! org>
Date: 2006-04-27 16:29:01
Message-ID: 1146155341.368657.28781.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 534722 by thiago:
Porting KMimeType to DBus.
This one-entry change to show how simple the porting is.
Unfortunately, I don't think this can be scripted (the example shows:
you cannot pass a KUrl).
M +4 -8 kmimetype.cpp
--- branches/work/kdelibs4-dbus/kio/kio/kmimetype.cpp #534721:534722
@@ -27,8 +27,6 @@
#include <kmessageboxwrapper.h>
-#include <dcopclient.h>
-#include <dcopref.h>
#include <kdebug.h>
#include <kdesktopfile.h>
#include <kiconloader.h>
@@ -41,6 +39,7 @@
#include <qset.h>
#include <qstring.h>
#include <qfile.h>
+#include <dbus/qdbus.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -496,12 +495,9 @@
|| !useFavIcons )
return QString();
- DCOPRef kded( "kded", "favicons" );
- DCOPReply result = kded.call( "iconForURL(KUrl)", url );
- if ( result.isValid() )
- return result;
-
- return QString();
+ QDBusRef kded( "org.kde.kded", "/modules/favicons" );
+ QDBusReply<QString> result = kded->call( "iconForURL", url.url() );
+ return result; // default is QString()
}
QString KMimeType::parentMimeType() const
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic