1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 2013 David Faure <faure@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7
8#include "kjobwindows.h"
9#include <QObject>
10#include <QVariant>
11#include <QWindow>
12
13void KJobWindows::setWindow(QObject *job, QWindow *window)
14{
15 job->setProperty(name: "window", value: QVariant::fromValue(value: window));
16 if (window) {
17 job->setProperty(name: "window-id", value: QVariant::fromValue(value: window->winId()));
18 }
19}
20
21QWindow *KJobWindows::window(QObject *job)
22{
23 return job->property(name: "window").value<QWindow *>();
24}
25

source code of kguiaddons/src/util/kjobwindows.cpp