aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/groupedlineedit.cpp
AgeCommit message (Collapse)Author
2020-10-24desktop: avoid crashes on drag&drop in GroupedLineEditGravatar Berthold Stoeger
If the user manages to "scroll" through the QPlainTextEdit by a drag&drop action, the state of the widget becomes inconsistent. On the one hand, the text-block says that it has one line. On the other hand, its layout says that it has no line. When trying to fetch the line, a crash occurs. Try to detect such a strange state and return early in GroupedLineEdit::paintEvent(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-06-13Fix includes for building against Qt-5.15Gravatar Gaetan Bisson
Signed-off-by: Gaetan Bisson <bisson@archlinux.org>
2018-01-10Unused code: GroupedLineEdit::removeAllColors()Gravatar Jan Mulder
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-29Add SPDX header to desktop widgetsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-26compile fixGravatar Jan Mulder
commit 597539ce39ab10 breaks my compile. Fixed here. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-03-24Fix double to int truncation in C++ codeGravatar Jeremie Guichard
Wfloat-conversion enabled for C++ part of the code Fix warnings raised by the flag using lrint Original issue reported on the mailing list: The ascent/descent rates are sometimes not what is expected. E.g. setting the ascent rate to 10m/min results in an actual ascent rate of 9m/min. This is due to truncating the ascent rate preference, then effectively rounding up the time to reach each stop to 2s intervals. The result being that setting the ascent rate to 10m/min results in 20s to ascend 3m (9m/min), when it should be exactly 18s. Reported-by: John Smith <noseygit@hotmail.com> Reported-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2015-10-30Move qt-ui to desktop-widgetsGravatar Tomaz Canabrava
Since we have now destkop and mobile versions, 'qt-ui' was a very poor name choice for a folder that contains only destkop-enabled widgets. Also, move the graphicsview-common.h/cpp to subsurface-core because it doesn't depend on qgraphicsview, it merely implements all the colors that we use throughout Subsurface, and we will use colors on both desktop and mobile versions Same thing applies for metrics.h/cpp Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>