Index: MainWindow/ExternalPopup.cpp
===================================================================
--- MainWindow/ExternalPopup.cpp	(revision 734030)
+++ MainWindow/ExternalPopup.cpp	(working copy)
@@ -26,6 +26,7 @@
 #include <krun.h>
 #include <klocale.h>
 #include <kfileitem.h>
+#include <kdebug.h>
 
 void MainWindow::ExternalPopup::populate( DB::ImageInfoPtr current, const QStringList& imageList )
 {
@@ -71,6 +72,9 @@
 {
     QString name = text( id );
     KTrader::OfferList offers = KTrader::self()->query( *(_appToMimeTypeMap[name].begin()), QString::fromLatin1("Type == 'Application' and Name == '%1'").arg(name));
+    kdError() << "id: " << id << ", name: '" << name << "', mimeType: '" << *(_appToMimeTypeMap[name].begin()) << "', offers.count(): " << offers.count() << endl;
+    for ( KTrader::OfferList::const_iterator it = offers.begin(); it != offers.end(); ++it )
+        kdError() << " type: " << (**it).type() << ", name: " << (**it).name() << endl;
     Q_ASSERT( offers.count() == 1 );
     KService::Ptr ptr = offers.first();
     KURL::List lst;
@@ -110,10 +114,12 @@
 MainWindow::OfferType MainWindow::ExternalPopup::appInfos(const QStringList& files )
 {
     StringSet types = mimeTypes( files );
+    kdError() << "appInfos():" << endl << " types: " << types.toList() << endl;
     OfferType res;
     for ( StringSet::const_iterator mimeTypeIt = types.begin(); mimeTypeIt != types.end(); ++mimeTypeIt ) {
         KTrader::OfferList offers = KTrader::self()->query( *mimeTypeIt, QString::fromLatin1("Type == 'Application'"));
         for(KTrader::OfferList::Iterator offerIt = offers.begin(); offerIt != offers.end(); ++offerIt) {
+            kdError() << "  mime: " << *mimeTypeIt << ", offer: " << (**offerIt).name() << endl;
             res.insert( qMakePair( (*offerIt)->name(), (*offerIt)->pixmap(KIcon::Toolbar) ) );
             _appToMimeTypeMap[(*offerIt)->name()].insert( *mimeTypeIt );
         }
