Skip to content

Commit

Permalink
QMetaObject: clean up includes
Browse files Browse the repository at this point in the history
Remove duplicate ones and regroup them.

Add a comment explaining why qthread(_p).h isn't guarded by an
`#if QT_CONFIG(thread)`; thanks to Fabian Kosmale for the explanation.

Pick-to: 6.7
Change-Id: I9b13fd62ab92fa6d2ffc4d004d77e95e95f5fb08
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
  • Loading branch information
ahmadsamir committed Feb 1, 2024
1 parent 6d9185c commit 28db390
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/corelib/kernel/qmetaobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,23 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#include "qmetaobject.h"
#include "qmetatype.h"
#include "qobject.h"
#include "qmetaobject_p.h"
#include "qmetatype.h"
#include "qmetatype_p.h"
#include "qobject.h"
#include "qobject_p.h"

#include <qcoreapplication.h>
#include <qcoreevent.h>
#include <qdatastream.h>
#include <qstringlist.h>
#include <qthread.h>
#include <qvariant.h>
#include <qdebug.h>

// qthread(_p).h uses QT_CONFIG(thread) internally and has a dummy
// interface for the non-thread support case
#include <qthread.h>
#include "private/qthread_p.h"
#if QT_CONFIG(thread)
#include <qsemaphore.h>
#endif

#include "private/qobject_p.h"
#include "private/qmetaobject_p.h"
#include "private/qthread_p.h"

// for normalizeTypeInternal
#include "private/qmetaobject_moc_p.h"

Expand Down

0 comments on commit 28db390

Please sign in to comment.