Commit Graph

271 Commits

Author SHA1 Message Date
Peinthor Rene
c5dafe9617 avoid useless string copies and fix a bug with logSQL because of that 2013-01-26 10:23:04 +01:00
Peinthor Rene
fbfe25cca9 show browsetable tab on start 2013-01-26 10:22:11 +01:00
Peinthor Rene
322520270d rework the pragma view and setting
removed uninteresting PRAGMA's for user
only set PRAGMA if value has changed
commit transaction before setting pragma with user warning
show the current PRAGMA value after setting
2013-01-25 14:55:03 +01:00
Peinthor Rene
95dbd93ab8 remove sqlite_source from include path 2013-01-25 14:29:32 +01:00
Peinthor Rene
9c6bb1daed remove duplicate setDirty 2013-01-25 14:27:54 +01:00
Peinthor Rene
0dcf45ca47 Merge pull request #5 from MKleusberg/master
Fix pragma editing and further code clean up
2013-01-22 12:26:45 -08:00
Martin Kleusberg
31bd8fd98e Fix pragma editing
Fix a bug in the pragma editing that made it impossible to change some
pragmas because the new values were not put in quotes.
2013-01-22 17:22:09 +01:00
Martin Kleusberg
317cebf2a8 Merge remote-tracking branch 'upstream/master' 2013-01-22 16:05:36 +01:00
Martin Kleusberg
68bb8f103a Merge SQLLogDock and MainWindow
Move the SQL log dock into the main window. This means the log dock is
now included in the MainWindow.ui file and its logic in MainWindow,cpp.
2013-01-22 16:03:20 +01:00
Peinthor Rene
33b1adf58d Revert the reverted "Revert "better about dialog layout""
This reverts commit 176435646f.
2013-01-22 16:01:22 +01:00
Peinthor Rene
adf1d9eb8a Merge branch 'master' of https://github.com/MKleusberg/sqlitebrowser 2013-01-21 20:12:18 +01:00
Peinthor Rene
176435646f Revert "better about dialog layout"
This reverts commit f7bb605d66.
2013-01-21 20:09:28 +01:00
Peinthor Rene
304a606423 Revert "remove useless debug message"
This reverts commit dea609140b.
2013-01-21 20:08:57 +01:00
Peinthor Rene
258c91556b Revert "use explicit slot connection"
This reverts commit de2397f4dc.
2013-01-21 20:08:47 +01:00
Peinthor Rene
9bcad6eb20 Revert "move the whole mainwindow ui into a layout file .ui"
This reverts commit 6459cd4fc7.
2013-01-21 20:08:30 +01:00
Peinthor Rene
a72aee8b7d Revert "show the current journal mode in the statusbar"
This reverts commit bc2956a484.
2013-01-21 20:08:04 +01:00
Peinthor Rene
bc2956a484 show the current journal mode in the statusbar
will be made changeable soon
2013-01-21 19:13:59 +01:00
Peinthor Rene
6459cd4fc7 move the whole mainwindow ui into a layout file .ui
there might still be crashes or bad behavior because i missed some widgets
2013-01-20 22:01:49 +01:00
Martin Kleusberg
e92075869e Update readme file
Change the readme file to include a short description of the project
taken from the original website.

Update the current status of the project listing some more achievements
and things to do.
2013-01-20 20:28:07 +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
a0c209efd8 Get rid of some global variables
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.
2013-01-20 15:16:35 +01:00
Peinthor Rene
de2397f4dc use explicit slot connection 2013-01-19 13:08:28 +01:00
Martin Kleusberg
e52f268578 MainWindow: Remove copy and paste actions
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.
2013-01-18 22:12:20 +01:00
Martin Kleusberg
d05e90e495 Improve translatability of the application
Head towards a translatable application by loading translation files for
the current locale and using tr() where ever it's needed.
2013-01-18 18:11:07 +01:00
Martin Kleusberg
88e4b177a4 Simplify and unify the dialog initialisation a bit 2013-01-18 15:12:08 +01:00
Peinthor Rene
dea609140b remove useless debug message 2013-01-18 14:58:02 +01:00
Peinthor Rene
f7bb605d66 better about dialog layout 2013-01-18 14:47:10 +01:00
Martin Kleusberg
8115727e75 Rewrite the Import CSV Dialog using Qt Creator
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.
2013-01-18 14:45:22 +01:00
Martin Kleusberg
ef197e29e3 Rewrite export to SQL dump
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.
2013-01-10 20:03:34 +01:00
Martin Kleusberg
2a7b3d47fa Clear SQL log when closing a DB and close DB before opening a new one
Clear the SQL log when closing the associated DB file.

Before opening a new database file make sure the last one is closed
correctly.
2013-01-09 20:22:18 +01:00
Martin Kleusberg
dff9221963 Rewrite export to CSV dialog
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.
2013-01-09 20:03:48 +01:00
Martin Kleusberg
ab2a4e6479 Rewrite EditDialog using Qt Designer
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.
2013-01-09 16:25:45 +01:00
Martin Kleusberg
065cb3682a Rewrite the find dialog using Qt Designer
Create a Qt Designer form file for the find dialog.

Simplify the find dialog code a little bit.

Add a new comparison operator '<>' in the find dialog.
2013-01-09 15:45:24 +01:00
Martin Kleusberg
95312a6cd3 Group objects in the DB structure tab
Group the database objects by their type when inserting them into the
tree widget in the structure tab.
2013-01-09 14:31:07 +01:00
Martin Kleusberg
41ec2f6f84 Fix half a dozen bugs concerning the find dialog
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.
2013-01-09 01:20:30 +01:00
Martin Kleusberg
73ca1045a2 Also rename AboutDialog
Missed that file in the last commit
2013-01-08 21:45:55 +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
Martin Kleusberg
32ab512f08 Rewrite the create index dialog
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.
2013-01-08 20:55:18 +01:00
Martin Kleusberg
b38ea3c6bf Silence to debug messages 2013-01-08 19:43:57 +01:00
Martin Kleusberg
684b825a9e Add new function to DBBrowserDB which creates a new table
Add a new function to the DBBrowserDB class which creates a new table.

Use this function in most places where a table needs to be created.
2013-01-08 19:41:07 +01:00
Martin Kleusberg
f8c629ca4e Add keyboard shortcuts for the buttons in the browse tab again
Re-add the keyboard shortcuts for the find and refresh button in the
browse tab. They were lost in the process of using Qt Designer again.
2013-01-07 23:57:31 +01:00
Martin Kleusberg
6b9ad93116 Support dropping of columns
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.
2013-01-07 23:54:15 +01:00
Martin Kleusberg
fac589c3e3 Allow editing fields in existing DB tables
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.
2013-01-07 23:33:52 +01:00
Martin Kleusberg
b0af89c1cb Move code to rename table to DBBrowserDB class
Move the code to rename a table from the EditTableForm to the
DBBrowserDB class where it should be and where it obviously was intended
to be.
2013-01-07 22:43:31 +01:00
Martin Kleusberg
7904b594ed Delete the SQLite source code
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.
2013-01-05 23:18:47 +01:00
Martin Kleusberg
1c4891ad47 Silence some runtime warnings
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.
2013-01-05 16:21:28 +01:00
Martin Kleusberg
acfb40902a Reset sorting when changing the current table
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.
2013-01-05 16:08:33 +01:00
Martin Kleusberg
bed67cd970 Make sure to always escape table and column names properly
Always put `...` around the names of tables, columns and other objects
to avoid errors when the user creates objects with the name of key
words.
2013-01-05 15:31:42 +01:00
Martin Kleusberg
2201ff3234 Partially undo 9a9d32a5a7
Reload the DB structure even when changing to the browse tab asthe
structure might have been changed when coming from the SQL tab.
2013-01-05 15:16:32 +01:00