Changeset View
Changeset View
Standalone View
Standalone View
src/platformtheme/kdeplatformfiledialoghelper.cpp
Show First 20 Lines • Show All 324 Lines • ▼ Show 20 Line(s) | 321 | { | |||
---|---|---|---|---|---|
325 | // NOTICE: QWindow::setGeometry() does NOT impact the backing QWidget geometry even if the platform | 325 | // NOTICE: QWindow::setGeometry() does NOT impact the backing QWidget geometry even if the platform | ||
326 | // window was created -> QTBUG-40584. We therefore copy the size here. | 326 | // window was created -> QTBUG-40584. We therefore copy the size here. | ||
327 | // TODO: remove once this was resolved in QWidget QPA | 327 | // TODO: remove once this was resolved in QWidget QPA | ||
328 | m_dialog->resize(m_dialog->windowHandle()->size()); | 328 | m_dialog->resize(m_dialog->windowHandle()->size()); | ||
329 | } | 329 | } | ||
330 | 330 | | |||
331 | bool KDEPlatformFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) | 331 | bool KDEPlatformFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) | ||
332 | { | 332 | { | ||
333 | Q_UNUSED(parent) | | |||
334 | initializeDialog(); | 333 | initializeDialog(); | ||
335 | m_dialog->setWindowFlags(windowFlags); | 334 | m_dialog->setWindowFlags(windowFlags); | ||
336 | m_dialog->setWindowModality(windowModality); | 335 | m_dialog->setWindowModality(windowModality); | ||
337 | restoreSize(); | 336 | restoreSize(); | ||
337 | m_dialog->windowHandle()->setTransientParent(parent); | ||||
338 | // Use a delayed show here to delay show() after the internal Qt invisible QDialog. | 338 | // Use a delayed show here to delay show() after the internal Qt invisible QDialog. | ||
339 | // The delayed call shouldn't matter, because for other "real" native QPlatformDialog | 339 | // The delayed call shouldn't matter, because for other "real" native QPlatformDialog | ||
340 | // implementation like Mac and Windows, the native dialog is not necessarily | 340 | // implementation like Mac and Windows, the native dialog is not necessarily | ||
341 | // show up immediately. | 341 | // show up immediately. | ||
342 | m_dialog->delayedShow(); | 342 | m_dialog->delayedShow(); | ||
343 | return true; | 343 | return true; | ||
344 | } | 344 | } | ||
345 | 345 | | |||
Show All 38 Lines |