[Digikam-devel] [digikam] /: On Linux, use Inotify directly for file notification changes

Gilles Caulier caulier.gilles at gmail.com
Tue Nov 8 11:05:44 GMT 2011


Thanks Ananta.

Marcel,

current implementation do not compile here :

[ 88%] Building CXX object
core/digikam/CMakeFiles/digikam.dir/digikamadaptor.cpp.o
Linking CXX executable digikam
CMakeFiles/digikam.dir/album/albumwatch.cpp.o: In function
`Digikam::AlbumWatch::AlbumWatchPriv::determineMode()':
/mnt/data/Devel/GIT/2.x/core/digikam/album/albumwatch.cpp:93: undefined
reference to `Digikam::KInotify::KInotify(QObject*)'
/mnt/data/Devel/GIT/2.x/core/digikam/album/albumwatch.cpp:93: undefined
reference to `Digikam::KInotify::available() const'
/mnt/data/Devel/GIT/2.x/core/digikam/album/albumwatch.cpp:93: undefined
reference to `Digikam::KInotify::~KInotify()'
/mnt/data/Devel/GIT/2.x/core/digikam/album/albumwatch.cpp:93: undefined
reference to `Digikam::KInotify::~KInotify()'
CMakeFiles/digikam.dir/album/albumwatch.cpp.o: In function
`Digikam::AlbumWatch::clear()':
/mnt/data/Devel/GIT/2.x/core/digikam/album/albumwatch.cpp:167: undefined
reference to `Digikam::KInotify::removeAllWatches()'
CMakeFiles/digikam.dir/album/albumwatch.cpp.o: In function
`Digikam::AlbumWatch::slotAlbumAdded(Digikam::Album*)':
/mnt/data/Devel/GIT/2.x/core/digikam/album/albumwatch.cpp:211: undefined
reference to `Digikam::KInotify::watchDirectory(QString const&)'
CMakeFiles/digikam.dir/album/albumwatch.cpp.o: In function
`Digikam::AlbumWatch::slotAlbumAboutToBeDeleted(Digikam::Album*)':
/mnt/data/Devel/GIT/2.x/core/digikam/album/albumwatch.cpp:239: undefined
reference to `Digikam::KInotify::removeDirectory(QString const&)'
CMakeFiles/digikam.dir/album/albumwatch.cpp.o: In function
`Digikam::AlbumWatch::connectToKInotify()':
/mnt/data/Devel/GIT/2.x/core/digikam/album/albumwatch.cpp:262: undefined
reference to `Digikam::KInotify::KInotify(QObject*)'
collect2: ld a retourné 1 code d'état d'exécution
make[2]: *** [core/digikam/digikam] Erreur 1
make[1]: *** [core/digikam/CMakeFiles/digikam.dir/all] Erreur 2
make: *** [all] Erreur 2

Perhaos it's an export problem, as usual. I will try to clean up all and
rebuild to see...

Gilles

2011/11/8 Ananta Palani <anantapalani at gmail.com>

> Yes, this is the highest priority for me. I would like to fix all file
> handling in Windows. Right now it is extremely slow, and deleting a file is
> not possible. This is not only a problem for digiKam, but also for KDE on
> Windows in general (see, for example, Dolphin). I will try to implement
> these improvements as time allows.
>
> -Ananta
>
>
> On Tue, Nov 8, 2011 at 9:14 AM, Gilles Caulier <caulier.gilles at gmail.com>wrote:
>
>> Thanks Marcel for the info ,
>>
>> Ananta Palani who work under Windows to port digiKam. He build installer
>> and can help us around this subject...
>>
>> Best
>>
>> Gilles Caulier
>>
>> 2011/11/8 Marcel Wiesweg <marcel.wiesweg at gmx.de>:
>> >
>> >
>> >> Marcel,
>> >>
>> >> very interesting solution. I'm sure that some bugzilla files will be
>> >> closed in the future.
>> >>
>> >> KInotify do not exist in KDELibs yet ? Or do you have customized this
>> >> implementation for digiKam ?
>> >
>> > It's not yet in kdelibs, it was only recently written for use inside
>> the Nepomuk indexer. The code was copied and slightly customized from
>> Nepomuk Core.
>> > In the current form, I'm not sure it will ever be in kdelibs: For
>> Linux, it's the best solution, because we get information in better
>> quality, and we get the information which we really need
>> (closed-after-write). But Inotify is definitely Linux-only.
>> > If there are comparable solutions for Windows and Mac, the way to go
>> would be to extend KDirWatch API and offer this cross-platform. But I dont
>> know about available APIs on these systems.
>> >
>> > Marcel
>> > --
>> > NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
>> > Jetzt informieren: http://www.gmx.net/de/go/freephone
>> > _______________________________________________
>> > Digikam-devel mailing list
>> > Digikam-devel at kde.org
>> > https://mail.kde.org/mailman/listinfo/digikam-devel
>> >
>> >
>> --------------------------------------------------------------------------------------------------------------
>>
>> Marcel,
>>
>> very interesting solution. I'm sure that some bugzilla files will be
>> closed in the future.
>>
>> KInotify do not exist in KDELibs yet ? Or do you have customized this
>> implementation for digiKam ?
>>
>> Best
>>
>> Gilles
>>
>> >
>> --------------------------------------------------------------------------------------------------------------
>>
>> Git commit dcf2ba9d7e92d51b049bdd354f82ddbf75e51a31 by Marcel Wiesweg.
>> Committed on 07/11/2011 at 22:47.
>> Pushed by mwiesweg into branch 'master'.
>>
>> On Linux, use Inotify directly for file notification changes
>>
>> Use Sebastian Trueg's KInotify wrapper, if Inotify is available.
>> This gives much more detailed reports and especially info when a file
>> has been closed after write. For a detailed explanation, see
>>
>> http://trueg.wordpress.com/2011/10/13/taking-a-break-from-crash-fixing-for-usability/
>> Separate the file watch code from AlbumManager to a new class, AlbumWatch.
>> Do not watch directories recursively (convenient API, but often
>> inefficient implementation
>> out of our reach). We scan the directories anyway, it is possible and
>> efficient to
>> add each directory = album separately.
>> If Inotify is not available (non-linux), the previous code based on
>> KDirWatch and KIO is still used.
>>
>> CCMAIL: digikam-devel at kde.org
>>
>> M  +5    -2    CMakeLists.txt
>> M  +1    -1    digikam/CMakeLists.txt
>> M  +7    -209  digikam/album/albummanager.cpp
>> M  +0    -5    digikam/album/albummanager.h
>> A  +512  -0    digikam/album/albumwatch.cpp     [License: GPL (v2+)]
>> A  +90   -0    digikam/album/albumwatch.h     [License: GPL (v2+)]
>> A  +517  -0    libs/3rdparty/kinotify/kinotify.cpp     [License: LGPL
>> (v2+)]
>> A  +198  -0    libs/3rdparty/kinotify/kinotify.h     [License: LGPL
>> (v2+)]
>>
>> http://commits.kde.org/digikam/dcf2ba9d7e92d51b049bdd354f82ddbf75e51a31
>>
>
>
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20111108/b01bfe64/attachment.html>


More information about the Digikam-devel mailing list