Commit Graph

14 Commits

Author SHA1 Message Date
Martin Kleusberg
ba75bd16fe Use common format for all include guards and avoid leading underscores
Use a common format for all include guards, make sure each header file
has one and make sure it's named after the file name.

And as a random extra in this commit: Make sure the gen_version.h file
generated by cmake ends with a line break.

Closes #59.
2014-07-31 21:32:58 +02:00
Peinthor Rene
1bac11348f include cleanup 2013-09-19 22:55:35 +02:00
Martin Kleusberg
7167129464 EditTableDialog: Add buttons to move a field up and down
Add two buttons to move the currently selected field up or down to allow
changing the field order of a table.

Extend the DBBrowserDB::renameColumn() method to support changing the
position of a field.
2013-06-13 20:37:19 +02:00
Martin Kleusberg
ebadc180ce EditTableDialog: Remove unused function 2013-06-01 12:50:19 +02:00
Martin Kleusberg
a1b72c5eef Extend the entire savepoint logic to allow multiple active savepoints
Allow multiple savepoints in DBBrowserDB, i.e. setRestorePoint() doesn't
simply return if the DB is already set to dirty but creates an
additional savepoint.

Track the names of all savepoints which have not been either saved or
reverted yet.

Finally, and that's the whole point of this commit, change the savepoint
logic of the EditTableDialog. We used to have a transaction started when
opening a database which was only committed when the file was closed
again. This way the EditFileDialog could savely create a savepoint when
being opened and just release it when OK was clicked or revert to it
when cancel was clicked. Getting rid of the transaction broke this
logic. The dialog still worked but as the savepoint was released when
the changes were applied all changes made via the dialog were
immediately committed to the database. So clicking the revert button had
no effect on those changes. This is at best an unexpected behaviour but
could also be a problem when some changes are reverted while others
aren't. So, having the option now of keeping multiple savepoints opened
this problem can be fixed by just creating a new savepoint every time
the dialog is opened, reverting to it when it is cancelled and _not_
releasing it when OK is clicked.

I hope this works!
2013-05-23 17:41:16 +02:00
Peinthor Rene
b36800ea02 disable editing of table data if not a new table
we currently don't support it
2013-03-28 19:00:45 +01:00
Peinthor Rene
bf29ebb37c add new field properties default value and check constraint 2013-03-19 17:18:52 +01:00
Peinthor Rene
1b0d5a2ff9 Fix view updating after remove field in edittable dialog
rename the FieldList typedef to FieldVector
use a object instead of a table pointer in edittable dialog
2013-03-19 17:18:52 +01:00
Peinthor Rene
05da4bfe8e Rework the create/modify table dialog.
In the crusade to remove the ugly edit field dialog.
Editing tables does currently not work because of a locking issue.
2013-03-16 20:22:23 +01:00
Peinthor Rene
c5dafe9617 avoid useless string copies and fix a bug with logSQL because of that 2013-01-26 10:23:04 +01:00
Martin Kleusberg
e4e840dc38 Make many methods and attributes of classes private
Make most variables, functions, slots etc. private instead of public.

Also make the constructors explicit.
2013-01-20 16:00:09 +01:00
Martin Kleusberg
88e4b177a4 Simplify and unify the dialog initialisation a bit 2013-01-18 15:12:08 +01:00
Martin Kleusberg
cda16ba0fb Remove the modified flag in the EditTableDialog
Remove the flag storing the mofification status in the edit table
dialog. It's only been used in one place and there it was not even
really needed - so why bothering updating and maintaining it?
2013-01-08 21:24:45 +01:00
Martin Kleusberg
24c3eca2e5 Rename dialog files and classes
Rename the files and classes for the dialogs to share all the same
naming pattern. This should make navigation in the code a bit easier.
Do not include dialogs not rewritten yet; they'll be edited as they are
redesigned.
2013-01-08 21:19:01 +01:00