Commit Graph

36 Commits

Author SHA1 Message Date
Peinthor Rene
df91d663f9 Fix the transaction logic 2013-03-05 20:22:17 +01:00
Peinthor Rene
93acb897df fix locking the database by just opening it 2013-03-04 19:25:15 +01:00
Peinthor Rene
d6533747b4 rework database encoding settings and conversions 2013-02-23 13:00:07 +01:00
Peinthor Rene
f8777ca550 add some constness 2013-02-14 18:43:46 +01:00
Peinthor Rene
f8e51cc07a add a foreign key setting
to open database with foreign keys enabled
2013-01-29 18:26:29 +01:00
Peinthor Rene
13792e8100 forgot to add an else branch 2013-01-26 10:25:50 +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
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
9c6bb1daed remove duplicate setDirty 2013-01-25 14:27:54 +01: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
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
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
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
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
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
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
9e2beb6c81 Fix a few bugs in the CSV import
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.
2013-01-05 14:37:58 +01:00
Martin Kleusberg
a836837b57 Quiten some more debug messages
Remove some more debug messages. There is no point in showing them when
there has been no error.
2013-01-04 23:26:38 +01:00
Martin Kleusberg
d12bb62156 Change design of DBBrowserDB a bit and support more actions with views
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.
2013-01-04 16:38:59 +01:00
Martin Kleusberg
8290a035e8 Add basic and shaky pragma editing
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!
2013-01-03 14:36:28 +01:00
Martin Kleusberg
0edfb7e9d3 Show triggers and views
Also show the triggers and views in the DB structure tab.
2013-01-02 18:50:27 +01:00
Martin Kleusberg
979ed7a007 Clean up code, especially includes
Clean up the entire code a bit, especially by deleting unneeded defines
and includes. This should make the code a bit clearer and faster to
compile.
2012-12-31 18:01:48 +01:00
Martin Kleusberg
01f1e0b253 Use a Qt Designer form file for the editFieldForm dialog
Design the editFieldForm dialog in Qt Designer.
Also add custom field type support and fix some other issues.

The dialog is still doing nothing because support for modifying columns
is still missing in the SQLite interface.
2012-12-31 01:14:03 +01:00
Peinthor Rene
959e7ccf91 change the order in the browse data tab on header click
if a header is clicked in the browse data view
the sort order of the clicked column is used/changed
2012-07-31 15:55:21 +02:00
Peinthor Rene
b570eeb0df cleanup DBBrowserDB::updateSchema and also get rid of a lot of unneeded object copies 2012-03-06 17:52:08 +01:00
Peinthor Rene
4aa23218e2 cleanup global var use + reindent browsermain.cpp 2012-02-10 14:06:08 +01:00
Peinthor Rene
98ccfafb2d make the sql log window a dockable widget 2012-02-04 20:40:42 +01:00
Peinthor Rene
f1155c676e reindent file 2012-01-28 10:39:35 +01:00
Peinthor Rene
d51a5f592e Qt3Support was completely removed
While testing some of my changes I noticed
there are a lot of broken things.
So still a lot of work.
2012-01-27 21:23:14 +01:00
Peinthor Rene
2f19d2ff55 fix permissions and move building file one level up 2012-01-25 21:14:26 +01:00
Peinthor Rene
233efd138c move the source one folder level up 2012-01-19 23:02:27 +01:00