We set "setNetworkAccessManager" in WebEnginePage which was only required for Webkit so removed that statement.
"triggerAction" on WebPage is only required for Qt > 5 with WebKit only. Not required for WebEngine so added that condition.
1) Fixed issue of opening Query Tool and Debugger in new Tab with QT 5.8 and annulen webkit
2) Moved unload event of window from javascript files to html.
3) Change alertify messages for debugger.
4) Closed all connections created by debugger. Previously only one connection has been closed.
Desktop runtime has a couple bugs using already freed memory supplied to embedded python leading to occasional crashes and failures to start maintenance processes (VACUUM, ANALYZE, REINDEX, CLUSTER).
This is caused by incorrect usage of QString::toUtf8() which returns newly created QByteArray which is automatically destroyed once closing context; e.g.
Py_SetPythonHome(pythonHome.toUtf8().data());
Windows 2008 R2 (32 bit), while running the pgAdmin 4 as runtime for
the PostgreSQL one click installers.
- Found a typo in runtime code, we were appending the path using ';' on
*nix systems too. We should have used ':', and that did not allow the
os.environ['PATH'] to identify the correct path of the python
interpreter under the 'venv' directory.
- On Windows 2008, it was not honouring the environment variables, set
under the Qt application (e.g. pgAdmin4.exe runtime), in the python
application. (e.g. pgAdmin4.py). We will need to assume that - the
python interpreter resides under the 'venv' directory outside the
'bin' directory.
- Also, on windows 2008, it was setting PYTHONHOME environment variable
to the full path of the pgAdmin4.exe, we need to reset it to 'venv'
directory, if we find the python interpreter under it.
Thanks Murtuza Zabuawala for tips, and help.
- Compilation error with Qt4 as "QUrlQuery" class was introduced since Qt5.
- Client side download code has been removed as now we support server side download.
- We should not delete sender object inside slot. If we do so it may crash the application. To avoid this, we used Qt's "deleteLater" which will delete the objects once the processing of all the events have been done.
PYTHONPATH) to run the runtime with the virtual environment properly.
And, also allow to use the python interpreter to be used with the
background process modules.
- Add binary directory of the virtual environment to PATH environment
variable.
- Add lib, dynamic libraries (python specific), and site-package
directories of the virtual environment in the PYTHONPATH environment
variable.
Added functionality to open different website link and load the
website data to different tab. To achieve this, new customized
QTabWidget and QWebView are added to render the data to WebView
widget. All the widgets (New Tab, WebViewWinodw, and QToolButton)
are added dynamically. QToolButton is used to traverse back and
forward to web document opened in WebViewWindow.
Introduced the New class called WebViewWindow which is derived
from QWebView. Each tab of the QTabWidget contains the instance
of WebViewWindow class. WebViewWindow class is useful to display
the web document.
Introduced New class called TabWindow which is derived from
QTabWidget. This class is useful to achieve following functionality:
- Customize the close button of tabbar so that it can only be
visible other then main pgAdmin 4 window.
- Enable/Disable the toolbutton added left side of tabbar
depending on the web history traversed by the user in WebViewWindow.
- Set the tooltip text of the tabbar depending on the title change
event of WebViewWindow class.
Modified the Qt project file to support the both the version
of python 2 and python 3.
Qt5 is recommended to test pgAdmin4 in dektop mode.
instead. Add support to the runtime to allow the user to specify the
Python path. This needs to be more automated for release, but will be
useful for debugging and development.
If the web server is slow to start, we may need to retry the initial
page load. Implement a retry system that will retry the initial load
4 times, after 1, 2, 3 and 4 seconds, before giving up and leaving
the user with an error message and a link to retry manually.
Upon startup, the runtime will attempt to locate pgAdmin4.py in a
number of different relative locations. Once found, it will execute
it in a new thread. The main window is then created and the brower's
initial page is set to the root of the CherryPy server. At present,
that's http://127.0.0.1:8080.
This runtime implements a brower control with embedded Python
interpretor. The Python interpretor runs a simple script at
startup to generate some HTML that is displayed in the browser.
Arbitrary URLs can be opened from the "Open URL" option on the
File menu.