realthunder / FreeCAD

Link branch FreeCAD
Other
782 stars 45 forks source link

Building LinkMargeTemp #840

Open wsteffe opened 1 year ago

wsteffe commented 1 year ago

Error:

/home/walter/Software/FreeCad/FreeCAD2/src/Gui/Action.cpp:808:69: error: cannot convert ‘QRect’ to ‘int’ in initialization 808 int maxHeight = getMainWindow()->screen()->availableGeometry(); ~~~~~~~~~~~~^~
QRect

I am on ubuntu 22.04 with Qt 5.15.3

I know that LinkMargeTemp build is failing also in the automatic build test. But, RT, since you are checking and committing to this branch I may imagine that you have a way to build it.

wsteffe commented 1 year ago

Another error:

/home/walter/Software/FreeCad/FreeCAD2/src/Gui/CallTips.cpp:588:38: error: invalid use of incomplete type ‘class QScreen’ 588 | QRect screen = textEdit->screen()->availableGeometry(); | ^~ In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qapplication.h:48: /usr/include/x86_64-linux-gnu/qt5/QtGui/qcursor.h:51:7: note: forward declaration of ‘class QScreen’ 51 | class QScreen; | ^~~

wsteffe commented 1 year ago

There is also another thing (only a warning) but it would be esay to fix:

/home/walter/Software/FreeCad/FreeCAD2/src/Gui/CallTips.cpp:557:54: warning: ‘QVariant qVariantFromValue(const T&) [with T = Gui::CallTip]’ is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] 557 | item->setData(Qt::UserRole, qVariantFromValue( it.value() )); //< store full CallTip data | ~~~^~~~

wsteffe commented 1 year ago

I fixed both with following changes in CallTips.cpp: 1) added:

# include \<QScreen>

2) replaced:

item->setData(Qt::UserRole, qVariantFromValue( it.value() )); //< store full CallTip data

with:

item->setData(Qt::UserRole, QVariant::fromValue( it.value() ));

wsteffe commented 1 year ago

same problem (need of # include \<QScreen>) also in PropertyEditor.cpp:

<Q/home/walter/Software/FreeCad/FreeCAD2/src/Gui/propertyeditor/PropertyEditor.cpp:711:32: error: invalid use of incomplete type ‘class QScreen’ 711 | QRect rect = this->screen()->availableGeometry(); | ^~

wsteffe commented 1 year ago

And again in PrefWidgets.cpp:

/home/walter/Software/FreeCad/FreeCAD2/src/Gui/PrefWidgets.cpp:599:38: error: invalid use of incomplete type ‘class QScreen’ 599 | QRect rect = parent->screen()->availableGeometry(); | ^~ In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qapplication.h:48, from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QApplication:1, from /home/walter/Software/FreeCad/FreeCAD2/src/Gui/PrefWidgets.cpp:25: /usr/include/x86_64-linux-gnu/qt5/QtGui/qcursor.h:51:7: note: forward declaration of ‘class QScreen’ 51 | class QScreen;

wsteffe commented 1 year ago

Another error:

[ 63%] Building CXX object src/Mod/Sketcher/Gui/CMakeFiles/SketcherGui.dir/ViewProviderSketch.cpp.o /home/walter/Software/FreeCad/FreeCAD2/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp: In member function ‘void SketcherGui::ViewProviderSketch::initParams()’: /home/walter/Software/FreeCad/FreeCAD2/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp:4498:19: error: ‘getMainWindow’ was not declared in this scope; did you mean ‘Gui::getMainWindow’? 4498 | dpi = getMainWindow()->screen()->logicalDotsPerInchX(); | ^~~~~ | Gui::getMainWindow In file included from /home/walter/Software/FreeCad/FreeCAD2/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp:110: /home/walter/Software/FreeCad/FreeCAD2/src/Gui/MainWindow.h:363:20: note: ‘Gui::getMainWindow’ declared here 363 | inline MainWindow* getMainWindow() | ^~~~~

wsteffe commented 1 year ago

I do not know if it is correct but, to go ahead, I replaced:

dpi = getMainWindow()->screen()->logicalDotsPerInchX();

with:

dpi = Gui::getMainWindow()->screen()->logicalDotsPerInchX();

at:

src/Mod/Sketcher/Gui/ViewProviderSketch.cpp:4498

wsteffe commented 1 year ago

With last change the build was completed but following error occurred when I excecuted it:

User path has changed to /home/walter/.local/share/FreeCAD/. Please move user modules and macros During initialization the error "module 'FreeCAD' has no attribute 'EndingAdd'" occurred in /usr/local/Mod/Image/InitGui.py Please look into the log file for further information