]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphintabwidget.cpp
Merge branch 'master' into frameworks
[dolphin.git] / src / dolphintabwidget.cpp
index c6607e52933c988fbf6cf06dc2d2c3a265e0d60c..42a8aff09e63c8a7d4f644cb06b7d12297b7e488 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <QApplication>
 #include <KConfigGroup>
-#include <KIcon>
+#include <kio/global.h>
 #include <KRun>
 
 DolphinTabWidget::DolphinTabWidget(QWidget* parent) :
@@ -146,7 +146,7 @@ void DolphinTabWidget::openNewTab(const KUrl& primaryUrl, const KUrl& secondaryU
             this, SIGNAL(activeViewChanged(DolphinViewContainer*)));
     connect(tabPage, SIGNAL(activeViewUrlChanged(KUrl)),
             this, SLOT(tabUrlChanged(KUrl)));
-    addTab(tabPage, KIcon(KMimeType::iconNameForUrl(primaryUrl)), tabName(primaryUrl));
+    addTab(tabPage, QIcon::fromTheme(KIO::iconNameForUrl(primaryUrl)), tabName(primaryUrl));
 
     if (focusWidget) {
         // The DolphinViewContainer grabbed the keyboard focus. As the tab is opened
@@ -301,7 +301,7 @@ void DolphinTabWidget::tabUrlChanged(const KUrl& url)
     const int index = indexOf(qobject_cast<QWidget*>(sender()));
     if (index >= 0) {
         tabBar()->setTabText(index, tabName(url));
-        tabBar()->setTabIcon(index, KIcon(KMimeType::iconNameForUrl(url)));
+        tabBar()->setTabIcon(index, QIcon::fromTheme(KIO::iconNameForUrl(url)));
 
         // Emit the currentUrlChanged signal if the url of the current tab has been changed.
         if (index == currentIndex()) {