Drop winId and KWindowSystem::setMainWindow
as fpicker isn't a separate binary anymore Change-Id: I9c9c57a21f5dc79714f37f8bc65b998887c29e78
This commit is contained in:
@@ -40,8 +40,6 @@ KDE5FilePicker::~KDE5FilePicker()
|
|||||||
delete _dialog;
|
delete _dialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KDE5FilePicker::setWinId(sal_uIntPtr winId) { _winId = winId; }
|
|
||||||
|
|
||||||
bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e)
|
bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e)
|
||||||
{
|
{
|
||||||
if (e->type() == QEvent::Show && o->isWidgetType())
|
if (e->type() == QEvent::Show && o->isWidgetType())
|
||||||
@@ -49,7 +47,6 @@ bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e)
|
|||||||
auto* w = static_cast<QWidget*>(o);
|
auto* w = static_cast<QWidget*>(o);
|
||||||
if (!w->parentWidget() && w->isModal())
|
if (!w->parentWidget() && w->isModal())
|
||||||
{
|
{
|
||||||
KWindowSystem::setMainWindow(w, _winId);
|
|
||||||
if (auto* fileWidget = w->findChild<KFileWidget*>({}, Qt::FindDirectChildrenOnly))
|
if (auto* fileWidget = w->findChild<KFileWidget*>({}, Qt::FindDirectChildrenOnly))
|
||||||
fileWidget->setCustomWidget(_extraControls);
|
fileWidget->setCustomWidget(_extraControls);
|
||||||
}
|
}
|
||||||
|
@@ -78,8 +78,6 @@ protected:
|
|||||||
//layout for extra custom controls
|
//layout for extra custom controls
|
||||||
QGridLayout* _layout;
|
QGridLayout* _layout;
|
||||||
|
|
||||||
sal_uIntPtr _winId;
|
|
||||||
|
|
||||||
bool allowRemoteUrls;
|
bool allowRemoteUrls;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -140,8 +138,6 @@ public:
|
|||||||
// XFilePicker2 functions
|
// XFilePicker2 functions
|
||||||
virtual css::uno::Sequence<OUString> SAL_CALL getSelectedFiles() override;
|
virtual css::uno::Sequence<OUString> SAL_CALL getSelectedFiles() override;
|
||||||
|
|
||||||
void setWinId(sal_uIntPtr winId);
|
|
||||||
|
|
||||||
// XInitialization
|
// XInitialization
|
||||||
virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& rArguments) override;
|
virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& rArguments) override;
|
||||||
|
|
||||||
|
@@ -82,7 +82,6 @@ KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode)
|
|||||||
, _dialog(new QFileDialog(nullptr, {}, QDir::homePath()))
|
, _dialog(new QFileDialog(nullptr, {}, QDir::homePath()))
|
||||||
, _extraControls(new QWidget)
|
, _extraControls(new QWidget)
|
||||||
, _layout(new QGridLayout(_extraControls))
|
, _layout(new QGridLayout(_extraControls))
|
||||||
, _winId(0)
|
|
||||||
, allowRemoteUrls(false)
|
, allowRemoteUrls(false)
|
||||||
{
|
{
|
||||||
_dialog->setSupportedSchemes({
|
_dialog->setSupportedSchemes({
|
||||||
|
Reference in New Issue
Block a user