Bug 269862 - libkmap compilation fails because of changes in MarbleWidget [patch]
Summary: libkmap compilation fails because of changes in MarbleWidget [patch]
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Unclassified
Component: Tarball-Compilation (show other bugs)
Version: 2.0.0
Platform: Compiled Sources Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-01 05:46 UTC by T.R.Shashwath
Modified: 2017-08-19 20:59 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.0.0


Attachments
Compilation fix for new marble version (1.42 KB, patch)
2011-04-01 05:46 UTC, T.R.Shashwath
Details

Note You need to log in before you can comment on or make changes to this bug.
Description T.R.Shashwath 2011-04-01 05:46:05 UTC
Created attachment 58489 [details]
Compilation fix for new marble version

Version:           unspecified (using Devel) 
OS:                Linux

Looks like the interface for MarbleWidget has changed again, and you shouldn't use "marbleWidget->map()->fooBar()" anymore. Apparently, the calls are forwarded to the backend map() object directly.

The compiler output is attached.

I worked around this problem by changing the relevant calls in backend_map_marble.cpp (in three places). It compiles properly, but I haven't run it to ensure that it works. The patch for this is also attached.

In the patch, I've added a new #if condition in backend_map_marble.cpp to handle MARBLE_VERSION>=0x000c00, which is where this change happened, apparently.

Reproducible: Always

Steps to Reproduce:
Update to a recent version of kdeedu from SVN
Attempt to build libkmap

Actual Results:  
makeobj[0]: Entering directory `/mnt/new2/build/extragear/graphics/libkmap/libkmap'
[  0%] Built target kmap_automoc
[  5%] Building CXX object libkmap/CMakeFiles/kmap.dir/backend_map_marble.o
/mnt/new2/code/extragear/graphics/libkmap/libkmap/backend_map_marble.cpp: In destructor ‘virtual KMap::BackendMarble::~BackendMarble()’:                                       
/mnt/new2/code/extragear/graphics/libkmap/libkmap/backend_map_marble.cpp:178: error: ‘class Marble::MarbleWidget’ has no member named ‘map’
/mnt/new2/code/extragear/graphics/libkmap/libkmap/backend_map_marble.cpp: In member function ‘virtual QWidget* KMap::BackendMarble::mapWidget()’:
/mnt/new2/code/extragear/graphics/libkmap/libkmap/backend_map_marble.cpp:225: error: ‘class Marble::MarbleWidget’ has no member named ‘map’
/mnt/new2/code/extragear/graphics/libkmap/libkmap/backend_map_marble.cpp: In member function ‘virtual QSize KMap::BackendMarble::mapSize() const’:
/mnt/new2/code/extragear/graphics/libkmap/libkmap/backend_map_marble.cpp:909: error: ‘class Marble::MarbleWidget’ has no member named ‘map’
make[2]: *** [libkmap/CMakeFiles/kmap.dir/backend_map_marble.o] Error 1
make[1]: *** [libkmap/CMakeFiles/kmap.dir/all] Error 2
make: *** [all] Error 2
makeobj[0]: Leaving directory `/mnt/new2/build/extragear/graphics/libkmap/libkmap'


Expected Results:  
It should compile properly.
Comment 1 caulier.gilles 2011-04-01 11:36:47 UTC
Micheal, this patch is for you...

Gilles Caulier
Comment 2 Christoph Feck 2011-04-02 02:10:59 UTC
*** Bug 269900 has been marked as a duplicate of this bug. ***
Comment 3 Michael G. Hansen 2011-04-02 15:34:35 UTC
Thanks for the patch, I will take a look.

Michael
Comment 4 Michael G. Hansen 2011-04-02 21:29:58 UTC
Git commit 26285d37a7818becb2a252461ca0e82851da6db2 by Michael Georg Hansen.
Committed on 02/04/2011 at 21:32.
Pushed by mghansen into branch 'master'.

Apply patch by T.R.Shashwath to make libkmap compile against Marble API changes. Since the changes were made some time after KDE SC 4.6 was released, this can break the build for older versions of trunk, but I don't know how to make the version detection ifdefs more precise.

BUG: 269862

M  +7    -6    libkmap/backend_map_marble.cpp     

http://commits.kde.org/libkmap/26285d37a7818becb2a252461ca0e82851da6db2