Hotfix/2657 prevent share overwrite (#2746)

* Fix problem with export from newly saved database

Newly created/saved databases (or used with DatabaseWidget::saveAs)
were not exported/imported correctly.
Fixed the problem by reinitializing the ShareObserver on
DatabaseWidget::saveAs.

* Introduce warnings and prevent conflicting shares

Introduced several warnings and errors to indicate improper settings.
Prevent export when a path is used multiple times (only the file path is
checked - may ignore multiple similar ways to reference a share).

* Improve KeeShare integration in DatabaseWidget

Moved initial KeeShare association to constructor.
Introduced Q_UNUSED to indicate need for assignment statement.
This commit is contained in:
ckieschnick 2019-03-16 03:39:46 +01:00 committed by Jonathan White
parent ebb87e6379
commit 11ecaf4fa4
8 changed files with 109 additions and 19 deletions

View file

@ -43,7 +43,7 @@ public:
virtual QString name() = 0;
virtual QIcon icon() = 0;
virtual QWidget* createWidget() = 0;
virtual void set(QWidget* widget, Group* tempoaryGroup) = 0;
virtual void set(QWidget* widget, Group* tempoaryGroup, QSharedPointer<Database> database) = 0;
virtual void assign(QWidget* widget) = 0;
};