GithubHelp home page GithubHelp logo

huge BUG with data lose! about qtodotxt2 HOT 15 CLOSED

qtodotxt avatar qtodotxt commented on September 26, 2024
huge BUG with data lose!

from qtodotxt2.

Comments (15)

fuchsmich avatar fuchsmich commented on September 26, 2024

from qtodotxt2.

fuchsmich avatar fuchsmich commented on September 26, 2024

from qtodotxt2.

fuchsmich avatar fuchsmich commented on September 26, 2024

from qtodotxt2.

oroulet avatar oroulet commented on September 26, 2024

Ok. Where?

from qtodotxt2.

fuchsmich avatar fuchsmich commented on September 26, 2024

Its in the taskline. inputAccepted() gets called multiple times. I'm working on a fix.

from qtodotxt2.

oroulet avatar oroulet commented on September 26, 2024

I might be naive, but can you avoid tracking indexes? Can't you keep track of Task object?

from qtodotxt2.

fuchsmich avatar fuchsmich commented on September 26, 2024

yes, this made it a lot easier.

from qtodotxt2.

oroulet avatar oroulet commented on September 26, 2024

So now you have a solution that should work?

from qtodotxt2.

fuchsmich avatar fuchsmich commented on September 26, 2024

As far as I see, yes.
There are still some error messages from qml, when creating a new task and then selecting a filter without quitting editing before.

from qtodotxt2.

fuchsmich avatar fuchsmich commented on September 26, 2024

There are still issues, but data loss should not happen.
The problem is, that if you don't quit editing and then trigger a new action, the editing is quit by activeFocusChanged
https://github.com/QTodoTxt/QTodoTxt2/blob/qml/qtodotxt2/qml/TaskLine.qml#L54
which is too late, because the new tasklist seems to be populated already before the focus loss.

I have to investigate some more, but maybe we need a signal, which is emitted when an action gets triggered, which is about to change the content of the maincontroller.tasklist (setting filters, deleting/adding tasks etc.). Then we can quit editing upon this signal.

These problems also cause issue #35

from qtodotxt2.

oroulet avatar oroulet commented on September 26, 2024

maybe we could just disable all actions while editing? it is a bit crazy to change filtering while editing ....

from qtodotxt2.

fuchsmich avatar fuchsmich commented on September 26, 2024

That's one aproach I'm testing.

from qtodotxt2.

oroulet avatar oroulet commented on September 26, 2024

You should remove HTML and text variable in that code. Just get them from task

from qtodotxt2.

fuchsmich avatar fuchsmich commented on September 26, 2024

in the taskline? why?

from qtodotxt2.

oroulet avatar oroulet commented on September 26, 2024

Do they help? Having them only increases the chance to make an error by forgetting to update them. And they generate an error sometimes

from qtodotxt2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.