Bug 448593 - New generic Flow View plugin for digiKam
Summary: New generic Flow View plugin for digiKam
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Generic-FlowView (show other bugs)
Version: 7.6.0
Platform: Compiled Sources All
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-16 12:44 UTC by 319513897@outlook.com
Modified: 2022-03-10 11:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 7.6.0


Attachments
binary (25.98 KB, application/gzip)
2022-01-16 12:44 UTC, 319513897@outlook.com
Details
plugin that using master code (3.38 MB, image/gif)
2022-01-23 05:54 UTC, 319513897@outlook.com
Details
plugin that using PreviewLoadThread (3.72 MB, image/gif)
2022-01-23 06:26 UTC, 319513897@outlook.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description 319513897@outlook.com 2022-01-16 12:44:44 UTC
Created attachment 145537 [details]
binary

Hi, I write a viewer for digikam to brought flow view, and I use it for a long time. I am here to ask it's possible merge it to digikam's repo? It may need some modify.

Here is it's repo: https://github.com/cathaysia/digikamflowplugin

and here some screenshot: https://github.com/cathaysia/digikamflowplugin/tree/master/screenshot

emm, all documents and commit msgs wrote by Chinese. But I will change it to English if this plugin can be merged.

For fedora, here is a binary:
Comment 1 caulier.gilles 2022-01-16 18:11:27 UTC
Hi and thanks to create a new plugin for digiKam.

I will take a look to your source code. But it will be better to include your plusing as a 3rd party tool compiled with all bundle (appimage, MacOS, and Windows). We have already 2 plugins in this case : MosaicWall and GmicQt :

https://github.com/scheckmedia/ImageMosaicWall
https://github.com/cgilles/gmic-qt

... which are compiled with this bundle rules:

https://invent.kde.org/graphics/digikam/-/blob/master/project/bundles/3rdparty/ext_mosaicwall/CMakeLists.txt
https://invent.kde.org/graphics/digikam/-/blob/master/project/bundles/3rdparty/ext_gmicqt/CMakeLists.txt

This kind of plan is fine for you ?

Best regards

Gilles Caulier
Comment 2 319513897@outlook.com 2022-01-17 02:39:46 UTC
What you means is make my plugin as a 3rd plugin? My intention was simply to have digikam installed with this plugin.

In this case, is my plugin compiled separately from digikam? Can I get the header file for digikam at compile time?
Comment 3 caulier.gilles 2022-01-17 05:31:49 UTC
A 3rd plugin is a tool that source code is located outside the project but packaged with digiKam in the official AppImage, MacOS and Windows bundles. The 3rdparty plugins source code are taken from the own repository and compiled with digiKam.
Look how the ImageMosaic and GMicQt repository are done.

Gilles Caulier
Comment 4 319513897@outlook.com 2022-01-17 07:10:56 UTC
Understand. But for my part, it seems fedora has not contains these 3rd plugins. So I am afraid I can't get any benefit from this.
Comment 5 caulier.gilles 2022-01-17 08:37:04 UTC
Hi,

No, digiKam team do not package RPMs at all. We provide a generic AppImage Linux bundle, the official MacOS package, and the official Windows installer. In your case AppImage cover all Linux distributions.

For the Linux Ubuntu Flatpak, MosiacWall and GmicQt are also included, but this bundle maintenance is delegate to a dedicated team. 

To have a Fedora support, contact the distribution team to build a rpm for the plugin. It's the standard way. 

Best
Gilles Caulier
Comment 6 caulier.gilles 2022-01-17 08:46:28 UTC
I take a lok in your plugin source and something is wrong :

https://github.com/cathaysia/digikamflowplugin/blob/master/src/PicFlowView.h

Your plugin is defined as GENERIC and access directly to the database. It's weird. You must use the DPlugin interface to access to the item metadata. This will work too with Showfoto which do not have at all a database.

A generic plugin must work on both application transparently.

https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/dplugins/iface/dinfointerface.h

All generic plugin for digiKam use DPlugin interface. 
Please fix your code. Thanks in advance

Gilles Caulier
Comment 7 caulier.gilles 2022-01-17 08:50:50 UTC
To be more clear this header are prohibited in a Generic plugin :

#include <digikam/coredbaccess.h>
#include <digikam/dbengineaction.h>

There are shared to build Batch Queue Manager plugins (BQM), which are dedicated for digiKam only, not Showfoto.

Gilles Caulier
Comment 8 319513897@outlook.com 2022-01-17 13:17:06 UTC
Thanks, this has been fix at 640413057fde0e066027988225c59a3a92654aa3
Comment 9 caulier.gilles 2022-01-18 06:12:38 UTC
Another important remark :

In this function : https://github.com/cathaysia/digikamflowplugin/blob/master/src/PicFlowView.cpp#L169

you access to image directly by a QPixmap() call to later create label in GUI over a loop. This is so far not optimal.

1/ Do not use QPixmap directly. digiKam has a multithread image preview API with a cache mechanism to speed up image data handling with huge album contents. It's accessible from plugins of course. Look use of PreviewLoadThread in Slideshow plugin here :

https://invent.kde.org/graphics/digikam/-/blob/master/core/dplugins/generic/view/slideshow/widgets/slideimage.cpp#L76

2 instances are used, internally, both use a common cache to optimize memory usage. One instance preload image in cache, one is used to load current image. Both instance will use a separated thread to run. A signal is emitted when image is available as DImg which thread safe (in opposite of QPixmap). You can convert DImg as QImage or QPixmap of course.

API :

DImg : https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/dimg/dimg.h
PreviewLoadThread : https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/threadimageio/preview/previewloadthread.h

2/ The forever loop here :

https://github.com/cathaysia/digikamflowplugin/blob/master/src/PicFlowView.cpp#L258

...will be time consuming to render large album. Use preview load thread and signal/slot mechanism to not freeze GUI. If you need to play with image data, use a separated thread with QImage, not QPixmap. Only play with widget on main thread at end. All consuming CPU task as loop must be done in separated thread. Use profiling for that. if necessary

3/ Remove definitively the database headers https://github.com/cathaysia/digikamflowplugin/blob/master/src/PicFlowView.cpp#L258
Generic plugin must not use database at all.

4/ why do you mix Qt and C++ API where Qt propose equivalent, optimized, and portable classes ? c++::semaphore for ex.

5/ Please use English comments and documentations everywhere. It's difficult to use a translator over source code to read explanations.

6/ In dependencies list i can see spdlog API. Do not add this extra dependency if.... Qt do the job with QDebug API and is enough for a plugin...

I don't yet compiled your code. I will do it later.

Best regards

Gilles Caulier
Comment 10 319513897@outlook.com 2022-01-18 08:07:55 UTC
Thanks for all your suggestions. I had do some changes. And for your suggestions:

Q5: I translate all docs and comments to English. Sorry for my bad habits.
Q6: spdlog has been removed recently, but I forget update my documents.

Q4: I had replace c++ api with qt api as much as possible other than std::jthread. It need some time.
Q3: Thanks again. I remove it. And remove some headers that does't need.

Q2: That forever loop can be break by https://github.com/cathaysia/digikamflowplugin/blob/f66aa255392893ea734820e117fbd35944aded24/src/PicFlowView.cpp#L252

Q1: Thanks for this suggestion very much. I'll work at now to do this. :)
Comment 11 caulier.gilles 2022-01-18 08:52:58 UTC
You're welcome. Thanks to contribute.

Do not be hurt with my English words recommendation in source code and doc. I know that it can be an high level to use everywhere a non native language to write open source, but it's my very long experience in this domain, more than 20 years now (:-))))...

Best

Gilles Caulier
Comment 12 319513897@outlook.com 2022-01-18 09:25:13 UTC
HAHA. I can feel your enthusiasm to me. So I never depressed by your words. ;) 

Because I have not the idea to push my code to this huge project, so I write Chinese at first. (just a toy for me), and write English is some torture for me.

But I will use English as much as possible later. I'm sorry for my poor level of English.

It must be happy that have such a enthusiastic and  practical man like you to help me at new year.

For Q1, I need some time to view source code for understand it's structure and logic. So it may take more time.

All the best.

Longtao Zhang
Comment 13 319513897@outlook.com 2022-01-19 06:15:39 UTC
Hi, I had do some changes at new brach: https://github.com/cathaysia/digikamflowplugin/tree/data_loading

I use ManagedLoadSaveThread to loading images, it makes my codes more clear. However, I can't get more performance. To be exact, my plugin become slower, and eat more memory.

At the first case, I use threads by threadpool: https://github.com/cathaysia/digikamflowplugin/blob/27f3d310e5dc22a7aab28f771cf8ce0236734f31/src/PicFlowView.cpp#L205

and a thread deal 3 QPixmap:  https://github.com/cathaysia/digikamflowplugin/blob/27f3d310e5dc22a7aab28f771cf8ce0236734f31/src/PicFlowView.cpp#L208

For the second, I scale images when it's size beyond 1920x1080: https://github.com/cathaysia/digikamflowplugin/blob/27f3d310e5dc22a7aab28f771cf8ce0236734f31/src/PicFlowView.cpp#L187

Because all cpu works be done in sub-threads, so it's quickly.

But when I use ManagedLoadSaveThread, what can I do seems just: 

1. use LoadingModeShared: https://github.com/cathaysia/digikamflowplugin/blob/f5e575639341dbc6656740bc90f7016739c64eb9/src/picdialog.hpp#L38
2. use PreviewSettings::fastPreview() : https://github.com/cathaysia/digikamflowplugin/blob/f5e575639341dbc6656740bc90f7016739c64eb9/src/picdialog.cpp#L61

But both them can't obtain  significant profit.

If you try plugins that compiled by two branchs, you will find master branch better than data_loading branch.
Comment 14 caulier.gilles 2022-01-21 07:28:00 UTC
Hi,

I don't yet take a look in your branch. I will do it asap.

Note : The PreviewLoadThread has a huge advantage than using QPixmap/QImage to load image data : you will inherir of the digiKam whole architecture to use cache and to support all file formats as RAW, all Image Magick codecs, and video preview.

Q : your plugin will solve also this entry in bugzilla : https://bugs.kde.org/show_bug.cgi?id=418256 ?

Best
Gilles Caulier
Comment 15 319513897@outlook.com 2022-01-21 08:32:49 UTC
That (https://bugs.kde.org/show_bug.cgi?id=418256) is something interesting, if possible, I'd like to implement normal layout(1:1) and masonry layout(row)

It should just take a little time.
Comment 16 319513897@outlook.com 2022-01-23 05:54:19 UTC
I had implement square and row layout by a simple algorithm in QtFlowLayout: https://github.com/cathaysia/QtFlowLayout/tree/43c24711106fd365c76c7ff9b46ab391a126baa3

If you have any interesting, you can just compile it and run ctest for a skim. But I haven't add it to digikamflowplugin. For the reason is I don't know whether I should PreviewLoadThread or not.

In fact, I'm prefer using PreviewLoadThread , as you say, it bring more clear codes and more image format's support, I can enjoy the ecosystem of whole digikam. But I can't stand it's preference.

I'll upload two gifs to compare the two case, please give it a look.
Comment 17 319513897@outlook.com 2022-01-23 05:54:58 UTC
Created attachment 145785 [details]
plugin that using master code
Comment 18 319513897@outlook.com 2022-01-23 06:26:00 UTC
Created attachment 145787 [details]
plugin that using PreviewLoadThread
Comment 19 caulier.gilles 2022-01-23 08:54:39 UTC
Hi,

As i can see in your code :

https://github.com/cathaysia/digikamflowplugin/blob/data_loading/src/flowplugin.cpp#L96
https://github.com/cathaysia/digikamflowplugin/blob/data_loading/src/picdialog.hpp#L32

Your CachedLoadThread inherit from ManagedLoadSaveThread. Use PreviewLoadThread instead.

it will use the same cache in memory than digiKam core. It will run in a separated thread/core.

To calculate the fast loading settings automatically, use PreviewLoadThread::loadFast(). Don't forget to pass a valid size as argument, not zero. 

I recommend also to host the PreviewLoadThread directly in dialog class, and delete the instance in dialog destructor.

Best

Gilles Caulier
Comment 20 319513897@outlook.com 2022-01-24 05:00:06 UTC
But you should know is that digikam has not export PreviewLoadThread as a interface for plugins. 

Run *grep -R PreviewLoadThread* in /usr/include/digikam can get nothing. I don't thing it a good idea to copy PreviewLoadThread.h and PreviewLoadThread.cpp, which depends other sources.
Comment 21 caulier.gilles 2022-01-24 12:11:06 UTC
Oh, i don't take a look about that. I will check today...

Gilles
Comment 22 caulier.gilles 2022-01-24 16:00:28 UTC
Git commit 9f13b34d90c6bad4b1e2c6be251cac4ca47f288e by Gilles Caulier.
Committed on 24/01/2022 at 15:59.
Pushed by cgilles into branch 'master'.

DPlugins API: export previewloadthread header

M  +1    -0    core/app/DigikamExportAPI.cmake

https://invent.kde.org/graphics/digikam/commit/9f13b34d90c6bad4b1e2c6be251cac4ca47f288e
Comment 23 caulier.gilles 2022-01-24 16:01:28 UTC
Done. previewloadthread.h is now exported. Let's me hear if you can use it as well in your code

Gilles
Comment 24 319513897@outlook.com 2022-01-26 04:07:27 UTC
Hi, sorry too later replay. 

I had made a commit to using PreviewloadThread: https://github.com/cathaysia/digikamflowplugin/commit/e06105ee9fdb6d7cedd253f83916f15c39f6f7f3

But when I using PreviewloadThread, I can just load a image ervery album, I don't know what things happened. I will try to solve this problem today. But some time needed.
Comment 25 319513897@outlook.com 2022-01-26 04:50:32 UTC
Hi, I am try to load images by PreviewLoadThread::load or PreviewLoadThread::load_*, and for every album, only a picture can be loaded successfully.

here is my core codes:

auto t = new PreviewLoadThread(this);
connect(t, &PreviewLoadThread::signalImageLoaded, this, &PicDialog::loadPic);
void PicDialog::loadPic(const LoadingDescription& desc, const DImg& dimg) {
    if(dimg.isNull()) {
        qDebug() << "DImg null: " << desc.filePath;
        return;
    }
    auto* lbl = new QLabel;
    auto  pix = dimg.convertToPixmap();
    qDebug() << pix;
    lbl->setPixmap(pix);
    layout_->addWidget(lbl);
}

Then I load pictures by:

auto items = iface->currentAlbumItems();
for(auto& it: items) dialog->load(it);

void PicDialog::load(const QUrl& url) {
    QSize desktopSize = qApp->primaryScreen()->geometry().size();
    int   deskSize    = qMax(640, qMax(desktopSize.height(), desktopSize.width()));
    t->load(url.toLocalFile(), PreviewSettings::fastPreview(), deskSize);
}

and here is it's log when open dialog:

digikam.general: Try to get preview from "/home/tea/Pictures/wallpaper/01.jpg"
digikam.general: Preview quality:  2
digikam.general: Try to get preview from "/home/tea/Pictures/wallpaper/01.jpg!960.jpg"
digikam.general: Preview quality:  0
digikam.metaengine: Loading metadata with "Exiv2" backend from "/home/tea/Pictures/wallpaper/01.jpg!960.jpg"
digikam.general: Try to load DImg preview from: "/home/tea/Pictures/wallpaper/01.jpg!960.jpg"
digikam.general: Try to get preview from "/home/tea/Pictures/wallpaper/175751wirixiojeqbroizu.jpg"
digikam.general: Preview quality:  2
digikam.general: Try to get preview from "/home/tea/Pictures/wallpaper/175754qa7lln4zedqm9l97.jpg"
digikam.general: Preview quality:  2
digikam.general: Try to get preview from "/home/tea/Pictures/wallpaper/175756hvt94t5e2tz9g71u.jpg"
digikam.general: Preview quality:  0
digikam.metaengine: Loading metadata with "Exiv2" backend from "/home/tea/Pictures/wallpaper/175756hvt94t5e2tz9g71u.jpg"
digikam.general: Try to load DImg preview from: "/home/tea/Pictures/wallpaper/175756hvt94t5e2tz9g71u.jpg"
digikam.general: Try to get preview from "/home/tea/Pictures/wallpaper/175800vt9lyztbyiv87yec.jpg"
digikam.general: Preview quality:  0
digikam.metaengine: Loading metadata with "Exiv2" backend from "/home/tea/Pictures/wallpaper/175800vt9lyztbyiv87yec.jpg"
digikam.general: Try to load DImg preview from: "/home/tea/Pictures/wallpaper/175800vt9lyztbyiv87yec.jpg"
digikam.general: Try to get preview from "/home/tea/Pictures/wallpaper/1590557931-0019.jpg"
digikam.general: Preview quality:  2
digikam.general: Try to get preview from "/home/tea/Pictures/wallpaper/1590557931-0019.jpg"
digikam.general: Preview quality:  0
digikam.metaengine: Loading metadata with "Exiv2" backend from "/home/tea/Pictures/wallpaper/1590557931-0019.jpg"
digikam.general: Try to load DImg preview from: "/home/tea/Pictures/wallpaper/1590557931-0019.jpg"
digikam.general: Try to get preview from "/home/tea/Pictures/wallpaper/鬼刀 (3).jpg"
digikam.general: Preview quality:  2
digikam.general: Try to get preview from "/home/tea/Pictures/wallpaper/鬼刀 (4).jpg"
digikam.general: Preview quality:  2
digikam.general: Try to get preview from "/home/tea/Pictures/wallpaper/鬼刀 (6).jpg"
digikam.general: Preview quality:  0
digikam.metaengine: Loading metadata with "Exiv2" backend from "/home/tea/Pictures/wallpaper/鬼刀 (6).jpg"
digikam.general: Try to load DImg preview from: "/home/tea/Pictures/wallpaper/鬼刀 (6).jpg"
digikam.general: Try to get preview from "/home/tea/Pictures/wallpaper/鬼刀 (9).jpg"
digikam.general: Preview quality:  2
...
digikam.general: Try to get preview from "/home/tea/Pictures/wallpaper/wallpaper28.jpg"
digikam.general: Preview quality:  2
digikam.general: Try to get preview from "/home/tea/Pictures/wallpaper/wallpaper28.jpg"
digikam.general: Preview quality:  0
digikam.metaengine: Loading metadata with "Exiv2" backend from "/home/tea/Pictures/wallpaper/wallpaper28.jpg"
digikam.general: Try to load DImg preview from: "/home/tea/Pictures/wallpaper/wallpaper28.jpg"
digikam.dimg: "/home/tea/Pictures/wallpaper/wallpaper28.jpg" : "JPEG" file identified
digikam.metaengine: Loading metadata with "Exiv2" backend from "/home/tea/Pictures/wallpaper/wallpaper28.jpg"
digikam.dimg.jpeg: Start of Image  ( 1 )
digikam.dimg.jpeg: JFIF APP0 marker: version 1.02, density 300x300  1  ( 1 )
digikam.dimg.jpeg: Miscellaneous marker 0xe1, length 8805  ( 1 )
digikam.dimg.jpeg: Miscellaneous marker 0xed, length 10006  ( 1 )
digikam.dimg.jpeg: Miscellaneous marker 0xe1, length 6140  ( 1 )
digikam.dimg.jpeg: Miscellaneous marker 0xe2, length 3158  ( 1 )
digikam.dimg.jpeg: Adobe APP14 marker: version 100, flags 0x4000 0x0000, transform 1  ( 1 )
digikam.dimg.jpeg: Define Quantization Table 0  precision 0  ( 1 )
digikam.dimg.jpeg: Define Quantization Table 1  precision 0  ( 1 )
digikam.dimg.jpeg: Start Of Frame 0xc0: width=1920, height=1080, components=3  ( 1 )
digikam.dimg.jpeg:     Component 1: 1hx1v q=0  ( 1 )
digikam.dimg.jpeg:     Component 2: 1hx1v q=1  ( 1 )
digikam.dimg.jpeg:     Component 3: 1hx1v q=1  ( 1 )
digikam.dimg.jpeg: Define Restart Interval 240  ( 1 )
digikam.dimg.jpeg: Define Huffman Table 0x00  ( 1 )
digikam.dimg.jpeg:           0   0   6   2   3   1   0   0  ( 2 )
digikam.dimg.jpeg:           0   0   0   0   0   0   0   0  ( 2 )
digikam.dimg.jpeg: Define Huffman Table 0x01  ( 1 )
digikam.dimg.jpeg:           0   0   6   3   1   1   1   0  ( 2 )
digikam.dimg.jpeg:           0   0   0   0   0   0   0   0  ( 2 )
digikam.dimg.jpeg: Define Huffman Table 0x10  ( 1 )
digikam.dimg.jpeg:           0   2   1   3   4   1   3   3  ( 2 )
digikam.dimg.jpeg:           2   3   3   3   2   6   9 117  ( 2 )
digikam.dimg.jpeg: Define Huffman Table 0x11  ( 1 )
digikam.dimg.jpeg:           0   2   1   3   2   4   4   3  ( 2 )
digikam.dimg.jpeg:           5   4   4   4   6   6   5 109  ( 2 )
digikam.dimg.jpeg: Start Of Scan: 3 components  ( 1 )
digikam.dimg.jpeg:     Component 1: dc=0 ac=0  ( 1 )
digikam.dimg.jpeg:     Component 2: dc=1 ac=1  ( 1 )
digikam.dimg.jpeg:     Component 3: dc=1 ac=1  ( 1 )
digikam.dimg.jpeg:   Ss=0, Se=63, Ah=0, Al=0  ( 1 )
digikam.dimg.jpeg: RST0  ( 3 )
digikam.dimg.jpeg: RST1  ( 3 )
...
digikam.dimg.jpeg: RST5  ( 3 )
digikam.dimg.jpeg: End Of Image  ( 1 )
DImg null:  "/home/tea/Pictures/wallpaper/01.jpg"
...
DImg null:  "/home/tea/Pictures/wallpaper/wallpaper26.jpg"
DImg null:  "/home/tea/Pictures/wallpaper/wallpaper28.jpg"
QPixmap(QSize(1920, 1080),depth=32,devicePixelRatio=1,cacheKey=0xe3400000001)

What you can see is only a picture be loaded (at the bottom). Why so many pictures load failed?
Comment 26 caulier.gilles 2022-02-05 17:32:13 UTC
Hi, 

I seen your previous comment. Sorry for the delay, but i was busy to prepare projects for future GoSC 2022 students and to prepare Qt6 port patches for production.

I will look Monday morning, I promise, it's in my TODO list (:-)...

Best
Gilles Caulier
Comment 27 319513897@outlook.com 2022-02-08 12:10:53 UTC
Sorry reply too later. 

I encounter some bugs that makes this plugins can't meet my requirements. For a compromise, I write two function to load album, the one use QThreadPool, and anther use  PreviewLoadThread, then I add a option let user decide which loader they like.

Besides, I rename data_loading to master, and the previous master rename to old. And I remove raw sync codes, use signal-and-slot for a more clear code, although its performance is slightly lower, I think it's worth it.

Let me make it clear, the bugs come from PreviewLoadThread is:

1. t->load(this->createLoadingDescription(url.toLocalFile()));, then only one picture for every album be loaded.
2. if I use PreviewLoadThread::loadFastButLargeSynchronously(url.toLocalFile(), 1920 * 1080); then digikam will crash when I close plugins before all pictures be loaded.

Anther way is use loadFastButLargeSynchronously inside QThreadPool, this can solve bug 2, but I still feel some stuck when close plugin before pictures be loaded.
Comment 28 319513897@outlook.com 2022-02-14 10:59:48 UTC
emm, I had do some works today, and all bugs previous should be fixed, and three styles (Row, Col, and Square) can work normally. I had send a email to digikam-devel@kde.org to do a pr(Because I has not the permission to make a pr by email). And that patch has be tested on my laptop.

Looking forward to the approval of this pr. :)

(ps, PreviewThread may bring some bugs, I don't  know much about it, I add it to plugin still, and it should works in most scenes, but for my part, I just want add this plugin to digikm)
Comment 29 caulier.gilles 2022-02-14 16:07:49 UTC
Hi,

First, the git/master code of digiKam is now Qt6/Qt5 compatible branch. It's for the future 8.0.0 release.

A new qt5-maintenance branch have been created for Qt5 only code, mature and used to release 7.x series.

This last branch must be used with your plugin for the moment. Master still under development and probably full of new bugs.

Gilles Caulier
Comment 30 caulier.gilles 2022-02-14 16:20:02 UTC
In the README, indicate that developer needs to run "git submodule update --init" to get QtFlowLayout code before to configure and compile.

Never copy digiKam header in your plugin. Use system installed files instead.

Gilles Caulier
Comment 31 caulier.gilles 2022-02-14 16:58:04 UTC
First stage : I created a pull request on github to clean you plugin :

https://github.com/cathaysia/digikamflowplugin/pull/1

Gilles Caulier
Comment 32 319513897@outlook.com 2022-02-15 06:21:23 UTC
Thanks, that pr has been merged. Add support for qt6 for my plugin will be considered also. But not this time. I just want wait for the process of digikam.
Comment 33 caulier.gilles 2022-02-15 14:14:47 UTC
Hi,

Another point to improve, is the menu entry. Please move all options to a dialog (use DPluginDialog for that).

The settings must be saved and restored between digiKam session. Using QSettings is fine for that.

the idea is to have only 2 entries in the View/LowPlugin menu : 

- Open-View...
- Configure... 

The icon is not the right one (digiKam). Please chose one more adapted for that.

Best

Gilles Caulier
Comment 34 319513897@outlook.com 2022-02-16 03:46:23 UTC
These works:

1. Move all options to a dialog : has been done today. :)
2. Saved and restored settings: will be doing at 2022/2/18(UTC+8), because I have a 36-hour train today.

emm, where is the place for me to store settings? ~/.config/digikam/plugins/flowplugin.ini or anywhere I like?
Comment 35 caulier.gilles 2022-02-16 03:48:57 UTC
QConfig will store it at the right place automatically. Only set up the ini filename, and enjoy...

Gilles Caulier
Comment 36 319513897@outlook.com 2022-02-18 01:30:50 UTC
Ok, I just made a commit. Plug can store/restore settings now.
Comment 37 caulier.gilles 2022-02-20 17:11:00 UTC
Git commit 085fd20b5848c50f6ce6bc678c594041a6fd5c30 by Gilles Caulier.
Committed on 20/02/2022 at 17:09.
Pushed by cgilles into branch 'master'.

Add FlowView digiKam and Shwofoto generic plugin to the bundles.

M  +7    -2    project/bundles/3rdparty/CMakeLists.txt
C  +9    -17   project/bundles/3rdparty/ext_flowview/CMakeLists.txt [from: project/bundles/3rdparty/ext_mosaicwall/CMakeLists.txt - 052% similarity]
M  +1    -1    project/bundles/3rdparty/ext_gmicqt/CMakeLists.txt
M  +1    -1    project/bundles/3rdparty/ext_mosaicwall/CMakeLists.txt
M  +1    -0    project/bundles/appimage/03-build-digikam.sh
M  +11   -0    project/bundles/flatpak/org.kde.digikam.json
M  +1    -0    project/bundles/macports/03-build-digikam.sh
M  +1    -0    project/bundles/mxe/03-build-digikam.sh

https://invent.kde.org/graphics/digikam/commit/085fd20b5848c50f6ce6bc678c594041a6fd5c30
Comment 38 caulier.gilles 2022-02-20 17:17:06 UTC
Git commit 438dd39b71581dfd38551ae85d4aaca85a8fb09a by Gilles Caulier.
Committed on 20/02/2022 at 17:15.
Pushed by cgilles into branch 'qt5-maintenance'.

backport FlowView plugin integration in the bundles to qt5-maintenance branch.

M  +1    -0    NEWS
M  +9    -2    project/bundles/3rdparty/CMakeLists.txt
C  +9    -17   project/bundles/3rdparty/ext_flowview/CMakeLists.txt [from: project/bundles/3rdparty/ext_mosaicwall/CMakeLists.txt - 052% similarity]
M  +1    -1    project/bundles/3rdparty/ext_gmicqt/CMakeLists.txt
M  +1    -1    project/bundles/3rdparty/ext_mosaicwall/CMakeLists.txt
M  +1    -0    project/bundles/appimage/03-build-digikam.sh
M  +11   -0    project/bundles/flatpak/org.kde.digikam.json
M  +1    -0    project/bundles/macports/03-build-digikam.sh
M  +1    -0    project/bundles/mxe/03-build-digikam.sh

https://invent.kde.org/graphics/digikam/commit/438dd39b71581dfd38551ae85d4aaca85a8fb09a
Comment 39 319513897@outlook.com 2022-02-21 11:33:12 UTC
Thanks
Comment 40 caulier.gilles 2022-02-21 12:01:05 UTC
The computer to build all bundles is under backup stage. I will restart it later...

Note: i prepare a new MR for you plugin in github...

Gilles
Comment 41 caulier.gilles 2022-02-28 08:54:51 UTC
Git commit 05f26dd1b30f798dd88a8b4d8f03e6cb272169cd by Gilles Caulier.
Committed on 28/02/2022 at 08:54.
Pushed by cgilles into branch 'qt5-maintenance'.

fix operation to checkout FlowView reporsitory

M  +3    -2    project/bundles/3rdparty/ext_flowview/CMakeLists.txt

https://invent.kde.org/graphics/digikam/commit/05f26dd1b30f798dd88a8b4d8f03e6cb272169cd
Comment 42 caulier.gilles 2022-02-28 08:56:01 UTC
Hi,

Why git submodule update fail on your github repository ? 

[gilles@localhost data]$ git clone https://github.com/cathaysia/digikamflowplugin.git
Cloning into 'digikamflowplugin'...
remote: Enumerating objects: 680, done.
remote: Counting objects: 100% (680/680), done.
remote: Compressing objects: 100% (446/446), done.
remote: Total 680 (delta 366), reused 535 (delta 225), pack-reused 0
Receiving objects: 100% (680/680), 21.65 MiB | 11.83 MiB/s, done.
Resolving deltas: 100% (366/366), done.

[gilles@localhost data]$ 
[gilles@localhost digikamflowplugin]$ git submodule update --init
Submodule 'extern/QtFlowLayout' (git@github.com:cathaysia/QtFlowLayout.git) registered for path 'extern/QtFlowLayout'
Cloning into '/mnt/data/digikamflowplugin/extern/QtFlowLayout'...
X11 forwarding request failed on channel 0
X11 forwarding request failed on channel 0
X11 forwarding request failed on channel 0
fatal: remote error: upload-pack: not our ref 3fdf1b0b18f75ac9dd3027940d0daf797814788ae-band side-band-64k ofs-delta shallow deepen-since deepen-not deepen-relative no-progress include-tag multi_ack_detailed allow-tip-sha1-in-want allow-reachable-sha1-in-want symref=HEAD:refs/heads/master filter object-format=sha1 agent=git/github-g5b50be7cc83b
Fetched in submodule path 'extern/QtFlowLayout', but it did not contain 3fdf1b0b18f75ac9dd3027940d0daf797814788a. Direct fetching of that commit failed.
[gilles@localhost digikamflowplugin]$ pwd
/mnt/data/digikamflowplugin

Best

Gilles Caulier
Comment 43 319513897@outlook.com 2022-02-28 10:31:15 UTC
Sorry, it's my mistake, I am forget to push 3fdf1b0b18f75ac9dd3027940d0daf797814788a of QtFlowLayout. 

And it should be OK now.
Comment 44 caulier.gilles 2022-02-28 11:26:46 UTC
FlowView plugin is now integrated in digiKam 7.6.0 Windows installer:

...
[  0%] Creating directories for 'ext_flowview'
[  0%] Performing download step (git clone) for 'ext_flowview'
Cloning into 'ext_flowview'...
Already on 'master'
Your branch is up to date with 'origin/master'.
Submodule 'extern/QtFlowLayout' (git@github.com:cathaysia/QtFlowLayout.git) registered for path 'extern/QtFlowLayout'
Cloning into '/mnt/data/7.x/project/bundles/mxe/temp.build/ext_flowview/ext_flowview-prefix/src/ext_flowview/extern/QtFlowLayout'...
X11 forwarding request failed on channel 0
Submodule path 'extern/QtFlowLayout': checked out '3fdf1b0b18f75ac9dd3027940d0daf797814788a'
[ 50%] No update step for 'ext_flowview'
[ 50%] No patch step for 'ext_flowview'
[100%] Performing configure step for 'ext_flowview'
MXE target : 64 bits shared
Installing to /mnt/data/7.x/project/bundles/mxe/build.win64 for target x86_64-w64-mingw32.shared with build mode RelWithDebInfo and configure options 
== Using MXE wrapper: /home/gilles/Documents/7.x/project/bundles/mxe/build.win64/usr/bin/x86_64-w64-mingw32.shared-cmake
     - cmake version 3.22.1
     - warnings for unused CMAKE_POLICY_DEFAULT variables can be ignored
== Using MXE toolchain: /home/gilles/Documents/7.x/project/bundles/mxe/build.win64/usr/x86_64-w64-mingw32.shared/share/cmake/mxe-conf.cmake
== Using MXE runresult: /home/gilles/Documents/7.x/project/bundles/mxe/build.win64/usr/share/cmake/modules/TryRunResults.cmake
loading initial cache file /home/gilles/Documents/7.x/project/bundles/mxe/build.win64/usr/share/cmake/modules/TryRunResults.cmake
CMake Warning at /mnt/data/7.x/project/bundles/mxe/build.win64/usr/x86_64-w64-mingw32.shared/share/cmake/mxe-conf.cmake:13 (message):
  

  ** Warning: direct use of toolchain file is deprecated

  ** Please use prefixed wrapper script instead:

       x86_64-w64-mingw32.shared-cmake [options] <path-to-source>
         - uses mxe supplied cmake version 3.22.1
         - loads toolchain
         - loads common run results
         - sets various policy defaults
      
Call Stack (most recent call first):
  /mnt/data/7.x/project/bundles/mxe/build.win64/usr/x86_64-pc-linux-gnu/share/cmake-3.22/Modules/CMakeDetermineSystem.cmake:124 (include)
  CMakeLists.txt:9 (project)


-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/gilles/Documents/7.x/project/bundles/mxe/build.win64/usr/x86_64-pc-linux-gnu/bin/x86_64-w64-mingw32.shared-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/gilles/Documents/7.x/project/bundles/mxe/build.win64/usr/x86_64-pc-linux-gnu/bin/x86_64-w64-mingw32.shared-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- The following REQUIRED packages have been found:

 * QT
 * Qt5Core
 * Qt5Widgets
 * Qt5Gui
 * Qt5
 * DigikamCore, digiKam core library, <http://www.digikam.org>

-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_WITH_CCACHE
    CMAKE_FIND_PREFIX_PATH
    CMAKE_INCLUDE_PATH
    CMAKE_LIBRARY_PATH
    CMAKE_POLICY_DEFAULT_CMP0017
    CMAKE_POLICY_DEFAULT_CMP0020
    CMAKE_SYSTEM_INCLUDE_PATH
    DIGIKAMSC_CHECKOUT_DOC
    DIGIKAMSC_CHECKOUT_PO
    DIGIKAMSC_COMPILE_DIGIKAM
    DIGIKAMSC_COMPILE_DOC
    DIGIKAMSC_COMPILE_PO
    ENABLE_AKONADICONTACTSUPPORT
    ENABLE_APPSTYLES
    ENABLE_DBUS
    ENABLE_DRMINGW
    ENABLE_INTERNALMYSQL
    ENABLE_KFILEMETADATASUPPORT
    ENABLE_KIO
    ENABLE_MEDIAPLAYER
    ENABLE_MYSQLSUPPORT
    ENABLE_QWEBENGINE
    MXE_TOOLCHAIN
    OpenCV_DIR
    ZLIB_ROOT


-- Build files have been written to: /mnt/data/7.x/project/bundles/mxe/temp.build/ext_flowview/ext_flowview-prefix/src/ext_flowview/build.mxe
[100%] Performing build step for 'ext_flowview'
[  6%] Automatic MOC for target FlowLayout
[  6%] Built target FlowLayout_autogen
[ 12%] Building CXX object extern/QtFlowLayout/src/CMakeFiles/FlowLayout.dir/FlowLayout_autogen/mocs_compilation.cpp.obj
[ 18%] Building CXX object extern/QtFlowLayout/src/CMakeFiles/FlowLayout.dir/flowlayout.cpp.obj
[ 25%] Linking CXX static library libFlowLayout.a
[ 25%] Built target FlowLayout
[ 31%] Automatic MOC for target layoutTest
[ 37%] Automatic MOC for target Generic_PicFlowView_Plugin
[ 37%] Built target Generic_PicFlowView_Plugin_autogen
[ 37%] Built target layoutTest_autogen
[ 43%] Building CXX object src/CMakeFiles/Generic_PicFlowView_Plugin.dir/picdialog.cpp.obj
[ 50%] Building CXX object src/CMakeFiles/Generic_PicFlowView_Plugin.dir/Generic_PicFlowView_Plugin_autogen/mocs_compilation.cpp.obj
[ 56%] Building CXX object src/CMakeFiles/Generic_PicFlowView_Plugin.dir/plugflow.cpp.obj
[ 62%] Building CXX object src/CMakeFiles/Generic_PicFlowView_Plugin.dir/aspectratiopixmaplabel.cpp.obj
[ 68%] Building CXX object src/CMakeFiles/Generic_PicFlowView_Plugin.dir/plugsettings.cpp.obj
[ 75%] Building CXX object extern/QtFlowLayout/test/CMakeFiles/layoutTest.dir/main.cpp.obj
[ 81%] Building CXX object extern/QtFlowLayout/test/CMakeFiles/layoutTest.dir/layoutTest_autogen/mocs_compilation.cpp.obj
[ 87%] Building CXX object extern/QtFlowLayout/test/CMakeFiles/layoutTest.dir/mainwindow.cpp.obj
[ 93%] Linking CXX shared module Generic_PicFlowView_Plugin.dll
[ 93%] Built target Generic_PicFlowView_Plugin
[100%] Linking CXX executable layoutTest.exe
[100%] Built target layoutTest
[100%] Performing install step for 'ext_flowview'
make[4]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /mnt/data/7.x/project/bundles/mxe/build.win64/usr/x86_64-w64-mingw32.shared/lib/plugins/digikam/generic/Generic_PicFlowView_Plugin.dll
[100%] Completed 'ext_flowview'
[100%] Built target ext_flowview
...
Comment 45 caulier.gilles 2022-02-28 13:06:36 UTC
Flow View plugin is now integrated in digiKam 7.6.0 AppImage bundle

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

Gilles Caulier
Comment 46 caulier.gilles 2022-02-28 14:38:24 UTC
Under MacOS, we have a compilation error :

-- Build files have been written to: /Users/gilles/Documents/7.x/project/bundles/macports/temp.build
[  0%] Creating directories for 'ext_flowview'
[  0%] Performing download step (git clone) for 'ext_flowview'
Clonage dans 'ext_flowview'...
Déjà sur 'master'
Votre branche est à jour avec 'origin/master'.
Sous-module 'extern/QtFlowLayout' (git@github.com:cathaysia/QtFlowLayout.git) enregistré pour le chemin 'extern/QtFlowLayout'
Clonage dans '/Users/gilles/Documents/7.x/project/bundles/macports/temp.build/ext_flowview/ext_flowview-prefix/src/ext_flowview/extern/QtFlowLayout'...
Chemin de sous-module 'extern/QtFlowLayout' : '3fdf1b0b18f75ac9dd3027940d0daf797814788a' extrait
[  0%] No update step for 'ext_flowview'
[  0%] Performing patch step for 'ext_flowview'
[  0%] Performing configure step for 'ext_flowview'
-- The C compiler identification is AppleClang 13.0.0.13000029
-- The CXX compiler identification is AppleClang 13.0.0.13000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- The following REQUIRED packages have been found:

 * QT
 * Qt5Core
 * Qt5Widgets
 * Qt5Gui
 * Qt5
 * DigikamCore, digiKam core library, <http://www.digikam.org>

-- Configuring done
-- Generating done
-- Build files have been written to: /Users/gilles/Documents/7.x/project/bundles/macports/temp.build/ext_flowview/ext_flowview-prefix/src/ext_flowview
[  0%] Performing build step for 'ext_flowview'
[  6%] Automatic MOC for target FlowLayout
[  6%] Built target FlowLayout_autogen
[ 12%] Building CXX object extern/QtFlowLayout/src/CMakeFiles/FlowLayout.dir/FlowLayout_autogen/mocs_compilation.cpp.o
[ 18%] Building CXX object extern/QtFlowLayout/src/CMakeFiles/FlowLayout.dir/flowlayout.cpp.o
[ 25%] Linking CXX static library libFlowLayout.a
[ 25%] Built target FlowLayout
[ 37%] Automatic MOC for target Generic_PicFlowView_Plugin
[ 37%] Automatic MOC for target layoutTest

AutoMoc subprocess error
------------------------
The moc process failed to compile
  "SRC:/src/plugflow.hpp"
into
  "SRC:/src/Generic_PicFlowView_Plugin_autogen/EWIEGA46WW/moc_plugflow.cpp"

Command
-------
/opt/digikam.org.x86_64/libexec/qt5/bin/moc -DGeneric_PicFlowView_Plugin_EXPORTS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -I/Users/gilles/Documents/7.x/project/bundles/macports/temp.build/ext_flowview/ext_flowview-prefix/src/ext_flowview/extern/QtFlowLayout -I/opt/digikam.org.x86_64/include/digikam -I/opt/digikam.org.x86_64/libexec/qt5/lib/QtCore.framework -I/opt/digikam.org.x86_64/libexec/qt5/lib/QtCore.framework/Headers -I/opt/digikam.org.x86_64/libexec/qt5/mkspecs/macx-clang -I/opt/digikam.org.x86_64/libexec/qt5/lib/QtWidgets.framework -I/opt/digikam.org.x86_64/libexec/qt5/lib/QtWidgets.framework/Headers -I/opt/digikam.org.x86_64/libexec/qt5/lib/QtGui.framework -I/opt/digikam.org.x86_64/libexec/qt5/lib/QtGui.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/c++/v1 -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks -F /opt/digikam.org.x86_64/libexec/qt5/lib --include /Users/gilles/Documents/7.x/project/bundles/macports/temp.build/ext_flowview/ext_flowview-prefix/src/ext_flowview/src/Generic_PicFlowView_Plugin_autogen/moc_predefs.h --output-dep-file -o /Users/gilles/Documents/7.x/project/bundles/macports/temp.build/ext_flowview/ext_flowview-prefix/src/ext_flowview/src/Generic_PicFlowView_Plugin_autogen/EWIEGA46WW/moc_plugflow.cpp /Users/gilles/Documents/7.x/project/bundles/macports/temp.build/ext_flowview/ext_flowview-prefix/src/ext_flowview/src/plugflow.hpp

Output
------
/Users/gilles/Documents/7.x/project/bundles/macports/temp.build/ext_flowview/ext_flowview-prefix/src/ext_flowview/src/plugflow.hpp:32: Error: Undefined interface

gmake[6]: *** [src/CMakeFiles/Generic_PicFlowView_Plugin_autogen.dir/build.make:71 : src/CMakeFiles/Generic_PicFlowView_Plugin_autogen] Erreur 1
gmake[5]: *** [CMakeFiles/Makefile2:1067 : src/CMakeFiles/Generic_PicFlowView_Plugin_autogen.dir/all] Erreur 2
gmake[5]: *** Attente des tâches non terminées....
[ 37%] Built target layoutTest_autogen
gmake[4]: *** [Makefile:156 : all] Erreur 2
gmake[3]: *** [ext_flowview/CMakeFiles/ext_flowview.dir/build.make:86 : ext_flowview/ext_flowview-prefix/src/ext_flowview-stamp/ext_flowview-build] Erreur 2
gmake[2]: *** [CMakeFiles/Makefile2:2290 : ext_flowview/CMakeFiles/ext_flowview.dir/all] Erreur 2
gmake[1]: *** [CMakeFiles/Makefile2:2297 : ext_flowview/CMakeFiles/ext_flowview.dir/rule] Erreur 2
gmake: *** [Makefile:917 : ext_flowview] Erreur 2
FAILED COMMAND: cmake --build . --config RelWithDebInfo --target ext_flowview -- -j$CPU_CORES

Gilles Caulier
Comment 47 caulier.gilles 2022-02-28 15:04:09 UTC
My MacOS patch : https://github.com/cathaysia/digikamflowplugin/pull/3
Comment 48 caulier.gilles 2022-02-28 17:50:18 UTC
Question: 

With the next 7.6.0 release, when my PR on github will be applied, i will close this file. 7.6.0 is planed for next Sunday.
What's about the bug #418256 to support Masonry layouts ? Can it be closed with 7.6.0 release too ?

Gilles Caulier
Comment 49 319513897@outlook.com 2022-02-28 18:15:08 UTC
All layouts mentioned by https://bugs.kde.org/show_bug.cgi?id=418256 has been implemented. 

That is Row, Col and Square, it can be configured through plugin's settings dialog.

So I think https://bugs.kde.org/show_bug.cgi?id=418256 can be closed with 7.6.0 release.
Comment 50 caulier.gilles 2022-02-28 22:00:21 UTC
Flow View plugin running under MacOS : https://i.imgur.com/CvL4Zr5.png
Comment 51 caulier.gilles 2022-02-28 22:17:29 UTC
Flow View plugin under Windows : https://i.imgur.com/pEpFn50.png
Comment 52 319513897@outlook.com 2022-03-01 10:33:37 UTC
Thanks for your test. :)
Comment 53 caulier.gilles 2022-03-09 08:58:06 UTC
Hi,

Any idea why the FlatPak CI server cannot checkout your github repository :

https://binary-factory.kde.org/view/Flatpak/job/Digikam_x86_64_flatpak/531/console

Other ones from github can be handled properly.

Settings : https://invent.kde.org/graphics/digikam/-/tree/master/project/bundles/flatpak

Gilles Caulier
Comment 54 319513897@outlook.com 2022-03-10 11:03:18 UTC
The problem should be caused by git submodule's url, I use ssh as submodule's url for a quicker clone. But it need my private key.

I push a commit to use https but not ssh to fix this problem. It should be fixed.