File indexing completed on 2021-12-21 13:19:39

0001 /* This file is part of the dbusmenu-qt library
0002    Copyright 2010 Canonical
0003    Author: Aurelien Gateau <aurelien.gateau@canonical.com>
0004 
0005    This library is free software; you can redistribute it and/or
0006    modify it under the terms of the GNU Library General Public
0007    License (LGPL) as published by the Free Software Foundation;
0008    either version 2 of the License, or (at your option) any later
0009    version.
0010 
0011    This library is distributed in the hope that it will be useful,
0012    but WITHOUT ANY WARRANTY; without even the implied warranty of
0013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0014    Library General Public License for more details.
0015 
0016    You should have received a copy of the GNU Library General Public License
0017    along with this library; see the file COPYING.LIB.  If not, write to
0018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0019    Boston, MA 02110-1301, USA.
0020 */
0021 #include "testutils.h"
0022 
0023 #include <QCoreApplication>
0024 
0025 void waitForDeferredDeletes()
0026 {
0027     while (QCoreApplication::hasPendingEvents()) {
0028         QCoreApplication::sendPostedEvents();
0029         QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
0030         QCoreApplication::processEvents();
0031     }
0032 }
0033 
0034 #include "testutils.moc"