Fixed runtime compilation error for Qt4 - Mailing list pgadmin-hackers

From Neel Patel
Subject Fixed runtime compilation error for Qt4
Date
Msg-id CACCA4P2E50Dp8chC=_P_mcVyDaVSO+LppYEVHZ-Kqiuzeah9kA@mail.gmail.com
Whole thread Raw
Responses Re: Fixed runtime compilation error for Qt4
List pgadmin-hackers
Hi All,

As sandeep from EDB was doing the setup for pgAdmin4 runtimes in CentOS 7 with Qt4 and found that there were some compilation errors.

Please find the attached patch file which will fix the below compilation errors for Qt4.
  • QtWebKitWidgets should only be included in Qt5. There is no such header in Qt4.
  • QUrl class does not have "url()" function in Qt4 so when we compile the code in Qt4 it gives error saying "no such function url()". This is fixed by adding common method ( "host()" ) available in both the version of Qt.
  • In QTcpSocket class, there is no "bind" method available in Qt4 so it gives error during the compilation.
  • "QThread::sleep(1)" is the public method in Qt5 while it is protected in Qt4 so we can not use the same method in Qt4. We have written delay function to replace this method.
  • Removed "cache()" from Qt project file. Cache file is required by qmake to read special setting specified other then project and qmake.conf file, as we have not specified any special configuration other then project file so we have removed this function.
We have tested in both the versions Qt4 and Qt5 and now it is compiling without any errors.

Do review it and let us know in case of any comments/queries.

Thanks,
Neel Patel
Attachment

pgadmin-hackers by date:

Previous
From: Khushboo Vashi
Date:
Subject: Re: pgAdmin4 PATCH: Domain Module
Next
From: Murtuza Zabuawala
Date:
Subject: Re: PATCH: Schema/Catalog Node [pgAdmin4]