Dive site rewrite: fix adding a new dive and chaning notes / description

I had to create an event filter to deal with the missing callbacks from
QPlainTextEdit (it doesn't support editingFinished()).

Also we need to manually create a dive site on a newly added dive if the
user entered one.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-06-26 21:20:45 -03:00 committed by Dirk Hohndel
parent c2f7702805
commit dee59e5334
3 changed files with 23 additions and 5 deletions

View file

@ -52,11 +52,12 @@ public:
SimpleDiveSiteEditDialog(QWidget *parent);
virtual ~SimpleDiveSiteEditDialog();
bool changed_dive_site;
bool eventFilter(QObject *obj, QEvent *ev);
public slots:
void on_diveSiteName_editingFinished();
void on_diveSiteCoordinates_editingFinished();
void on_diveSiteDescription_editingFinished();
void on_diveSiteNotes_editingFinished();
void diveSiteDescription_editingFinished();
void diveSiteNotes_editingFinished();
protected:
void showEvent(QShowEvent *ev);
private: