[digikam] [Bug 389273] Copy/move selected items to anothor Album doesn't work correctly [patch]

2018-08-29 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=389273

caulier.gil...@gmail.com changed:

   What|Removed |Added

   Version Fixed In||6.0.0
 Resolution|DUPLICATE   |FIXED

--- Comment #13 from caulier.gil...@gmail.com ---
Git commit 1803bd2a555890b91095d92b0321e1357db0fa59 by Maik Qualmann.
Committed on 25/02/2018 at 19:11.
Pushed by mqualmann into branch 'development/6.0.0'.

add progress indicator and cancel function to file operations
FIXED-IN: 6.0.0

M  +2-1NEWS.6.0.0
M  +101  -5libs/database/utils/dio.cpp
M  +5-0libs/database/utils/dio.h
M  +10   -0libs/iojobs/iojob.cpp
M  +8-8libs/iojobs/iojobsmanager.cpp
M  +8-4libs/iojobs/iojobsmanager.h
M  +21   -7libs/iojobs/iojobsthread.cpp
M  +20   -9libs/iojobs/iojobsthread.h

https://commits.kde.org/digikam/1803bd2a555890b91095d92b0321e1357db0fa59

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 389273] Copy/move selected items to anothor Album doesn't work correctly [patch]

2018-01-23 Thread Maik Qualmann
https://bugs.kde.org/show_bug.cgi?id=389273

Maik Qualmann  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #12 from Maik Qualmann  ---
I close this bug as a duplicate, because the desire for a progress bar and
cancel function is also described here.

Maik

*** This bug has been marked as a duplicate of bug 233063 ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 389273] Copy/move selected items to anothor Album doesn't work correctly [patch]

2018-01-23 Thread Maik Qualmann
https://bugs.kde.org/show_bug.cgi?id=389273

Maik Qualmann  changed:

   What|Removed |Added

 Attachment #110071|0   |1
is obsolete||

--- Comment #11 from Maik Qualmann  ---
Comment on attachment 110071
  --> https://bugs.kde.org/attachment.cgi?id=110071
DIOProgressManager.patch

>diff --git a/libs/database/utils/dio.cpp b/libs/database/utils/dio.cpp
>index 82813bae60..952c9e8336 100644
>--- a/libs/database/utils/dio.cpp
>+++ b/libs/database/utils/dio.cpp
>@@ -48,6 +48,7 @@
> #include "collectionmanager.h"
> #include "dnotificationwrapper.h"
> #include "digikamapp.h"
>+#include "progressmanager.h"
> 
> namespace Digikam
> {
>@@ -188,7 +189,7 @@ void DIO::Private::processJob(int operation, const 
>QList& srcList, const Q
> {
> emit jobToCreate(operation, finder.remoteFiles, dest);
> // stat'ing is unreliable; just try to copy and suppress error message
>-emit jobToCreate(operation | SourceStatusUnknown, 
>finder.possibleRemoteSidecars, dest);
>+emit jobToCreate(operation | IOJobsThread::SourceStatusUnknown, 
>finder.possibleRemoteSidecars, dest);
> }
> }
> 
>@@ -200,7 +201,7 @@ void DIO::Private::processRename(const QUrl& src, const 
>QUrl& dest)
> {
> for (int i = 0 ; i < finder.localFiles.length() ; ++i)
> {
>-emit jobToCreate(Rename, QList() << finder.localFiles.at(i),
>+emit jobToCreate(IOJobsThread::Rename, QList() << 
>finder.localFiles.at(i),
>  QUrl::fromLocalFile(dest.toLocalFile() + 
> finder.localFileSuffixes.at(i)));
> }
> 
>@@ -209,11 +210,11 @@ void DIO::Private::processRename(const QUrl& src, const 
>QUrl& dest)
> 
> for (int i = 0 ; i < finder.remoteFileSuffixes.length() ; ++i)
> {
>-emit jobToCreate(Rename | SourceStatusUnknown,
>+emit jobToCreate(IOJobsThread::Rename | 
>IOJobsThread::SourceStatusUnknown,
>  QList() << finder.possibleRemoteSidecars.at(i),
>  QUrl::fromLocalFile(dest.toLocalFile() + 
> finder.possibleRemoteSidecarSuffixes.at(i)));
> }
>-emit jobToCreate(Rename, QList() << src, dest);
>+emit jobToCreate(IOJobsThread::Rename, QList() << src, dest);
> }
> 
> void DIO::Private::albumToAlbum(int operation, const PAlbum* const src, const 
> PAlbum* const dest)
>@@ -231,7 +232,7 @@ void DIO::Private::imagesToAlbum(int operation, const 
>QList& infos, c
> QList ids;
> QList  urls;
> 
>-if (operation == Move)
>+if (operation == IOJobsThread::IOJobsThread::Move)
> {
> // update the image infos
> CoreDbAccess access;
>@@ -290,7 +291,7 @@ void DIO::Private::deleteFiles(const QList& 
>infos, bool useTrash)
> 
> qCDebug(DIGIKAM_DATABASE_LOG) << "Deleting files:" << urls;
> 
>-emit jobToProcess(useTrash ? Trash : Delete, urls, QUrl());
>+emit jobToProcess(useTrash ? IOJobsThread::Trash : IOJobsThread::Delete, 
>urls, QUrl());
> }
> 
> // 
> 
>@@ -335,19 +336,38 @@ void DIO::createJob(int operation, const QList& 
>src, const QUrl& dest)
> return;
> }
> 
>+ProgressItem* item  = 0;
> IOJobsThread* jobThread = 0;
>-int flags   = operation & FlagMask;
>-operation  &= OperationMask;
>+int flags   = operation & IOJobsThread::FlagMask;
>+operation  &= IOJobsThread::OperationMask;
> 
>-if (operation == Copy)
>+if (operation == IOJobsThread::Copy)
> {
>+item = getProgressItem(IOJobsThread::Copy);
>+
>+if (!item || item->totalCompleted())
>+{
>+item = 
>ProgressManager::instance()->createProgressItem(QLatin1String("DIOCopy"),
>+   
>i18n("Copy"), QString(), true, false);
>+}
>+
>+item->setTotalItems(item->totalItems() + src.count());
> jobThread = IOJobsManager::instance()->startCopy(src, dest);
> }
>-else if (operation == Move)
>+else if (operation == IOJobsThread::Move)
> {
>+item = getProgressItem(IOJobsThread::Move);
>+
>+if (!item || item->totalCompleted())
>+{
>+item = 
>ProgressManager::instance()->createProgressItem(QLatin1String("DIOMove"),
>+   
>i18n("Move"), QString(), true, false);
>+}
>+
>+item->setTotalItems(item->totalItems() + src.count());
> jobThread = IOJobsManager::instance()->startMove(src, dest);
> }
>-else if (operation == Rename)
>+else if (operation == IOJobsThread::Rename)
> {
> if (src.size() != 1)
> {
>@@ -363,23 +383,53 @@ 

[digikam] [Bug 389273] Copy/move selected items to anothor Album doesn't work correctly

2018-01-23 Thread Maik Qualmann
https://bugs.kde.org/show_bug.cgi?id=389273

--- Comment #10 from Maik Qualmann  ---
Created attachment 110071
  --> https://bugs.kde.org/attachment.cgi?id=110071=edit
DIOProgressManager.patch

This is the first version for a patch to provide a progress bar and the ability
to cancel file operations (copy, move and delete items).

Maik

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 389273] Copy/move selected items to anothor Album doesn't work correctly [patch]

2018-01-23 Thread Maik Qualmann
https://bugs.kde.org/show_bug.cgi?id=389273

Maik Qualmann  changed:

   What|Removed |Added

Summary|Copy/move selected items to |Copy/move selected items to
   |anothor Album doesn't work  |anothor Album doesn't work
   |correctly   |correctly [patch]

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 389273] Copy/move selected items to anothor Album doesn't work correctly

2018-01-23 Thread Manfred
https://bugs.kde.org/show_bug.cgi?id=389273

Manfred  changed:

   What|Removed |Added

   Severity|major   |task

--- Comment #9 from Manfred  ---
I investigated one more time and I can explain my mistake.
I am using grouping of images. When the group is opened, the "master" image,
which hold the information, looks very similar to others. It differs only by a
"number" which indicates the amount of the group. So when only the "master"
image is selected digikam shows that one image is selected, ok. Now when I
copy/move only the one selected "master" image digikam will be copying the hole
group without any information. This was a little bit confusion for me. But now
I know this issue and it's ok for me.
In fact the memory overflows isn't a problem of digikam.
Now this topic can be closed because it isn't a bug.
Many thanks for the support.
Finally, digikam is a great software:-) Thanks a lot to the whole digikam team!
Manfred

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 389273] Copy/move selected items to anothor Album doesn't work correctly

2018-01-21 Thread Maik Qualmann
https://bugs.kde.org/show_bug.cgi?id=389273

Maik Qualmann  changed:

   What|Removed |Added

 CC||metzping...@gmail.com

--- Comment #8 from Maik Qualmann  ---
Copying all images of the group is a very old behavior of digiKam. We have
recently created the possibility that this behavior can already be configured
for many actions. For file operations via drag & drop or copy / move it is not
yet implemented. You have to open all groups and select only the images you
want to copy. That the memory overflows when copying, I can not reproduce here.
I can imagine no reason at the moment which could be triggered. A test here
with many more images shows no abnormalities.

Maik

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 389273] Copy/move selected items to anothor Album doesn't work correctly

2018-01-21 Thread Manfred
https://bugs.kde.org/show_bug.cgi?id=389273

--- Comment #7 from Manfred  ---
One notice more:
After copying images by digikam the RAM buff/cache is always using 5.6GB. It is
freezed and isn't decreasing. So I had to reboot my computer.

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 389273] Copy/move selected items to anothor Album doesn't work correctly

2018-01-21 Thread Manfred
https://bugs.kde.org/show_bug.cgi?id=389273

--- Comment #6 from Manfred  ---
How I reproduced: 
1. Went in my my Album with 1896 images.
2. Showed all images also which are grouped. I am using grouping.
3. Selected 4+ rating. -> 156 images showed.
3. Selected all 156 images. It signed at status bar that 156 images are
selected.
4. Copied to a new album. Digikam noticed that 156 images will be copied. 
5. But all 1896 images where copied. That's the problem.

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 389273] Copy/move selected items to anothor Album doesn't work correctly

2018-01-21 Thread Manfred
https://bugs.kde.org/show_bug.cgi?id=389273

--- Comment #5 from Manfred  ---
The problem is also reproducible with version 5.9.0. 
Debug logs are only "[New Thread...]" and "[Threadexited]", not more.
I selected 156 items and this was showed but round about 3000 items where
copied.

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 389273] Copy/move selected items to anothor Album doesn't work correctly

2018-01-21 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=389273

--- Comment #4 from caulier.gil...@gmail.com ---
Another point : run the AppImage from a console and look the debug trace while
you perform the operation in DK. This can be instructive.

Gilles Caulier

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 389273] Copy/move selected items to anothor Album doesn't work correctly

2018-01-21 Thread Manfred
https://bugs.kde.org/show_bug.cgi?id=389273

--- Comment #3 from Manfred  ---
I am using sqlite. The total amount of images is approx. 16.000. One album is
connected as a network drive, mount via smbfs. The other album is connected to
local drive.
I didn't use 5.9.0. So I have to check later.
Manfred Doerner

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 389273] Copy/move selected items to anothor Album doesn't work correctly

2018-01-21 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=389273

caulier.gil...@gmail.com changed:

   What|Removed |Added

 CC||caulier.gil...@gmail.com

--- Comment #2 from caulier.gil...@gmail.com ---
Reproducible with 5.9.0 pre release AppImage ?

https://files.kde.org/digikam/

Did you use Mysql or sqlite database ?

Gilles Caulier

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 389273] Copy/move selected items to anothor Album doesn't work correctly

2018-01-21 Thread Manfred
https://bugs.kde.org/show_bug.cgi?id=389273

--- Comment #1 from Manfred  ---
Also by copying/moving some images selected by a group, any images will be
copied not the selected once. This behavior is unpredictically and very
strange.

-- 
You are receiving this mail because:
You are watching all bug changes.