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/PlatQt.cpp | |
| parent | 9659ea34246320bd9872740d1ee6a5c9ae9066c6 (diff) | |
| download | scintilla-mirror-6b444111ecfe47a3f94293c3959cf197e3415735.tar.gz | |
Add Platform::Supports for SupportsFeature API.
Diffstat (limited to 'qt/ScintillaEditBase/PlatQt.cpp')
| -rw-r--r-- | qt/ScintillaEditBase/PlatQt.cpp | 13 | 
1 files changed, 13 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;  | 
