Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network inaccessible error when using a WiFi network #1595

Closed
raananb opened this Issue Oct 28, 2018 · 126 comments

Comments

Projects
None yet
@raananb
Copy link

raananb commented Oct 28, 2018

Details for the issue

Upon startup, an error message is displayed: The network is not accessible. DB Browser then works correctly.

What did you do?

Installed DB Browser for SQLite-win64.msi
The same problem arose with yesterday's (and maybe the day before).

What did you expect to see?

What did you see instead?

Useful extra information

DB4S v3.11.99 (Oct 28 2018) on Windows 10 (10.0) (winnt/10.0.17134) [x86_64]
using SQLite Version 3.25.2
and Qt 5.10.1

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Oct 28, 2018

Thanks @raananb. Yep, we're in the process of upgrading the version of Qt we use, and it looks like we need to use a newer version of MSVC to make that go away.

We're figuring that out now, but it'll probably take a few more days - maybe even until the weekend (best guess).

As a workaround, if you turn off the "Check for updated version" (or similar wording) in the application preferences, the error message shouldn't happen.

Does that help? 😄

@raananb

This comment has been minimized.

Copy link
Author

raananb commented Oct 29, 2018

With "Auto update" unchecked, the error message is not displayed on today's nightly (3.11.99 Oct 29 2018).

@chrisjlocke

This comment has been minimized.

Copy link
Contributor

chrisjlocke commented Nov 6, 2018

Closing, as this is resolved (technically....) and has a workaround... (and is also mentioned elsewhere)

@RudolfJan

This comment has been minimized.

Copy link

RudolfJan commented Dec 7, 2018

I have the same issue. The workaround helps.

@chrisjlocke

This comment has been minimized.

Copy link
Contributor

chrisjlocke commented Dec 7, 2018

The latest version of the nightlies is also useful ... depending on your operating system, of course.

@mgrojo

This comment has been minimized.

Copy link
Contributor

mgrojo commented Dec 7, 2018

And the fix will enter our next beta in the v3.11.x branch.

77a701d

@vlakoff

This comment has been minimized.

Copy link

vlakoff commented Feb 9, 2019

Hi, I just tried the recently released 3.11.0 and encountered this issue.

What's interesting is that I encounter it with DB.Browser.for.SQLite-3.11.0-win64.zip but not with DB.Browser.for.SQLite-3.11.0-win32.zip.

@karim

This comment has been minimized.

Copy link
Member

karim commented Feb 9, 2019

@vlakoff I just downloaded both versions now and I can't reproduce this error.

This error means you are missing a Qt DLL (qgenericbearer.dll) file. Can you check if you have bearer folder and this file inside it?

The error is not happening in 32-bit version because we use different version of Qt for 32-bit (5.7.1) and 64-bit (5.11.3). Qt 5.7.1 doesn't come with this file and it is not needed.

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Feb 9, 2019

Uh oh. Hopefully the packaging for Win64 isn't busted. If it is, we'll be making a v2 package today... 😉

@vlakoff

This comment has been minimized.

Copy link

vlakoff commented Feb 9, 2019

Indeed I have dug a bit about this issue, and understood there are different Qt versions. Hence only 64-bit is affected.

As you can see in the released zip, yes there is a bearer\qgenericbearer.dll file. But maybe it isn't loaded? Just in case, I tried putting copies of the DLL everywhere in the folder structure, but it didn't fix the issue.

I also tried clearing the program settings from the Registry, and also installing using the MSI, but issue is still present.

And obviously, I'm using a wifi connection.

@karim

This comment has been minimized.

Copy link
Member

karim commented Feb 9, 2019

@vlakoff Thanks for clarifications.

As you can see in the released zip, yes there is a bearer\qgenericbearer.dll file.

My initial thought, as well as Justin's I think, is that the .zip file was damaged somehow so it wasn't extracting the file or it is missing. Clearly this isn't the case here because the MSI is showing the same error also.

I also tried clearing the program settings from the Registry, and also installing using the MSI, but issue is still present.

Turning off the automatic update check at startup should make the error go away for now.

And obviously, I'm using a wifi connection.

While we are trying to narrow it down, can you try connecting to a wired network and see if the error is gone.

@justinclift Would it be possible to make a one-time 64-bit build without this commit 7394640?

I suspect that this workaround, while it fixed the high ping issue, it disabled networking polling (check & reconnect) on wifi. I could be wrong, but I'm out of ideas here. 😃

@vlakoff

This comment has been minimized.

Copy link

vlakoff commented Feb 9, 2019

I'm lazy to move my whole desktop computer and the internet router because all I have is a very short ethernet cable ^^ However, I tried using the internet connection of my phone (USB tethering), disabling the wifi adapter, and the issue doesn't happen.

Interestingly enough, I don't have the issue on another computer, which is connected using wifi.

I guess the commited fix/workaround just doesn't cover 100% of cases. I'm hoping for the proper upstream fix to land, on the Qt side.

@vlakoff

This comment has been minimized.

Copy link

vlakoff commented Feb 9, 2019

How about this suggestion I read from the Qt ticket?

Just check whether you have a connection with the server without checking the network state of the device itself. Checking the state of the connection with the server is a much better indication of whether your app is online or not.

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Feb 9, 2019

Would it be possible to make a one-time 64-bit build without this commit 7394640?

Yeah, that's do-able. Still need it done? And if so, 32-bit or 64-bit? 😄

@karim

This comment has been minimized.

Copy link
Member

karim commented Feb 9, 2019

Still need it done?

Yes, please. Like it was mentioned by @vlakoff the workaround seems to be inconsistent and doesn't cover all the cases. Sometimes it works, sometimes not. I guess it is caused by different wifi configurations.

If that fixed the connection issue then I think our fix should be in the wiki and not in the code.

This answer https://apple.stackexchange.com/a/312388 points out that we can actually set it as an environment variable to fix the Qt problem for all Qt applications. Or if you want it for a specific application, then something like...

set QT_BEARER_POLL_TIMEOUT=-1
DB4S.exe

And if so, 32-bit or 64-bit? 😄

64-bit since this isn't a problem with Qt 5.7.1 that is being used with the 32-bit version.

@vlakoff

This comment has been minimized.

Copy link

vlakoff commented Feb 9, 2019

It would be interesting to know if other people than me encounter the issue

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Feb 9, 2019

No worries, I'll get this done today. The box which automatically generates our nightly builds, will start generating them in roughly 1/2 an hour. That will keep it busy for roughly 3 hours, after which I'll be able to use it for making one-off builds like this. 😄

@justinclift

This comment has been minimized.

@karim

This comment has been minimized.

Copy link
Member

karim commented Feb 10, 2019

Thanks @justinclift 😃

@vlakoff Would you mind giving it a try now and see if this version is better?

@torpkev

This comment has been minimized.

Copy link

torpkev commented Feb 10, 2019

Hi - I still get the Error: The network is not accessible witht he Win64 build that @justinclift posted (using Windows 10)

Unticking Automatic Updates still works as a workaround.

@Krivvenz

This comment has been minimized.

Copy link

Krivvenz commented Feb 10, 2019

I have just upgraded to 3.11 and can confirm that I am also getting the "The network is not accessible" message on opening. 64 bit version and turning off automatic updates silences the error.

@karim karim reopened this Feb 10, 2019

@karim

This comment has been minimized.

Copy link
Member

karim commented Feb 10, 2019

Thanks @torpkev and @Krivvenz for reporting this. I reopened the issue now.

Just to confirm, You are on Windows 10, using the 64-bit version, and on wifi connection, right?

@Krivvenz

This comment has been minimized.

Copy link

Krivvenz commented Feb 10, 2019

Hi @karim - I can confirm all that information is correct - Windows 10, 64 bit and a WiFi connection.

@MKleusberg

This comment has been minimized.

Copy link
Member

MKleusberg commented Feb 16, 2019

Awesome 😄

Let's make one final test. @justinclift Can you build any of these binaries again but apply this patch on top of the other one?

diff --git a/src/RemoteDatabase.cpp b/src/RemoteDatabase.cpp
index 0b5dc867..7f13f896 100644
--- a/src/RemoteDatabase.cpp
+++ b/src/RemoteDatabase.cpp
@@ -30,6 +30,8 @@ RemoteDatabase::RemoteDatabase() :
     connect(m_configurationManager, &QNetworkConfigurationManager::updateCompleted, [this]() {
         m_manager->setConfiguration(m_configurationManager->defaultConfiguration());
 
+        QMessageBox::warning(nullptr, "test", "Working!");
+
 #ifdef CHECKNEWVERSION
     // Check for a new version if automatic update check aren't disabled in the settings dialog
     if(Settings::getValue("checkversion", "enabled").toBool())

By adding a message box I want to make sure that the updateCompleted signal is emitted at all. If the message box shows up in this build, we definitely know that the fix is working. If it doesn't show up, the code for the automatic update check is never actually called which would mean that the problem is still there, it's only better hidden. Let's hope it works 😉

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Feb 16, 2019

No worries, v10 coming up shortly. 😄

justinclift added a commit that referenced this issue Feb 16, 2019

@chrisjlocke

This comment has been minimized.

Copy link
Contributor

chrisjlocke commented Feb 16, 2019

image

I get two of these pop up. Worth noting there is about a 2 or 3 second delay from double clicking for these boxes to appear though - thats slightly unusual - DB4S normally starts instantly.

This is using Wi-Fi, by the way.

@vlakoff

This comment has been minimized.

Copy link

vlakoff commented Feb 16, 2019

Same here, I'm getting two popups. You'll probably want to fix this :)

About the application startup time, I can't say. Personally I don't feel it changed.
As a reminder, the added code is asynchronous. But maybe it's the debug popup that causes the delay.
Do you also have the delay with v8 or v9?

@chrisjlocke

This comment has been minimized.

Copy link
Contributor

chrisjlocke commented Feb 16, 2019

v8 is about a second. Just seemed longer with this particular build. I'm sure its nothing, and as its just a testing build, I'm not panicking too much just yet.... ;)

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Feb 16, 2019

The v9 build should be the "best" so far. This v10 build was just a confirmation check (the pop up) to see if the added function really does get called.

The pop up does occur, so looks like that function is called and Martins patch is a real fix. 😄

@vlakoff

This comment has been minimized.

Copy link

vlakoff commented Feb 16, 2019

Now you want to avoid checking for update twice at program startup ;)

And maybe it uncovered another problem: I don't think this RemoteDatabase constructor should be executed several times. I guess it's a bit costly performance-wise, with the SSL initializations and so on.

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Feb 17, 2019

Interesting point. From a "lets get it perfect" perspective, you could be on to something. 😄

From a "lets get 3.11.1 out the door" perspective, I'm thinking this is good enough currently, or pretty close to it. We can perfect it at leisure, later. 😉

@MKleusberg Looks like this patch (minus pop up) is working. Should we commit it to master + 3.11.1 as is, or do you want to iterate on it a bit more?

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Feb 17, 2019

Hmmm, wonder if that "two pop ups" thing is something along the lines of it popping up once per network interface on the system?

eg for someone with just a single network interface (from the Qt perspective) it's only once. Likewise for people with more, it'd also happen further times.

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Feb 17, 2019

It looks like qgenericbearer.dll (added in this commit 77a701d) is no longer needed with this patch.

@karim I'd rather not risk it at this point. We can experiment with the nightlies, but for the 3.11.1 release let's just leave it in. Unlikely to hit further edge cases - where it does turn out to be needed - that way. 😄

@vlakoff

This comment has been minimized.

Copy link

vlakoff commented Feb 17, 2019

Whether I enable/disable my Ethernet adapter and my VPN virtual adapter, I have 2 popups.

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Feb 17, 2019

Thanks @vlakoff, that helps. 😄

MKleusberg added a commit that referenced this issue Feb 17, 2019

Make early network accesses more reliable when using WLAN
The automatic update check is performed early during the application
start. It turns out that, when using a Wifi connection, the Qt
networking code is not ready yet at this point which leads to an
"Network inaccessible" error. This commit delays the automatic update
check until the network configuration is loaded completely.

See issue #1595.

MKleusberg added a commit that referenced this issue Feb 17, 2019

Make early network accesses more reliable when using WLAN
The automatic update check is performed early during the application
start. It turns out that, when using a Wifi connection, the Qt
networking code is not ready yet at this point which leads to an
"Network inaccessible" error. This commit delays the automatic update
check until the network configuration is loaded completely.

See issue #1595.
@MKleusberg

This comment has been minimized.

Copy link
Member

MKleusberg commented Feb 17, 2019

I have just committed a slightly modified version of the patch (without the popup of course) to both the master and the v3.11.x branch. Thank you everybody for your patience here 😄 And special thanks to @vlakoff who posted the pseudo code which in fact turned out to fix the problem here 👍

And maybe it uncovered another problem: I don't think this RemoteDatabase constructor should be executed several times. I guess it's a bit costly performance-wise, with the SSL initializations and so on.

The constructor is only called once. I have just checked that again 😄 The problem was the extra QNetworkConfigurationManager::updateConfigurations() call. Apprently this function is also called in the constructor of QNetworkConfigurationManager, so no manual extra call is needed.

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Feb 17, 2019

Thanks @MKleusberg! 😀

New v11 build coming up shortly (using the v3.11.x branch).

@justinclift justinclift changed the title Network inaccessible Network inaccessible error when using a WiFi network Feb 17, 2019

@vlakoff

This comment has been minimized.

Copy link

vlakoff commented Feb 17, 2019

v11 working, as expected :)

@MKleusberg Understood, the key wasn't exactly to call updateConfigurations() (was already called actually) but to listen to the updateCompleted signal. Good finding!

Could it be possible to put back the update check code into MainWindow::init rather than digging it inside the RemoteDatabase constructor?

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Feb 17, 2019

v11 working, as expected :)

Fantastic!

Could it be possible to put back the update check code into MainWindow::init rather than digging it inside the RemoteDatabase constructor?

Can make a v12 without stress. It's a well oiled process now. 😉

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Feb 18, 2019

Meh, I'm calling this "done". It's good enough for our purposes for 3.11.1, which I'll start building the release binaries of in the next few hours.

Moving the call around is fine (if that's the right direction to go), but lets do that in the master branch only. 😄

MKleusberg added a commit that referenced this issue Feb 18, 2019

@MKleusberg

This comment has been minimized.

Copy link
Member

MKleusberg commented Feb 18, 2019

Make sense, @raananb @vlakoff - just in case we do need two instances of the RemoteDatabase class at some point in the future. I have just added a commit which moved the check back into the main window 😄

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Feb 18, 2019

@MKleusberg Should that be "vlakoff"?

@MKleusberg

This comment has been minimized.

Copy link
Member

MKleusberg commented Feb 18, 2019

@justinclift You're right - sorry about that 😄 Stupid Github auto completion...

deepsidhu1313 added a commit to deepsidhu1313/sqlitebrowser that referenced this issue Feb 20, 2019

Changes from upstream (#8)
* Replace link style from pragma labels to an embedded icon with link

Even after having removed the hard-coded style from the link texts, this
combination of hyperlink over regular window background is not giving good
results in some dark theme colours. It is uncommon to have this combination
in GUI applications.

The link in the label has been replaced by a link in an embedded icon.

In order to be still recognisable as a link (apart from the hand icon) the
link hover signal is connected to a slot showing the link in the status bar
for 5 seconds.

See issue sqlitebrowser#1493

* Align Mac shortcut in Scintilla to standard and Qt for Alt+Backspace

In Mac the standard shortcut for deleting word to the left is Alt+Backspace
so we set this key sequence in Scintilla editors as alternate for Mac.

Reference:

http://doc.qt.io/qt-5/qkeysequence.html
Section Standard Shortcuts:
DeleteStartOfWord	is Alt+Backspace in macOS column.

See issue sqlitebrowser#815

* Cmd+Backspace should delete from cursor to the beginning of line on macOS

See issue sqlitebrowser#815

* Merge updated Spanish translation for v3.11.x

- New SQLcipher dialog strings
- Extensions filter
- Remove translation for Alt+Del, since it has to match the official Qt
translation and it changes between versions. When the shortcut isn't
changed, it is better to not translate the shortcut at all.

# Conflicts:
#	src/translations/sqlb_es_ES.ts

* Merge updated Spanish translation for v3.11.x (Fix possible resource leaks)

This is an update of the translation file followed by a manual merge of
0ab9f44

See issue sqlitebrowser#1691

* Merge e completamento traduzione italiana (sqlitebrowser#1705)

* Nuke the AppImage stuff until we have time to investigate the failures

* Add source code locations to Portuguese translation file

Otherwise linguist doesn't show the widgets or source code references.

See PR sqlitebrowser#1707

* "Save Project" to remember filename and new "Save Project As" action

"Save Project" remembers used filename, at second and successive calls
the user is not asked for the filename. Ellipsis are removed, since it
only opens a dialog the first time.

A Wait Cursor is set while saving so the user does not get the impression
that pressing "Save Project" does nothing.

"Save Project As" action is added, so the user can still save to another
filename when saved for the first time. Added icon combining package.png
and textfield_rename.png from the Silk icon set.

The base filename for a new project does not include the DB suffix.

Problems saving the project file are detected and the user warned.

See issue sqlitebrowser#1706

* Added icon for foreign-key fields

Fields having a foreign-key constraint are shown with a distinctive icon.

New icon based on page_green.png and bullet_key.png from the Silk icon set.

See comment in issue sqlitebrowser#192

* New Czech translations (sqlitebrowser#1710)

* dbhub: Attempt to fix the OK button in the Push dialog

The OK button in the Remote Push dialog sometimes needed to be clicked
twice in order to work. That's because whenever the Database Name field
loses focus, we would send out a request for the updated branch list.
While processing this request the OK button is effectively disabled by
Qt. This commit aims for an easy fix by changing the request to happen
whenever the text in the Name field changes. This way the timing is a
lot less sensitive. We will need to see however if this introduces other
timing issues for users with slow Internet connections.

* Add a comment

* Fix executing selection only in Execute SQL tab

When executing only a part of a query by selecting the start of it in
the Execute SQL tab, SQLite would execute it until the next semicolon,
even when the selection does not go as far. This commit changes this
back to the old behaviour to only ever execute exactly the selected part
of a query.

See issue sqlitebrowser#1708.

* Ask user about saving any modified data in SQL tabs

User is asked once for saving modified SQL tabs not attached to a file to
the current project file (or to a new project file, when there isn't any
yet).

For each tab linked to a file, the user is asked to save the changes to the
file.

The asking is performed when the tab is closed, or when the application
is closing.

The modified attribute of the editor is set to false when the data is
saved or has just been loaded in the editor.

See issues sqlitebrowser#1386 and sqlitebrowser#1706

* New action "Save All"

New action "Save All" for saving all the files currently opened by the
application: DB file, SQL files and project file. Can be activated through
shortcut (Ctrl+Shift+S) and File menu.

Icon composed from package.png and database_save.png.

See issues sqlitebrowser#871 and sqlitebrowser#1706

* Fix shortcut items in the MSI installer

See issue sqlitebrowser#1713.

* refactor: find correct QScintilla package

* Building with CMake on macOS (sqlitebrowser#1644)

* Fix override warning in selectAll

This change fixes a cmpile warning on Mac OS: (10.12.6) + Clang

warning: 'selectAll' overrides a member function but is not marked
'override'

Fixes sqlitebrowser#1718

* Rectify the sort indicator after multiple column selection

When more than one column is selected we abort the sorting, but Qt has
already assigned the sort indicator to the last selected column, so we
have to restore the saved settings to fix the sort indicator column.

See issue sqlitebrowser#1717

* Double click a column for selecting it

Since the mouse release triggers the sorting, we were unable to select
only one column. Connecting the double click over the header to a column
selection, we are able to select that column. However, we cannot select
one column without sorting by it, since the sorting is triggered before,
on the first mouse click.

See issue sqlitebrowser#1717

* CMake installation on macOS should also copy the icon & desktop files

Should address sqlitebrowser#1723

* Homebrew seems to have removed all support for formula options

* Use our new, slightly customised, SQLite3 Homebrew tap

* Enable/disable "Save All" button

The  "Save All" button is now disabled and enabled with the same criteria
than the save project buttons.

See issues sqlitebrowser#871 and sqlitebrowser#1706

* Fix ambiguous shortcut for Ctrl+/

The shortcut was ambiguous because it was active in the button and in the
SQL editor itself. In the button was only documentation and was made
ambiguous when enabling the feature and fixing the shortcut in
6425fb1

Now its scope is reduced to widget like similar button shortcuts so it can
be unambiguous in the editor.

See issue sqlitebrowser#1614

* Use Qt 5.12.1 for our Win64 nightly builds

* qtquick1_*.qm doesn't seem to be included with Qt 5.12.1

* Switch Win64 nightly builds back to Qt 5.11.3

This is due to a weird word wrap bug in Qt 5.12.1

* Update DB4S version numbers in our issue templates

* Added 3.11.0 to the README.md Releases section

* Update BUILDING.md

Grammar tweak.

* Updated currentrelease file for 3.11.0

* Improve the size policy (toolbars and improved icons) (sqlitebrowser#1684)

* Improve the size policy (and more and better icons)

These changes improve the size policy for translations having long texts
in some buttons by:

* Converting the text buttons in the Edit Database Cell to icons
* Making the "Type of data" label wrappable and expandable
* Converting the text buttons in the Browse Data tab to icons
* Allowing the Plot combo-boxes to shrunk

All this allows both the Browse Data and the docks to grow and shrink with
more freedom.

New icons for buttons are reused when appropriate in context menus.

Added icon for filter and improve icon for docks (has been mirrored so it
matches the actual dock position).

Added Print icon in Edit Database Cell using the extra free space, so the
print action there is more visible.

This continues the effort started in sqlitebrowser#1324.

* Convert the embedded buttons to actual toolbars

This provides more flexibility, like the way how toolbars are compacted
when they have not enough space.

The QToolButtons in Browse Data tab and in Edit Cell dialog are converted
to QActions and inserted in new toolbars embedded in the same place as
the old buttons. Everything else should stay the same (shortcuts, tool-tips
and what's-this information).

* Set style for all toolbars in Preferences and minor adjustments

The combo-box used for the main toolbar is replicated for all the toolbars
in application. In this way, users with high resolutions can use the styles
with both icons and text, while users with lower resolutions can leave the
default styles, which should be better for them.

Some icon texts has been abbreviated from their default values, so they fit
better in the toolbars when they are visible.

The print icon in Edit Cell has been moved to the right, where it would be
the first to be collapsed.

The original what's-this info for Set as NULL in Edit Cell toolbar has been
restored.

* Remove no longer used overloaded function

The addShortcutsTooltip function applying to QWidget was no longer used
after having converted all the buttons to actions, so it is removed.

* grammar: Disable window function parsing

Remove the window function grammar rules. I think they are not needed
anyway as long as we only parse CREATE TABLE and CREATE INDEX
statements and unexpectedly they do seem to cause problems. It it still
worth investigating how this is possible but for now removing them seems
like the best option.

See issue sqlitebrowser#1733.

* tests: Add test case for ee70a34

Add a test case for the bug which motivated disabling the window
function rules in ee70a34.

See issue sqlitebrowser#1733.

* Make Add Record button work again with a single click

In 5f4d0ee the Add Record button in the
Browse Table tab was inadvertently changed to only open a popup menu
after a long click but not triggering the Add Record action after a
normal click. This restores the old behaviour.

* Fix text detection check

Truncating the text in bytes boundaries for the quick test was breaking
the text detection for Russian and probably any script encoded in more than
one byte. The problem occurred probably when a multibyte character was
truncated at the 512 boundary. This is a bit improbable in latin-based
languages like German or Spanish, whose most characters are a byte, but
very easy in other scripts, like Cyrillic, whose characters are encoded in
more than one.

The new approach is based in QTextCodec finding invalid characters using
the current encoding, which seems immune to the truncation problem.
According to callgrind, it has also better performance, probably because it
does not involve memory comparison.

See issue sqlitebrowser#1731

* Detect XML data starting with a declaration

Checking for "<?xml" at the beginning of a text is a quick and simple test
that will detect most of the XML cases.

This fills an obvious gap in sqlitebrowser#1537.

* Fix static analyzer issues (sqlitebrowser#1727)

* Fix `barsGroup` memory leak

* Remove unused values

* Revert currentrelease to 3.10.1

Our encryption of new databases with SQLCipher 4.0.1 is broken :(,
so we'll need to fix it and do a 3.11.1 release.

* Class 'NullLineEdit' lacks Q_OBJECT macro

Qt Creator and lupdate are giving warnings about this class lacking the
Q_OBJECT macro. Although it seems to not be needed, adding it will silence
the warnings without drawbacks.

See issue sqlitebrowser#1740.

* sqlcipher: Fix editing the encryption for SQLCipher4

With SQLCipher4 the encryption was not working as expected because the
KDF and HMAC algorithms were not set properly. This is fixed in this
commit so it should work now with SQLCipher4 as well as SQLCipher3.

See issues sqlitebrowser#1690 and sqlitebrowser#1732.

* Add warnings to cmake compilation (sqlitebrowser#1721)

* Add warnings to cmake compilation

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

See comments in sqlitebrowser#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.

* Speed up the SQL import a bit

This commit attempts to speed up the SQL import a bit by removing
unnecessary conversions and counting of characters. It's still far from
perfect though.

See issue sqlitebrowser#1045.

* Allow downgrading from nightly versions to stable releases

  sqlitebrowser#1743 (comment)

* DowngradeErrorMessage needed removing too

* AllowSameVersionUpgrades also needed removing

* Fix build on some platforms

Fix build issues caused by 13a8a1f.

* Further performance improvements in the SQL import

This eliminates some unneeded conversions in the SQL import code which
should speed up the import and reduce its memory consumption.

See issue sqlitebrowser#1045.

* Add more of our macOS packaging files

* Don't ask for saving changes when importing a SQL file

When importing a SQL file into a new database, we would create a
database file, import everything, then close the database and open it in
the GUI. While closing, however, the application asks you whether you
want to save the changes you made which can be confusing. This is solved
by creating an empty database, then closing it immediately without any
changes just to then open it in the GUI. Only then the import takes
place.

See comment in issue sqlitebrowser#1045.

* Fix alterTable() function

Fix a few issues in the alterTable() code. One type of issue would
happen if there are any keys or constraints in the table. Because the
check whether more changes are needed did not work as expected, we would
try to edit the table again, even though it is already correct. The
second type of issue (which can be triggered independently but which can
also be a follow-up issue to the first one) tries to access the table by
its old name even though it might already have been renamed.

See issue sqlitebrowser#1725.

* Allow custom display formats (sqlitebrowser#1720)

Allow user to define their own display formats. The SQL code is editable
and the combo box changes automatically to custom if the user edits one
of the predefined formats.

The display format (either custom or predefined) is validated with a 
case-insensitive regex so at least it contains a function applied to the column
name. 

Added a new callback for executeSQL following the model of sqlite3_exec.
Using this, the number of columns is got from a checking query execution. If
it is not one, the custom display format is also rejected.

Note that these validations might still be fooled in some unforeseen way, but
the users should know what they're doing.

See issue sqlitebrowser#573

* Add SQLITE_ENABLE_STAT4 to the nightly Windows builds

For the windows component of sqlitebrowser#1161.

* Make early network accesses more reliable when using WLAN

The automatic update check is performed early during the application
start. It turns out that, when using a Wifi connection, the Qt
networking code is not ready yet at this point which leads to an
"Network inaccessible" error. This commit delays the automatic update
check until the network configuration is loaded completely.

See issue sqlitebrowser#1595.

* Add 3.11.1 to README.md and to the issue templates

* Move the automatic update check back into the main window class

See issue sqlitebrowser#1595.

* Update currentrelease file for 3.11.1

* Simplify code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.