QRegExp include cleanup

QRegExp includes can be found in several files where there's not even a
use of the class. This patch aims to avoid needless includes as well as
follow the "include only what you use" moto.

This patch removes a QRegExp include from the QStringList header which
means that there is likely going to be code breaking since QStringList
is used in many places and would get QRegExp in.

[ChangeLog][Potentially Source-Incompatible Changes] qstringlist.h no
longer includes qregexp.h.

Change-Id: I32847532f16e419d4cb735ddc11a26551127e923
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Samuel Gaist 2018-09-27 00:19:49 +02:00
parent 642ef0c731
commit e2906ea5c4
31 changed files with 25 additions and 16 deletions

View File

@ -27,7 +27,6 @@
****************************************************************************/
#include "metamakefile.h"
#include "qregexp.h"
#include "qdir.h"
#include "qdebug.h"
#include "makefile.h"

View File

@ -28,7 +28,6 @@
#include "unixmake.h"
#include "option.h"
#include <qregexp.h>
#include <qfile.h>
#include <qhash.h>
#include <qdir.h>

View File

@ -34,6 +34,7 @@
#include <qscopedpointer.h>
#include <qstringlist.h>
#include <qfileinfo.h>
#include <qregexp.h>
QT_BEGIN_NAMESPACE

View File

@ -34,6 +34,7 @@
#include <qscopedpointer.h>
#include <qfileinfo.h>
#include <qregexp.h>
using namespace QMakeInternal;

View File

@ -30,6 +30,7 @@
#include <qdir.h>
#include <qfile.h>
#include <qregexp.h>
#ifdef Q_OS_WIN
# include <windows.h>

View File

@ -31,8 +31,6 @@
#include "proitems.h"
#include <qregexp.h>
#define debugMsg if (!m_debugLevel) {} else debugMsgInternal
#define traceMsg if (!m_debugLevel) {} else traceMsgInternal
#ifdef PROEVALUATOR_DEBUG

View File

@ -38,7 +38,6 @@
#include <qfile.h>
#include <qfileinfo.h>
#include <qlist.h>
#include <qregexp.h>
#include <qset.h>
#include <qstack.h>
#include <qstring.h>

View File

@ -93,6 +93,7 @@
#include "qdir_p.h"
#include "qabstractfileengine_p.h"
#include <QtCore/qregexp.h>
#include <QtCore/qset.h>
#include <QtCore/qstack.h>
#include <QtCore/qvariant.h>

View File

@ -45,6 +45,7 @@
#include <qmimedata.h>
#include <qdebug.h>
#include <qvector.h>
#include <qregexp.h>
#include <qstack.h>
#include <qbitarray.h>
#include <qdatetime.h>

View File

@ -51,6 +51,7 @@
#include "quuid.h"
#include "qvariant.h"
#include "qdatastream.h"
#include "qregexp.h"
#include "qmetatypeswitcher_p.h"
#if QT_CONFIG(regularexpression)

View File

@ -55,6 +55,7 @@
#include "qstringlist.h"
#include "qurl.h"
#include "qlocale.h"
#include "qregexp.h"
#include "quuid.h"
#if QT_CONFIG(itemmodel)
#include "qabstractitemmodel.h"

View File

@ -47,7 +47,6 @@
#if QT_CONFIG(timezone)
#include "qtimezone.h"
#endif
#include "qregexp.h"
#include "qdebug.h"
//#define QDATETIMEPARSER_DEBUG

View File

@ -38,6 +38,7 @@
****************************************************************************/
#include <qstringlist.h>
#include <qregexp.h>
#include <qset.h>
#if QT_CONFIG(regularexpression)
# include <qregularexpression.h>

View File

@ -54,6 +54,7 @@
#include "qpainter.h"
#include "qpainterpath.h"
#include "qpixmap.h"
#include "qregexp.h"
#include "qregion.h"
#include "qdebug.h"

View File

@ -44,6 +44,7 @@
#include <qimage.h>
#include <qiodevice.h>
#include <qregexp.h>
#include <qvariant.h>
#include <stdio.h>

View File

@ -45,6 +45,7 @@
#include <qbytearraymatcher.h>
#include <qimage.h>
#include <qmap.h>
#include <qregexp.h>
#include <qtextstream.h>
#include <qvariant.h>

View File

@ -46,9 +46,6 @@
#include "qdebug.h"
#include <QtCore/qhashfunctions.h>
#ifndef QT_NO_REGEXP
# include "qregexp.h"
#endif
#ifndef QT_NO_DATASTREAM
# include "qdatastream.h"
#endif

View File

@ -48,7 +48,6 @@
#include "qpoint.h"
#include "qbuffer.h"
#include "qimage.h"
#include "qregexp.h"
#include "qdir.h"
#include "qimagereader.h"
#include "qimagewriter.h"

View File

@ -46,6 +46,7 @@
#include "QtCore/qdebug.h"
#include "QtCore/qlist.h"
#include "QtCore/qlocale.h"
#include <QtCore/qregexp.h>
#include "QtCore/qstring.h"
#include "QtCore/qstringlist.h"
#include "QtCore/qurl.h"

View File

@ -48,7 +48,11 @@
#include <QtCore/QDir>
#include <QtCore/QDirIterator>
#include <QtCore/QSettings>
#if QT_CONFIG(regularexpression)
#include <QtCore/QRegularExpression>
#else
#include <QtCore/QRegExp>
#endif
#include <QtGui/QGuiApplication>
#include <QtGui/QFontDatabase>

View File

@ -51,7 +51,6 @@
#include "qt_mac_p.h"
#include "qcocoahelpers.h"
#include "qcocoaeventdispatcher.h"
#include <qregexp.h>
#include <qbuffer.h>
#include <qdebug.h>
#include <qstringlist.h>

View File

@ -53,6 +53,7 @@
#include <QtGui/private/qcoregraphics_p.h>
#include <QtCore/QDebug>
#include <QtCore/QRegExp>
QT_BEGIN_NAMESPACE

View File

@ -43,7 +43,6 @@
#include <qvariant.h>
#include <qdatetime.h>
#include <qfile.h>
#include <qregexp.h>
#include <qsqlerror.h>
#include <qsqlfield.h>
#include <qsqlindex.h>

View File

@ -41,7 +41,6 @@
#include "qvariant.h"
#include "qhash.h"
#include "qregexp.h"
#include "qsqlerror.h"
#include "qsqlfield.h"
#include "qsqlrecord.h"

View File

@ -32,7 +32,6 @@
#include <qfile.h>
#include <qlist.h>
#include <qbuffer.h>
#include <qregexp.h>
#include <qvector.h>
#include <qdebug.h>

View File

@ -37,6 +37,7 @@
#include <qfile.h>
#include <qiodevice.h>
#include <qlocale.h>
#include <qregexp.h>
#include <qstack.h>
#include <qxmlstream.h>

View File

@ -45,7 +45,6 @@
#include <qfile.h>
#include <qfileinfo.h>
#include <qtextstream.h>
#include <qregexp.h>
#include <quuid.h>
static inline QString providerVar(const QString &providerName)

View File

@ -46,7 +46,6 @@
#include <qfile.h>
#include <qfileinfo.h>
#include <qtextstream.h>
#include <qregexp.h>
#include <qdebug.h>
static void writeCtfMacro(QTextStream &stream, const Tracepoint::Field &field)

View File

@ -57,6 +57,11 @@
#include "qpainter.h"
#include "qpixmap.h"
#include "qpushbutton.h"
#if QT_CONFIG(regularexpression)
#include <qregularexpression.h>
#else
#include <qregexp.h>
#endif
#if QT_CONFIG(settings)
#include "qsettings.h"
#endif

View File

@ -37,6 +37,7 @@
#include <qpixmap.h>
#include <qbrush.h>
#include <qhash.h>
#include <qregexp.h>
QT_FORWARD_DECLARE_CLASS(QPainter)
#ifndef QT_NO_OPENGL

View File

@ -38,6 +38,7 @@
#include <QDir>
#include <QTime>
#include <QPointer>
#include <QRegExp>
const QString PI_Project(QLS("Project"));
const QString PI_TestCase(QLS("TestCase"));