Fix scoping issues with Screen::DecodingOptions
Summary: Move the Q_DECLARE_OPERATORS_FOR_FLAGS macro declaration for the DecodingOption enum to the Konsole namespace. This should fix a bug that happens when KeyboardTranslator.h is included in Screen.h (either directly or indirectly), where the compiler doesn't find the |() operator of the QFlags class. I haven't pinpointed where the conflicting |() operator is coming from exactly, but moving the macro declaration to the Konsole namespace matches how other QFlags are used through out the code (and matches upstream doc examples). Test Plan: - Add this include to Screen.h and try to compile: #include "KeyboardTranslator.h" - The compilation fails in SessionController.cpp: error: invalid conversion from 'int' to 'Konsole::Screen::DecodingOption' The line it fails on is 1200: QString selectedText = _view->screenWindow()->selectedText(Screen::PreserveLineBreaks | Screen::TrimLeadingWhitespace | Screen::TrimTrailingWhitespace); - Apply the diff and build ...
parent
7e040b61
-
mentioned in merge request frameworks/kwidgetsaddons!18 (merged)
Please register or sign in to comment