pentix / qjournalctl

A multi-platform, Qt-based frontend for systemd's journalctl command. Accepting local as well as remote (SSH) data sources.
GNU General Public License v3.0
166 stars 17 forks source link

Taking wrong version of qt #20

Closed bagage closed 6 years ago

bagage commented 6 years ago

When compiling with ./autogen.sh && make, it fails to compile because of:

./ui_mainwindow.h: In member function ‘void Ui_MainWindow::setupUi(QMainWindow*)’:
./ui_mainwindow.h:114:20: error: ‘class QTableView’ has no member named ‘setSizeAdjustPolicy’; did you mean ‘setSizePolicy’?
         tableView->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents);
                    ^~~~~~~~~~~~~~~~~~~
                    setSizePolicy
./ui_mainwindow.h:114:61: error: ‘AdjustToContents’ is not a member of ‘QAbstractScrollArea’
         tableView->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents);

However I believe it's because it tries to use qt4 compiler instead of qt5. It should not use qt4 compiler at any moment I guess.

pentix commented 6 years ago

Hey thanks for reaching out!

What distribution/version are you using and what are the outputs of qmake --version and g++ --version?

bagage commented 6 years ago

I'm using debian buster:

$ qmake --version
QMake version 2.01a
Using Qt version 4.8.7 in /usr/lib/x86_64-linux-gnu
$ g++ --version
g++ (Debian 8.2.0-7) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ QT_SELECT=qt5 qmake --version
QMake version 3.1
Using Qt version 5.11.1 in /usr/lib/x86_64-linux-gnu

On Debian it seems you have to set QT_SELECT=qt5 to make qtchooser use the right qmake. If set, everythings goes right :).

pentix commented 6 years ago

Okay thanks! When editing autogen.sh and setting the QT_SELECT environment variable before starting qmake, does the compilation then work for you?

bagage commented 6 years ago

Yes it does :).

pentix commented 6 years ago

Thanks a lot, I just added this to the autogen.sh script :smile:

bagage commented 6 years ago

That was a quick fix, thanks @pentix. BTW qjournalctl already helped me to decrease my boot time from 20sec to 5sec :D. Really cool software I was looking for for ages!

pentix commented 6 years ago

Yeah, all alarms going off here when there's a qjournalctl mail incoming :joy:

Wow, that's cool to hear, thanks a lot! :)