diff options
| author | Neil <nyamatongwe@gmail.com> | 2021-03-19 14:12:20 +1100 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2021-03-19 14:12:20 +1100 |
| commit | 6b444111ecfe47a3f94293c3959cf197e3415735 (patch) | |
| tree | bf90b6915dcb2f45f22d3e2377a4252ec80c9259 /qt/ScintillaEditBase | |
| parent | 9659ea34246320bd9872740d1ee6a5c9ae9066c6 (diff) | |
| download | scintilla-mirror-6b444111ecfe47a3f94293c3959cf197e3415735.tar.gz | |
Add Platform::Supports for SupportsFeature API.
Diffstat (limited to 'qt/ScintillaEditBase')
| -rw-r--r-- | qt/ScintillaEditBase/PlatQt.cpp | 13 | ||||
| -rw-r--r-- | qt/ScintillaEditBase/PlatQt.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/qt/ScintillaEditBase/PlatQt.cpp b/qt/ScintillaEditBase/PlatQt.cpp index 52cb54bf7..b7d0e3a53 100644 --- a/qt/ScintillaEditBase/PlatQt.cpp +++ b/qt/ScintillaEditBase/PlatQt.cpp @@ -133,6 +133,10 @@ public: namespace { +const int SupportsQt[] = { + SC_SUPPORTS_LINE_DRAWS_FINAL, +}; + const FontAndCharacterSet *AsFontAndCharacterSet(const Font *f) { return dynamic_cast<const FontAndCharacterSet *>(f); } @@ -205,6 +209,15 @@ void SurfaceImpl::Release() noexcept Clear(); } +int SurfaceImpl::Supports(int feature) noexcept +{ + for (const int f : SupportsQt) { + if (f == feature) + return 1; + } + return 0; +} + bool SurfaceImpl::Initialised() { return device != nullptr; diff --git a/qt/ScintillaEditBase/PlatQt.h b/qt/ScintillaEditBase/PlatQt.h index 844418343..ae0994b32 100644 --- a/qt/ScintillaEditBase/PlatQt.h +++ b/qt/ScintillaEditBase/PlatQt.h @@ -90,6 +90,7 @@ public: Surface *surface, WindowID wid) override; void Release() noexcept override; + int Supports(int feature) noexcept override; bool Initialised() override; void PenColour(ColourDesired fore) override; int LogPixelsY() override; |
