DiveLocationManagement rewrite

Tomaz Canabrava tcanabrava at kde.org
Wed Sep 23 13:45:44 PDT 2015


Dirk,
Here comes the rest of the series. I'v tested with:
 - No Dives
-  Dives
- Creating Dives
- Cancelling

everything seemed to work - I need a bit of help testing it. after all it's
a major rewrite.

points:

- new code is *much* more easy to read and follow.
- Lots of dead code removed.
- you *cant* edit the dive site and the dive at the same time. edit the
dive, then edit the dive site, or only edit the dive site.

sorry for that but it just closed a can of worms and it's not that bad. I
promess to make this work on 5.0 flawlessly, no time for 4.5

On Tue, Sep 22, 2015 at 10:55 PM, Dirk Hohndel <dirk at hohndel.org> wrote:

> On Tue, Sep 22, 2015 at 05:50:45PM -0300, Tomaz Canabrava wrote:
> > Uffs, so:
> >
> > This patch series completely rewrites the LocationManagement *lineedit +
> > combobox* that we used to have.
>
> Wow.
>
> > It is stetically identical to the old one, everything beneath the UI has
> > changed.
>
> There are a few minute differences... one that I noticed is that if you
> have focus in the location field (let's say you clicked on it), simply
> pressing shift or control already gets the completer shown - before you
> ever entered (or removed) a character. That's not terrible, but it seemed
> noteworthy
>

Fixed.


>
> > it currently *doesn't* works ( the line edit + selection *works* , but it
> > doesn't *sets* the dive site ) - I need a bit of help on that as my time
> > just runned out.
>
> That makes it a bit harder to test. So I focused on testing simply what's
> shown to the user and how you can navigate with mouse and keyboard.
>
> If I hit enter on a selection it's chosen. But clicking on a selection
> only highlights it but it doesn't get chosen.
>

Fixed. ( it was actually getting choosed but the dpopup didn't disappeared)

>
> > but basically:
> > after a dive site is choosed on the new location line edit, you have:
> > currentDiveSiteUuid and text()
> > if location.currentDiveSiteUuid() == 1, this means that we need to
> create a
> > new dive site and set the text() as dive_site.name
> >
> > if location.currentDiveSiteUuid() > 1, it's an existing dive site. just
> set
> > it on the dive.
> >
> > Please test: I'm doing this in berseker mode for two days trying to
> remove
> > the old system that's completely broken ( because we where abusing
> > QCompleter, it works very well in all other cases that we use it. )
>
> As I said in IRC - I'm quite nervous about such a dramatic rewrite this
> late in the cycle. I understand why we need it as this addresses a user
> visible bug in the current code... still. Urgs.
>
> Since right now it stops us from actually selecting dive sites I didn't
> pull this into master, yet.
>

I really tried to fix it using QCompleter, didn't worked. you remember m y
5 rewrites trying to hack around it.


>
> Thanks for your hard work, Tomaz.
>
> /D
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150923/83ac8c24/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0015-Fix-keyboard-inconsistencies.patch
Type: text/x-patch
Size: 2423 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150923/83ac8c24/attachment-0014.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0016-Handle-palette-change-for-dive-site-selection.patch
Type: text/x-patch
Size: 3254 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150923/83ac8c24/attachment-0015.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0017-Removed-a-ton-of-dead-code.patch
Type: text/x-patch
Size: 4964 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150923/83ac8c24/attachment-0016.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0018-Remove-dead-code.patch
Type: text/x-patch
Size: 2668 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150923/83ac8c24/attachment-0017.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0019-Correctly-Fix-the-popup-position.patch
Type: text/x-patch
Size: 2261 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150923/83ac8c24/attachment-0018.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0020-Set-the-correct-dive-site-uuid.patch
Type: text/x-patch
Size: 879 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150923/83ac8c24/attachment-0019.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0021-Removed-unused-code.patch
Type: text/x-patch
Size: 1061 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150923/83ac8c24/attachment-0020.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0022-Select-an-index-if-no-index-is-selected.patch
Type: text/x-patch
Size: 1072 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150923/83ac8c24/attachment-0021.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0023-Do-not-display-popup-with-modifiers.patch
Type: text/x-patch
Size: 1159 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150923/83ac8c24/attachment-0022.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0024-Dont-crash-on-new-dive-site.patch
Type: text/x-patch
Size: 868 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150923/83ac8c24/attachment-0023.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0025-Much-simpler-code-to-set-the-dive-site.patch
Type: text/x-patch
Size: 4564 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150923/83ac8c24/attachment-0024.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0026-Code-cleanup.patch
Type: text/x-patch
Size: 1003 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150923/83ac8c24/attachment-0025.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0027-Handles-Dive-Selection-gracefully.patch
Type: text/x-patch
Size: 1476 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150923/83ac8c24/attachment-0026.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0028-Disable-edit-dive-site-if-already-in-edit-mode.patch
Type: text/x-patch
Size: 2259 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150923/83ac8c24/attachment-0027.bin>


More information about the subsurface mailing list