Skip to content

Toast timeout violation warnings #2417

@dl3sdo

Description

@dl3sdo

In mobile mode there are developer warnings: Minimum toast timeout is 500, got: 0
The reason for that warnings is that MainWindow::autosave() and MapEditorController::loadFrom() call MainWindow::showStatusBarMessageImmediately() (which will call MainWindow::showStatusBarMessage) with an effective value of 0 for the timeout parameter.

While this is not an issue in desktop mode, in mobile mode toast->showText(text, timeout); will be called which will trigger Toast::startTimer().
There the timeout value is checked to be between 500ms and 5000ms. Values below will become 500ms and values above will become 5000ms. In addition a warning is issued as this is not the expected behaviour.
In mobile mode warnings are triggered when autosaving the map (a failure would lead to a timeout value of 6000ms) and when loading templates after loading the map.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions