summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2021-04-11 17:40:26 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2021-04-11 21:13:50 +0200
commit963f252cd1ea9c268a6ced68a3454b10cbee1a89 (patch)
tree024c6ba41c79ff178ec5cd0596f0132469028917 /vcl/unx
parent91c883e75436210ca8af95df1ca597caeeda8703 (diff)
Qt5/KF5 get rid of unneeded own grahics handling
This was hiding tdf#141623, when I decided to implement the override to run the kf5 VCL plugin with the qfont text rendering. Change-Id: Id1fcd363bd77a756cb27e3a171c872ce792da5ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113956 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/kf5/KF5SalFrame.cxx24
-rw-r--r--vcl/unx/kf5/KF5SalFrame.hxx6
-rw-r--r--vcl/unx/kf5/KF5SalInstance.cxx13
-rw-r--r--vcl/unx/kf5/KF5SalInstance.hxx1
4 files changed, 8 insertions, 36 deletions
diff --git a/vcl/unx/kf5/KF5SalFrame.cxx b/vcl/unx/kf5/KF5SalFrame.cxx
index 1aa0b9008de7..8f14594586d2 100644
--- a/vcl/unx/kf5/KF5SalFrame.cxx
+++ b/vcl/unx/kf5/KF5SalFrame.cxx
@@ -45,7 +45,6 @@
KF5SalFrame::KF5SalFrame(KF5SalFrame* pParent, SalFrameStyleFlags nState, bool bUseCairo)
: Qt5Frame(pParent, nState, bUseCairo)
- , m_bGraphicsInUse(false)
{
}
@@ -162,27 +161,4 @@ void KF5SalFrame::UpdateSettings(AllSettings& rSettings)
rSettings.SetStyleSettings(style);
}
-SalGraphics* KF5SalFrame::AcquireGraphics()
-{
- if (m_bGraphicsInUse)
- return nullptr;
-
- m_bGraphicsInUse = true;
-
- if (!m_pKF5Graphics)
- {
- m_pKF5Graphics.reset(new Qt5SvpGraphics(this));
- Qt5Frame::InitQt5SvpGraphics(m_pKF5Graphics.get());
- }
-
- return m_pKF5Graphics.get();
-}
-
-void KF5SalFrame::ReleaseGraphics(SalGraphics* pSalGraph)
-{
- (void)pSalGraph;
- assert(pSalGraph == m_pKF5Graphics.get());
- m_bGraphicsInUse = false;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kf5/KF5SalFrame.hxx b/vcl/unx/kf5/KF5SalFrame.hxx
index f757535c2f35..d0fdd91978e6 100644
--- a/vcl/unx/kf5/KF5SalFrame.hxx
+++ b/vcl/unx/kf5/KF5SalFrame.hxx
@@ -28,15 +28,9 @@ class QWidget;
class KF5SalFrame : public Qt5Frame
{
-private:
- std::unique_ptr<Qt5SvpGraphics> m_pKF5Graphics;
- bool m_bGraphicsInUse;
-
public:
KF5SalFrame(KF5SalFrame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo);
- virtual SalGraphics* AcquireGraphics() override;
- virtual void ReleaseGraphics(SalGraphics* pGraphics) override;
virtual void UpdateSettings(AllSettings& rSettings) override;
};
diff --git a/vcl/unx/kf5/KF5SalInstance.cxx b/vcl/unx/kf5/KF5SalInstance.cxx
index 4c1a87730e51..c1ee2f61a48d 100644
--- a/vcl/unx/kf5/KF5SalInstance.cxx
+++ b/vcl/unx/kf5/KF5SalInstance.cxx
@@ -40,14 +40,15 @@ KF5SalInstance::KF5SalInstance(std::unique_ptr<QApplication>& pQApp)
pSVData->maAppData.mxToolkitName = OUString("kf5");
}
+SalFrame* KF5SalInstance::CreateChildFrame(SystemParentData* /*pParent*/, SalFrameStyleFlags nStyle)
+{
+ return new KF5SalFrame(nullptr, nStyle, useCairo());
+}
+
SalFrame* KF5SalInstance::CreateFrame(SalFrame* pParent, SalFrameStyleFlags nState)
{
- SalFrame* pRet(nullptr);
- RunInMainThread([&pRet, pParent, nState]() {
- pRet = new KF5SalFrame(static_cast<KF5SalFrame*>(pParent), nState, true);
- });
- assert(pRet);
- return pRet;
+ assert(!pParent || dynamic_cast<KF5SalFrame*>(pParent));
+ return new KF5SalFrame(static_cast<KF5SalFrame*>(pParent), nState, useCairo());
}
bool KF5SalInstance::hasNativeFileSelection() const
diff --git a/vcl/unx/kf5/KF5SalInstance.hxx b/vcl/unx/kf5/KF5SalInstance.hxx
index b462e147003d..1d9ed8bc5d92 100644
--- a/vcl/unx/kf5/KF5SalInstance.hxx
+++ b/vcl/unx/kf5/KF5SalInstance.hxx
@@ -29,6 +29,7 @@ class KF5SalInstance final : public Qt5Instance
QFileDialog::FileMode) override;
SalFrame* CreateFrame(SalFrame* pParent, SalFrameStyleFlags nStyle) override;
+ SalFrame* CreateChildFrame(SystemParentData* pParent, SalFrameStyleFlags nStyle) override;
public:
explicit KF5SalInstance(std::unique_ptr<QApplication>& pQApp);