Bug 335073 - Entering the digiKam database path manually is broken
Summary: Entering the digiKam database path manually is broken
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Setup-Database (show other bugs)
Version: 4.0.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-20 10:33 UTC by qqqqqqqqq9
Modified: 2017-08-09 20:35 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.1.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description qqqqqqqqq9 2014-05-20 10:33:46 UTC
When I edit the database path manually, the cursor jumps to the end after entering the first character.

Reproducible: Always

Steps to Reproduce:
1. Go to: Settings - configure digikam - database
2. The database path be /home/photos
3. click after /home/ and enter: "horst/"
Actual Results:  
The path now reads;
/home/hPhotosorst/

Expected Results:  
The path should read:
/home/horst/Photos
Comment 1 caulier.gilles 2014-05-20 11:18:28 UTC
Widget used to edit Database path is KUrlRequester from KDElibs :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/libs/widgets/common/databasewidget.cpp#L99

Problem is reproducible here. there is nothing special in digiKam code about

Sound like a problem from KDELibs...

Gilles Caulier
Comment 2 Christoph Feck 2014-05-20 12:01:27 UTC
I cannot reproduce it using the KUrlRequester that are used in System Settings > Account Details > Paths. Does it also happen there?

Can you please right-click the widget and check which "Completion mode" you use and try changing these?
Comment 3 qqqqqqqqq9 2014-05-20 12:08:34 UTC
No problems in systemsettings for me. Changing the text completion mode doesn't have an effect.
Comment 4 Christoph Feck 2014-05-20 12:14:20 UTC
Gilles, could you re-check digikam code? Does the code connect to the textChanged() signal, and if yes, what does it do?
Comment 5 caulier.gilles 2014-05-20 12:31:09 UTC
yes, it's connected to textChanged() to filter path entered by user :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/libs/widgets/common/databasewidget.cpp#L236

Perhaps i need to use a timer here before to complete filtering and prevent slot cal for each characters enter in edit field ?

Gilles
Comment 6 caulier.gilles 2014-05-23 12:11:59 UTC
Git commit 646f4612f128dca8e32085447f93327164da7c0d by Gilles Caulier.
Committed on 23/05/2014 at 12:10.
Pushed by cgilles into branch 'master'.

add timer to prevent bombarding signal over DB path edit field, which can corrupt path edited.
FIXED-IN: 4.1.0

M  +11   -3    libs/widgets/common/databasewidget.cpp
M  +9    -5    libs/widgets/common/databasewidget.h

http://commits.kde.org/digikam/646f4612f128dca8e32085447f93327164da7c0d
Comment 7 Johannes Hirte 2014-10-10 16:58:49 UTC
This patch breakes config dialog when MySQL is chosen as DB backend. Please see: https://bugs.gentoo.org/show_bug.cgi?id=521992
Comment 8 caulier.gilles 2015-03-25 08:35:10 UTC
To Johannes from comment #7

Problem still reproducible with last digiKam 4.8.0 ?

Gilles Caulier
Comment 9 Johannes Hirte 2015-03-25 22:07:21 UTC
(In reply to Gilles Caulier from comment #8)
> To Johannes from comment #7
> 
> Problem still reproducible with last digiKam 4.8.0 ?
> 
> Gilles Caulier

Was already fixed in 4.5.0 with:

commit f0400ec7e518e753e0c4ccab4eb2b8b022f91767
Author: Gilles Caulier <caulier.gilles@gmail.com>
Date:   Tue Oct 28 15:58:55 2014 +0100

    apply patch #89156
    BUGS: 337737
    FIXED-IN: 4.5.0