Fwd: extragear/graphics/digikam/libs/imageproperties

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fwd: extragear/graphics/digikam/libs/imageproperties

Bugzilla from andi.clemens@gmx.net
This is not compiling, you can not have #ifdef in Qt slots or signals. The moc
compiler will not resolve these.

Disable WITH_MARBLEWIDGET in cmake to see that compile fails.

Andi

SVN commit 1030612 by mghansen:

Wrap markerclusterholder code in Digikam namespace

CCBUG: 205001


 M  +6 -0      markerclusterholder.cpp  
 M  +16 -10    markerclusterholder.h  
 M  +24 -23    worldmapwidget.cpp  


--- trunk/extragear/graphics/digikam/libs/imageproperties/markerclusterholder.cpp #1030611:1030612
@@ -43,6 +43,9 @@
 #include "markerclusterholderplugin/externaldraw.h"
 #endif // MARBLE_VERSION >= 0x000800
 
+namespace Digikam
+{
+
 // constants for clusters
 const int ClusterRadius = 15;
 const QSize ClusterDefaultSize = QSize(2*ClusterRadius, 2*ClusterRadius);
@@ -1435,3 +1438,6 @@
 {
     return d->markers[markerIndex];
 }
+
+} // Digikam
+
--- trunk/extragear/graphics/digikam/libs/imageproperties/markerclusterholder.h #1030611:1030612
@@ -30,6 +30,14 @@
 #include <marble/MarbleWidget.h>
 #include <marble/GeoDataPoint.h>
 
+namespace Marble
+{
+    class GeoPainter;
+}
+
+namespace Digikam
+{
+
 class MarkerClusterHolderPrivate;
 
 class MarkerClusterHolder : public QObject
@@ -402,16 +410,6 @@
     Q_DISABLE_COPY(MarkerClusterHolder)
 };
 
-Q_DECLARE_METATYPE(MarkerClusterHolder::MarkerInfo)
-Q_DECLARE_METATYPE(MarkerClusterHolder::MarkerInfoList)
-Q_DECLARE_METATYPE(MarkerClusterHolder::ClusterInfo)
-Q_DECLARE_METATYPE(MarkerClusterHolder::ClusterInfoList)
-
-namespace Marble
-{
-    class GeoPainter;
-}
-
 inline MarkerClusterHolder::PixmapOperations& operator|=(MarkerClusterHolder::PixmapOperations& target, const MarkerClusterHolder::PixmapOperations& source)
 {
     target = MarkerClusterHolder::PixmapOperations(target | source);
@@ -443,5 +441,13 @@
     Q_DISABLE_COPY(MarbleSubClassWidget)
 };
 
+} // Digikam
+
+Q_DECLARE_METATYPE(Digikam::MarkerClusterHolder::MarkerInfo)
+Q_DECLARE_METATYPE(Digikam::MarkerClusterHolder::MarkerInfoList)
+Q_DECLARE_METATYPE(Digikam::MarkerClusterHolder::ClusterInfo)
+Q_DECLARE_METATYPE(Digikam::MarkerClusterHolder::ClusterInfoList)
+
+
 #endif // MARKERCLUSTERHOLDER_H
 
--- trunk/extragear/graphics/digikam/libs/imageproperties/worldmapwidget.cpp #1030611:1030612
@@ -42,33 +42,15 @@
 #include <marble/MarbleWidget.h>
 using namespace Marble;
 
-Q_DECLARE_METATYPE(Digikam::GPSInfo)
-
-template<> MarkerClusterHolder::MarkerInfo MarkerClusterHolder::MarkerInfo::fromData<Digikam::GPSInfo>(const Digikam::GPSInfo& yourdata)
-{
-    return MarkerClusterHolder::MarkerInfo(yourdata.longitude, yourdata.latitude, QVariant::fromValue(yourdata));
-}
-
-bool MarkerInfoDataEqualFunction(const QVariant& one, const QVariant& two, void* const yourdata)
-{
-    Q_UNUSED(yourdata)
-    
-    const Digikam::GPSInfo oneInfo = one.value<Digikam::GPSInfo>();
-    const Digikam::GPSInfo twoInfo = two.value<Digikam::GPSInfo>();
-    
-    // just compare the urls of the GPSInfos:
-    return (oneInfo.url==twoInfo.url);
-}
-
-#endif // HAVE_MARBLEWIDGET
-
-
 // local includes
 
 #include <thumbnailloadthread.h>
 
+Q_DECLARE_METATYPE(Digikam::GPSInfo)
+
 namespace Digikam
 {
+    
 class ClusterUserData
 {
 public:
@@ -81,13 +63,32 @@
     int thumbnailMarkerIndex;
     int thumbnailSettingsHash;
 };
-}
 
+} // Digikam
+
 Q_DECLARE_METATYPE(Digikam::ClusterUserData)
 
 namespace Digikam
 {
-  
+
+template<> MarkerClusterHolder::MarkerInfo MarkerClusterHolder::MarkerInfo::fromData<Digikam::GPSInfo>(const Digikam::GPSInfo& yourdata)
+{
+    return MarkerClusterHolder::MarkerInfo(yourdata.longitude, yourdata.latitude, QVariant::fromValue(yourdata));
+}
+
+bool MarkerInfoDataEqualFunction(const QVariant& one, const QVariant& two, void* const yourdata)
+{
+    Q_UNUSED(yourdata)
+    
+    const Digikam::GPSInfo oneInfo = one.value<Digikam::GPSInfo>();
+    const Digikam::GPSInfo twoInfo = two.value<Digikam::GPSInfo>();
+    
+    // just compare the urls of the GPSInfos:
+    return (oneInfo.url==twoInfo.url);
+}
+
+#endif // HAVE_MARBLEWIDGET
+
 class WorldMapWidgetPriv
 {
 

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel