Commit Graph

201 Commits

Author SHA1 Message Date
Martin Kleusberg
740c88b702 Update to C++14
This updates the qmake and cmake files to enable C++14 support in the
compiler. It also simplifies a function by using a new function
introduced in C++14.
2021-01-11 18:40:11 +01:00
Pino Toscano
acd23e1fc3 Install SVG logo as hicolor scalable icon
Install the SVG logo as scalable icon in the global hicolor icon theme:
this way, application launchers/browsers that show icons bigger than
256 pixels can show a good-looking icon from the SVG logo instead of
upscaling the 256px PNG icon.
2020-10-10 16:16:09 +02:00
SeongTae Jeong
bd8e6bfd8d Correct to tab instead of space 2020-10-09 01:45:28 +09:00
Codifier
30413802de Add Dutch translation
* Initial Dutch (nl) translation for v3.12.1
* Added missing translation phrase for AddRecordDialog and fixed a typo
* Added the proper references in configuration files to compile the Dutch translation into the build.
* Amended translations with changes requested in review 504832399.
* Fix CMakeLists.txt
* Correct one untranslated item

Co-authored-by: SeongTae Jeong <seongtaej98@gmail.com>
2020-10-09 01:16:00 +09:00
horst-p-w-neubauer
06dc1325b1 DbStructureQItemViewFacade implemented
DbStructureQItemViewFacade provides a simple read only interface to a
QAbstractItemView (e.g. QTreeView) that holds a model() of type
DBStructureModel.

It is designed to simplify the access to the actual selected node.

The Class follows the facade design pattern.
But it doesn't control the lifecycle of the itemView it is connected to.
2020-08-21 15:38:37 +02:00
Martin Kleusberg
28ae741745 Change tabbed table browisng to use docks instead
This changes the different tabs in the Browse Data tab to docks. Docks
can be tabbed as well (which is also the default now) but also allow
free floating windows or split views.

See issues #756, #1465, #1905, #2229, #2283.
2020-08-20 11:35:38 +02:00
SeongTae Jeong
7f7c9e40ec Rename Mac OS X to macOS in code and documents 2020-08-12 21:55:33 +02:00
Justin Clift
ef18362698 Add Qt5Svg.dll to our windows packages
See issue #2321
2020-07-31 09:36:32 +10:00
Martin Kleusberg
ddf5117331 dbhub: Refactor networking code
This splits up the RemoteDatabase class into two classes, RemoteDatabase
and RemoteNetwork. The first is for managing the directory of cloned
databases while the second is for network handling only. Moving the
network code into a separate class requires some rewriting but should
make the code easier to maintain and extend.
2020-07-24 13:30:52 +02:00
Nikolay Korotkiy
73819f5f5e Fix cmake build on macOS 2020-07-21 13:39:34 +02:00
Martin Kleusberg
5d89bb8991 dbhub: Show list of commits in Remote dock
When opening a clone of a remote database show a list of all branches,
releases, and tags in the Remote dock and show the commit list when
selecting one of them.
2020-07-13 23:02:17 +02:00
Martin Kleusberg
c776af9880 dbhub: Add view of all checked out databases
The Remote dock shows a list of all databases on dbhub.io. Double
clicking a database downloads and opens it. If the database has already
been downloaded before, the local file is simply opened. This only works
for a small number of databases: To open the database you want, you just
search for it and double click it. But for a larger number of databases
on dbhub.io this does not perform very well since finding a database can
be very difficult. Because of this this commit adds a new view which
shows all checked out databases, i.e. those databases which are already
downloaded. Double clicking one of these opens it without trying to
update it first.

In the future this might also provide a place to add extra options like
deleting local copies.
2020-07-10 18:19:43 +02:00
Martin Kleusberg
d0978ef462 Move image viewer from EditDialog into a separate class
This does not change any look or functionality but is only a preparation
towards adding more features to the image viewer.

See issue #2029.
2020-06-03 11:09:31 +02:00
Scott Furry
4e7669bd0c Correct CMake Warning Messages - QCustomPlot, QHexEdit
Correct text case usage in local FindXXX.cmake and CMakeLists.txt files.
During usage, warning messages appear due to differences in file name/library name case.

Resolution is to match file name case with variable name case where it appears in all CMake files.
i.e. file name - QCustomPlot.cmake
     variable name QCustomPlot_{LIBRARIES, INCLUDE_DIRS, et al}

Affects CMakeLists.txt and cmake/FindXXX.cmake files.
2020-04-23 05:00:23 -06:00
Pino Toscano
09b8c549b2 Install the AppStream file to the canonical location
The canonical location for AppStream XML files has been changed to
/usr/share/metainfo four years ago at least, with /usr/share/appdata
left as legacy location. It is time to switch to the right location.
2020-04-19 13:34:37 +02:00
Justin Clift
0da8973716 Updating 32-bit Qt install on our Win build VM to Qt 5.12.8 2020-04-11 22:15:59 +10:00
Justin Clift
2fc7bf6477 Updating path for the 64-bit Qt install on our Win build VM 2020-04-11 21:20:49 +10:00
WATAHIKI Hiroyuki
9a1cc66503 Japanese Localization. 2020-02-15 02:34:58 +09:00
Justin Clift
574303a550 Update paths on build server for Qt 5.12.6 x64 2019-11-19 22:58:09 +11:00
Justin Clift
6bd176aab6 Update our nightly builds to use Qt 5.12.5
More a test to see if things are better with this Qt version than
5.11.3.
2019-10-09 21:17:27 +11:00
Martin Kleusberg
ce66c1da20 Remove the Antlr parser and the Antlr runtime library
Both are fully replaced by our new parser and are no longer needed.

See issue #1990.
2019-09-13 14:22:12 +02:00
Martin Kleusberg
9e8cb6e2fb grammar: Replace the Antlr parser for CREATE INDEX statements
Replace the Antlr lexer and parser for CREATE INDEX statements a new
lexer and parser generated with flex and bison. This commit is a first
step towards replacing all Antlr-realted parts of the parser. Until then
the new bison-generated parser is only used for CREATE INDEX statements
and the old Antlr-generated parser is used for CREATE TABLE statements.

These are the main reasons for replacing all of the Antlr parser:
- Getting rid of the Antlr runtime library as a dependency.
- Not depending on an old piece of sotware (we are depending on Antlr2
  while Antlr4 is available at the moment. However, migrating to Antlr4
  is as bad as migrating to bison).
- Better handling of expressions in statements. This proved to be a
  consistent source of problems over the last couple of years.
- Somewhat better Unicode support.
- Reentrant code / multithreading support.
- I can finally uninstall Java from my computer.

See #1990.
2019-09-12 11:25:41 +02:00
Martin Kleusberg
3f0832f449 Move form data and code for Browse Data tab into a separate widget class
This adds a new widget called TableBrowser which does everything the
Browse Data tab did before. All the UI data and all the code related to
this tab is moved into the new widget class. The main window now simply
uses the new widget instead of implementing all this stuff itself.

I mainly see three benefits from this change:
1) The main window class becomes smaller and starts looking less like a
master class which manages all of the application. This should make it
easier for new developers to find their way around the code.
2) A better separation of the table browser and the remaining main
window makes it clearer which class class is responsible for what. Again
this makes it easier to maintain the code when it grows.
3) If we ever want to have split views, multiple Browse Data tabs, or
something similar this is an absolute prerequisite.

This commit obviously changes a lot of code. So be prepared for
unintended changes and consider doing some extra testing.

See issue #1972.
2019-08-21 20:47:27 +02:00
Martin Kleusberg
9d654a19ba Support modifying the column list of a constraint in Edit Table dialog
This adds support for modifying the columns a constraint is applied on
in the Constraints tab of the Edit Table dialog. This is a major step
towards full constraint editing capabilities (adding new constraints,
modifying constraint type, and editing constraint type-dependent
parameters are the other missing pieces).

The reasoning behind the popup dialog is to not introduce another full
dialog on top of the Edit Table dialog. After opening the Edit Table
dialog, then switching to the Constraints tab, then opening another
modal dialog, I felt like losing track of what I am currently editing.
The popup dialog is certainly not great but feels a bit less intrusive.
Any suggestions regarding this are appreciated.
2019-07-27 18:26:01 +02:00
Martin Kleusberg
5589bd9da4 Speed up the loading of the database structure
While testing the original database from issue #1892 which contains
hundreds of tables and fields, I noticed how long the loading of the
database structure takes. This is especially problematic since it needs
to be reloaded on various occasions, e.g. running most statements in the
Execute SQL tab, which stalls the application every time.

According to a profiler it is the QIcon constructor which requires most
of the time. By introducing this small icon cache class we can reduce
the time for loading icons to almost nothing.

While still not perfect the UI already feels much more responsive with
this patch.
2019-06-28 14:58:50 +02:00
Scott Furry
a692c06637 Add option in CMake to build against external QHexEdit library
From upstream source, QHexEdit is intended to be a modular widget
for Qt5. (README @ https://github.com/Simsys/qhexedit2)

Add ability for platforms that already have QHexEdit installed to
build DB4S against installed (external to DB4S) QHexEdit library.
Current version of library available is consistent with version
contained in DB4S project `libs` folder.
(see https://repology.org/project/qhexedit2/versions)

Default of CMake flag FORCE_INTERNAL_QHEXEDIT is ON (enabled) so
as to minimize impact to current development workflow and other
platforms. Using flag is left as an option to package managers.
2019-05-29 15:39:46 +02:00
Scott Furry
3642d1dedf CMakeLists change to silence CMP0071 warning.
Problem identified in Github Issue #1910.

Update to CMake had policy warning of AUTOMOC usage.
See https://cmake.org/cmake/help/latest/policy/CMP0071.html

Commit adds instructions to silence the warning.
Affect of AUTOMOC behaviour with 'new' needs further study.
2019-05-25 12:05:29 -06:00
Martin Kleusberg
38ece2ea42 dbhub: Add proxy configuration support
This adds a new dialog, accessible from the Remote tab in the Preferences
Dialog, which allows the user to configure the proxy to use for all
network connections.

The new default is to use the system-wide proxy settings.

See issue #979.
2019-05-09 15:11:44 +02:00
Scott Furry
800a8daf11 Normalize qhexedit.h include path
Include path used for QHexEdit in EditDialog.cpp is "implementation specific"
to how DB4S uses the QHexEdit library. Change is to make usage of library
more generic.
2019-05-07 21:56:06 +02:00
Martin Kleusberg
189652d350 Remove some unnecessary includes 2019-04-29 20:54:26 +02:00
mgrojo
217563fd47 Dialog and foreground configuration for conditional formats
A new dialog for editing conditional formats that can be invoked from the
filter line editor or from the data browser contextual menus. The dialog
allows adding and removing conditional formats, changing the priority order
and editing foreground colour, background colour and filter condition.

The conditional formats have been expanded to allow defining the foreground
colour. By default is the setting configured by user.

This is a continuation of the functionality introduced in PR #1503.
2019-03-23 22:14:18 +01:00
Justin Clift
064514a919 Update our Win32 builds to use MSVC 2015 instead of MSVC 2013
This is so the new JSON library we're using doesn't break things. :)

Note also the "8.1" added to the end of the vcvars line in the batch
file, so the correct SDK is selected.

Without it, when both MSVC 2015 & MSVC 2017 are installed, the MSVC
2015 installation (by default) will be unable to find rc.exe.
2019-03-10 21:07:55 +11:00
Martin Kleusberg
e59100f297 Use Niels Lohmann's JSON library instead of Qt's
Replace Qt's own JSON library functions by Niels Lohmann's JSON library
in the Export JSON dialog. This was necessary because for very large
JSON objects Qt's library functions generated incomplete JSON exports.

See issue #1789.
2019-03-08 12:26:17 +01:00
Scott Furry
543b98ec55 Enable build against external QCustomPlot (#1784)
* Enable build against external QCustomPlot

Source-base distribution has stand-alone QCustomPlot library package.
Feature request is to modify the build instructions to enable use of
external library, rather than building internal supplied library,
with cmd-line switch.

If unable to locate external library, fallback to building internal QCustomPlot.
Build internal is on by default.

* Enable build against external QCustomPlot #1784 - revised

Invert naming/logic:
FORCE_INTERNAL_QCUSTOMPLOT=ON(default) will build QCustomPlot library provided sources
(consistent with current processes)

FORCE_INTERNAL_QCUSTOMPLOT=OFF will search for external QCustomPlot library on system and
fall back to internal if not found.

[github #1784]
2019-03-06 12:29:42 +01:00
Scott Furry
b4af221ee1 Improve FindQScintilla.cmake functioning
Changes depend on successful find_package(Qt5...) call and when
building against external QScintilla.

Modified FindQScintilla.cmake providing extra hints of locations
to search for needed header files. Hints include paths based on
where Qt5 is installed. Presuming Unix/Linux distributions will
put QScintilla header files under Qt5 header folders.
2019-03-06 10:27:28 +01:00
mgrojo
ed178689a4 New setting allowing to set a dark style using a style-sheet
A new setting allows to follow the system style or set a new dark style
based on a the style-sheet provided by
https://github.com/ColinDuquesnoy/QDarkStyleSheet
The style-sheet is licensed under the MIT license. Images contained in
that project are licensed under CC-BY license.

Pending issues:

- Use of stylesheets is incompatible to QPalette. Some colours for
previewing settings in the Preferences dialog are eclipsed by the style-
sheet
See https://github.com/ColinDuquesnoy/QDarkStyleSheet/issues/48

- Changing the style should select matching background and foreground
colours for the Browse Data and SQL tabs in Preferences.

See issues #1751 #1493 and #1738
2019-02-22 22:15:19 +01:00
Manuel
e9145a0c8e Add warnings to cmake compilation (#1721)
* Add warnings to cmake compilation

Use the same set of warning flags that are used for qmake compilation.

See comments in #1718.

* Add condition for warning flags not supported by GCC 5.5

Satisfy Travis build by adding the unrecognised warning flags only when
the compiler version is greater or equal 7.0. Maybe those flags are
available in previous versions, but I don't know when they were introduced.

Tested with GCC 7.3.

* CMake option for enabling GCC warnings

This option follows the qmake configuration, where the same all_warnings
option exist. This allows users to select compiling with or without
warnings using "cmake -DALL_WARNINGS=ON" or OFF.
2019-02-13 17:53:12 +01:00
Justin Clift
5c4f1ab7da Switch Win64 nightly builds back to Qt 5.11.3
This is due to a weird word wrap bug in Qt 5.12.1
2019-02-06 22:52:38 +11:00
Justin Clift
b182d9520e Use Qt 5.12.1 for our Win64 nightly builds 2019-02-06 16:28:19 +11:00
Brook Milligan
21d8800ce6 CMake installation on macOS should also copy the icon & desktop files
Should address #1723
2019-01-31 17:08:14 +11:00
Tien Do
4f939285fc refactor: find correct QScintilla package 2019-01-24 16:06:37 +07:00
Justin Clift
573bcdb7d0 Use Qt 5.11.3 for our Win64 nightly builds 2018-12-22 22:44:15 +11:00
Justin Clift
1181687115 Update Windows x64 nightly build to use Qt 5.12.0 2018-12-11 19:34:58 +11:00
Feyn-Man
6431998470 Italian translation (#1584)
Partial Italian translation for now.  Will be continued later as time permits.
2018-12-08 14:39:34 +11:00
Martin Kleusberg
7e0ff3061b Move code for running SQL statements into a separate class
This is only done for better readability and for easing future changes.
No major logic changes intended here.
2018-12-05 18:37:52 +01:00
Karim ElDeeb
9f28851d00 Allow overriding a library path from the commandline when using CMake on Windows
Change the path of used libraries to a cache entry instead of a normal variable. More info https://cmake.org/cmake/help/latest/command/set.html#set-cache-entry

If you are automating Windows build, you have to change the path of every library in CMakeLists.txt, to match your system, after every update to DB4S source.

This commit will set every library path to a cache entry instead of a normal value so it can be changed from the commandline using the `-D` flag.

For example, to change Qt5 path run `cmake -DQT5_PATH=/path/to/qt5 ...` to let CMake use this path instead of the one in CMakeLists.txt. This doesn't affect the current used paths and they will continue to work, and be used, if they are not replaced on the commandline.
2018-12-01 15:58:48 +02:00
Justin Clift
bd2cd99f2d Remove all references to VSREDIST too
Missed from the previous commit
2018-11-24 21:39:09 +11:00
Justin Clift
c01e6d3e85 Remove CPack pieces and winlaunch.bat, as they're no longer needed 2018-11-24 21:15:45 +11:00
Justin Clift
058f2acd14 Typo fix in a comment 2018-11-24 10:12:41 +11:00
Justin Clift
17193d96f3 Update Win x64 builds to use MSVC 2017 2018-11-24 05:39:37 +11:00