Commit Graph

2661 Commits

Author SHA1 Message Date
mgrojo
d0417eeac9 Support for CMake 3.11
CMake 3.11 has a new AUTOMOC implementation that is breaking QScintilla
compilation.
https://cmake.org/cmake/help/v3.11/release/3.11.html#autogen

It is disabled and QT5_WRAP_CPP used instead. This has been tested with
CMake 3.10.2 and 3.13.1.

See issue #1361
2018-12-01 18:16:03 +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
Karim ElDeeb
161e71b8b0 Update build script to include math extension
See issue #1224.
2018-11-29 05:09:09 +02:00
Karim ElDeeb
2b21e1b18b Add math extension source 2018-11-29 04:14:42 +02:00
Karim ElDeeb
ab9939376b Fix a typo 2018-11-28 21:32:58 +02:00
Karim ElDeeb
79859dc0da Test merging SQLite and SQLCipher installers together
All the new committed files are the same as the current files, but have "_new" suffix so they can be tested without breaking the current build system. Once tested, the old files can be removed and the new ones renamed.

See issue #1630.
2018-11-28 18:18:20 +02:00
Martin Kleusberg
e8a03f462c Fix bug in 9e36f21112
This fixes a bug in the code to modify multiple table columns in one go.
We were accidentally adding more tracked columns when adding a new
column and then changing its name.

See issue #1627.
2018-11-28 12:13:38 +01:00
Justin Clift
583301d0df Update the version numbers in our issue templates. 2018-11-28 19:40:08 +11:00
Justin Clift
05fc3007ca Adjust the Win32/64 nightly build batch files to handle more edge cases 2018-11-28 10:49:09 +11:00
Karim ElDeeb
7db2372509 Update build to include a .zip package for Windows
See #1630.
2018-11-27 12:40:28 +02:00
Justin Clift
5ae582355b Add the nightly macOS build script to our git repo 2018-11-27 14:34:09 +11:00
Justin Clift
655dd497ac Update the included translations for our Win32 nightly builds 2018-11-26 11:30:19 +11:00
mgrojo
58f52f13cb Set the POSIX flag in Scintilla regex find
The POSIX flag is passed to QScintilla for stardardisation of the regex
implementation. This only changes the syntax for sub-expressions. Before
this change it was '\( \)'. With the POSIX flag it is simply '( )' for
sub-expressions, consequently \( and \( have to be used for matching
parenthesis.

Both the Qt implementation (used in filters and REGEXP operator) and the
C++11 standard (possibly used in the future for the editor, if QScintilla
add support) use the the new syntax for sub-expressions.

References:
https://en.cppreference.com/w/cpp/regex/syntax_option_type
>    If no grammar is chosen, ECMAScript is assumed to be selected.

https://en.cppreference.com/w/cpp/regex/ecmascript
>    The Atom ( Disjunction ) is marked subexpression

Qt also uses subexpressions in the POSIX style.
http://doc.qt.io/qt-5/qregexp.html#capturing-parentheses

See issue #1625
2018-11-25 18:43:27 +01:00
Karim ElDeeb
58553647a5 Add the missing *.qm translations files
The *.qm translations files were missing from being bundled with the installer, so the default strings weren't translated and were defaulting to English.

See #1592.
2018-11-25 15:41:46 +02:00
Karim ElDeeb
1f0acad07c Remove the bearer plugin from the 32-bit build
The 32-bit version is built using Qt 5.7 and it doesn't look like it needs this plugin. It will be included in 64-bit builds only.

See #1592.
2018-11-25 02:09:01 +02:00
Karim ElDeeb
9c0ccc3cb1 Fix "The network is not accessible" error
Commit 7394640 added a workaround for a bug in QNetworkAccessManager about a year ago but the required DLL "qgenericbearer.dll" for it wasn't included with the build which was causing "The network is not accessible" error.

The required file is now included till the bug is fixed and probably
 should be removed when it is no longer needed.

See https://bugreports.qt.io/browse/QTBUG-40332

See also #1592.
2018-11-24 17:24:44 +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
Karim ElDeeb
1ceb9ba946 Update the location of MSVC 2017 merge modules
See #1592.
2018-11-24 11:12:15 +02:00
Justin Clift
d206c9a990 Added Win32 nightly build script 2018-11-24 15:38:34 +11:00
Justin Clift
5113bd8fb0 Added Win64 nightly build script 2018-11-24 15:01:26 +11:00
mgrojo
87a8aeb1c0 Option to find&replace in selection #1618
New check box in the Find and Replace dialog for Scintilla editors. The
new option uses the feature in QScintilla for finding text in the
selection only.

The implementation has been changed to use findFirst(InSelection) and
findNext so it works exactly as designed by QScintilla. Consequently the
finding process has to be cancel whenever any of the parameters have
changed.
2018-11-24 00:25:40 +01: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
mgrojo
2b15029be5 Button for new Un/Comment Block feature
A new button has been added to the "Execute SQL" toolbar for invoking the
new Un/Comment Block feature.

See issue #1614
2018-11-23 18:35:52 +01:00
mgrojo
33266b7707 Improvement and fixes to the un/comment block feature
The last line of the selection is considered part of the block, even if it
is not completely selected. At the same time, we have to discard this last
line of the selection, if the index is 0, since in that case there is no
actual selected character in the line.

Additionally all the steps in the replacement are considered a single
action for history, so that user can undo the change in a single undo
action.

See issue #1614
2018-11-21 21:13:40 +01:00
mgrojo
17827ce5be Update QScintilla patches for version 2.10.8
Delete patches that have already been applied upstream and add new ones
for build related files that were not registered.

See commits:
209120c01e
43134caa2d

and issue #1621
2018-11-21 20:30:59 +01:00
Martin Kleusberg
39586da475 Remove some unneeded includes 2018-11-20 23:57:00 +01:00
Martin Kleusberg
32f4394eb8 Remove unreachable code 2018-11-20 23:11:25 +01:00
Martin Kleusberg
43134caa2d Fix qmake build
This was broken by 209120c01e.

See issue #1621.
2018-11-20 22:57:23 +01:00
Martin Kleusberg
594e3a2945 Remove unnecessary 'virtual' to silence some warnings 2018-11-20 22:09:23 +01:00
mgrojo
70534e2ae3 Adapt to QScintilla behaviour with Windows line terminator
QScintilla is returning strings with text(line) with line terminator and
they are also counted by lineLength, so the Windows version has to
substract one for setSelection.

This solves various problems resulting in characters being removed at the
beginning of lines when commenting or uncommenting blocks of code with
Windows line terminators.
2018-11-20 00:19:42 +01:00
Justin Clift
df3a1b1188 Remove no-longer-needed Ubuntu build steps note 2018-11-19 22:09:55 +11:00
mgrojo
209120c01e Updated QScintilla version to 2.10.8
Summary from NEWS file:

  - Control-wheel scroll will now zoom in and out of the document.
  - Added accessibility support.
  - Added setScrollWidth() , scrollWidth, setScrollWidthTracking() and
    scrollWidthTracking() to QsciScintilla. (one of our patches)
  - Bug fixes.
2018-11-18 17:37:08 +01:00
Navdeep Singh Sidhu
52332c98ef Merge pull request #1617 from deepsidhu1313/master
Snap package support to upstream.
2018-11-18 09:53:41 -06:00
jamesrobertclarke
8be9733c08 Update BUILDING.md for Ubuntu 18.04 (#1615)
This is to deal with building on Ubuntu 18.04 and seeing the message:

  Could not find a package configuration file provided by "Qt5LinguistTools"
  with any of the following names:

    Qt5LinguistToolsConfig.cmake
    qt5linguisttools-config.cmake
2018-11-18 23:42:39 +11:00
Navdeep Singh Sidhu
ce36277c96 * Commented code required to build AppImage (CI/CD) packages for the moment as it was causing trouble with Travis config.
Signed-off-by: Navdeep Singh Sidhu <deepsidhu1313@users.noreply.github.com>
2018-11-18 01:32:18 -06:00
Navdeep Singh Sidhu
b6f7b1eec3 Snap package - Removed wrapper file
* As mentioned in one of previous commits, dump wrapper was causing problem with launchpad CI/CD for snap packages. Content of this wrapper file resemble snapcraft-desktop-helpers for gtk application.

Signed-off-by: Navdeep Singh Sidhu <deepsidhu1313@users.noreply.github.com>
2018-11-18 00:52:42 -06:00
Navdeep Singh Sidhu
c31d299fed * Readme.md - Fixed heading of compiling section.
Signed-off-by: Navdeep Singh Sidhu <deepsidhu1313@users.noreply.github.com>
2018-11-18 00:10:40 -06:00
Navdeep Singh Sidhu
cc6cf60e9c Fixed snap heading in readme
Signed-off-by: Navdeep Singh Sidhu <deepsidhu1313@users.noreply.github.com>
2018-11-18 00:08:26 -06:00
Navdeep Singh Sidhu
fb9e80820d Updated Readme
* Added instructions for Snap package installation.

Signed-off-by: Navdeep Singh Sidhu <deepsidhu1313@users.noreply.github.com>
2018-11-18 00:06:40 -06:00
Navdeep Singh Sidhu
abec29823b Merge branch 'master' of git://github.com/sqlitebrowser/sqlitebrowser 2018-11-17 23:27:19 -06:00
Navdeep Singh Sidhu
323b416462 * Removing wrappers (to test fix https://bugs.launchpad.net/snapcraft/+bug/1791871)
* Added qt5-gtk-platformtheme in comments, this can be uncommented if snap is build on base 18 to support gtk theme for QT app.

Signed-off-by: Navdeep Singh Sidhu <deepsidhu1313@users.noreply.github.com>
2018-11-17 22:30:19 -06:00
mgrojo
2c4ff851b1 Comment/uncomment code command for the SQL editor
A new command is added for commenting or uncommenting SQL code (depending
of the state of the first line of the block).

It is bound to "Ctrl+/" as used by many IDEs ("Ctrl+-" is more standard as
Zoom out). Unusual Scintilla binding for "Ctrl+/" is removed for avoiding
interference.

If there is no selection, the current line is un/commented.

See issue #1614
2018-11-18 01:44:59 +01:00
mgrojo
12b4fd91a7 Replace button in SQL Editor inserts text at cursor after a previous find
Each time the searched term or the dialog is closed, the find process in
the QScintilla widget is cancelled. This avoids the problem mentioned in
issue #1612 and similar others, like finding, then changing the searched
term and pressing Replace. In all these cases Replace only finds the next
term to be replaced without performing any actual replacement.
2018-11-17 14:51:46 +01:00
Martin Kleusberg
ef7492adfb Better identifier quoting
This commit fixes the SQL export which did not quote the field names in
the INSERT statements.

This also simplifies the code for escaping SQL identifiers.
2018-11-16 11:05:13 +01:00
Martin Kleusberg
9e36f21112 Allow any number of changes to the table schema in one alterTable call
In the Edit Table dialog we used to call our alterTable function (which
works around SQLite's missing full ALTER TABLE support by - besided
other things - copying all the data of the table) for pretty much every
change immediately. This was taking a lot of time for larger tables.

Our alterTable function allowed any number of changes if they affect
only one field of the table at once. So we could have reduced the number
of calls a lot by just using that capability. Instead however, this
commit improves the alterTable function to make possible transforming a
table completely in just one call. It does so by taking the new table
schema and using that without further modification. It also takes a new
parameter to keep track of what column in the old table becomes what
column in the new table, so the data can be preserved.

This commit obviously also changes the Edit Table dialog to make proper
use of the new features. This means that whatever changes you make to a
table, you will only have to wait once until for the alterTable call,
and that's when clicking the OK button.

See issue #1444.
2018-11-16 10:59:20 +01:00
Martin Kleusberg
37a5645bf5 Fix some shadow warnings 2018-11-15 15:24:00 +01:00
Martin Kleusberg
c91009c7f3 Fix old-style-cast warnings 2018-11-15 15:11:09 +01:00
mgrojo
f262bf6b18 Prepare for different options when the DB is in use
waitForDbRelease receives a parameter for waiting, cancelling the other
operation or asking the user; defaulting to ask.

The wait option is used for the conditional formatting, so it doesn't
interfere with the loading. This avoid opening a dialog when scrolling
the table over a still not fetched area with conditional formats.
And it is done independently of the threading model supported by SQLite.
2018-11-15 14:45:43 +01:00