LeFroid / Viper-Browser

A lightweight Qt5 web browser using QtWebEngine
GNU General Public License v3.0
217 stars 21 forks source link

[OpenSUSE TW: Qt version 5.13] Error on make #8

Closed DevDorrejo closed 5 years ago

DevDorrejo commented 5 years ago
`[  3%] Building CXX object src/core/CMakeFiles/viper-core.dir/adblock/AdBlockLog.cpp.o
[  3%] Building CXX object src/core/CMakeFiles/viper-core.dir/adblock/AdBlockLogTableModel.cpp.o

/pruebas/Viper-Browser/src/core/adblock/AdBlockLogTableModel.cpp: In member function ‘virtual QVariant adblock::LogTableModel::data(const QModelIndex&, int) const’:

/pruebas/Viper-Browser/src/core/adblock/AdBlockLogTableModel.cpp:71:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
71 |             switch (entry.Action)
|             ^~~~~~
/pruebas/Viper-Browser/src/core/adblock/AdBlockLogTableModel.cpp:82:9: note: here
82 |         case 2:
|         ^~~~
cc1plus: all warnings being treated as errors
make[2]: *** [src/core/CMakeFiles/viper-core.dir/build.make:128: src/core/CMakeFiles/viper-core.dir/adblock/AdBlockLogTableModel.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:195: src/core/CMakeFiles/viper-core.dir/all] Error 2
make: *** [Makefile:130: all] Error 2`
DevDorrejo commented 5 years ago

Un amigo mio en Leap 15.1 QT 5.9 tiene este error.

/home/ponchale/Viper-Browser/src/core/cookies/CookieJar.cpp: In member function ‘void CookieJar::setThirdPartyCookiesEnabled(bool)’:
/home/ponchale/Viper-Browser/src/core/cookies/CookieJar.cpp:87:50: error: unused parameter ‘value’ [-Werror=unused-parameter]
 void CookieJar::setThirdPartyCookiesEnabled(bool value)
                                                  ^~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [src/core/CMakeFiles/viper-core.dir/build.make:543: src/core/CMakeFiles/viper-core.dir/cookies/CookieJar.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:202: src/core/CMakeFiles/viper-core.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
LeFroid commented 5 years ago

Please try building again Should be fixed in commit 2a45c765e9d0fc31c77d0beff93541619d026528

Alternatively, you can use one of the prebuilt releases here: https://github.com/LeFroid/Viper-Browser/releases

--

(Google translate)

Inténtalo de nuevo Debería arreglarse en 2a45c765e9d0fc31c77d0beff93541619d026528

Alternativamente, puede usar uno de los lanzamientos precompilados aquí: https://github.com/LeFroid/Viper-Browser/releases

DevDorrejo commented 5 years ago

New Error: (Tumbleweed)


[  6%] Building CXX object src/core/CMakeFiles/viper-core.dir/app/BrowserApplication.cpp.o
In file included from /home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/core/app/BrowserApplication.cpp:11:
/home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/core/database/DatabaseFactory.h: In instantiation of ‘static std::unique_ptr<DatabaseWorker> DatabaseFactory::createDBWorker(const QString&) [with Derived = BookmarkStore]’:
/home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/core/app/BrowserApplication.cpp:82:147:   required from here
/home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/core/database/DatabaseFactory.h:33:32: error: redundant move in return statement [-Werror=redundant-move]
33 |         return std::move(worker);
|                                ^
/home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/core/database/DatabaseFactory.h:33:32: note: remove ‘std::move’ call
/home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/core/database/DatabaseFactory.h: In instantiation of ‘static std::unique_ptr<DatabaseWorker> DatabaseFactory::createDBWorker(const QString&) [with Derived = HistoryStore]’:
/home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/core/app/BrowserApplication.cpp:117:145:   required from here
/home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/core/database/DatabaseFactory.h:33:32: error: redundant move in return statement [-Werror=redundant-move]
/home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/core/database/DatabaseFactory.h:33:32: note: remove ‘std::move’ call
/home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/core/database/DatabaseFactory.h: In instantiation of ‘static std::unique_ptr<_Tp> DatabaseFactory::createWorker(const ViperServiceLocator&, const QString&) [with Derived = WebPageThumbnailStore; ViperServiceLocator = ServiceLocator<std::__cxx11::basic_string<char>, QObject>]’:
/home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/core/app/BrowserApplication.cpp:121:150:   required from here
/home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/core/database/DatabaseFactory.h:69:32: error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move]
69 |         return std::move(worker);
|                                ^
/home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/core/database/DatabaseFactory.h:69:32: note: remove ‘std::move’ call
/home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/core/database/DatabaseFactory.h: In instantiation of ‘static std::unique_ptr<_Tp> DatabaseFactory::createWorker(const QString&) [with Derived = ExtStorage]’:
/home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/core/app/BrowserApplication.cpp:144:124:   required from here
/home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/core/database/DatabaseFactory.h:51:32: error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move]
51 |         return std::move(worker);
|                                ^
/home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/core/database/DatabaseFactory.h:51:32: note: remove ‘std::move’ call
cc1plus: all warnings being treated as errors
make[2]: *** [src/core/CMakeFiles/viper-core.dir/build.make:193: src/core/CMakeFiles/viper-core.dir/app/BrowserApplication.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:195: src/core/CMakeFiles/viper-core.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
wedc@TW-WEDC:~/Documents/WorkSpace/Others/pr

(Leap 15.1)

Scanning dependencies of target viper-browser
[ 98%] Building CXX object src/app/CMakeFiles/viper-browser.dir/main.cpp.o
[ 99%] Building CXX object src/app/CMakeFiles/viper-browser.dir/qrc_application.cpp.o
[100%] Building CXX object src/app/CMakeFiles/viper-browser.dir/viper-browser_autogen/mocs_compilation.cpp.o
/home/ponchale/Viper-Browser/src/app/main.cpp: In function ‘int main(int, char**)’:
/home/ponchale/Viper-Browser/src/app/main.cpp:241:63: error: ISO C++ forbids converting a string constant to ‘char*’ [-Werror=write-strings]
     char *argv2[] = { argv[0], "--remote-debugging-port=9477" };
                                                               ^
cc1plus: all warnings being treated as errors
make[2]: *** [src/app/CMakeFiles/viper-browser.dir/build.make:501: src/app/CMakeFiles/viper-browser.dir/main.cpp.o] Error 1
make[2]: *** Se espera a que terminen otras tareas....
make[1]: *** [CMakeFiles/Makefile2:113: src/app/CMakeFiles/viper-browser.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
LeFroid commented 5 years ago

Hopefully your builds will be working now with commit 9b5475e . If not, we can remove the -Wall compiler flag, it is nice to have but unnecessary

DevDorrejo commented 5 years ago

next XD:

[ 64%] Building CXX object src/ui/CMakeFiles/viper-ui.dir/adblock/AdBlockButton.cpp.o /home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/ui/adblock/AdBlockButton.cpp: In member function ‘void AdBlockButton::updateCount()’: /home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/ui/adblock/AdBlockButton.cpp:85:76: error: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Werror=deprecated-declarations] 85 | const int containerWidth = std::min(metrics.width(numAdsBlocked) * 3, adBlockPixmap.width()) - startX; | ^ In file included from /usr/include/qt5/QtWidgets/qwidget.h:50, from /usr/include/qt5/QtWidgets/qabstractbutton.h:46, from /usr/include/qt5/QtWidgets/qtoolbutton.h:45, from /usr/include/qt5/QtWidgets/QToolButton:1, from /home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/ui/adblock/AdBlockButton.h:6, from /home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/ui/adblock/AdBlockButton.cpp:1: /usr/include/qt5/QtGui/qfontmetrics.h:108:9: note: declared here 108 | int width(const QString &, int len = -1) const; | ^~~~~ cc1plus: all warnings being treated as errors make[2]: [src/ui/CMakeFiles/viper-ui.dir/build.make:212: src/ui/CMakeFiles/viper-ui.dir/adblock/AdBlockButton.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:269: src/ui/CMakeFiles/viper-ui.dir/all] Error 2 make: *** [Makefile:130: all] Error 2

LeFroid commented 5 years ago

Haha wow, seems like the best thing to do is stop treating all warnings as compiler errors. In this case I have also fixed the deprecated API call, please try building again and let me know how it goes.

DevDorrejo commented 5 years ago

(Tumbleweed) Warnings:

[ 76%] Building CXX object src/ui/CMakeFiles/viper-ui.dir/network/CertificateViewer.cpp.o
/home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/ui/network/CertificateViewer.cpp: In member function ‘void CertificateViewer::onCertFieldSelected()’:
/home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/ui/network/CertificateViewer.cpp:168:20: warning: enumeration value ‘Dh’ not handled in switch [-Wswitch]
168 |             switch (cert.publicKey().algorithm())
|                    ^
[ 91%] Building CXX object src/ui/CMakeFiles/viper-ui.dir/widgets/CodeEditor.cpp.o
/home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/ui/widgets/CodeEditor.cpp: In member function ‘int CodeEditor::getLineNumberAreaWidth() const’:
/home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/ui/widgets/CodeEditor.cpp:80:53: warning: ‘int QFontMetrics::width(QChar) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
80 |     return (3 + fontMetrics().width(QLatin1Char('9')) * digits);
|                                                     ^
In file included from /usr/include/qt5/QtWidgets/qwidget.h:50,
from /usr/include/qt5/QtWidgets/qframe.h:44,
from /usr/include/qt5/QtWidgets/qabstractscrollarea.h:44,
from /usr/include/qt5/QtWidgets/qtextedit.h:44,
from /usr/include/qt5/QtWidgets/qplaintextedit.h:44,
from /usr/include/qt5/QtWidgets/QPlainTextEdit:1,
from /home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/ui/widgets/CodeEditor.h:54,
from /home/wedc/Documents/WorkSpace/Others/pruebas/Viper-Browser/src/ui/widgets/CodeEditor.cpp:51:
/usr/include/qt5/QtGui/qfontmetrics.h:112:9: note: declared here
112 |     int width(QChar) const;
|         ^~~~~
[ 91%] Building CXX object src/ui/CMakeFiles/viper-ui.dir/widgets/FileChooserLineEdit.cpp.o

Finally compile and working, thank you for the hard work:

image

i am waiting my friend with leap 15.1 to update files and try compile.

LeFroid commented 5 years ago

Great! Happy to help. I will keep this open until the results from leap 15.1 are posted. Make sure to review the browser Preferences and Ad Block Subscriptions at least once, as you may find that the default configuration is bare bones!

DevDorrejo commented 5 years ago

ok

DevDorrejo commented 5 years ago

(Leap 15.1) Died Screenshot_20190903_012737

DevDorrejo commented 5 years ago

Hello @LeFroid now is working on leap and tumbleweed, thank you for the support

image

LeFroid commented 5 years ago

Great! I'm glad to hear it's working