mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 09:33:25 -08:00
The executables precompile Qt since #7235, but the libcockatrice_* static libraries still reparse the full Qt Core stack in every TU. Measured over the tree after the IWYU pass: 380 MB of header parse in the libraries, 92% of it reachable from qtcore_pch.h. - Apply qtcore_pch.h to the 14 Qt Core static library targets (skips libcockatrice_rng: its SFMT.c is C and cannot use a C++ precompiled header). - Grow qtcore_pch.h with 25 QtCore headers that IWYU shows are re-parsed across many TUs and were not already reachable from the existing list (JSON/QUuid cluster, QSettings, item models, threading, XmlStream, QTemporaryDir, ...). - Grow qtwidgets_pch.h with 30 QtGui/QtWidgets headers (dialog cluster, item views, QImageReader, ...). Only stable Qt headers go into the PCH, so it rarely invalidates. Test executables stay PCH-less: 1-3 TUs per target does not amortize the extra precompile. Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
59 lines
1.6 KiB
C
59 lines
1.6 KiB
C
/** @file qtwidgets_pch.h
|
|
* @brief Precompiled header for GUI targets (Cockatrice client, Oracle).
|
|
*
|
|
* Includes the Qt Core precompiled header plus the heavy Gui, Widgets and
|
|
* Network layers that virtually every client translation unit re-parses.
|
|
* Do not use on Servatrice (headless, QT_DONT_USE_QTGUI).
|
|
*
|
|
* Candidates are chosen from IWYU include statistics: a header earns a
|
|
* spot when it is not already reachable from the rest of this list and
|
|
* enough translation units re-parse it. Qt headers are stable across
|
|
* builds, so the precompiled header rarely invalidates.
|
|
*/
|
|
|
|
#include "qtcore_pch.h"
|
|
|
|
#include <QAction>
|
|
#include <QApplication>
|
|
#include <QCheckBox>
|
|
#include <QComboBox>
|
|
#include <QCompleter>
|
|
#include <QDialogButtonBox>
|
|
#include <QDockWidget>
|
|
#include <QFileDialog>
|
|
#include <QFormLayout>
|
|
#include <QFrame>
|
|
#include <QGraphicsItem>
|
|
#include <QGraphicsScene>
|
|
#include <QGraphicsSceneMouseEvent>
|
|
#include <QGraphicsView>
|
|
#include <QGridLayout>
|
|
#include <QGroupBox>
|
|
#include <QHBoxLayout>
|
|
#include <QHeaderView>
|
|
#include <QImage>
|
|
#include <QImageReader>
|
|
#include <QInputDialog>
|
|
#include <QLabel>
|
|
#include <QLayout>
|
|
#include <QListWidget>
|
|
#include <QMainWindow>
|
|
#include <QMenu>
|
|
#include <QMessageBox>
|
|
#include <QNetworkAccessManager>
|
|
#include <QNetworkReply>
|
|
#include <QPainter>
|
|
#include <QPlainTextEdit>
|
|
#include <QPushButton>
|
|
#include <QScrollArea>
|
|
#include <QSpinBox>
|
|
#include <QSplitter>
|
|
#include <QStandardItemModel>
|
|
#include <QTabWidget>
|
|
#include <QTableWidget>
|
|
#include <QTableWidgetItem>
|
|
#include <QToolBar>
|
|
#include <QToolButton>
|
|
#include <QTreeWidget>
|
|
#include <QVBoxLayout>
|
|
#include <QWidget>
|