[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/libs/kofficecore
From:       Ariya Hidayat <ariya () kde ! org>
Date:       2007-01-02 21:28:51
Message-ID: 1167773331.411468.7370.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 619153 by ariya:

take iconLoader from the application


 M  +1 -1      KoDocument.cpp  
 M  +4 -3      KoDocumentInfoDlg.cpp  
 M  +2 -1      KoGlobal.cpp  
 M  +3 -2      KoOpenPane.cpp  
 M  +2 -1      KoTemplates.cpp  


--- trunk/koffice/libs/kofficecore/KoDocument.cpp #619152:619153
@@ -198,7 +198,7 @@
     {
         KGlobal::locale()->insertCatalog("koffice");
         // Tell the iconloader about share/apps/koffice/icons
-        KGlobal::iconLoader()->addAppDir("koffice");
+        kapp->iconLoader()->addAppDir("koffice");
         m_view = 0L;
         // Avoid warning from KParts - we'll have the KoView as focus proxy anyway
         setFocusPolicy( Qt::ClickFocus );
--- trunk/koffice/libs/kofficecore/KoDocumentInfoDlg.cpp #619152:619153
@@ -24,6 +24,7 @@
 #include "ui_koDocumentInfoAuthorWidget.h"
 #include "KoDocumentInfo.h"
 #include "KoDocument.h"
+#include <kapplication.h>
 #include <kmimetype.h>
 #include <klocale.h>
 #include <kglobal.h>
@@ -143,11 +144,11 @@
 
 void KoDocumentInfoDlg::initAuthorTab()
 {
-    QPixmap p = KGlobal::iconLoader()->loadIcon( "personal", K3Icon::Desktop, 48 );
+    QPixmap p = kapp->iconLoader()->loadIcon( "personal", K3Icon::Desktop, 48 );
     d->m_authorUi->lblAuthor->setPixmap( p );
-    p = KGlobal::iconLoader()->loadIcon( "kaddressbook", K3Icon::Small );
+    p = kapp->iconLoader()->loadIcon( "kaddressbook", K3Icon::Small );
     d->m_authorUi->pbLoadKABC->setIcon( QIcon( p ) );
-    p= KGlobal::iconLoader()->loadIcon( "eraser", K3Icon::Small );
+    p= kapp->iconLoader()->loadIcon( "eraser", K3Icon::Small );
     d->m_authorUi->pbDelete->setIcon( QIcon( p ) );
 
     d->m_authorUi->leFullName->setText( d->m_info->authorInfo( "creator" ) );
--- trunk/koffice/libs/kofficecore/KoGlobal.cpp #619152:619153
@@ -28,6 +28,7 @@
 #endif
 
 #include <KoGlobal.h>
+#include <kapplication.h>
 #include <kdebug.h>
 #include <kglobalsettings.h>
 #include <kglobal.h>
@@ -60,7 +61,7 @@
     KGlobal::dirs()->addPrefix(PREFIX);
 
     // Tell the iconloader about share/apps/koffice/icons
-    KGlobal::iconLoader()->addAppDir("koffice");
+    kapp->iconLoader()->addAppDir("koffice");
 
     // Another way to get the DPI of the display would be QPaintDeviceMetrics,
     // but we have no widget here (and moving this to KoView wouldn't allow
--- trunk/koffice/libs/kofficecore/KoOpenPane.cpp #619152:619153
@@ -31,6 +31,7 @@
 #include <QPixmap>
 #include <QSize>
 
+#include <kapplication.h>
 #include <klocale.h>
 #include <kfiledialog.h>
 #include <kinstance.h>
@@ -273,8 +274,8 @@
 
 Q3ListViewItem* KoOpenPane::addPane(const QString& title, const QString& icon, \
QWidget* widget, int sortWeight)  {
-  return addPane(title, SmallIcon(icon, K3Icon::SizeLarge, K3Icon::DefaultState, \
                d->m_instance),
-                 widget, sortWeight);
+  return addPane(title, KIcon(icon, \
kapp->iconLoader()).pixmap(K3Icon::SizeLarge,K3Icon::SizeLarge),  +    widget, \
sortWeight);  }
 
 Q3ListViewItem* KoOpenPane::addPane(const QString& title, const QPixmap& icon, \
                QWidget* widget, int sortWeight)
--- trunk/koffice/libs/kofficecore/KoTemplates.cpp #619152:619153
@@ -24,6 +24,7 @@
 #include <QPixmap>
 #include <QPrinter>
 
+#include <kapplication.h>
 #include <kdesktopfile.h>
 #include <ksimpleconfig.h>
 #include <kdebug.h>
@@ -67,7 +68,7 @@
         m_pixmap = QPixmap::fromImage(img);
         return m_pixmap;
     } else { // relative path
-        m_pixmap = instance->iconLoader()->loadIcon( m_picture, K3Icon::Desktop, 128 \
); +        m_pixmap = kapp->iconLoader()->loadIcon( m_picture, K3Icon::Desktop, 128 \
);  return m_pixmap;
     }
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic