Package: qgis / 2.4.0-1

0001-Fix-10828-slow-project-loading.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
From 904443ff0d49b3d6b6b883cb479ab2f0b5f5f6af Mon Sep 17 00:00:00 2001
From: Martin Dobias <wonder.sk@gmail.com>
Date: Wed, 16 Jul 2014 23:29:16 +0200
Subject: Fix #10828 (slow project loading)
Origin: https://github.com/qgis/QGIS/commit/904443ff0d49b3d6b6b883cb479ab2f0b5f5f6af
Bug: http://hub.qgis.org/issues/10828


--- a/src/gui/qgsmaplayermodel.cpp
+++ b/src/gui/qgsmaplayermodel.cpp
@@ -15,6 +15,7 @@
 
 #include <QIcon>
 
+#include "qgsdataitem.h"
 #include "qgsmaplayermodel.h"
 #include "qgsmaplayerregistry.h"
 #include "qgsapplication.h"
@@ -132,6 +133,7 @@ int QgsMapLayerModel::columnCount( const
   return 1;
 }
 
+
 QVariant QgsMapLayerModel::data( const QModelIndex &index, int role ) const
 {
   if ( !index.isValid() || !index.internalPointer() )
@@ -165,7 +167,7 @@ QVariant QgsMapLayerModel::data( const Q
       {
         case QgsMapLayer::RasterLayer:
         {
-          return QgsApplication::getThemeIcon( "/mIconRasterLayer.svg" );
+          return QgsLayerItem::iconRaster();
         }
 
         case QgsMapLayer::VectorLayer:
@@ -180,19 +182,19 @@ QVariant QgsMapLayerModel::data( const Q
           {
             case QGis::Point:
             {
-              return QgsApplication::getThemeIcon( "/mIconPointLayer.svg" );
+              return QgsLayerItem::iconPoint();
             }
             case QGis::Polygon :
             {
-              return QgsApplication::getThemeIcon( "/mIconPolygonLayer.svg" );
+              return QgsLayerItem::iconPolygon();
             }
             case QGis::Line :
             {
-              return QgsApplication::getThemeIcon( "/mIconLineLayer.svg" );
+              return QgsLayerItem::iconLine();
             }
             case QGis::NoGeometry :
             {
-              return QgsApplication::getThemeIcon( "/mIconTableLayer.png" );
+              return QgsLayerItem::iconTable();
             }
             default:
             {