Skip to content

Commit

Permalink
use iwyu to regenerate gui includes. (#1382)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteven4 authored Nov 15, 2024
1 parent 4bff9b2 commit 9f57b0f
Show file tree
Hide file tree
Showing 42 changed files with 313 additions and 235 deletions.
10 changes: 5 additions & 5 deletions gui/aboutdlg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
//

#include "aboutdlg.h"
#include <QTextCursor> // for QTextCursor
#include <QTextDocument> // for QTextDocument
#include <QTextEdit> // for QTextEdit
#include "appname.h" // for appName
#include "upgrade.h" // for UpgradeCheck
#include <QTextCursor> // for QTextCursor
#include <QTextDocument> // for QTextDocument
#include <QTextEdit> // for QTextEdit
#include "appname.h" // for appName
#include "upgrade.h" // for UpgradeCheck


AboutDlg::AboutDlg(QWidget* parent, const QString& ver1,
Expand Down
8 changes: 4 additions & 4 deletions gui/aboutdlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
#ifndef ABOUTDLG_H
#define ABOUTDLG_H

#include <QString> // for QString
#include <QDialog> // for QDialog
#include <QWidget> // for QWidget
#include "ui_aboutui.h" // for Ui_AboutDlg
#include <QDialog> // for QDialog
#include <QString> // for QString
#include <QWidget> // for QWidget
#include "ui_aboutui.h" // for Ui_AboutDlg

class AboutDlg: public QDialog
{
Expand Down
8 changes: 4 additions & 4 deletions gui/advdlg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
//
#include <QMessageBox>
#include <QProcess>
#include <QFileDialog>
#include <QSettings>

#include "advdlg.h"
#include <QCheckBox> // for QCheckBox
#include <QComboBox> // for QComboBox
#include <QDialogButtonBox> // for QDialogButtonBox

//------------------------------------------------------------------------
AdvDlg::AdvDlg(QWidget* parent,
Expand Down
6 changes: 5 additions & 1 deletion gui/advdlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
#ifndef ADVDLG_H
#define ADVDLG_H

#include "ui_advui.h"
#include <QDialog> // for QDialog
#include <QObject> // for Q_OBJECT, slots
#include <QPushButton> // for QPushButton
#include <QWidget> // for QWidget
#include "ui_advui.h" // for Ui_AdvUi

class AdvDlg: public QDialog
{
Expand Down
13 changes: 9 additions & 4 deletions gui/babeldata.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,15 @@
#ifndef BABELDATA_H
#define BABELDATA_H

#include <QSettings>
#include <QStringList>
#include <QUuid>
#include "setting.h"
#include <QDate> // for QDate
#include <QDateTime> // for QDateTime
#include <QList> // for QList
#include <QSettings> // for QSettings
#include <QString> // for QString
#include <QStringList> // for QStringList
#include <QTime> // for QTime
#include <QUuid> // for QUuid
#include "setting.h" // for SettingGroup, BoolSetting, StringSetting, IntSetting, DateTimeSetting


class BabelData
Expand Down
7 changes: 5 additions & 2 deletions gui/donate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@
//

#include "donate.h"
#include <QUrl>
#include <QDesktopServices>
#include <QAbstractButton> // for QAbstractButton
#include <QDesktopServices> // for QDesktopServices
#include <QPushButton> // for QPushButton
#include <QString> // for QString
#include <QUrl> // for QUrl

// A completely simple QDialog, in a class of its own for layout.
Donate::Donate(QWidget* parent) : QDialog(parent)
Expand Down
7 changes: 6 additions & 1 deletion gui/donate.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
#ifndef DONATE_H
#define DONATE_H

#include "ui_donate.h"
#include <QCheckBox> // for QCheckBox
#include <QDialog> // for QDialog
#include <QLabel> // for QLabel
#include <QObject> // for Q_OBJECT, slots
#include <QWidget> // for QWidget
#include "ui_donate.h" // for Ui_Donate

class Donate: public QDialog
{
Expand Down
3 changes: 3 additions & 0 deletions gui/filterdata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
//------------------------------------------------------------------------

#include "filterdata.h"
#include <QChar> // for QChar
#include <QDate> // for QDate
#include <QVector> // for QVector

QStringList WayPtsFilterData::makeOptionString()
{
Expand Down
11 changes: 7 additions & 4 deletions gui/filterdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
#ifndef FILTERDATA_H
#define FILTERDATA_H

#include <QDateTime>
#include <QSettings>
#include <QStringList>
#include "setting.h"
#include <QDateTime> // for QDateTime
#include <QList> // for QList
#include <QSettings> // for QSettings
#include <QString> // for QString
#include <QStringList> // for QStringList
#include <QTime> // for QTime
#include "setting.h" // for BoolSetting, SettingGroup, IntSetting, DoubleSetting, DateTimeSetting, StringSetting

//------------------------------------------------------------------------

Expand Down
12 changes: 9 additions & 3 deletions gui/filterdlg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@
//
//------------------------------------------------------------------------

#include <QMessageBox>
#include "filterdlg.h"
#include "help.h"
#include "appname.h"
#include <QAbstractButton> // for QAbstractButton
#include <QFrame> // for QFrame
#include <QHBoxLayout> // for QHBoxLayout
#include <QListWidget> // for QListWidget
#include <QMessageBox> // for QMessageBox, operator|
#include <QPushButton> // for QPushButton
#include <Qt> // for CheckState
#include "appname.h" // for appName
#include "help.h" // for ShowHelp

int FilterDialog::lastPage_ = 0;

Expand Down
14 changes: 10 additions & 4 deletions gui/filterdlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@
#ifndef FILTER_H
#define FILTER_H

#include <QStackedWidget>
#include "ui_filterui.h"
#include "filterdata.h"
#include "filterwidgets.h"
#include <QDialog> // for QDialog
#include <QList> // for QList
#include <QListWidgetItem> // for QListWidgetItem
#include <QObject> // for Q_OBJECT, slots
#include <QStackedWidget> // for QStackedWidget
#include <QString> // for QString
#include <QWidget> // for QWidget
#include "filterdata.h" // for AllFiltersData
#include "filterwidgets.h" // for FilterWidget
#include "ui_filterui.h" // for Ui_FilterDlg

class FilterDialog: public QDialog
{
Expand Down
4 changes: 2 additions & 2 deletions gui/filterwidgets.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@

#include <QChar> // for QChar
#include <QCheckBox> // for QCheckBox
#include <QEvent> // for QEvent, QEvent::LocaleChange
#include <QEvent> // for QEvent
#include <QLabel> // for QLabel
#include <QRadioButton> // for QRadioButton
#if (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0))
#include <QTimeZone> // for QTimeZone
#endif
#include <Qt> // for LocalTime, UTC
#include <Qt> // for TimeSpec


//------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion gui/format.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
//
//------------------------------------------------------------------------
#include "format.h"
#include "mainwindow.h"

QString Format::htmlBase_ = QString();

Expand Down
9 changes: 5 additions & 4 deletions gui/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@
#ifndef FORMAT_H
#define FORMAT_H

#include <QString>
#include <QVariant>
#include <QStringList>
#include <QSettings>
#include <QList> // for QList
#include <QSettings> // for QSettings
#include <QString> // for QString
#include <QStringList> // for QStringList
#include <QVariant> // for QVariant

class FormatOption
{
Expand Down
25 changes: 12 additions & 13 deletions gui/formatload.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,18 @@
//------------------------------------------------------------------------

#include "formatload.h"
#include <QByteArray> // for QByteArray
#include <QChar> // for operator==, QChar
#include <QCoreApplication> // for QCoreApplication
#include <QObject> // for QObject
#include <QProcess> // for QProcess
#include <QRegularExpression> // for QRegularExpression
#include <QRegularExpressionMatch> // for QRegularExpressionMatch
#include <QString> // for QString, operator+
#include <QTextStream> // for QTextStream
#include <QVariant> // for QVariant
#include <QApplication> // for QApplication
#include <QMessageBox> // for QMessageBox
#include "appname.h" // for appName
#include <QApplication> // for QApplication
#include <QByteArray> // for QByteArray
#include <QChar> // for QChar, operator==
#include <QCoreApplication> // for QCoreApplication
#include <QMessageBox> // for QMessageBox
#include <QObject> // for QObject
#include <QProcess> // for QProcess
#include <QRegularExpression> // for QRegularExpression, QRegularExpressionMatch
#include <QString> // for QString, operator+
#include <QTextStream> // for QTextStream
#include <QVariant> // for QVariant
#include "appname.h" // for appNam


#ifdef GENERATE_CORE_STRINGS
Expand Down
6 changes: 3 additions & 3 deletions gui/formatload.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
#ifndef FORMATLOAD_H
#define FORMATLOAD_H

#include <QList> // for QList
#include <QStringList> // for QStringList
#include <QList> // for QList
#include <QStringList> // for QStringList

#include "format.h" // for Format
#include "format.h" // for Format

class FormatLoad
{
Expand Down
22 changes: 17 additions & 5 deletions gui/gmapdlg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,24 @@
//
//------------------------------------------------------------------------

#include <QStandardItemModel>
#include <QMenu>
#include <QHeaderView>
#include "gmapdlg.h"
#include "appname.h"
#include "gpx.h"
#include <QAbstractButton> // for QAbstractButton
#include <QAbstractItemView> // for QAbstractItemView
#include <QDateTime> // for QDateTime, operator<, operator>
#include <QFrame> // for QFrame
#include <QHBoxLayout> // for QHBoxLayout
#include <QHeaderView> // for QHeaderView
#include <QItemSelectionModel> // for QItemSelectionModel
#include <QMenu> // for QMenu
#include <QPushButton> // for QPushButton
#include <QStandardItemModel> // for QStandardItemModel
#include <QTreeView> // for QTreeView
#include <QVariant> // for QVariant
#include <Qt> // for CheckState, ContextMenuPolicy
#include <QtGlobal> // for QForeachContainer, qMakeForeachContainer, foreach
#include "appname.h" // for appName
#include "gpx.h" // for GpxWaypoint, GpxTrack, GpxRoute, Gpx, GpxItem, GpxTrackPoint, GpxTrackSegment
#include "latlng.h" // for LatLn

//------------------------------------------------------------------------
class StandardItem: public QStandardItem
Expand Down
20 changes: 14 additions & 6 deletions gui/gmapdlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,20 @@
#ifndef GMAPDLG_H
#define GMAPDLG_H

#include <QStackedWidget>
#include <QStandardItem>
#include <QModelIndex>
#include "ui_gmapui.h"
#include "gpx.h"
#include "map.h"
#include <QDialog> // for QDialog
#include <QItemSelection> // for QItemSelection
#include <QList> // for QList
#include <QModelIndex> // for QModelIndex
#include <QObject> // for Q_OBJECT, slots
#include <QPlainTextEdit> // for QPlainTextEdit
#include <QPoint> // for QPoint
#include <QStandardItem> // for QStandardItem
#include <QStandardItemModel> // for QStandardItemModel
#include <QString> // for QString
#include <QWidget> // for QWidget
#include "gpx.h" // for Gpx, GpxRoute, GpxTrack, GpxWaypoint
#include "map.h" // for Map
#include "ui_gmapui.h" // for Ui_GMapDlg

class GMapDialog: public QDialog
{
Expand Down
9 changes: 4 additions & 5 deletions gui/gpx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@
//
//------------------------------------------------------------------------


#include "gpx.h"
#include <QFile> // for QFile
#include <QIODevice> // for QIODevice, QIODevice::ReadOnly
#include <QStringView> // for QStringView
#include <QIODevice> // for QIODevice
#include <QStringView> // for QStringView, operator==
#include <QXmlStreamAttributes> // for QXmlStreamAttributes
#include <QXmlStreamReader> // for QXmlStreamReader, QXmlStreamReader::Characters, QXmlStreamReader::EndDocument, QXmlStreamReader::EndElement, QXmlStreamReader::Invalid, QXmlStreamReader::StartElement
#include "gpx.h"
#include <QXmlStreamReader> // for QXmlStreamReader


static QDateTime decodeDateTime(const QString& s)
Expand Down
10 changes: 5 additions & 5 deletions gui/gpx.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
#ifndef GPX_H
#define GPX_H

#include <QDateTime> // for QDateTime
#include <QList> // for QList
#include <QString> // for QString
#include <QtGlobal> // for foreach
#include "latlng.h" // for LatLng
#include <QDateTime> // for QDateTime
#include <QList> // for QList
#include <QString> // for QString
#include <QtGlobal> // for QForeachContainer, qMakeForeachContainer, foreach
#include "latlng.h" // for LatLng


//------------------------------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions gui/help.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
//------------------------------------------------------------------------
#include "help.h"

#include <QRegularExpression> // for QRegularExpression
#include <QString> // for QString
#include <QUrl> // for QUrl
#include <QDesktopServices> // for QDesktopServices
#include <QDesktopServices> // for QDesktopServices
#include <QRegularExpression> // for QRegularExpression
#include <QString> // for QString, operator+
#include <QUrl> // for QUrl

#include "format.h" // for Format
#include "format.h" // for Format

//------------------------------------------------------------------------
void ShowHelp(const QString& urlIn)
Expand Down
2 changes: 1 addition & 1 deletion gui/help.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#ifndef HELP_H
#define HELP_H
#include <QString> // for QString
#include <QString> // for QString

extern void ShowHelp(const QString& name);

Expand Down
2 changes: 1 addition & 1 deletion gui/latlng.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//
//------------------------------------------------------------------------
#include "latlng.h"
#include <cmath>
#include <cmath> // for cos, sin, asin, sqrt


// copied from the web somewhere.
Expand Down
Loading

0 comments on commit 9f57b0f

Please sign in to comment.