Find all fitting files and run the fixer-script in parallel over it.
( find . -name "CMakeLists.txt" ; find . -name "*.cmake" ; find . -name "*.h" ; find . -name "*.cpp" ) | parallel --bar ../removeTrailing.sh
After playing for a while with sed and awk and not being able to get a fitting solution, I decided to create my own as python-script. It squashes all consecutive double-whitespace-lines (and adds one to the end if missing).
Or “run it on the files changed for the last commit”:
$ git diff --name-only HEAD~1 HEAD | parallel --bar ../removeTrailing.sh
How to get GNU parallel (developed by Ole Tange):
(wget -O - pi.dk/3 || curl pi.dk/3/ || fetch -o - http://pi.dk/3) | bash
Updating to the current package of Qt Charts (from the commercial version)
Qt (or Digia? or how was the company-owning-Qt called at that time?) released in 2014 the version 1.4 of their Charts add-on for Qt. It was available only for the commercial-license and had some distinc namespace-requirements. And was also quite bare-metal.
Further development lead to more opportunities regarding the emitted signals for the cursor-handling (pressed/released instead of just clicked, for instance) and it became part of the regular package for Qt.
## Advice for a CMake-based project ##
If you want to maintain and upgrade your legacy code, then:
- add “Charts” to your find_package:
1find_package(Qt5 COMPONENTS Widgets Charts REQUIRED)
- change the namespace inside the CMakeLists from “former naming” to “Qt5::Charts”
- remove the dependency to the old package in the top-level CMakeLists.txt
- replace inside the h/cpp all occurences of “QtCommercialChart::” with “QtCharts::”
- replace inside the h/cpp all occurences of “QTCOMMERCIALCHART_USE_NAMESPACE” with “using namespace QtCharts;”
- update the installer-creator-script(s) to include the Qt5Charts.dll
Et voilà , it should build now.
Retrospective view at 2018
The first month of 2019 already passed. And we passed it with flying colors!
But let’s have a look at 2018 – a year full of challenges and success: I’ve worked full-time, organized and participated in advanced courses for Python and in Requirements Engineering (officially: IREB Requirements Engineering Foundation Level-approved) and pursued a new employment as software engineer.
And I wrote some software in my spare-time, as you can see in the graph for the public github-repositories. The gaps in the commits can be explained with the birth of my daughter and the time where I acquired the new job and moved nearly 900 km across the country. Yay! Nice personal projects were and are Cullendula and the Daily Coding Challenges, which I solve mostly with fully Unit-tested Python (3).
More new, hands-on knowledge was gained in the area of CMake and Qt-charts.
Well – 2018 was great. Let me make 2019 greater! 💪