You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
latte-dock/app/view
Rodrigo Pedra Brum 2b039e1275 Add const declarations on implementation files which use them as references
When trying to compile the new Multiple Screens feature released yesterday I got this error on KDE neon:

```bash
[ 83%] Building CXX object app/CMakeFiles/latte-dock.dir/lattedockadaptor.cpp.o
[ 84%] Linking CXX executable ../bin/latte-dock
/usr/bin/ld: CMakeFiles/latte-dock.dir/view/clonedview.cpp.o: in function `Latte::ClonedView::translateToClonesOrder(QList<int> const&)':
clonedview.cpp:(.text+0x1aaa): undefined reference to `Latte::ClonedView::ERRORAPPLETID'
collect2: error: ld returned 1 exit status
make[2]: *** [app/CMakeFiles/latte-dock.dir/build.make:2270: bin/latte-dock] Error 1
make[1]: *** [CMakeFiles/Makefile2:1806: app/CMakeFiles/latte-dock.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
```

After some research I found this StackOverflow answer:

https://stackoverflow.com/a/3026148

Which referenced this FAQ by Bjarne Stroustrup:

https://www.stroustrup.com/bs_faq2.html#in-class

In summary, if a `static const` is initialized in a class, and later is used as a reference in an implementation file, it should also be declared inside the implementation file. The initialization can live only inside the class.

Maybe the compiler used by @mvourlakos has an optimization to overcome such construct.

In my case by adding these two lines I could compile it on KDE neon (after fixing the first error, compilation failed on a second spot).
3 years ago
..
helpers position kwinedgehelper properly after startup 3 years ago
indicator Indicators API:Extend animations capabilities 3 years ago
settings fix #96,FEATURE:AllScreens and AllSecondaryScreens 3 years ago
windowstracker fix broken initialization of windows tracking 3 years ago
CMakeLists.txt fix #96,FEATURE:AllScreens and AllSecondaryScreens 3 years ago
clonedview.cpp Add const declarations on implementation files which use them as references 3 years ago
clonedview.h fix #96,FEATURE:AllScreens and AllSecondaryScreens 3 years ago
containmentinterface.cpp fix #96,FEATURE:AllScreens and AllSecondaryScreens 3 years ago
containmentinterface.h fix #96,FEATURE:AllScreens and AllSecondaryScreens 3 years ago
contextmenu.cpp fix #96,FEATURE:AllScreens and AllSecondaryScreens 3 years ago
contextmenu.h Use spdx syntax for all files 4 years ago
effects.cpp Make spring cleaning to match our KF5_MIN_VERSION 3 years ago
effects.h Use spdx syntax for all files 4 years ago
eventssink.cpp Use spdx syntax for all files 4 years ago
eventssink.h Use spdx syntax for all files 4 years ago
originalview.cpp fix #96,FEATURE:AllScreens and AllSecondaryScreens 3 years ago
originalview.h fix #96,FEATURE:AllScreens and AllSecondaryScreens 3 years ago
panelshadows.cpp Use spdx syntax for all files 4 years ago
panelshadows_p.h Use spdx syntax for all files 4 years ago
parabolic.cpp Use spdx syntax for all files 4 years ago
parabolic.h Use spdx syntax for all files 4 years ago
positioner.cpp panels:fix switch to explicit screens and back 3 years ago
positioner.h fix #96,FEATURE:AllScreens and AllSecondaryScreens 3 years ago
tasksmodel.cpp Use spdx syntax for all files 4 years ago
tasksmodel.h Use spdx syntax for all files 4 years ago
view.cpp fix #96,FEATURE:AllScreens and AllSecondaryScreens 3 years ago
view.h fix #96,FEATURE:AllScreens and AllSecondaryScreens 3 years ago
visibilitymanager.cpp always trust KWin for setting struts 3 years ago
visibilitymanager.h more startup improvements 3 years ago