IJHack / QtPass

QtPass is a multi-platform GUI for pass, the standard unix password manager.
https://qtpass.org/
GNU General Public License v3.0
1.03k stars 162 forks source link

Restore/fix support for Qt4 #665

Open barracuda156 opened 1 year ago

barracuda156 commented 1 year ago

While source code implies a possibility of building with Qt4 https://github.com/IJHack/QtPass/blob/ab5c1e9f72a60f693bc94e959f781f7c7bad6211/qtpass.pri#L13 – it is broken, unfortunately. Apparently broken for quite a while: I have tried building QtPass back to v. 1.2.3, and it kept failing with similar errors.

Could support for Qt4 be restored? (If it was removed in an organized way, I can revert needed commits and make a PR. Presently I have no idea whether it was done in some coherent way or in random commits.)

barracuda156 commented 10 months ago

So there were two pointes which has broken QtPass:

  1. An arbitrary SDK has been forced in 7e735f372becc03112bc6d4b89d93dd00c786f9f which obviously could not end up nicely :)
  2. Nevertheless, with that line removed, everything up to 1.1.6 builds fine. However, 1.2.0 is badly broken. There are tons of commits in between, not yet sure what exactly has broken the build and whether it is a single or multiple issues.
barracuda156 commented 10 months ago

I have found why it was broken. There was a bunch of “improvements” leading to:

:info:build executor.h:78:46: error: 'Q_NULLPTR' was not declared in this scope
:info:build    78 |                       QString *process_out = Q_NULLPTR,
:info:build       |                                              ^~~~~~~~~
:info:build executor.h:79:46: error: 'Q_NULLPTR' was not declared in this scope
:info:build    79 |                       QString *process_err = Q_NULLPTR);
:info:build       |                                              ^~~~~~~~~
:info:build executor.h:82:68: error: 'Q_NULLPTR' was not declared in this scope
:info:build    82 |                       QString *process_out, QString *process_err = Q_NULLPTR);
:info:build       |                                                                    ^~~~~~~~~
. . .
:info:build imitatepass.h:39:43: error: expected ';' at end of member declaration
:info:build    39 |                         const QString &err) Q_DECL_OVERRIDE;
:info:build       |                                           ^
:info:build       |                                            ;
:info:build imitatepass.h:39:45: error: 'Q_DECL_OVERRIDE' does not name a type; did you mean 'Q_OVERRIDE'?
:info:build    39 |                         const QString &err) Q_DECL_OVERRIDE;
:info:build       |                                             ^~~~~~~~~~~~~~~
:info:build       |                                             Q_OVERRIDE
:info:build imitatepass.h:44:53: error: expected ';' at end of member declaration
:info:build    44 |                               bool readStderr = true) Q_DECL_OVERRIDE;
:info:build       |                                                     ^
:info:build       |                                                      ;
:info:build imitatepass.h:44:55: error: 'Q_DECL_OVERRIDE' does not name a type; did you mean 'Q_OVERRIDE'?
:info:build    44 |                               bool readStderr = true) Q_DECL_OVERRIDE;
:info:build       |                                                       ^~~~~~~~~~~~~~~
:info:build       |                                                       Q_OVERRIDE
:info:build imitatepass.h:49:24: error: expected ';' at end of member declaration
:info:build    49 |   virtual void GitInit() Q_DECL_OVERRIDE;
:info:build       |                        ^
:info:build       |                         ;

This is Qt5-only syntax: https://forum.qt.io/topic/66593/error-q_decl_override-does-not-name-a-type https://github.com/CsoundQt/CsoundQt/issues/228

Breaking commits: https://github.com/IJHack/QtPass/commit/5b8e9cd001e5e8586911184c1bfb1b932c59b21a https://github.com/IJHack/QtPass/commit/7cd15e79b588ee9ede0f6af6cfc2da352d6d879d https://github.com/IJHack/QtPass/commit/12c08eaf8ca35cec9248ac1353e1651b84688fa1

Will see if fixing these will fix the build.

barracuda156 commented 10 months ago

UPD. This does not work too: https://github.com/IJHack/QtPass/commit/e0964b9c170754ce92d391ac1ed43da88f3cedbf