keshavbhatt / whatsie

Feature rich WhatsApp Client for Desktop Linux
MIT License
1.98k stars 59 forks source link

Errors during make #129

Closed hhsnake closed 1 year ago

hhsnake commented 1 year ago

Hello. Please tell me during the make I get such errors, what can I do?

downloadmanagerwidget.cpp:29:44: error: ‘class QWebEngineDownloadItem’ has no member named ‘downloadFileName’ 29 | path + QDir::separator() + download->downloadFileName(); | ^~~~ downloadmanagerwidget.cpp:44:48: error: ‘class QWebEngineDownloadItem’ has no member named ‘downloadFileName’ 44 | download->downloadFileName(); | ^~~~ downloadmanagerwidget.cpp:45:17: error: ‘class QWebEngineDownloadItem’ has no member named ‘setDownloadFileName’ 45 | download->setDownloadFileName(n_proposed_file_name); | ^~~~~~~ downloadmanagerwidget.cpp:55:15: error: ‘class QWebEngineDownloadItem’ has no member named ‘setDownloadFileName’ 55 | download->setDownloadFileName(proposed_file_name); | ^~~~~~~ g++ -c -pipe -O2 -std=gnu++1z -Wall -W -D_REENTRANT -fPIC -DQAPPLICATION_CLASS=QApplication -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG_OUTPUT -DGIT_HASH=\"906ca7e\" -DGIT_BRANCH=\"main\" -DBUILD_TIMESTAMP=\"2023-08-02T15:59:17UTC\" -DVERSIONSTR=\"4.14\" -DQT_NO_DEBUG -DQT_WEBENGINE_LIB -DQT_WEBENGINEWIDGETS_LIB -DQT_WEBENGINECORE_LIB -DQT_QUICK_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBCHANNEL_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_POSITIONING_LIB -DQT_CORE_LIB -I. -Isingleapplication -Iwidgets/MoreApps -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebEngine -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebEngineWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebEngineCore -isystem /usr/include/x86_64-linux-gnu/qt5/QtQuick -isystem /usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebChannel -isystem /usr/include/x86_64-linux-gnu/qt5/QtQml -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtPositioning -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o main.o main.cpp make: [Makefile:1326: downloadmanagerwidget.o] Ошибка 1 make: Ожидание завершения заданий… downloadwidget.cpp: In constructor ‘DownloadWidget::DownloadWidget(QWebEngineDownloadItem, QWidget)’: downloadwidget.cpp:17:39: error: ‘class QWebEngineDownloadItem’ has no member named ‘downloadFileName’ 17 | auto downloadFileName = m_download->downloadFileName(); | ^~~~ downloadwidget.cpp: In lambda function: downloadwidget.cpp:29:50: error: ‘class QWebEngineDownloadItem’ has no member named ‘downloadFileName’ 29 | QDesktopServices::openUrl(QUrl(m_download->downloadFileName())); | ^~~~ make: *** [Makefile:1331: downloadwidget.o] Ошибка 1 In file included from mainwindow.h:30, from main.cpp:10: notificationpopup.h:19:10: fatal error: QWebEngineNotification: Нет такого файла или каталога 19 | #include | ^~~~~~~~ compilation terminated.

keshavbhatt commented 1 year ago

Which version of Qt you are using for compiling the project?

hhsnake commented 1 year ago

I installed qt libraries from ubuntu 20.04.1 repo. There is version 5.12.8-0ubuntu1

keshavbhatt commented 1 year ago

Oh, actually this method was added to QWebEngineDownloadItem class in Qt 5.14

https://doc.qt.io/qt-5/qwebenginedownloaditem.html#downloadFileName

We need to check of alternative is available in 5.12 and refactoring the code to support both version if we want.

hhsnake commented 1 year ago

Thank you for your reply. I'll try to compile qt 5.15 from source

hhsnake commented 1 year ago

Thanks again. I managed to compile qt 5.15.2, though with some features for whatsie, after which I built the whatsie project

hhsnake commented 1 year ago

.