mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
QML UI: stop using "--" for empty strings
I can't remember why we started doing this, but at this point I find it just weird. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9e787a2476
commit
6985c123d4
2 changed files with 1 additions and 19 deletions
|
@ -6,7 +6,7 @@
|
||||||
#include "../qthelper.h"
|
#include "../qthelper.h"
|
||||||
#include "../helpers.h"
|
#include "../helpers.h"
|
||||||
|
|
||||||
static QString EMPTY_DIVE_STRING = QStringLiteral("--");
|
static QString EMPTY_DIVE_STRING = QStringLiteral("");
|
||||||
enum returnPressureSelector {START_PRESSURE, END_PRESSURE};
|
enum returnPressureSelector {START_PRESSURE, END_PRESSURE};
|
||||||
|
|
||||||
static QString getFormattedWeight(struct dive *dive, unsigned int idx)
|
static QString getFormattedWeight(struct dive *dive, unsigned int idx)
|
||||||
|
|
|
@ -440,24 +440,6 @@ void QMLManager::commitChanges(QString diveId, QString date, QString location, Q
|
||||||
QString airtemp, QString watertemp, QString suit, QString buddy, QString diveMaster, QString weight, QString notes,
|
QString airtemp, QString watertemp, QString suit, QString buddy, QString diveMaster, QString weight, QString notes,
|
||||||
QString startpressure, QString endpressure, QString gasmix)
|
QString startpressure, QString endpressure, QString gasmix)
|
||||||
{
|
{
|
||||||
#define DROP_EMPTY_PLACEHOLDER(_s) if ((_s) == QLatin1Literal("--")) (_s).clear()
|
|
||||||
|
|
||||||
DROP_EMPTY_PLACEHOLDER(location);
|
|
||||||
DROP_EMPTY_PLACEHOLDER(duration);
|
|
||||||
DROP_EMPTY_PLACEHOLDER(depth);
|
|
||||||
DROP_EMPTY_PLACEHOLDER(airtemp);
|
|
||||||
DROP_EMPTY_PLACEHOLDER(watertemp);
|
|
||||||
DROP_EMPTY_PLACEHOLDER(suit);
|
|
||||||
DROP_EMPTY_PLACEHOLDER(buddy);
|
|
||||||
DROP_EMPTY_PLACEHOLDER(diveMaster);
|
|
||||||
DROP_EMPTY_PLACEHOLDER(weight);
|
|
||||||
DROP_EMPTY_PLACEHOLDER(gasmix);
|
|
||||||
DROP_EMPTY_PLACEHOLDER(startpressure);
|
|
||||||
DROP_EMPTY_PLACEHOLDER(endpressure);
|
|
||||||
DROP_EMPTY_PLACEHOLDER(notes);
|
|
||||||
|
|
||||||
#undef DROP_EMPTY_PLACEHOLDER
|
|
||||||
|
|
||||||
struct dive *d = get_dive_by_uniq_id(diveId.toInt());
|
struct dive *d = get_dive_by_uniq_id(diveId.toInt());
|
||||||
// notes comes back as rich text - let's convert this into plain text
|
// notes comes back as rich text - let's convert this into plain text
|
||||||
QTextDocument doc;
|
QTextDocument doc;
|
||||||
|
|
Loading…
Reference in a new issue