Currently there's an extra layer of calls into the ScintillaDocument to emit its own signal. This patch has the WatcherHelper directly emit the owner's signal.
I'm no Qt expert :) but I did some digging in the documentation and in Qt4 it seems signals are protected, in Qt5+ signals are public. Not sure why this is showing up in Qt5.7.1 however and do not have any way of testing it currently.
Signals are public access functions and can be emitted from anywhere, but we recommend to only emit them from the class that defines the signal and its subclasses.
Some possible solutions:
Err on the side of caution by adhearing to the documentation and revert the commit.
Adding the friend class ::WatcherHelper; line back into ScintillaDocument should solve the compilation failures.
Have the ScintillaDocument inherit and implement the DocWatcher interface itself instead of having a separate WatcherHelper class.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem was that Fedora 26 has both qmake-qt5 and qmake-qt4. qmake-qt5 should be used for correct building of ScintillaEdit when it is available. However, PySide needs Qt 4. Went with (2) friend class ::WatcherHelper;
Committed as [f8c75a].
Reindented with astyle as it was a little inconsistent.
Related
Commit: [f8c75a]
There are compilation failures on Fedora 26, GCC 7.1, Qt 5.7.1 with this change.
I'm no Qt expert :) but I did some digging in the documentation and in Qt4 it seems signals are protected, in Qt5+ signals are public. Not sure why this is showing up in Qt5.7.1 however and do not have any way of testing it currently.
The documentation for Qt5 states:
Some possible solutions:
friend class ::WatcherHelper;line back into ScintillaDocument should solve the compilation failures.The problem was that Fedora 26 has both qmake-qt5 and qmake-qt4. qmake-qt5 should be used for correct building of ScintillaEdit when it is available. However, PySide needs Qt 4. Went with (2)
friend class ::WatcherHelper;Changes in [fce43d] and [3d780a].
Related
Commit: [3d780a]
Commit: [fce43d]