Subject: [pgAdmin4][runtime]: RM #2328 - Unable to launch query tool and debugger in new browser tab

From: Neel Patel <[email-masked]>
Date: Fri, 5 May 2017 16:23:41 +0530

Hi,

Please find attached patch file with the fix of RM #2328 - [Runtime]:
Unable to launch query tool and debugger in new browser tab.

I have used Qt 5.8 with webkit mentioned in below URL.

https://github.com/annulen/webkit/releases

As there was a bug in QWebKit regarding "unload" event. We have raised and
also they have provided patch file to fix this issue. I have applied the
patch in linux and compile the webkit and tested the attached patch with
compiled webkit which is now working fine.

Below is the link for reference regarding unload issue. They have provided
test webkit release for Mac in below URL but for other platform we need to
apply the patch and compile the webkit until they provide webkit-releases
for all platforms.

https://github.com/annulen/webkit/issues/519

Do review it and let me know in case of any issue.

Thanks,
Neel Patel

-- 
Sent via pgadmin-hackers mailing list ([email-masked])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

---

From: Dave Page <[email-masked]>
Date: Mon, 8 May 2017 10:51:13 +0100

Akshay, could you review this please?

Thanks.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

---

From: Akshay Joshi <[email-masked]>
Date: Tue, 9 May 2017 13:09:35 +0530

Thanks patch applied.

On Mon, May 8, 2017 at 3:21 PM, Dave Page <[email-masked]> wrote:

>> As there was a bug in QWebKit regarding "unload" event. We have raised
>> and also they have provided patch file to fix this issue. I have applied
>> the patch in linux and compile the webkit and tested the attached patch
>> with compiled webkit which is now working fine.
>>
>> Below is the link for reference regarding unload issue. They have
>> provided test webkit release for Mac in below URL but for other platform we
>> need to apply the patch and compile the webkit until they provide
>> webkit-releases for all platforms.
>>

-- 
*Akshay Joshi*
*Principal Software Engineer *

*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*

---

From: Dave Page <[email-masked]>
Date: Tue, 9 May 2017 09:12:28 +0100

This appears to have made Jenkins get all angry and red :-(

https://jenkins.pgadmin.org/

On Tue, May 9, 2017 at 8:39 AM, Akshay Joshi <[email-masked]>
wrote:

> *Phone: +91 20-3058-9517 <+91%2020%203058%209517>Mobile: +91 976-788-8246
> <+91%2097678%2088246>*
>

-- 
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

---

From: Akshay Joshi <[email-masked]>
Date: Tue, 9 May 2017 13:48:21 +0530

Hi

> https://jenkins.pgadmin.org/

   We(Neel and I) have tested it and working fine.

>
>
> On Tue, May 9, 2017 at 8:39 AM, Akshay Joshi <
> [email-masked]> wrote:
>
>> Thanks patch applied.
>>
>>> On Fri, May 5, 2017 at 11:53 AM, Neel Patel <[email-masked]
>>> > wrote:
>>>
>>>> Hi,
>>>>

---

From: Dave Page <[email-masked]>
Date: Tue, 9 May 2017 09:26:43 +0100

>    We(Neel and I) have tested it and working fine.

It clearly doesn't compile on QT4. Please review the Jenkins logs.

>>>> On Fri, May 5, 2017 at 11:53 AM, Neel Patel <
>>>> [email-masked]> wrote:
>>>>
>>>>> Hi,
>>>>>
>>> *Phone: +91 20-3058-9517 <+91%2020%203058%209517>Mobile: +91
>>> 976-788-8246 <+91%2097678%2088246>*
>>>
>>
>>
>>
>> --
>> Dave Page

---

From: Neel Patel <[email-masked]>
Date: Tue, 9 May 2017 13:58:55 +0530

Hi Dave,

Yes, It looks like compilation fails on Qt4. We will fix this issue but
which version of Qt4 we are using in Jenkins ?

Thanks,
Neel Patel

On Tue, May 9, 2017 at 1:56 PM, Dave Page <[email-masked]>
wrote:

>
>
> On Tue, May 9, 2017 at 9:18 AM, Akshay Joshi <
>>>>>> As there was a bug in QWebKit regarding "unload" event. We have
>>>>>> raised and also they have provided patch file to fix this issue. I have
>>>>>> applied the patch in linux and compile the webkit and tested the attached
>>>>>> patch with compiled webkit which is now working fine.
>>>>>>

---

From: Dave Page <[email-masked]>
Date: Tue, 9 May 2017 09:32:45 +0100

It's running CentOS 7.3, with packages from EPEL:

[dpage@jenkins ~]$ rpm -qa |grep qt
qt5-qtbase-common-5.6.1-10.el7.noarch
qt5-qtbase-devel-5.6.1-10.el7.x86_64
qt-4.8.5-13.el7.x86_64
qt5-qtbase-5.6.1-10.el7.x86_64
qt5-qtxmlpatterns-5.6.1-10.el7.x86_64
qt5-qtwebchannel-5.6.1-10.el7.x86_64
qt5-qtwebkit-5.6.1-3.b889f46git.el7.x86_64
qt5-qtdeclarative-devel-5.6.1-10.el7.x86_64
qt-devel-4.8.5-13.el7.x86_64
qt-settings-19-23.5.el7.centos.noarch
qt5-qtbase-gui-5.6.1-10.el7.x86_64
qt5-qtlocation-5.6.1-10.el7.x86_64
qt5-qtwebsockets-5.6.1-10.el7.x86_64
qt5-qtwebkit-devel-5.6.1-3.b889f46git.el7.x86_64
qtwebkit-2.3.4-6.el7.x86_64
qt3-3.3.8b-51.el7.x86_64
qt5-qtdeclarative-5.6.1-10.el7.x86_64
qt5-rpm-macros-5.6.1-10.el7.noarch
qtwebkit-devel-2.3.4-6.el7.x86_64
qt-x11-4.8.5-13.el7.x86_64
qt5-qtsensors-5.6.1-10.el7.x86_64

On Tue, May 9, 2017 at 9:28 AM, Neel Patel <[email-masked]>
wrote:

>>>>>>> Please find attached patch file with the fix of RM #2328 -
>>>>>>> [Runtime]: Unable to launch query tool and debugger in new browser tab.
>>>>>>>

---

From: Neel Patel <[email-masked]>
Date: Tue, 9 May 2017 14:58:02 +0530

Hi Dave,

Here there are 2 compilation issue. We have fixed 'QNetworkCookieJar'
related compilation error in Qt4. BUT

Below compilation error is coming because we have not applied the latest
patch of webkit which was fixed in annulen/webkit repo which was raised at
below path.

BrowserWindow.cpp:842:59: error: ‘RequestClose’ is not a member of
‘QWebPage’

 webviewPtr->page()->triggerAction(QWebPage::RequestClose);

To fix the above compilation error currently we have two solution.

   - Apply the given patch in webkit ( qwebpage.cpp & qwebpage.h file ) .
   - Comment the below line temporary for compilation until we get the
   releases from annulen/webkit.

               webviewPtr->page()->triggerAction(QWebPage::RequestClose);

Other compilation issues, (Me and Akshay) will fix and commit it but need
your input on above issue.

Thanks,
Neel Patel

---

From: Dave Page <[email-masked]>
Date: Tue, 9 May 2017 10:38:43 +0100

Hi

> your input on above issue.

For various reasons we need to retain compatibility with the previous
versions of qtwebkit. Can we detect at build time what version we have, and
enable/disable that code as appropriate?

---

From: Neel Patel <[email-masked]>
Date: Tue, 9 May 2017 15:18:24 +0530

Hi Dave,

> enable/disable that code as appropriate?

Make sense.  We will check if we are getting any webkit version in
application or not and update you.

>>>>>> On Tue, May 9, 2017 at 1:42 PM, Dave Page <[email-masked]
>>>>>> > wrote:
>>>>>>

---

From: Neel Patel <[email-masked]>
Date: Wed, 10 May 2017 12:00:03 +0530

Hi,

Please find attached patch file with the fix of compilation issues with
Qt4.  Tested with both the version of Qt4 and Qt5 webkit and it is working
now.

As triggerAction code will not be applicable for Qt4 so we made conditional
macro for Qt5 version check and for backward compatibility webkit version
with Qt5, as in new webkit new enum is added so we have incremented with
one to previous enum value which will solve the problem with both old and
new webkit.

Do review it and let me know for any issue.

Thanks,
Neel Patel

On Tue, May 9, 2017 at 3:18 PM, Neel Patel <[email-masked]>
wrote:

>>> Other compilation issues, (Me and Akshay) will fix and commit it but
>>> need your input on above issue.
>>>
>>
>>>> On Tue, May 9, 2017 at 9:28 AM, Neel Patel <[email-masked]
>>>> > wrote:
>>>>
>>>>> Hi Dave,
>>>>>
>>>>> Yes, It looks like compilation fails on Qt4. We will fix this issue
>>>>> but which version of Qt4 we are using in Jenkins ?
>>>>>
>>>>> Thanks,
>>>>> Neel Patel
>>>>>
>>>>>>> On Tue, May 9, 2017 at 1:42 PM, Dave Page <
>>>>>>> [email-masked]> wrote:
>>>>>>>
>>>>>>>>>>> Below is the link for reference regarding unload issue. They
>>>>>>>>>>> have provided test webkit release for Mac in below URL but for other
>>>>>>>>>>> platform we need to apply the patch and compile the webkit until they
>>>>>>>>>>> provide webkit-releases for all platforms.
>>>>>>>>>>>

---

From: Dave Page <[email-masked]>
Date: Wed, 10 May 2017 07:55:35 +0100

Hi

What happens on a standard QtWebKit if we try to trigger QWebPage::ToggleVideoFullscreen + 1? Does it error, or get silently ignored?

EnterpriseDB UK:http://www.enterprisedb.com
The Enterprise PostgreSQL Company

> On 10 May 2017, at 07:30, Neel Patel <[email-masked]> wrote:
> 
> Hi,
> 
> Please find attached patch file with the fix of compilation issues with Qt4.  Tested with both the version of Qt4 and Qt5 webkit and it is working now.
> 
> As triggerAction code will not be applicable for Qt4 so we made conditional macro for Qt5 version check and for backward compatibility webkit version with Qt5, as in new webkit new enum is added so we have incremented with one to previous enum value which will solve the problem with both old and new webkit.
> 
>> On Tue, May 9, 2017 at 3:18 PM, Neel Patel <[email-masked]> wrote:
>> Hi Dave,
>> 
>>> On Tue, May 9, 2017 at 3:08 PM, Dave Page <[email-masked]> wrote:
>>> Hi
>>> 
>>>> On Tue, May 9, 2017 at 10:28 AM, Neel Patel <[email-masked]> wrote:
>>>> Hi Dave,
>>>> 
>>>> Here there are 2 compilation issue. We have fixed 'QNetworkCookieJar' related compilation error in Qt4. BUT
>>>> 
>>>> Below compilation error is coming because we have not applied the latest patch of webkit which was fixed in annulen/webkit repo which was raised at below path.
>>>> 
>>>> BrowserWindow.cpp:842:59: error: ‘RequestClose’ is not a member of ‘QWebPage’
>>>> Apply the given patch in webkit ( qwebpage.cpp & qwebpage.h file ) .
>>>> Comment the below line temporary for compilation until we get the releases from annulen/webkit.
>>>> Other compilation issues, (Me and Akshay) will fix and commit it but need your input on above issue.
>>> 
>>> For various reasons we need to retain compatibility with the previous versions of qtwebkit. Can we detect at build time what version we have, and enable/disable that code as appropriate?
>>  
>> Make sense.  We will check if we are getting any webkit version in application or not and update you.
>> 
>>>  
>>>> 
>>>> Thanks,
>>>> Neel Patel
>>>> 
>>>>> On Tue, May 9, 2017 at 2:02 PM, Dave Page <[email-masked]> wrote:
>>>>>> On Tue, May 9, 2017 at 9:28 AM, Neel Patel <[email-masked]> wrote:
>>>>>> Hi Dave,
>>>>>> 
>>>>>> Yes, It looks like compilation fails on Qt4. We will fix this issue but which version of Qt4 we are using in Jenkins ?
>>>>>> 
>>>>>> Thanks,
>>>>>> Neel Patel
>>>>>> 
>>>>>>> On Tue, May 9, 2017 at 1:56 PM, Dave Page <[email-masked]> wrote:
>>>>>>> 
>>>>>>> 
>>>>>>>> On Tue, May 9, 2017 at 9:18 AM, Akshay Joshi <[email-masked]> wrote:
>>>>>>>> Hi
>>>>>>>> 
>>>>>>>>> On Tue, May 9, 2017 at 1:42 PM, Dave Page <[email-masked]> wrote:
>>>>>>>>>> On Tue, May 9, 2017 at 8:39 AM, Akshay Joshi <[email-masked]> wrote:
>>>>>>>>>> Thanks patch applied.
>>>>>>>>>> 
>>>>>>>>>>>> On Fri, May 5, 2017 at 11:53 AM, Neel Patel <[email-masked]> wrote:
>>>>>>>>>>>> Hi,
>>>>>>>>>>>> 
>>>>>>>>>>>> Please find attached patch file with the fix of RM #2328 - [Runtime]: Unable to launch query tool and debugger in new browser tab.
>>>>>>>>>>>> 
>>>>>>>>>>>> As there was a bug in QWebKit regarding "unload" event. We have raised and also they have provided patch file to fix this issue. I have applied the patch in linux and compile the webkit and tested the attached patch with compiled webkit which is now working fine.
>>>>>>>>>>>> 
>>>>>>>>>>>> Below is the link for reference regarding unload issue. They have provided test webkit release for Mac in below URL but for other platform we need to apply the patch and compile the webkit until they provide webkit-releases for all platforms.
>>>>>>>>>>>> 
>>>>>>>>>> Akshay Joshi
>>>>>>>>>> Principal Software Engineer 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> Phone: +91 20-3058-9517
>>>>>>>>>> Mobile: +91 976-788-8246
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> -- 
>>>>>>>>> Dave Page
>>>>>>>> Akshay Joshi
>>>>>>>> Principal Software Engineer 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Phone: +91 20-3058-9517
>>>>>>>> Mobile: +91 976-788-8246
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> -- 
>>>>>>> Dave Page
> <webkit_compile_issue.patch>

---

From: Neel Patel <[email-masked]>
Date: Wed, 10 May 2017 12:31:50 +0530

It does not give any error with standard QtWebkit.

On Wed, May 10, 2017 at 12:25 PM, Dave Page <[email-masked]> wrote:

> Hi
>
> What happens on a standard QtWebKit if we try to trigger QWebPage::ToggleVideoFullscreen
> + 1? Does it error, or get silently ignored?
>
> --
> Dave Page
> As triggerAction code will not be applicable for Qt4 so we made
> conditional macro for Qt5 version check and for backward compatibility
> webkit version with Qt5, as in new webkit new enum is added so we have
> incremented with one to previous enum value which will solve the problem
> with both old and new webkit.
>
>>> On Tue, May 9, 2017 at 10:28 AM, Neel Patel <[email-masked]
>>> > wrote:
>>>
>>>> Hi Dave,
>>>>
>>>> Below compilation error is coming because we have not applied the
>>>> latest patch of webkit which was fixed in annulen/webkit repo which was
>>>> raised at below path.
>>>>
>>>>>> On Tue, May 9, 2017 at 1:56 PM, Dave Page <[email-masked]
>>>>>> > wrote:
>>>>>>
>>>>>>>
>>>>>>>

---

From: Dave Page <[email-masked]>
Date: Wed, 10 May 2017 08:04:32 +0100

Cool :-)

> On 10 May 2017, at 08:01, Neel Patel <[email-masked]> wrote:
>

---

From: Neel Patel <[email-masked]>
Date: Wed, 10 May 2017 12:54:22 +0530

Should I ask Akshay to review and commit ?

On Wed, May 10, 2017 at 12:34 PM, Dave Page <[email-masked]> wrote:

>> What happens on a standard QtWebKit if we try to trigger
>> QWebPage::ToggleVideoFullscreen + 1? Does it error, or get silently
>> ignored?
>>
>> --
>> Dave Page
>>>>>    - Comment the below line temporary for compilation until we get
>>>>>    the releases from annulen/webkit.
>>>>>
>>>>>>>>>>>>> As there was a bug in QWebKit regarding "unload" event. We
>>>>>>>>>>>>> have raised and also they have provided patch file to fix this issue. I
>>>>>>>>>>>>> have applied the patch in linux and compile the webkit and tested the
>>>>>>>>>>>>> attached patch with compiled webkit which is now working fine.
>>>>>>>>>>>>>

---

From: Dave Page <[email-masked]>
Date: Wed, 10 May 2017 08:27:18 +0100

Yes please.

> On 10 May 2017, at 08:24, Neel Patel <[email-masked]> wrote:
>