Skip to content

chore: update includes with include-what-you-use #1382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions avogadro/core/elements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
This source code is released under the 3-Clause BSD License, (see "LICENSE").
******************************************************************************/

#include "elements.h"
// IWYU pragma: no_include <ext/alloc_traits.h>

#include "avogadrocore.h"
#include "elementdata.h"
#include "utilities.h"
#include "elements.h"

#include <algorithm>
#include <cctype>
#include <vector>
#include <memory>

#include "avogadrocore.h"
#include "elementdata.h"
#include "utilities.h"

using Avogadro::Core::isCustomElement;

Expand Down
5 changes: 2 additions & 3 deletions avogadro/core/elements.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
#ifndef AVOGADRO_CORE_ELEMENTS_H
#define AVOGADRO_CORE_ELEMENTS_H

#include "avogadrocoreexport.h"
#include <string>

#include "avogadrocoreexport.h"
#include "avogadrocore.h"

#include <string>

namespace Avogadro {
namespace Core {

Expand Down
5 changes: 5 additions & 0 deletions avogadro/core/graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
This source code is released under the 3-Clause BSD License, (see "LICENSE").
******************************************************************************/

// IWYU pragma: no_include <ext/alloc_traits.h>

#include "graph.h"

#include <algorithm>
#include <array>
#include <cassert>
#include <set>
#include <stack>
#include <memory>

#include "avogadro/core/array.h"

namespace Avogadro::Core {

Expand Down
10 changes: 5 additions & 5 deletions avogadro/core/graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
#ifndef AVOGADRO_CORE_GRAPH_H
#define AVOGADRO_CORE_GRAPH_H

#include "avogadrocoreexport.h"

#include "avogadrocore.h"
#include "array.h"

#include <cstddef>
#include <set>
#include <vector>
#include <utility>

#include "avogadrocoreexport.h"
#include "avogadrocore.h"
#include "array.h"

namespace Avogadro {
namespace Core {
Expand Down
6 changes: 6 additions & 0 deletions avogadro/core/layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
******************************************************************************/

#include "layer.h"

#include <cassert>
#include <utility>
#include <vector>

#include "avogadro/core/array.h"
#include "avogadro/core/avogadrocore.h"

namespace Avogadro::Core {

Expand Down
6 changes: 3 additions & 3 deletions avogadro/core/layer.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
#ifndef AVOGADRO_CORE_LAYER_H
#define AVOGADRO_CORE_LAYER_H

#include "avogadrocoreexport.h"
#include <avogadro/core/array.h>
#include <cstddef>

#include "avogadrocoreexport.h"
#include "avogadrocore.h"

#include <avogadro/core/array.h>

namespace Avogadro {
namespace Core {

Expand Down
5 changes: 5 additions & 0 deletions avogadro/core/layermanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
******************************************************************************/

#include "layermanager.h"

#include <cassert>
#include <utility>

#include "avogadro/core/array.h"
#include "avogadro/core/layer.h"

namespace Avogadro::Core {

Expand Down
14 changes: 7 additions & 7 deletions avogadro/core/layermanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
#ifndef AVOGADRO_CORE_LAYERMANAGER_H
#define AVOGADRO_CORE_LAYERMANAGER_H

#include "avogadrocoreexport.h"

#include "avogadrocore.h"

#include "array.h"
#include "layer.h"

#include <cassert>
#include <map>
#include <memory>
#include <set>
#include <string>
#include <vector>
#include <algorithm>
#include <cstddef>

#include "avogadrocoreexport.h"
#include "avogadrocore.h"
#include "array.h"
#include "layer.h"

namespace Avogadro {
namespace Core {
Expand Down
4 changes: 2 additions & 2 deletions avogadro/io/fileformat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#include "fileformat.h"

#include <algorithm>
#include <fstream>
#include <fstream> // IWYU pragma: keep
#include <locale>
#include <sstream>
#include <sstream> // IWYU pragma: keep

namespace Avogadro::Io {

Expand Down
4 changes: 2 additions & 2 deletions avogadro/io/fileformat.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
#ifndef AVOGADRO_IO_FILEFORMAT_H
#define AVOGADRO_IO_FILEFORMAT_H

#include "avogadroioexport.h"
#include <avogadro/core/avogadrocore.h>

#include <istream>
#include <ostream>
#include <string>
#include <vector>

#include "avogadroioexport.h"

namespace Avogadro {

namespace Core {
Expand Down
2 changes: 1 addition & 1 deletion avogadro/io/fileformatmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "fileformatmanager.h"

#include "fileformat.h"

#include "cjsonformat.h"
#include "cmlformat.h"
#include "dcdformat.h"
Expand All @@ -25,6 +24,7 @@

#include <algorithm>
#include <memory>
#include <utility>

using std::unique_ptr;

Expand Down
10 changes: 6 additions & 4 deletions avogadro/io/fileformatmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
#ifndef AVOGADRO_IO_FILEFORMATMANAGER_H
#define AVOGADRO_IO_FILEFORMATMANAGER_H

#include "avogadroioexport.h"

#include "fileformat.h" // For FileFormat::Operation enum.

#include <ctype.h>
#include <stddef.h>
#include <map>
#include <string>
#include <vector>
#include <algorithm>

#include "avogadroioexport.h"
#include "fileformat.h" // For FileFormat::Operation enum.

namespace Avogadro {
namespace Core {
Expand Down
12 changes: 9 additions & 3 deletions avogadro/molequeue/batchjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@
******************************************************************************/

#include "batchjob.h"
#include "molequeuemanager.h"

#include <QtCore/QDebug>

#include <qdebug.h>
#include <qglobal.h>
#include <qmetatype.h>
#include <qstringlist.h>
#include <limits>

#include "molequeuemanager.h"
#include "avogadro/molequeue/client/client.h"
#include "avogadro/molequeue/client/jobobject.h"
#include "avogadro/molequeue/inputgenerator.h"

namespace Avogadro::MoleQueue {

// initialize statics
Expand Down
21 changes: 14 additions & 7 deletions avogadro/molequeue/batchjob.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,25 @@
#ifndef AVOGADRO_QTGUI_BATCHJOB_H
#define AVOGADRO_QTGUI_BATCHJOB_H

#include <QtCore/QObject>

#include "inputgenerator.h"

#include <avogadro/core/avogadrocore.h>

#include "client/jobobject.h"

#include <qjsonobject.h>
#include <qjsonvalue.h>
#include <qlist.h>
#include <qmap.h>
#include <qobject.h>
#include <qobjectdefs.h>
#include <qstring.h>
#include <qvariant.h>
#include <qvector.h>
#include <QtCore/QObject>
#include <QtCore/QJsonObject>
#include <QtCore/QMap>
#include <QtCore/QVector>

#include "inputgenerator.h"
#include "client/jobobject.h"
#include "avogadromolequeueexport.h"

namespace Avogadro {
namespace Core {
class Molecule;
Expand Down
6 changes: 4 additions & 2 deletions avogadro/molequeue/client/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@

#include "client.h"

#include <qglobal.h>
#include <qnamespace.h>
#include <qregexp.h>

#include "jsonrpcclient.h"
#include "jobobject.h"

#include <QtCore/QJsonDocument>

namespace Avogadro::MoleQueue {

Client::Client(QObject *parent_) : QObject(parent_), m_jsonRpcClient(nullptr)
Expand Down
14 changes: 12 additions & 2 deletions avogadro/molequeue/client/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,24 @@
#ifndef AVOGADRO_MOLEQUEUE_CLIENT_H
#define AVOGADRO_MOLEQUEUE_CLIENT_H

#include "avogadromolequeueexport.h"

#include <qhash.h>
#include <qjsonarray.h>
#include <qjsonobject.h>
#include <qjsonvalue.h>
#include <qlist.h>
#include <qobject.h>
#include <qobjectdefs.h>
#include <qstring.h>
#include <QtCore/QJsonArray>
#include <QtCore/QJsonObject>
#include <QtCore/QObject>
#include <QRegExp>
#include <QtCore/QHash>

#include "avogadromolequeueexport.h"

class QRegExp;

namespace Avogadro {
namespace MoleQueue {

Expand Down
2 changes: 1 addition & 1 deletion avogadro/molequeue/client/jobobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "jobobject.h"

#include <QtCore/QJsonArray>
#include <qjsonvalue.h>

namespace Avogadro::MoleQueue {

Expand Down
9 changes: 6 additions & 3 deletions avogadro/molequeue/client/jobobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@
#ifndef AVOGADRO_MOLEQUEUE_JOBOBJECT_H
#define AVOGADRO_MOLEQUEUE_JOBOBJECT_H

#include "avogadromolequeueexport.h"

#include <qjsonarray.h>
#include <qjsonobject.h>
#include <qstring.h>
#include <qvariant.h>
#include <QtCore/QJsonObject>

#include <QtCore/QString>
#include <QtCore/QVariant>

#include "avogadromolequeueexport.h"

namespace Avogadro {
namespace MoleQueue {

Expand Down
10 changes: 6 additions & 4 deletions avogadro/molequeue/client/jsonrpcclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@

#include "jsonrpcclient.h"

#include <QtCore/QJsonDocument>
#include <QtCore/QDataStream>
#include <QtCore/QTimer>
#include <QtNetwork/QLocalSocket>
#include <qdatastream.h>
#include <qjsondocument.h>
#include <qjsonvalue.h>
#include <qlocalsocket.h>
#include <qnamespace.h>
#include <qtimer.h>

namespace Avogadro::MoleQueue {

Expand Down
9 changes: 7 additions & 2 deletions avogadro/molequeue/client/jsonrpcclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@
#ifndef AVOGADRO_MOLEQUEUE_JSONRPCCLIENT_H
#define AVOGADRO_MOLEQUEUE_JSONRPCCLIENT_H

#include "avogadromolequeueexport.h"

#include <qbytearray.h>
#include <qjsonobject.h>
#include <qobject.h>
#include <qobjectdefs.h>
#include <qstring.h>
#include <QtCore/QJsonObject>
#include <QtCore/QObject>

#include "avogadromolequeueexport.h"

class QLocalSocket;

namespace Avogadro {
Expand Down
5 changes: 4 additions & 1 deletion avogadro/molequeue/inputgeneratordialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
******************************************************************************/

#include "inputgeneratordialog.h"
#include "ui_inputgeneratordialog.h"

#include "ui_inputgeneratordialog.h"
#include "inputgeneratorwidget.h"
#include "avogadro/molequeue/inputgenerator.h"

class QWidget;

namespace Avogadro::MoleQueue {

Expand Down
Loading