Bug 394544

Summary: New tool to export to inaturalist
Product: [Applications] digikam Reporter: Dav <davm6101>
Component: Plugin-WebService-iNaturalistAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: caulier.gilles, gaurav, joergmlpts, mehmetgelisin, stefan.haerle, synrg
Priority: NOR    
Version: 7.0.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 7.3.0
Sentry Crash Report:

Description Dav 2018-05-21 22:50:22 UTC
Hi there,

As a powerful digikam user and also a naturalist, I think that an export feature to inaturalist would be very helpful.

background:

inaturalist is a community website which allow to identify both plants and animals based upon pictures: we submit a picture, add geotag and a date if there are not embedded in the metadatas, suggest a species and the community will help us to define very precisely the species which have been shooted.

main feature request:

being able to export to inaturalist from digikam like the google photos export does (automatic login, save credentials, convert raw files into the supported formats by inaturalist).

others useful features requests:

- Being able to identify from digikam which files have been submitted and which not: it will avoid to being able to compare your submissions from inaturalist website and digikam, task which can be time consuming.

- Having an option which doesn't allow submission of pictures which don't have embedded geotag: this is not a real problem in inaturalist to set afterward the geotag, but this is another time we'll have to contribute afterward in inaturalist: it should be done only in digikam, and inaturalist would be there only for identification.

- being able to embed the taxonomy which have been defined in inaturalist in the pictures tags: taxnonomy is a very complex classification, and copy them in the pictures tags is a very long task if we do numerous submissions. 
From my side, I copy all the taxonomy found in inaturalist in my pictures. Our exchanges on the mailing list highlight that not everyone copy all the taxonomy so perhaps being able to configure which part of the taxonomy should be copied would be useful. Take care: taxonomy is provided in differents languages. We should be able to configure in which lang the taxonomy would be embedded.
Comment 1 Ben Armstrong 2018-06-10 10:13:31 UTC
See https://www.inaturalist.org/pages/developers and https://www.inaturalist.org/pages/api+reference which provides a place for developers to start on this.

I'm trying to use Digikam to establish a photo processing workflow entirely based on open source software.

On the input/import end, I'm using OsmAnd on Android to collect GPS tracks, OpenCamera on Android to take photos. Then I use Digikam to GPS correlate tracks & photos from my discrete camera (and also to supplement Android photos with DOP values from the OsmAnd tracks, which the Android platform doesn't yet support recording in EXIF natively). Currently, I do all other editing & photo processing within Digikam.

For exporting, I typically publish (currently via batch uploads of files through the web interfaces of each platform) to five different target platforms: Strava (a group for stewards of our local wilderness trail), Facebook (valuable to support discussions with a broader community not on other platforms), Flickr (mostly as fairly large, "free" cloud storage), Wordpress (self-hosted), and iNaturalist. Anything I can do to automate / optimize / cut out redundancy in my workflow would greatly improve life for me.

A significant barrier in this workflow to uploading efficiently to the iNaturalist platform is submissions through their web interface of large photo sets. In Chromium, it is necessary to partition sets of greater than about 30 photos at a time into subsets, otherwise my Atom-based workstation with 8G RAM runs out of memory to handle the page. Integration with Digikam done properly would likely help with this.

The main feature request & other useful features all sound like things that would help me too. I'd love to see something started, and then those additional requests filed as separate wishlists once work is underway.

As a professional software developer, primarily in Ruby these days, but with some proficiency in other languages, and also as a Debian developer of some years, helping develop an iNaturalist export extension for digikam is certainly something I'd be interested in exploring. I must caution, though, that I have no KDE development experience. I don't think that's a huge barrier to me making some sort of contribution, but it probably rules me out as being a driver for this effort.
Comment 2 caulier.gilles 2018-06-10 10:23:04 UTC
Hi Ben,

First thanks to propose to contribute in goal to make a new export tool for digiKam.

Since 5.0.0, and more with 6.0.0, we reduce drastically the KDE dependencies to digiKam. You don't need to know the KDE API to write a new export tool. Only Qt5 API is required. This simplify to developers work and increase the portability everywhere.

Qt5 is a very powerfull C++ framework. all digiKam is based on Qt5.

The export tools source code, are located especially at this place :

https://cgit.kde.org/digikam.git/tree/core/utilities/assistants/webservices

And currently, all tools are step by step ported to O2 authentification by a student to simplify the users workflow.

We can guide you understand the current code and the internal DK API than you can use in these tools. Note that all export tools are available everywhere now in digiKam and Showfoto, as in icon-view, image editor and light table (this is not the case with previous releases).

Best

Gilles Caulier
Comment 3 Ben Armstrong 2018-06-20 13:17:23 UTC
Gilles,

I appreciate that when building & supporting a plugin ecosystem, having the freedom of language choice through bindings for those languages has a cost, so by limiting it to C++ and Qt5, it is less of a burden to support, but unfortunately, that diminishes my interest in writing any code for this wishlist, as any such code would be novice-level at best, and both user communities (iNaturalist, Digikam) deserve better than that.

Still, I'd be happy to play some supporting role here, so that includes clearly articulating what would be useful in such an extension, testing & debugging any code written (if it gets that far), or any other way I can help.

If I cannot realize a substantially Digikam-centred workflow, perhaps I could take a different tack, prototyping something standalone that works with my Digikam collection.

And in any case, here are some issues I'm currently facing with Digikam's support for GPS tags that a plugin like this could help with:

- It is important to submit accuracy with each observation created on iNaturalist. While there are ways to collect that data automatically, I have yet to determine how to merge it into my photo collection and submit in a form that iNat accepts.

- Unfortunately, while OsmAnd (which I use for GPS tracking) stores HDOP per trackpoint, I know of no way horizontal positioning error can be computed from that figure & then written out to the corresponding EXIF tag (GPSHPositioningError). And that's the only mechanism they have to input accuracy from photos submitted on the web.

- Indeed, even after using Digikam's GPS correlation to merge HDOP from my tracks, it doesn't loook like Digikam writes that out, not even to GPSDOP, in the EXIF (I'd have to use exiftool for that).

- And even if Digikam did that, iNat ignores GPSDOP and only accepts GPSHPositioningError.

- Therefore, while I can use Digikam's GPS correlator to import those HDOP values into Digikam per photo, I am currently without any way (via Digikam or otherwise) to turn that into usable data for my observation submissions.

If the plugin would ease this particular pain point, it would greatly improve the workflow:

- snap shots in the field while taking GPS track with HDOP
- import into Digikam for processing
- GPS edit, using correlator to merge HDOP values
- submit to iNat with accuracy info included in a form iNat will accept

Thanks for considering this request.

Ben
Comment 4 caulier.gilles 2018-11-03 11:00:30 UTC
WARNING : with digiKam 6.0.0 and later, we will not support kipi interface anymore. All tools are now located in digiKam core as well for a plan to provide a more power-full integration with Batch Queue Manager and to be able to export a workflow on a web-service.

All export tools are now available everywhere : album view, Image editor, Light table, and Showfoto. Previously, only album view from digiKam core was able to deal with export tools through libkipi.

All export tools are now located here :

https://cgit.kde.org/digikam.git/tree/core/utilities/assistants/webservices

All export tools use now a dedicated interface to communicate with the application : 

- digiKam (database) : 

https://cgit.kde.org/digikam.git/tree/core/libs/database/utils/ifaces/dbinfoiface.h

- Showfoto (files metadata) : 

https://cgit.kde.org/digikam.git/tree/core/utilities/assistants/common/dmetainfoiface.h


There is not direct use of digiKam database for compatibility with Showfoto.

We plan later to provide a dynamic loading of export tools using a plugins mechanism. This will reduce overloading of the internal core libraries. A dedicated devel branch have been created for that, but it's not yet complete:

https://cgit.kde.org/digikam.git/tree/?h=development/dplugins

But take a care, digiKam export tools as plugins will not be shared with another external application. API will still private and only shared between Showfoto and digiKam core. The experience with libkipi was bad and complex to maintain/extend in time.

Gilles Caulier
Comment 5 Stefan Haag 2020-03-21 16:31:15 UTC
updated the digikam version to 7.0.0

I would also highly appreciate it to see an export tool to iNaturalist.
Personally for me it would also help a lot to export single pictures as a start.
Batch exporting would be great and  re-importing/synching of taxonomy with pictures in digikam wwould be excellent :-)

Thanks
Stefan
Comment 6 caulier.gilles 2020-03-21 16:40:17 UTC
If a student while this summer want to work on this topic, why not...

Best

Gilles Caulier
Comment 7 caulier.gilles 2021-04-16 04:33:35 UTC
fixed with this merge request : 

https://invent.kde.org/graphics/digikam/-/merge_requests/59

Gilles Caulier
Comment 8 caulier.gilles 2021-04-16 04:35:06 UTC
Git commit 6c2065214abff2d14af50c4640a72e5fdeb6528c by Nor Eply.
Committed on 11/04/2021 at 04:43.
Pushed by cgilles into branch 'master'.

export plugin for iNaturalist

M  +1    -0    core/dplugins/generic/webservices/CMakeLists.txt
A  +46   -0    core/dplugins/generic/webservices/inaturalist/CMakeLists.txt
A  +-    --    core/dplugins/generic/webservices/inaturalist/icons/16-apps-dk-inat.png
A  +-    --    core/dplugins/generic/webservices/inaturalist/icons/22-apps-dk-inat.png
A  +-    --    core/dplugins/generic/webservices/inaturalist/icons/32-apps-dk-inat.png
A  +-    --    core/dplugins/generic/webservices/inaturalist/icons/48-apps-dk-inat.png
A  +11   -0    core/dplugins/generic/webservices/inaturalist/icons/CMakeLists.txt
A  +354  -0    core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.cpp     [License: GPL (v2+)]
A  +91   -0    core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.h     [License: GPL (v2+)]
A  +115  -0    core/dplugins/generic/webservices/inaturalist/inatplugin.cpp     [License: GPL (v2+)]
A  +71   -0    core/dplugins/generic/webservices/inaturalist/inatplugin.h     [License: GPL (v2+)]
A  +125  -0    core/dplugins/generic/webservices/inaturalist/inatscore.cpp     [License: GPL (v2+)]
A  +80   -0    core/dplugins/generic/webservices/inaturalist/inatscore.h     [License: GPL (v2+)]
A  +435  -0    core/dplugins/generic/webservices/inaturalist/inatsuggest.cpp     [License: GPL (v2+)]
A  +86   -0    core/dplugins/generic/webservices/inaturalist/inatsuggest.h     [License: GPL (v2+)]
A  +1281 -0    core/dplugins/generic/webservices/inaturalist/inattalker.cpp     [License: GPL (v2+)]
A  +253  -0    core/dplugins/generic/webservices/inaturalist/inattalker.h     [License: GPL (v2+)]
A  +184  -0    core/dplugins/generic/webservices/inaturalist/inattaxon.cpp     [License: GPL (v2+)]
A  +88   -0    core/dplugins/generic/webservices/inaturalist/inattaxon.h     [License: GPL (v2+)]
A  +48   -0    core/dplugins/generic/webservices/inaturalist/inattaxonedit.cpp     [License: GPL (v2+)]
A  +53   -0    core/dplugins/generic/webservices/inaturalist/inattaxonedit.h     [License: GPL (v2+)]
A  +320  -0    core/dplugins/generic/webservices/inaturalist/inatutils.cpp     [License: GPL (v2+)]
A  +68   -0    core/dplugins/generic/webservices/inaturalist/inatutils.h     [License: GPL (v2+)]
A  +231  -0    core/dplugins/generic/webservices/inaturalist/inatwidget.cpp     [License: GPL (v2+)]
A  +71   -0    core/dplugins/generic/webservices/inaturalist/inatwidget.h     [License: GPL (v2+)]
A  +107  -0    core/dplugins/generic/webservices/inaturalist/inatwidget_p.h     [License: GPL (v2+)]
A  +1128 -0    core/dplugins/generic/webservices/inaturalist/inatwindow.cpp     [License: GPL (v2+)]
A  +120  -0    core/dplugins/generic/webservices/inaturalist/inatwindow.h     [License: GPL (v2+)]

https://invent.kde.org/graphics/digikam/commit/6c2065214abff2d14af50c4640a72e5fdeb6528c
Comment 9 caulier.gilles 2021-04-16 05:41:53 UTC
Git commit f33e49a793c87d836718d74e4d241fb131a930f9 by Gilles Caulier.
Committed on 16/04/2021 at 05:35.
Pushed by cgilles into branch 'master'.

fix coding style and code review

M  +1    -1    NEWS
M  +1    -1    core/app/views/stack/welcomepageview.cpp
M  +59   -33   core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.cpp
M  +8    -6    core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.h
M  +1    -1    core/dplugins/generic/webservices/inaturalist/inatplugin.h
M  +11   -11   core/dplugins/generic/webservices/inaturalist/inatscore.cpp
M  +7    -8    core/dplugins/generic/webservices/inaturalist/inatscore.h

https://invent.kde.org/graphics/digikam/commit/f33e49a793c87d836718d74e4d241fb131a930f9
Comment 10 caulier.gilles 2021-04-16 12:11:17 UTC
Git commit 2b7a88f6e06364e0d61f1e47dcad39c0e660524f by Gilles Caulier.
Committed on 16/04/2021 at 12:09.
Pushed by cgilles into branch 'master'.

Fix coding style
Constify
fix cppcheck warning about non explicit contructor in TaxonAndFlags structure

M  +63   -41   core/dplugins/generic/webservices/inaturalist/inatsuggest.cpp
M  +12   -3    core/dplugins/generic/webservices/inaturalist/inatsuggest.h

https://invent.kde.org/graphics/digikam/commit/2b7a88f6e06364e0d61f1e47dcad39c0e660524f
Comment 11 caulier.gilles 2021-04-16 12:48:06 UTC
Git commit 3ce41a5f50fcbd40724429653971cc646c18111f by Gilles Caulier.
Committed on 16/04/2021 at 12:46.
Pushed by cgilles into branch 'master'.

Fix coding style
constify
move class private members on the bottom of definition. Public in first, private in second.

M  +228  -182  core/dplugins/generic/webservices/inaturalist/inattalker.cpp
M  +118  -66   core/dplugins/generic/webservices/inaturalist/inattalker.h

https://invent.kde.org/graphics/digikam/commit/3ce41a5f50fcbd40724429653971cc646c18111f
Comment 12 caulier.gilles 2021-04-16 14:26:25 UTC
Git commit 899cd7c721500a721142e3c5867e185652e24071 by Gilles Caulier.
Committed on 16/04/2021 at 14:25.
Pushed by cgilles into branch 'master'.

fix coding style, constify, and polish API doc

M  +25   -13   core/dplugins/generic/webservices/inaturalist/inattaxon.cpp
M  +34   -25   core/dplugins/generic/webservices/inaturalist/inattaxon.h
M  +4    -2    core/dplugins/generic/webservices/inaturalist/inattaxonedit.cpp
M  +7    -5    core/dplugins/generic/webservices/inaturalist/inattaxonedit.h
M  +30   -24   core/dplugins/generic/webservices/inaturalist/inatutils.cpp
M  +21   -7    core/dplugins/generic/webservices/inaturalist/inatutils.h

https://invent.kde.org/graphics/digikam/commit/899cd7c721500a721142e3c5867e185652e24071
Comment 13 joergmlpts 2021-04-16 15:00:12 UTC
A iNaturalist export plugin has been checked in. It supports uploading 1 - 20 photos as an iNat observation. At least one of the uploaded photos needs to have date & time, at least one needs latitude and longitude. An identification, a valid iNaturalist taxon, needs to be assigned before uploading. The export plugin optionally writes iNat data - observation id, observation photo id, and photo id - for later reference as XMP tags to the photo.

This a an export plugin; it creates observations and exports photos. It does not monitor already uploaded observations for updates to identifications or taxon changes.

This export plugin can be used together with Python script inat_photos - https://github.com/joergmlpts/inat_photos - which fetches the identifications from iNaturalist and writes them to tag XMP:Subject of each photo. After running inat_photos click on 'Reread Metadata from Files' in digikam and the identification will be displayed under each thumbnail.
Comment 14 caulier.gilles 2021-04-16 15:16:37 UTC
Screenshot of the tool in action :

https://i.imgur.com/qcSefN5.png

Gilles Caulier
Comment 15 caulier.gilles 2021-04-16 18:34:18 UTC
Git commit 4fa994cc79bfc1f8ed407abf7523753107b8882a by Gilles Caulier.
Committed on 16/04/2021 at 18:33.
Pushed by cgilles into branch 'master'.

fix coding style
constify and polish

M  +42   -53   core/dplugins/generic/webservices/inaturalist/inatwidget.cpp
M  +0    -2    core/dplugins/generic/webservices/inaturalist/inatwidget.h
M  +123  -118  core/dplugins/generic/webservices/inaturalist/inatwindow.cpp
M  +1    -2    core/dplugins/generic/webservices/inaturalist/inatwindow.h

https://invent.kde.org/graphics/digikam/commit/4fa994cc79bfc1f8ed407abf7523753107b8882a
Comment 16 Ben Armstrong 2021-04-17 12:05:42 UTC
Nice work, Gilles! I tried the 7.3.0 snapshot appimage built yesterday and did an upload using the extension. It worked with only two minor issues:

- I tried typing my identification and clicked the matching one and it was not selected. It worked when I tried again but pressed enter instead of just clicking the matching identification.
- I didn't see any way to adjust the position / enter accuracy, but was able to fix this on the web afterwards.
Comment 17 caulier.gilles 2021-04-17 12:25:14 UTC
Hi Ben,

I don't write this plugin. joergmlpts@gmail.com do it, i just review the code.
See comment #13 for details.

Again, Thanks to Joerg Lohse for this great work...

Gilles Caulier
Comment 18 Ben Armstrong 2021-04-17 19:24:49 UTC
(In reply to caulier.gilles from comment #17)
> I don't write this plugin. joergmlpts@gmail.com do it, i just review the
> code.
> See comment #13 for details.
> 
> Again, Thanks to Joerg Lohse for this great work...

My mistake. Thanks, Joerg.
Comment 19 Stefan Haag 2021-04-18 12:15:26 UTC
Thousand Thanks for this great tool, highly appreciate on my side!

I can confirm Ben's point, selection of iNats suggestion can be done by pressing enter only. Click with mouse does not have an effect.

In order of a smoother workflow I would suggest to skip the first window for selection of the iNat account, in case  there is already one and go with the last used account instead.

Thanks again
Stefan
Comment 20 joergmlpts 2021-04-20 01:11:10 UTC
Stefan, I have a fix to select the suggestion by mouse click. I tried to file a merge request but it seems only one request at a time is allowed. I'll file it again when the currently pending merge request has cleared.

But regarding your other request, to skip the account selection, what exactly is your workflow, how often do you go though the account selection? For me that is only once in a run. I leave the iNat export window open after submitting an observation. For all subsequent observations I select photos in the thumbnail view and drag them into the iNat export window. This way, no matter how many observations I upload, I only need to select the account once.
Comment 21 caulier.gilles 2021-04-20 13:57:45 UTC
Joerg,

There is a linking failure of your plugin under Windows (cross-compiled under Linux with MXE) :

Scanning dependencies of target Generic_iNaturalist_Plugin_autogen
[ 72%] Automatic MOC for target Generic_iNaturalist_Plugin
[ 72%] Built target Generic_iNaturalist_Plugin_autogen
Scanning dependencies of target Generic_iNaturalist_Plugin
[ 72%] Building CXX object core/dplugins/generic/webservices/inaturalist/CMakeFiles/Generic_iNaturalist_Plugin.dir/Generic_iNaturalist_Plugin_autogen/mocs_compilation.cpp.obj
In file included from /home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/mocs_compilation.cpp:2:
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:99:6: warning: 'static void DigikamGenericINatPlugin::INatBrowserDlg::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
   99 | void DigikamGenericINatPlugin::INatBrowserDlg::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:159:38: warning: 'DigikamGenericINatPlugin::INatBrowserDlg::staticMetaObject' redeclared without dllimport attribute after being referenced with dll linkage
  159 | QT_INIT_METAOBJECT const QMetaObject DigikamGenericINatPlugin::INatBrowserDlg::staticMetaObject = { {
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:169:20: warning: 'virtual const QMetaObject* DigikamGenericINatPlugin::INatBrowserDlg::metaObject() const' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  169 | const QMetaObject *DigikamGenericINatPlugin::INatBrowserDlg::metaObject() const
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:174:7: warning: 'virtual void* DigikamGenericINatPlugin::INatBrowserDlg::qt_metacast(const char*)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  174 | void *DigikamGenericINatPlugin::INatBrowserDlg::qt_metacast(const char *_clname)
      |       ^~~~~~~~~~~~~~~~~~~~~~~~
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:182:5: warning: 'virtual int DigikamGenericINatPlugin::INatBrowserDlg::qt_metacall(QMetaObject::Call, int, void**)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  182 | int DigikamGenericINatPlugin::INatBrowserDlg::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:200:6: warning: 'void DigikamGenericINatPlugin::INatBrowserDlg::signalApiToken(const QString&, const QList<QNetworkCookie>&)' redeclared without dllimport attribute after being referenced with dll linkage
  200 | void DigikamGenericINatPlugin::INatBrowserDlg::signalApiToken(const QString & _t1, const QList<QNetworkCookie> & _t2)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:207:6: warning: 'void DigikamGenericINatPlugin::INatBrowserDlg::signalWebText(const QString&)' redeclared without dllimport attribute after being referenced with dll linkage
  207 | void DigikamGenericINatPlugin::INatBrowserDlg::signalWebText(const QString & _t1)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~
[ 72%] Building CXX object core/dplugins/generic/webservices/inaturalist/CMakeFiles/Generic_iNaturalist_Plugin.dir/inatbrowserdlg.cpp.obj
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.cpp:126:1: warning: 'DigikamGenericINatPlugin::INatBrowserDlg::INatBrowserDlg(const QString&, const QList<QNetworkCookie>&, QWidget*)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  126 | INatBrowserDlg::INatBrowserDlg(const QString& username,
      | ^~~~~~~~~~~~~~
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.cpp:234:1: warning: 'virtual DigikamGenericINatPlugin::INatBrowserDlg::~INatBrowserDlg()' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  234 | INatBrowserDlg::~INatBrowserDlg()
      | ^~~~~~~~~~~~~~
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.cpp:239:6: warning: 'virtual void DigikamGenericINatPlugin::INatBrowserDlg::closeEvent(QCloseEvent*)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  239 | void INatBrowserDlg::closeEvent(QCloseEvent* e)
      |      ^~~~~~~~~~~~~~
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.cpp:249:6: warning: 'void DigikamGenericINatPlugin::INatBrowserDlg::slotTitleChanged(const QString&)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  249 | void INatBrowserDlg::slotTitleChanged(const QString& title)
      |      ^~~~~~~~~~~~~~
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.cpp:254:6: warning: 'void DigikamGenericINatPlugin::INatBrowserDlg::slotLoadingFinished(bool)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  254 | void INatBrowserDlg::slotLoadingFinished(bool status)
      |      ^~~~~~~~~~~~~~
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.cpp:299:6: warning: 'void DigikamGenericINatPlugin::INatBrowserDlg::slotWebText(const QString&)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  299 | void INatBrowserDlg::slotWebText(const QString& text)
      |      ^~~~~~~~~~~~~~
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.cpp:330:6: warning: 'void DigikamGenericINatPlugin::INatBrowserDlg::slotGoHome()' redeclared without dllimport attribute after being referenced with dll linkage
  330 | void INatBrowserDlg::slotGoHome()
      |      ^~~~~~~~~~~~~~
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.cpp:343:6: warning: 'static bool DigikamGenericINatPlugin::INatBrowserDlg::filterCookie(const QNetworkCookie&, bool, const QDateTime&)' redeclared without dllimport attribute after being referenced with dll linkage
  343 | bool INatBrowserDlg::filterCookie(const QNetworkCookie& cookie,
      |      ^~~~~~~~~~~~~~
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.cpp:351:23: warning: 'static QList<QNetworkCookie> DigikamGenericINatPlugin::INatBrowserDlg::filterCookies(const QList<QNetworkCookie>&, bool)' redeclared without dllimport attribute after being referenced with dll linkage
  351 | QList<QNetworkCookie> INatBrowserDlg::filterCookies(const QList<QNetworkCookie>& cookies,
      |                       ^~~~~~~~~~~~~~
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.cpp:368:6: warning: 'void DigikamGenericINatPlugin::INatBrowserDlg::slotCookieAdded(const QNetworkCookie&)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  368 | void INatBrowserDlg::slotCookieAdded(const QNetworkCookie& cookie)
      |      ^~~~~~~~~~~~~~
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.cpp:373:6: warning: 'void DigikamGenericINatPlugin::INatBrowserDlg::slotCookieRemoved(const QNetworkCookie&)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  373 | void INatBrowserDlg::slotCookieRemoved(const QNetworkCookie& cookie)
      |      ^~~~~~~~~~~~~~
[ 72%] Building CXX object core/dplugins/generic/webservices/inaturalist/CMakeFiles/Generic_iNaturalist_Plugin.dir/inatplugin.cpp.obj
[ 72%] Building CXX object core/dplugins/generic/webservices/inaturalist/CMakeFiles/Generic_iNaturalist_Plugin.dir/inatscore.cpp.obj
[ 72%] Building CXX object core/dplugins/generic/webservices/inaturalist/CMakeFiles/Generic_iNaturalist_Plugin.dir/inatsuggest.cpp.obj
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatsuggest.cpp: In member function 'void DigikamGenericINatPlugin::SuggestTaxonCompletion::showCompletion(const DigikamGenericINatPlugin::Completions&)':
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatsuggest.cpp:295:46: warning: 'void QTreeWidgetItem::setTextColor(int, const QColor&)' is deprecated: Use QTreeWidgetItem::setForeground() instead [-Wdeprecated-declarations]
  295 |         item->setTextColor(0, QColor(Qt::red));
      |                                              ^
In file included from /mnt/data/7.x/project/bundles/mxe/build.win64/usr/x86_64-w64-mingw32.shared/qt5/include/QtWidgets/QTreeWidget:1,
                 from /home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatsuggest.h:31,
                 from /home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatsuggest.cpp:23:
/mnt/data/7.x/project/bundles/mxe/build.win64/usr/x86_64-w64-mingw32.shared/qt5/include/QtWidgets/qtreewidget.h:156:17: note: declared here
  156 |     inline void setTextColor(int column, const QColor &color)
      |                 ^~~~~~~~~~~~
[ 72%] Building CXX object core/dplugins/generic/webservices/inaturalist/CMakeFiles/Generic_iNaturalist_Plugin.dir/inattalker.cpp.obj
[ 72%] Building CXX object core/dplugins/generic/webservices/inaturalist/CMakeFiles/Generic_iNaturalist_Plugin.dir/inattaxon.cpp.obj
[ 72%] Building CXX object core/dplugins/generic/webservices/inaturalist/CMakeFiles/Generic_iNaturalist_Plugin.dir/inattaxonedit.cpp.obj
[ 72%] Building CXX object core/dplugins/generic/webservices/inaturalist/CMakeFiles/Generic_iNaturalist_Plugin.dir/inatwidget.cpp.obj
[ 72%] Building CXX object core/dplugins/generic/webservices/inaturalist/CMakeFiles/Generic_iNaturalist_Plugin.dir/inatwindow.cpp.obj
[ 72%] Building CXX object core/dplugins/generic/webservices/inaturalist/CMakeFiles/Generic_iNaturalist_Plugin.dir/inatutils.cpp.obj
[ 72%] Linking CXX shared module ../../../../../bin/Generic_iNaturalist_Plugin.dll
CMakeFiles/Generic_iNaturalist_Plugin.dir/objects.a(mocs_compilation.cpp.obj): In function `DigikamGenericINatPlugin::INatBrowserDlg::signalWebText(QString const&)':
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:210: undefined reference to `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg16staticMetaObjectE'
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:210:(.text+0x142): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg16staticMetaObjectE'
CMakeFiles/Generic_iNaturalist_Plugin.dir/objects.a(mocs_compilation.cpp.obj): In function `DigikamGenericINatPlugin::INatBrowserDlg::signalApiToken(QString const&, QList<QNetworkCookie> const&)':
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:203: undefined reference to `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg16staticMetaObjectE'
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:203:(.text+0x19c): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg16staticMetaObjectE'
CMakeFiles/Generic_iNaturalist_Plugin.dir/objects.a(mocs_compilation.cpp.obj): In function `DigikamGenericINatPlugin::INatBrowserDlg::metaObject() const':
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:172: undefined reference to `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg16staticMetaObjectE'
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:172:(.text+0x88b): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg16staticMetaObjectE'
CMakeFiles/Generic_iNaturalist_Plugin.dir/objects.a(mocs_compilation.cpp.obj): In function `DigikamGenericINatPlugin::INatBrowserDlg::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)':
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:111: undefined reference to `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg15slotCookieAddedERK14QNetworkCookie'
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:111:(.text+0x14cf): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg15slotCookieAddedERK14QNetworkCookie'
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:112: undefined reference to `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg17slotCookieRemovedERK14QNetworkCookie'
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:112:(.text+0x14db): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg17slotCookieRemovedERK14QNetworkCookie'
CMakeFiles/Generic_iNaturalist_Plugin.dir/objects.a(mocs_compilation.cpp.obj): In function `DigikamGenericINatPlugin::INatBrowserDlg::signalApiToken(QString const&, QList<QNetworkCookie> const&)':
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:203: undefined reference to `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg16staticMetaObjectE'
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:203:(.text+0x1502): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg16staticMetaObjectE'
CMakeFiles/Generic_iNaturalist_Plugin.dir/objects.a(mocs_compilation.cpp.obj): In function `DigikamGenericINatPlugin::INatBrowserDlg::signalWebText(QString const&)':
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:210: undefined reference to `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg16staticMetaObjectE'
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:210:(.text+0x151a): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg16staticMetaObjectE'
CMakeFiles/Generic_iNaturalist_Plugin.dir/objects.a(mocs_compilation.cpp.obj): In function `DigikamGenericINatPlugin::INatBrowserDlg::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)':
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:107: undefined reference to `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg19slotLoadingFinishedEb'
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:107:(.text+0x154b): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg19slotLoadingFinishedEb'
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:108: undefined reference to `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg16slotTitleChangedERK7QString'
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:108:(.text+0x155a): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg16slotTitleChangedERK7QString'
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:109: undefined reference to `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg11slotWebTextERK7QString'
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:109:(.text+0x1569): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg11slotWebTextERK7QString'
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:110: undefined reference to `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg10slotGoHomeEv'
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:110:(.text+0x1574): additional relocation overflows omitted from the output
CMakeFiles/Generic_iNaturalist_Plugin.dir/objects.a(mocs_compilation.cpp.obj): In function `__static_initialization_and_destruction_0':
/home/gilles/dktemp/digikam-master/build.mxe/core/dplugins/generic/webservices/inaturalist/Generic_iNaturalist_Plugin_autogen/EWIEGA46WW/moc_inatbrowserdlg.cpp:160: undefined reference to `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg16staticMetaObjectE'
CMakeFiles/Generic_iNaturalist_Plugin.dir/objects.a(inatbrowserdlg.cpp.obj): In function `DigikamGenericINatPlugin::INatBrowserDlg::~INatBrowserDlg()':
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.cpp:234: undefined reference to `__imp__ZTVN24DigikamGenericINatPlugin14INatBrowserDlgE'
CMakeFiles/Generic_iNaturalist_Plugin.dir/objects.a(inatbrowserdlg.cpp.obj): In function `DigikamGenericINatPlugin::INatBrowserDlg::slotLoadingFinished(bool)':
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.cpp:274: undefined reference to `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg13signalWebTextERK7QString'
CMakeFiles/Generic_iNaturalist_Plugin.dir/objects.a(inatbrowserdlg.cpp.obj): In function `DigikamGenericINatPlugin::INatBrowserDlg::INatBrowserDlg(QString const&, QList<QNetworkCookie> const&, QWidget*)':
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.cpp:130: undefined reference to `__imp__ZTVN24DigikamGenericINatPlugin14INatBrowserDlgE'
CMakeFiles/Generic_iNaturalist_Plugin.dir/objects.a(inatbrowserdlg.cpp.obj): In function `DigikamGenericINatPlugin::INatBrowserDlg::closeEvent(QCloseEvent*)':
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.cpp:243: undefined reference to `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg14signalApiTokenERK7QStringRK5QListI14QNetworkCookieE'
CMakeFiles/Generic_iNaturalist_Plugin.dir/objects.a(inatbrowserdlg.cpp.obj): In function `DigikamGenericINatPlugin::INatBrowserDlg::slotWebText(QString const&)':
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.cpp:320: undefined reference to `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg14signalApiTokenERK7QStringRK5QListI14QNetworkCookieE'
CMakeFiles/Generic_iNaturalist_Plugin.dir/objects.a(inattalker.cpp.obj): In function `DigikamGenericINatPlugin::INatTalker::restoreApiToken(QString const&, QList<QNetworkCookie>&, bool)':
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inattalker.cpp:348: undefined reference to `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg12filterCookieERK14QNetworkCookiebRK9QDateTime'
CMakeFiles/Generic_iNaturalist_Plugin.dir/objects.a(inattalker.cpp.obj): In function `DigikamGenericINatPlugin::UserRequest::parseResponse(DigikamGenericINatPlugin::INatTalker&, QByteArray const&) const':
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inattalker.cpp:461: undefined reference to `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlg12filterCookieERK14QNetworkCookiebRK9QDateTime'
CMakeFiles/Generic_iNaturalist_Plugin.dir/objects.a(inatwindow.cpp.obj): In function `DigikamGenericINatPlugin::INatWindow::switchUser(bool)':
/home/gilles/dktemp/digikam-master/core/dplugins/generic/webservices/inaturalist/inatwindow.cpp:385: undefined reference to `__imp__ZN24DigikamGenericINatPlugin14INatBrowserDlgC1ERK7QStringRK5QListI14QNetworkCookieEP7QWidget'
collect2: error: ld returned 1 exit status
make[2]: *** [core/dplugins/generic/webservices/inaturalist/CMakeFiles/Generic_iNaturalist_Plugin.dir/build.make:266: bin/Generic_iNaturalist_Plugin.dll] Error 1
make[1]: *** [CMakeFiles/Makefile2:12919: core/dplugins/generic/webservices/inaturalist/CMakeFiles/Generic_iNaturalist_Plugin.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
FAILED COMMAND: make -j$CPU_CORES
Comment 22 caulier.gilles 2021-04-20 14:01:20 UTC
Git commit f0f0cea7f922da5e0a3facaffc30eb4fc579831c by Gilles Caulier.
Committed on 20/04/2021 at 13:48.
Pushed by cgilles into branch 'master'.

We don't need to export C++ class symbols in a plugin, else linking stage under Windows is broken

M  +1    -5    core/dplugins/generic/webservices/inaturalist/inatbrowserdlg.h

https://invent.kde.org/graphics/digikam/commit/f0f0cea7f922da5e0a3facaffc30eb4fc579831c
Comment 23 Stefan Haag 2021-04-20 18:06:17 UTC
Answer to comment 20

Thanks Jörg for that explanation. I always closed the iNat window after transmitting the observation. I did not get to that possibility by my own.

Stefan