Remove two global variables storing the application short name which is
the same as the organisation name and the application icon which is only
used in one place.
Remove the copy and paste actions and slots from the main window code.
They have not been working for a very long time and seem to be rather
useless anyway.
Rewrite the dialog to import CSV files using a Qt Creator form file.
Simplify the CSV import a little bit.
A bit unrelated, but needed for this anyway:
Create the restorepoint right after opening a database file instead of
just doing so after the first change.
Completely rewrite the code for exporting the entire database to an SQL
file. The new code is more concise and should be easier to understand.
It also displays a progress bar while exporting the data. Also this
change eliminated most compiler warnings.
Rewrite the dialog to export tables as CSV file using Qt Designer.
Move the entire export functionality to this dialog instead of
generating the file in the main window.
Add some options for the user to change the layout of the CSV file.
Create a Qt Designer form file for the edit dialog.
Clean up the edit dialog code removing some not working and not used
functionality e.g. for blob editing.
Fix bug that caused invalid rows in the result table view. This could
happen because the rowid of the search result was used as the row number
in the table widget, too. Every rowid, however, is basically a random
number and to address the rows in the table widget you need continuos
numbers.
Fix bug that made it impossible to click on any column but the first one
in the result table widget. Clicking on a column in the data column lead
to wrong rows being highlighted because exactly that text was used that
the user clicked on instead of taking the text of the first column of
the row the user clicked on.
Make it impossible for the user to edit the cells of the search result
table widget. Editing these not just only makes no sense at all but can
also lead to wrong rows being selected in the main window when the rowid
in the first column was changed.
Fix bug that caused the wrong row to be selected in the main window.
When the table view in the find dialog is populated the rowid shown is
increased by one for every search result. This is fair enough but then
this modified row number needs to be changed back before selecting it.
Not doing so leads to always selecting row right after the intendet one.
Fix bug when searching for entries containing a number in some field.
This was caused because the search string was changed to be surrounded
by %-signs as you'd expect when doing a containing-search. However, the
check wether we're searching for a number or not was done on the old
string. So checking for a number was positive even though the program
would actually search for a string. This way the string was not put into
'...'-signs, leading to a malformed SQL statement.
Clear all input widgets as well as the result table widget when
(re)opening the find dialog. This may be less comfortable in some
situations but at least is a bit more consequent because the column
combo box was reset anyway.
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?
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.
Use Qt Designer for the create index dialog.
Change the layout of the create index dialog completely to be easier to
use and more powerful.
Rewrite most of the index creation code to be easier to understand and
more flexible.
Support deleting columns of existing tables. Again this requires a
workaround because of SQLite's ALTER TABLE support.
Also show an error message to the user when editing a column failes.
Make it possible to rename columns and change their types even when
editing an existing table. This requires a workaround to not use the
ALTER TABLE command which is not fully supported by SQLite.
Delete the SQLite source files and change all includes to external
files. This is how libraries are supposed to work and avoids spamming
the project diff with updates that were not even done by us.
Rename all slots starting with "on_" because Qt tries to auto-connect
them to signals of that name. And as those signals do not exist Qt
prints a warning for each of them after every program start.
Reset the sorting of the table view in the browse tab when changing the
current table. This offers not just only a more plausible behaviour to
the user but also fixes a bug that would cause an empty table to be
shown when sorting e.g. column number 5 and then changing to a table
with just 2 columns.
Set the encoding used by Qt to UTF8. This fixes the wrong appearance of
special characters caused by SQLite using UTF8 and the application
ISO-8859 or whatever.
Start numbering the rows in the preview table view of the ImportCSVForm
with #1 instead of 0.
Don't create too many columns when filling the preview table view.
Keep the UI responsive when reading a CSV file. This way the progress
dialog can be seen, too.
Don't crash when reading files without an empty line at their end.
Extend the code used to delete tables to also allow the deletion of
other objects in the data base.
Change the activation of the popup menu entries to activate the
associated action when a trigger, view or index is selected.
Change the design of DBBrowserDB to store all DB objects in one single
map instead of having one map for table, one for views, one for triggers
etc. This requires some changes in the entire program.
Show more details of views in the DB structure tab, i.e. the names of
the fields included in the view. Allow browsing views in the browse tab
and allow exporting views as CSV.
Do not scroll per item but per pixel when scrolling in the tree widget
in the DB structure tab of the main window. This makes scrolling much
more comfortable when the schema string includes line breaks.
Since quite a few problems are fixed by now and the program is moving
towards rudeimentary usability again it's time to add some new features
and problems!
This should let the user know that something's not working instead of
offering him a not working dialog and winding him up this way. That
should make the behaviour of the program much easier to understand.
Make it possible to remove columns in the dialog shown to design a new
table.
Show a TODO message when user tries to delete a column in an existing
table.
Create a savepoint when starting to edit an existing table, release it
when the user clicks on the OK button and rollback to it if he cancels
the action.
Delete those two dialog, the only use of which is to make it possible to
select a table which is totally pointless because the user can do this
in the main window and would probably do so intuitively anyway.
Fix the caption of the edit field dialog to show the correct table name
when it is called by the modify field action in the popup menu or the
toolbar.
Also remove one more useless debug message.