diff --git a/src/autotype/AutoType.cpp b/src/autotype/AutoType.cpp index 85b725df6..0ee96faea 100644 --- a/src/autotype/AutoType.cpp +++ b/src/autotype/AutoType.cpp @@ -19,18 +19,15 @@ #include "AutoType.h" #include +#include #include -#include +#include #include "config-keepassx.h" #include "autotype/AutoTypePlatformPlugin.h" #include "autotype/AutoTypeSelectDialog.h" #include "autotype/PickcharsDialog.h" -#include "core/Config.h" -#include "core/Database.h" -#include "core/Entry.h" -#include "core/Group.h" #include "core/Resources.h" #include "core/Tools.h" #include "gui/MainWindow.h" diff --git a/src/autotype/AutoType.h b/src/autotype/AutoType.h index e9d7e25e8..c91b08ad4 100644 --- a/src/autotype/AutoType.h +++ b/src/autotype/AutoType.h @@ -21,11 +21,8 @@ #include #include -#include #include -#include "autotype/AutoTypeMatch.h" - class AutoTypeAction; class AutoTypeExecutor; class AutoTypePlatformInterface; diff --git a/src/autotype/AutoTypeAction.h b/src/autotype/AutoTypeAction.h index cc291fb5f..48dd29cc9 100644 --- a/src/autotype/AutoTypeAction.h +++ b/src/autotype/AutoTypeAction.h @@ -19,8 +19,6 @@ #ifndef KEEPASSX_AUTOTYPEACTION_H #define KEEPASSX_AUTOTYPEACTION_H -#include - #include "core/Global.h" class AutoTypeExecutor; diff --git a/src/autotype/AutoTypeMatch.h b/src/autotype/AutoTypeMatch.h index 4f396546a..1b8f2c740 100644 --- a/src/autotype/AutoTypeMatch.h +++ b/src/autotype/AutoTypeMatch.h @@ -20,7 +20,6 @@ #include #include -#include class Entry; typedef QPair, QString> AutoTypeMatch; diff --git a/src/autotype/AutoTypeMatchModel.cpp b/src/autotype/AutoTypeMatchModel.cpp index f15df233b..128015898 100644 --- a/src/autotype/AutoTypeMatchModel.cpp +++ b/src/autotype/AutoTypeMatchModel.cpp @@ -20,9 +20,6 @@ #include -#include "core/DatabaseIcons.h" -#include "core/Entry.h" -#include "core/Global.h" #include "core/Group.h" #include "core/Metadata.h" diff --git a/src/autotype/AutoTypeMatchView.cpp b/src/autotype/AutoTypeMatchView.cpp index 12e01f479..c5d9eb36a 100644 --- a/src/autotype/AutoTypeMatchView.cpp +++ b/src/autotype/AutoTypeMatchView.cpp @@ -17,12 +17,8 @@ */ #include "AutoTypeMatchView.h" +#include "AutoTypeMatchModel.h" -#include "core/Entry.h" -#include "gui/Clipboard.h" -#include "gui/Icons.h" - -#include #include #include #include diff --git a/src/autotype/AutoTypeMatchView.h b/src/autotype/AutoTypeMatchView.h index 72a18a12e..cc4cf8e97 100644 --- a/src/autotype/AutoTypeMatchView.h +++ b/src/autotype/AutoTypeMatchView.h @@ -22,7 +22,8 @@ #include #include "autotype/AutoTypeMatch.h" -#include "autotype/AutoTypeMatchModel.h" + +class AutoTypeMatchModel; class QSortFilterProxyModel; diff --git a/src/autotype/PickcharsDialog.cpp b/src/autotype/PickcharsDialog.cpp index 4735e1ec9..798f2e228 100644 --- a/src/autotype/PickcharsDialog.cpp +++ b/src/autotype/PickcharsDialog.cpp @@ -18,7 +18,6 @@ #include "PickcharsDialog.h" #include "ui_PickcharsDialog.h" -#include "core/Entry.h" #include "gui/Icons.h" #include diff --git a/src/autotype/PickcharsDialog.h b/src/autotype/PickcharsDialog.h index dc35ae0bf..22d4c2a5a 100644 --- a/src/autotype/PickcharsDialog.h +++ b/src/autotype/PickcharsDialog.h @@ -19,8 +19,6 @@ #define KEEPASSXC_PICKCHARSDIALOG_H #include -#include -#include namespace Ui { diff --git a/src/autotype/test/AutoTypeTest.h b/src/autotype/test/AutoTypeTest.h index d61c9f6b5..3669c1cfc 100644 --- a/src/autotype/test/AutoTypeTest.h +++ b/src/autotype/test/AutoTypeTest.h @@ -20,7 +20,6 @@ #include -#include "autotype/AutoTypeAction.h" #include "autotype/AutoTypePlatformPlugin.h" #include "autotype/test/AutoTypeTestInterface.h" diff --git a/src/autotype/xcb/AutoTypeXCB.cpp b/src/autotype/xcb/AutoTypeXCB.cpp index 410a3f414..494f0b929 100644 --- a/src/autotype/xcb/AutoTypeXCB.cpp +++ b/src/autotype/xcb/AutoTypeXCB.cpp @@ -18,6 +18,13 @@ */ #include "AutoTypeXCB.h" +#include "core/Tools.h" +#include "gui/osutils/nixutils/X11Funcs.h" + +#include +#include +#include +#include AutoTypePlatformX11::AutoTypePlatformX11() { diff --git a/src/autotype/xcb/AutoTypeXCB.h b/src/autotype/xcb/AutoTypeXCB.h index 24c514290..f67a10a09 100644 --- a/src/autotype/xcb/AutoTypeXCB.h +++ b/src/autotype/xcb/AutoTypeXCB.h @@ -23,19 +23,11 @@ #include #include #include -#include #include -#include "autotype/AutoTypeAction.h" #include "autotype/AutoTypePlatformPlugin.h" -#include "core/Tools.h" -#include "gui/osutils/OSUtils.h" -#include "gui/osutils/nixutils/X11Funcs.h" #include -#include -#include -#include #define N_MOD_INDICES (Mod5MapIndex + 1) diff --git a/src/browser/BrowserAccessControlDialog.cpp b/src/browser/BrowserAccessControlDialog.cpp index 668631055..85c940254 100644 --- a/src/browser/BrowserAccessControlDialog.cpp +++ b/src/browser/BrowserAccessControlDialog.cpp @@ -18,6 +18,7 @@ #include "BrowserAccessControlDialog.h" #include "ui_BrowserAccessControlDialog.h" +#include #include "core/Entry.h" diff --git a/src/browser/BrowserAccessControlDialog.h b/src/browser/BrowserAccessControlDialog.h index 6b2fe52b1..0bf14ecc4 100644 --- a/src/browser/BrowserAccessControlDialog.h +++ b/src/browser/BrowserAccessControlDialog.h @@ -20,8 +20,7 @@ #define BROWSERACCESSCONTROLDIALOG_H #include -#include -#include +#include class Entry; diff --git a/src/browser/BrowserAction.cpp b/src/browser/BrowserAction.cpp index aa8fafa1f..0a33bdae3 100644 --- a/src/browser/BrowserAction.cpp +++ b/src/browser/BrowserAction.cpp @@ -16,14 +16,17 @@ */ #include "BrowserAction.h" + #include "BrowserService.h" #include "BrowserSettings.h" #include "BrowserShared.h" #include "config-keepassx.h" #include "core/Global.h" +#include #include -#include +#include + #include using namespace Botan::Sodium; diff --git a/src/browser/BrowserAction.h b/src/browser/BrowserAction.h index 06d6a131a..c9bc02120 100644 --- a/src/browser/BrowserAction.h +++ b/src/browser/BrowserAction.h @@ -18,9 +18,10 @@ #ifndef BROWSERACTION_H #define BROWSERACTION_H -#include #include +class QJsonObject; + class BrowserAction { public: diff --git a/src/browser/BrowserEntryConfig.cpp b/src/browser/BrowserEntryConfig.cpp index a058b6a05..80710e2c1 100644 --- a/src/browser/BrowserEntryConfig.cpp +++ b/src/browser/BrowserEntryConfig.cpp @@ -17,9 +17,13 @@ */ #include "BrowserEntryConfig.h" + +#include "browser/Variant.h" #include "core/Entry.h" -#include "core/EntryAttributes.h" -#include + +#include +#include +#include static const char KEEPASSXCBROWSER_NAME[] = "KeePassXC-Browser Settings"; diff --git a/src/browser/BrowserEntryConfig.h b/src/browser/BrowserEntryConfig.h index 183c492aa..6de4b0bc5 100644 --- a/src/browser/BrowserEntryConfig.h +++ b/src/browser/BrowserEntryConfig.h @@ -19,11 +19,9 @@ #ifndef BROWSERENTRYCONFIG_H #define BROWSERENTRYCONFIG_H -#include "Variant.h" -#include -#include -#include -#include +#include +#include +#include class Entry; diff --git a/src/browser/BrowserEntrySaveDialog.cpp b/src/browser/BrowserEntrySaveDialog.cpp index 43d6c0c62..16e0aec93 100644 --- a/src/browser/BrowserEntrySaveDialog.cpp +++ b/src/browser/BrowserEntrySaveDialog.cpp @@ -19,7 +19,6 @@ #include "BrowserEntrySaveDialog.h" #include "ui_BrowserEntrySaveDialog.h" -#include "core/Database.h" #include "gui/DatabaseWidget.h" BrowserEntrySaveDialog::BrowserEntrySaveDialog(QWidget* parent) diff --git a/src/browser/BrowserEntrySaveDialog.h b/src/browser/BrowserEntrySaveDialog.h index 2e2378635..8675e36fa 100644 --- a/src/browser/BrowserEntrySaveDialog.h +++ b/src/browser/BrowserEntrySaveDialog.h @@ -21,9 +21,7 @@ #include "gui/DatabaseTabWidget.h" -#include -#include -#include +class QListWidgetItem; class Entry; diff --git a/src/browser/BrowserHost.cpp b/src/browser/BrowserHost.cpp index ee3bc5c57..b58f0f5fb 100644 --- a/src/browser/BrowserHost.cpp +++ b/src/browser/BrowserHost.cpp @@ -16,16 +16,11 @@ */ #include "BrowserHost.h" -#include "BrowserSettings.h" #include "BrowserShared.h" #include #include #include -#include -#include - -#include #ifdef Q_OS_WIN #include @@ -34,7 +29,6 @@ #include #else #include -#include #endif BrowserHost::BrowserHost(QObject* parent) diff --git a/src/browser/BrowserService.cpp b/src/browser/BrowserService.cpp index fe76be6bd..1f4966ef7 100644 --- a/src/browser/BrowserService.cpp +++ b/src/browser/BrowserService.cpp @@ -17,26 +17,14 @@ * along with this program. If not, see . */ -#include -#include -#include -#include -#include -#include -#include +#include "BrowserService.h" #include "BrowserAccessControlDialog.h" #include "BrowserAction.h" #include "BrowserEntryConfig.h" #include "BrowserEntrySaveDialog.h" #include "BrowserHost.h" -#include "BrowserService.h" #include "BrowserSettings.h" -#include "core/Database.h" -#include "core/EntrySearcher.h" -#include "core/Group.h" -#include "core/Metadata.h" -#include "core/PasswordGenerator.h" #include "core/Tools.h" #include "gui/MainWindow.h" #include "gui/MessageBox.h" @@ -44,6 +32,16 @@ #include "gui/osutils/macutils/MacUtils.h" #endif +#include +#include +#include +#include +#include +#include +#include +#include +#include + const QString BrowserService::KEEPASSXCBROWSER_NAME = QStringLiteral("KeePassXC-Browser Settings"); const QString BrowserService::KEEPASSXCBROWSER_OLD_NAME = QStringLiteral("keepassxc-browser Settings"); static const QString KEEPASSXCBROWSER_GROUP_NAME = QStringLiteral("KeePassXC-Browser Passwords"); diff --git a/src/browser/BrowserService.h b/src/browser/BrowserService.h index 8f477b4a8..e45fd083e 100644 --- a/src/browser/BrowserService.h +++ b/src/browser/BrowserService.h @@ -21,10 +21,6 @@ #define BROWSERSERVICE_H #include "core/Entry.h" -#include -#include -#include -#include typedef QPair StringPair; typedef QList StringPairList; diff --git a/src/browser/BrowserSettings.cpp b/src/browser/BrowserSettings.cpp index d8822d879..331a25785 100644 --- a/src/browser/BrowserSettings.cpp +++ b/src/browser/BrowserSettings.cpp @@ -21,6 +21,8 @@ #include "core/Config.h" #include "core/PasswordHealth.h" +#include + BrowserSettings* BrowserSettings::m_instance(nullptr); BrowserSettings* BrowserSettings::instance() diff --git a/src/browser/BrowserSettings.h b/src/browser/BrowserSettings.h index c403d463d..3203e389d 100644 --- a/src/browser/BrowserSettings.h +++ b/src/browser/BrowserSettings.h @@ -20,7 +20,6 @@ #ifndef BROWSERSETTINGS_H #define BROWSERSETTINGS_H -#include "BrowserShared.h" #include "NativeMessageInstaller.h" #include "core/PassphraseGenerator.h" #include "core/PasswordGenerator.h" diff --git a/src/browser/BrowserSettingsWidget.cpp b/src/browser/BrowserSettingsWidget.cpp index 0c921f041..a9fd53231 100644 --- a/src/browser/BrowserSettingsWidget.cpp +++ b/src/browser/BrowserSettingsWidget.cpp @@ -20,7 +20,6 @@ #include "BrowserSettings.h" #include "config-keepassx.h" -#include "core/Resources.h" #include diff --git a/src/browser/BrowserSettingsWidget.h b/src/browser/BrowserSettingsWidget.h index 3f5ea5763..d84051d0e 100644 --- a/src/browser/BrowserSettingsWidget.h +++ b/src/browser/BrowserSettingsWidget.h @@ -19,7 +19,6 @@ #define BROWSERSETTINGSWIDGET_H #include -#include #include namespace Ui diff --git a/src/browser/BrowserShared.cpp b/src/browser/BrowserShared.cpp index 69d0db49f..18c3441ad 100644 --- a/src/browser/BrowserShared.cpp +++ b/src/browser/BrowserShared.cpp @@ -16,12 +16,10 @@ */ #include "BrowserShared.h" + #include "config-keepassx.h" -#include -#include #include -#include namespace BrowserShared { diff --git a/src/browser/NativeMessageInstaller.cpp b/src/browser/NativeMessageInstaller.cpp index 8b038f619..3e81c4957 100644 --- a/src/browser/NativeMessageInstaller.cpp +++ b/src/browser/NativeMessageInstaller.cpp @@ -23,9 +23,9 @@ #include #include #include -#include #include #include +#include #include #include #include diff --git a/src/browser/NativeMessageInstaller.h b/src/browser/NativeMessageInstaller.h index 4c0e339ee..256dd0c81 100644 --- a/src/browser/NativeMessageInstaller.h +++ b/src/browser/NativeMessageInstaller.h @@ -20,7 +20,9 @@ #define NATIVEMESSAGEINSTALLER_H #include "BrowserShared.h" -#include +#include + +class QJsonObject; class NativeMessageInstaller { diff --git a/src/browser/Variant.cpp b/src/browser/Variant.cpp index 64231736f..0db5899fd 100644 --- a/src/browser/Variant.cpp +++ b/src/browser/Variant.cpp @@ -15,7 +15,8 @@ * along with this program. If not, see . */ -#include "Variant.h" +#include +#include QVariantMap qo2qv(const QObject* object, const QStringList& ignoredProperties) { diff --git a/src/browser/Variant.h b/src/browser/Variant.h index 76211cdc9..084dc4a09 100644 --- a/src/browser/Variant.h +++ b/src/browser/Variant.h @@ -18,7 +18,7 @@ #ifndef VARIANT_H #define VARIANT_H -#include +#include QVariantMap qo2qv(const QObject* object, const QStringList& ignoredProperties = QStringList(QString(QLatin1String("objectName")))); diff --git a/src/cli/Add.cpp b/src/cli/Add.cpp index 6ff4fa36a..fe016160a 100644 --- a/src/cli/Add.cpp +++ b/src/cli/Add.cpp @@ -19,8 +19,10 @@ #include "Generate.h" #include "Utils.h" -#include "core/Entry.h" #include "core/Group.h" +#include "core/PasswordGenerator.h" + +#include const QCommandLineOption Add::UsernameOption = QCommandLineOption(QStringList() << "u" << "username", diff --git a/src/cli/AddGroup.cpp b/src/cli/AddGroup.cpp index 11c57f10c..64f5d8150 100644 --- a/src/cli/AddGroup.cpp +++ b/src/cli/AddGroup.cpp @@ -18,9 +18,10 @@ #include "AddGroup.h" #include "Utils.h" -#include "core/Entry.h" #include "core/Group.h" +#include + AddGroup::AddGroup() { name = QString("mkdir"); diff --git a/src/cli/Analyze.cpp b/src/cli/Analyze.cpp index 4498e1979..21093abf4 100644 --- a/src/cli/Analyze.cpp +++ b/src/cli/Analyze.cpp @@ -20,7 +20,6 @@ #include "Utils.h" #include "core/Group.h" #include "core/HibpOffline.h" -#include "core/Tools.h" #include #include diff --git a/src/cli/Clip.cpp b/src/cli/Clip.cpp index 10865092f..8f61e73c4 100644 --- a/src/cli/Clip.cpp +++ b/src/cli/Clip.cpp @@ -18,10 +18,11 @@ #include "Clip.h" #include "Utils.h" -#include "core/Entry.h" #include "core/Group.h" #include "core/Tools.h" +#include + #define CLI_DEFAULT_CLIP_TIMEOUT 10 const QCommandLineOption Clip::AttributeOption = QCommandLineOption( diff --git a/src/cli/Close.h b/src/cli/Close.h index afc91f9c6..94536beb2 100644 --- a/src/cli/Close.h +++ b/src/cli/Close.h @@ -18,8 +18,6 @@ #ifndef KEEPASSXC_CLOSE_H #define KEEPASSXC_CLOSE_H -#include - #include "Command.h" class Close : public Command diff --git a/src/cli/Command.cpp b/src/cli/Command.cpp index 82b22cb0e..ceb80c118 100644 --- a/src/cli/Command.cpp +++ b/src/cli/Command.cpp @@ -15,8 +15,6 @@ * along with this program. If not, see . */ -#include "Command.h" - #include "Add.h" #include "AddGroup.h" #include "Analyze.h" @@ -42,6 +40,7 @@ #include "Show.h" #include "Utils.h" +#include #include #include diff --git a/src/cli/Command.h b/src/cli/Command.h index c296f6fd6..43ffaf7e1 100644 --- a/src/cli/Command.h +++ b/src/cli/Command.h @@ -19,13 +19,11 @@ #define KEEPASSXC_COMMAND_H #include -#include -#include -#include -#include #include "core/Database.h" +class QCommandLineParser; + // At the moment, there's no QT class for the positional arguments // like there is for the options (QCommandLineOption). struct CommandLineArgument diff --git a/src/cli/Create.cpp b/src/cli/Create.cpp index c253312d1..59084c4e6 100644 --- a/src/cli/Create.cpp +++ b/src/cli/Create.cpp @@ -20,6 +20,7 @@ #include "Utils.h" #include "keys/FileKey.h" +#include #include const QCommandLineOption Create::DecryptionTimeOption = diff --git a/src/cli/DatabaseCommand.cpp b/src/cli/DatabaseCommand.cpp index 7456f418a..d3d3c641d 100644 --- a/src/cli/DatabaseCommand.cpp +++ b/src/cli/DatabaseCommand.cpp @@ -16,7 +16,11 @@ */ #include "DatabaseCommand.h" + #include "Utils.h" +#include "config-keepassx.h" + +#include DatabaseCommand::DatabaseCommand() { diff --git a/src/cli/Diceware.cpp b/src/cli/Diceware.cpp index cd73bed3d..b6a65bd1e 100644 --- a/src/cli/Diceware.cpp +++ b/src/cli/Diceware.cpp @@ -20,6 +20,8 @@ #include "Utils.h" #include "core/PassphraseGenerator.h" +#include + const QCommandLineOption Diceware::WordCountOption = QCommandLineOption(QStringList() << "W" << "words", diff --git a/src/cli/Edit.cpp b/src/cli/Edit.cpp index d4564f8f0..82352b0cd 100644 --- a/src/cli/Edit.cpp +++ b/src/cli/Edit.cpp @@ -20,8 +20,10 @@ #include "Add.h" #include "Generate.h" #include "Utils.h" -#include "core/Entry.h" #include "core/Group.h" +#include "core/PasswordGenerator.h" + +#include const QCommandLineOption Edit::TitleOption = QCommandLineOption(QStringList() << "t" << "title", diff --git a/src/cli/Estimate.cpp b/src/cli/Estimate.cpp index f97c8d1ee..094fcf36c 100644 --- a/src/cli/Estimate.cpp +++ b/src/cli/Estimate.cpp @@ -20,6 +20,7 @@ #include "Utils.h" #include "core/PasswordHealth.h" +#include #include const QCommandLineOption Estimate::AdvancedOption = diff --git a/src/cli/Exit.h b/src/cli/Exit.h index 8b0ce41f7..633805e59 100644 --- a/src/cli/Exit.h +++ b/src/cli/Exit.h @@ -18,9 +18,6 @@ #ifndef KEEPASSXC_EXIT_H #define KEEPASSXC_EXIT_H -#include -#include - #include "Command.h" class Exit : public Command diff --git a/src/cli/Export.cpp b/src/cli/Export.cpp index 787781174..6456fe5b1 100644 --- a/src/cli/Export.cpp +++ b/src/cli/Export.cpp @@ -21,6 +21,8 @@ #include "Utils.h" #include "format/CsvExporter.h" +#include + const QCommandLineOption Export::FormatOption = QCommandLineOption( QStringList() << "f" << "format", diff --git a/src/cli/Generate.cpp b/src/cli/Generate.cpp index fef828f65..9c2e57e09 100644 --- a/src/cli/Generate.cpp +++ b/src/cli/Generate.cpp @@ -17,8 +17,10 @@ #include "Generate.h" -#include "TextStream.h" #include "Utils.h" +#include "core/PasswordGenerator.h" + +#include const QCommandLineOption Generate::PasswordLengthOption = QCommandLineOption(QStringList() << "L" diff --git a/src/cli/Generate.h b/src/cli/Generate.h index c850ef1be..d77e1a087 100644 --- a/src/cli/Generate.h +++ b/src/cli/Generate.h @@ -20,7 +20,7 @@ #include "Command.h" -#include "core/PasswordGenerator.h" +class PasswordGenerator; class Generate : public Command { diff --git a/src/cli/Import.cpp b/src/cli/Import.cpp index 104a9b53d..cc231738c 100644 --- a/src/cli/Import.cpp +++ b/src/cli/Import.cpp @@ -20,6 +20,7 @@ #include "Create.h" #include "Utils.h" +#include #include /** diff --git a/src/cli/Info.cpp b/src/cli/Info.cpp index 5412dd0e5..4338cd000 100644 --- a/src/cli/Info.cpp +++ b/src/cli/Info.cpp @@ -21,6 +21,8 @@ #include "core/Global.h" #include "core/Metadata.h" +#include + Info::Info() { name = QString("db-info"); diff --git a/src/cli/List.cpp b/src/cli/List.cpp index 8959e5f1c..4140c1cd8 100644 --- a/src/cli/List.cpp +++ b/src/cli/List.cpp @@ -20,6 +20,8 @@ #include "Utils.h" #include "core/Group.h" +#include + const QCommandLineOption List::RecursiveOption = QCommandLineOption(QStringList() << "R" << "recursive", diff --git a/src/cli/Locate.cpp b/src/cli/Locate.cpp index ed1a39b70..8a2791324 100644 --- a/src/cli/Locate.cpp +++ b/src/cli/Locate.cpp @@ -17,9 +17,8 @@ #include "Locate.h" -#include +#include -#include "TextStream.h" #include "Utils.h" #include "core/Group.h" diff --git a/src/cli/Merge.cpp b/src/cli/Merge.cpp index 50f58f4cd..9d8711ed7 100644 --- a/src/cli/Merge.cpp +++ b/src/cli/Merge.cpp @@ -17,10 +17,11 @@ #include "Merge.h" -#include "TextStream.h" #include "Utils.h" #include "core/Merger.h" +#include + const QCommandLineOption Merge::SameCredentialsOption = QCommandLineOption(QStringList() << "s" << "same-credentials", diff --git a/src/cli/Move.cpp b/src/cli/Move.cpp index 960f9aae8..a42bb4760 100644 --- a/src/cli/Move.cpp +++ b/src/cli/Move.cpp @@ -17,11 +17,11 @@ #include "Move.h" -#include "TextStream.h" #include "Utils.h" -#include "core/Entry.h" #include "core/Group.h" +#include + Move::Move() { name = QString("mv"); diff --git a/src/cli/Open.cpp b/src/cli/Open.cpp index 2f7492fc7..57f3b34d5 100644 --- a/src/cli/Open.cpp +++ b/src/cli/Open.cpp @@ -17,6 +17,8 @@ #include "Open.h" +#include + Open::Open() { name = QString("open"); diff --git a/src/cli/Remove.cpp b/src/cli/Remove.cpp index 2f5ed2e95..c9381fdbe 100644 --- a/src/cli/Remove.cpp +++ b/src/cli/Remove.cpp @@ -17,11 +17,12 @@ #include "Remove.h" -#include "TextStream.h" #include "Utils.h" #include "core/Group.h" #include "core/Metadata.h" +#include + Remove::Remove() { name = QString("rm"); diff --git a/src/cli/RemoveGroup.cpp b/src/cli/RemoveGroup.cpp index b11b759a4..c495e8337 100644 --- a/src/cli/RemoveGroup.cpp +++ b/src/cli/RemoveGroup.cpp @@ -17,11 +17,12 @@ #include "RemoveGroup.h" -#include "TextStream.h" #include "Utils.h" #include "core/Group.h" #include "core/Metadata.h" +#include + RemoveGroup::RemoveGroup() { name = QString("rmdir"); diff --git a/src/cli/Show.cpp b/src/cli/Show.cpp index 979877161..e378c8e4a 100644 --- a/src/cli/Show.cpp +++ b/src/cli/Show.cpp @@ -20,6 +20,8 @@ #include "Utils.h" #include "core/Group.h" +#include + const QCommandLineOption Show::TotpOption = QCommandLineOption(QStringList() << "t" << "totp", QObject::tr("Show the entry's current TOTP.")); diff --git a/src/cli/Utils.cpp b/src/cli/Utils.cpp index 08fce77ac..7354be764 100644 --- a/src/cli/Utils.cpp +++ b/src/cli/Utils.cpp @@ -19,9 +19,7 @@ #include "core/Database.h" #include "core/EntryAttributes.h" -#include "keys/CompositeKey.h" #include "keys/FileKey.h" -#include "keys/PasswordKey.h" #ifdef WITH_XC_YUBIKEY #include "keys/ChallengeResponseKey.h" #endif @@ -35,7 +33,6 @@ #include #include -#include namespace Utils { diff --git a/src/cli/keepassxc-cli.cpp b/src/cli/keepassxc-cli.cpp index fb1341611..301e8b25e 100644 --- a/src/cli/keepassxc-cli.cpp +++ b/src/cli/keepassxc-cli.cpp @@ -17,10 +17,8 @@ #include #include -#include #include "Command.h" -#include "DatabaseCommand.h" #include "Open.h" #include "TextStream.h" #include "Utils.h" diff --git a/src/core/Alloc.cpp b/src/core/Alloc.cpp index 525a7e5c6..266f2a386 100644 --- a/src/core/Alloc.cpp +++ b/src/core/Alloc.cpp @@ -15,10 +15,7 @@ * along with this program. If not, see . */ -#include #include -#include -#include #if defined(Q_OS_MACOS) #include #elif defined(Q_OS_FREEBSD) diff --git a/src/core/AsyncTask.h b/src/core/AsyncTask.h index b113134d9..581865419 100644 --- a/src/core/AsyncTask.h +++ b/src/core/AsyncTask.h @@ -18,7 +18,6 @@ #ifndef KEEPASSXC_ASYNCTASK_HPP #define KEEPASSXC_ASYNCTASK_HPP -#include #include #include diff --git a/src/core/Base32.cpp b/src/core/Base32.cpp index 78448ffb5..05841121a 100644 --- a/src/core/Base32.cpp +++ b/src/core/Base32.cpp @@ -23,6 +23,9 @@ #include "Base32.h" +#include +#include + constexpr quint64 MASK_40BIT = quint64(0xF8) << 32; constexpr quint64 MASK_35BIT = quint64(0x7C0000000); constexpr quint64 MASK_25BIT = quint64(0x1F00000); diff --git a/src/core/Base32.h b/src/core/Base32.h index 204368c52..07b16a0cc 100644 --- a/src/core/Base32.h +++ b/src/core/Base32.h @@ -26,7 +26,6 @@ #include #include -#include class Base32 { diff --git a/src/core/Bootstrap.cpp b/src/core/Bootstrap.cpp index 4845ef0b1..e01bf7337 100644 --- a/src/core/Bootstrap.cpp +++ b/src/core/Bootstrap.cpp @@ -17,7 +17,6 @@ #include "Bootstrap.h" #include "config-keepassx.h" -#include "core/Config.h" #include "core/Translator.h" #ifdef Q_OS_WIN diff --git a/src/core/Compare.cpp b/src/core/Compare.cpp index 5dccdd781..414f97e0a 100644 --- a/src/core/Compare.cpp +++ b/src/core/Compare.cpp @@ -14,4 +14,3 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "Compare.h" diff --git a/src/core/Compare.h b/src/core/Compare.h index 921893859..15d1d144f 100644 --- a/src/core/Compare.h +++ b/src/core/Compare.h @@ -18,8 +18,6 @@ #ifndef KEEPASSXC_COMPARE_H #define KEEPASSXC_COMPARE_H -#include - #include "core/Clock.h" enum CompareItemOption diff --git a/src/core/Config.h b/src/core/Config.h index 5b480f084..34ec01e06 100644 --- a/src/core/Config.h +++ b/src/core/Config.h @@ -20,7 +20,6 @@ #define KEEPASSX_CONFIG_H #include -#include #include class QSettings; diff --git a/src/core/CsvParser.cpp b/src/core/CsvParser.cpp index 3370379ca..a376e3662 100644 --- a/src/core/CsvParser.cpp +++ b/src/core/CsvParser.cpp @@ -18,7 +18,7 @@ #include "CsvParser.h" -#include +#include #include #include "core/Tools.h" diff --git a/src/core/CsvParser.h b/src/core/CsvParser.h index d90e8300a..73fb13d24 100644 --- a/src/core/CsvParser.h +++ b/src/core/CsvParser.h @@ -20,10 +20,10 @@ #define KEEPASSX_CSVPARSER_H #include -#include -#include #include +class QFile; + typedef QStringList CsvRow; typedef QList CsvTable; diff --git a/src/core/CustomData.cpp b/src/core/CustomData.cpp index 6e1dbcb70..fc4401ef0 100644 --- a/src/core/CustomData.cpp +++ b/src/core/CustomData.cpp @@ -16,8 +16,8 @@ */ #include "CustomData.h" -#include "Clock.h" +#include "core/Clock.h" #include "core/Global.h" const QString CustomData::LastModified = QStringLiteral("_LAST_MODIFIED"); diff --git a/src/core/CustomData.h b/src/core/CustomData.h index 3879daffc..356d2c69f 100644 --- a/src/core/CustomData.h +++ b/src/core/CustomData.h @@ -20,8 +20,6 @@ #include #include -#include -#include #include "core/ModifiableObject.h" diff --git a/src/core/Database.cpp b/src/core/Database.cpp index 77398c608..d9ace8c2e 100644 --- a/src/core/Database.cpp +++ b/src/core/Database.cpp @@ -19,23 +19,18 @@ #include "Database.h" #include "core/AsyncTask.h" -#include "core/Clock.h" #include "core/FileWatcher.h" #include "core/Group.h" -#include "core/Merger.h" -#include "core/Metadata.h" #include "format/KdbxXmlReader.h" #include "format/KeePass2Reader.h" #include "format/KeePass2Writer.h" -#include "keys/FileKey.h" -#include "keys/PasswordKey.h" -#include #include +#include +#include #include #include #include -#include QHash> Database::s_uuidMap; diff --git a/src/core/Database.h b/src/core/Database.h index d51b4f230..d5e5b312e 100644 --- a/src/core/Database.h +++ b/src/core/Database.h @@ -23,13 +23,11 @@ #include #include #include -#include #include #include "config-keepassx.h" #include "core/ModifiableObject.h" #include "crypto/kdf/AesKdf.h" -#include "crypto/kdf/Kdf.h" #include "format/KeePass2.h" #include "keys/CompositeKey.h" #include "keys/PasswordKey.h" diff --git a/src/core/DatabaseIcons.cpp b/src/core/DatabaseIcons.cpp index b8d5fd382..a284d3842 100644 --- a/src/core/DatabaseIcons.cpp +++ b/src/core/DatabaseIcons.cpp @@ -19,8 +19,6 @@ #include "core/Config.h" #include "core/Global.h" -#include "core/Resources.h" -#include "gui/MainWindow.h" #include #include diff --git a/src/core/Endian.h b/src/core/Endian.h index c2d87ee3f..ed5f41945 100644 --- a/src/core/Endian.h +++ b/src/core/Endian.h @@ -19,9 +19,7 @@ #ifndef KEEPASSX_ENDIAN_H #define KEEPASSX_ENDIAN_H -#include #include -#include #include namespace Endian diff --git a/src/core/Entry.cpp b/src/core/Entry.cpp index c56c5f74e..e386a349d 100644 --- a/src/core/Entry.cpp +++ b/src/core/Entry.cpp @@ -15,10 +15,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include "Entry.h" #include "core/Config.h" -#include "core/Database.h" #include "core/DatabaseIcons.h" #include "core/Group.h" #include "core/Metadata.h" @@ -28,7 +28,7 @@ #include #include -#include +#include const int Entry::DefaultIconNumber = 0; const int Entry::ResolveMaximumDepth = 10; diff --git a/src/core/Entry.h b/src/core/Entry.h index 9dd58e5a7..99c0e6024 100644 --- a/src/core/Entry.h +++ b/src/core/Entry.h @@ -20,11 +20,7 @@ #define KEEPASSX_ENTRY_H #include -#include -#include #include -#include -#include #include #include "core/AutoTypeAssociations.h" @@ -32,7 +28,6 @@ #include "core/EntryAttachments.h" #include "core/EntryAttributes.h" #include "core/Global.h" -#include "core/ModifiableObject.h" #include "core/TimeInfo.h" class Database; diff --git a/src/core/EntryAttachments.cpp b/src/core/EntryAttachments.cpp index fea7a1bd4..be8135f5f 100644 --- a/src/core/EntryAttachments.cpp +++ b/src/core/EntryAttachments.cpp @@ -20,7 +20,6 @@ #include "core/Global.h" #include -#include EntryAttachments::EntryAttachments(QObject* parent) : ModifiableObject(parent) diff --git a/src/core/EntryAttributes.cpp b/src/core/EntryAttributes.cpp index aaa89d7d2..d6ca12102 100644 --- a/src/core/EntryAttributes.cpp +++ b/src/core/EntryAttributes.cpp @@ -20,6 +20,9 @@ #include "core/Global.h" +#include +#include + const QString EntryAttributes::TitleKey = "Title"; const QString EntryAttributes::UserNameKey = "UserName"; const QString EntryAttributes::PasswordKey = "Password"; diff --git a/src/core/EntryAttributes.h b/src/core/EntryAttributes.h index ee73f89b3..a9fcf7f60 100644 --- a/src/core/EntryAttributes.h +++ b/src/core/EntryAttributes.h @@ -21,10 +21,7 @@ #include #include -#include #include -#include -#include #include "core/ModifiableObject.h" diff --git a/src/core/EntrySearcher.h b/src/core/EntrySearcher.h index d1b17557b..c99639af1 100644 --- a/src/core/EntrySearcher.h +++ b/src/core/EntrySearcher.h @@ -20,7 +20,6 @@ #define KEEPASSX_ENTRYSEARCHER_H #include -#include class Group; class Entry; diff --git a/src/core/FileWatcher.cpp b/src/core/FileWatcher.cpp index 430e60274..c919a64ef 100644 --- a/src/core/FileWatcher.cpp +++ b/src/core/FileWatcher.cpp @@ -19,10 +19,8 @@ #include "core/AsyncTask.h" -#include - #ifdef Q_OS_LINUX -#include +#include #endif FileWatcher::FileWatcher(QObject* parent) diff --git a/src/core/Global.h b/src/core/Global.h index 6f48977b6..fe51b9b5d 100644 --- a/src/core/Global.h +++ b/src/core/Global.h @@ -21,7 +21,6 @@ #define KEEPASSX_GLOBAL_H #include -#include #if defined(Q_OS_WIN) #if defined(KEEPASSX_BUILDING_CORE) diff --git a/src/core/Group.cpp b/src/core/Group.cpp index 0564df82c..5e77d4951 100644 --- a/src/core/Group.cpp +++ b/src/core/Group.cpp @@ -19,10 +19,8 @@ #include "Group.h" #include "config-keepassx.h" -#include "core/Clock.h" #include "core/Config.h" #include "core/DatabaseIcons.h" -#include "core/Global.h" #include "core/Metadata.h" #include "core/Tools.h" @@ -30,7 +28,7 @@ #include "keeshare/KeeShare.h" #endif -#include +#include const int Group::DefaultIconNumber = 48; const int Group::RecycleBinIconNumber = 43; diff --git a/src/core/Group.h b/src/core/Group.h index ce32cdc16..021126b3e 100644 --- a/src/core/Group.h +++ b/src/core/Group.h @@ -20,15 +20,10 @@ #define KEEPASSX_GROUP_H #include -#include -#include #include "core/CustomData.h" #include "core/Database.h" #include "core/Entry.h" -#include "core/Global.h" -#include "core/ModifiableObject.h" -#include "core/TimeInfo.h" class Group : public ModifiableObject { diff --git a/src/core/HibpDownloader.cpp b/src/core/HibpDownloader.cpp index 53189af91..9ff181093 100644 --- a/src/core/HibpDownloader.cpp +++ b/src/core/HibpDownloader.cpp @@ -16,13 +16,10 @@ */ #include "HibpDownloader.h" -#include "core/Config.h" -#include "core/Global.h" #include "core/NetworkManager.h" #include -#include -#include +#include namespace { diff --git a/src/core/HibpDownloader.h b/src/core/HibpDownloader.h index 04c109bae..f8e66baf3 100644 --- a/src/core/HibpDownloader.h +++ b/src/core/HibpDownloader.h @@ -21,7 +21,6 @@ #include "config-keepassx.h" #include #include -#include #ifndef WITH_XC_NETWORKING #error This file requires KeePassXC to be built with network support. diff --git a/src/core/HibpOffline.cpp b/src/core/HibpOffline.cpp index 65ea63b4a..7a5d4d24c 100644 --- a/src/core/HibpOffline.cpp +++ b/src/core/HibpOffline.cpp @@ -17,13 +17,11 @@ #include "HibpOffline.h" -#include -#include -#include - -#include "core/Database.h" #include "core/Group.h" +#include +#include + namespace HibpOffline { const std::size_t SHA1_BYTES = 20; diff --git a/src/core/HibpOffline.h b/src/core/HibpOffline.h index 4548f58e1..da0363de9 100644 --- a/src/core/HibpOffline.h +++ b/src/core/HibpOffline.h @@ -18,9 +18,9 @@ #ifndef KEEPASSXC_HIBPOFFLINE_H #define KEEPASSXC_HIBPOFFLINE_H -#include -#include -#include +#include + +class QIODevice; class Database; class Entry; diff --git a/src/core/Merger.cpp b/src/core/Merger.cpp index 83b1e5a44..a5f532af2 100644 --- a/src/core/Merger.cpp +++ b/src/core/Merger.cpp @@ -17,9 +17,6 @@ #include "Merger.h" -#include "core/Clock.h" -#include "core/Database.h" -#include "core/Entry.h" #include "core/Metadata.h" Merger::Merger(const Database* sourceDb, Database* targetDb) diff --git a/src/core/Merger.h b/src/core/Merger.h index 712f4fde3..4b277f956 100644 --- a/src/core/Merger.h +++ b/src/core/Merger.h @@ -19,8 +19,6 @@ #define KEEPASSXC_MERGER_H #include "core/Group.h" -#include -#include class Database; class Entry; diff --git a/src/core/Metadata.cpp b/src/core/Metadata.cpp index 65adba49a..f99f42499 100644 --- a/src/core/Metadata.cpp +++ b/src/core/Metadata.cpp @@ -16,14 +16,12 @@ */ #include "Metadata.h" -#include -#include -#include "core/Clock.h" #include "core/DatabaseIcons.h" -#include "core/Entry.h" #include "core/Group.h" -#include "core/Tools.h" + +#include +#include const int Metadata::DefaultHistoryMaxItems = 10; const int Metadata::DefaultHistoryMaxSize = 6 * 1024 * 1024; diff --git a/src/core/Metadata.h b/src/core/Metadata.h index d833a0ae8..51276ec61 100644 --- a/src/core/Metadata.h +++ b/src/core/Metadata.h @@ -19,18 +19,12 @@ #define KEEPASSX_METADATA_H #include -#include #include -#include -#include -#include #include -#include #include #include "core/CustomData.h" #include "core/Global.h" -#include "core/ModifiableObject.h" class Database; class Group; diff --git a/src/core/NetworkManager.cpp b/src/core/NetworkManager.cpp index 52b54609f..8fc4c9e06 100644 --- a/src/core/NetworkManager.cpp +++ b/src/core/NetworkManager.cpp @@ -18,9 +18,11 @@ #include "config-keepassx.h" #ifdef WITH_XC_NETWORKING + #include "NetworkManager.h" #include +#include QNetworkAccessManager* g_netMgr = nullptr; QNetworkAccessManager* getNetMgr() diff --git a/src/core/NetworkManager.h b/src/core/NetworkManager.h index 561621874..1e571d95c 100644 --- a/src/core/NetworkManager.h +++ b/src/core/NetworkManager.h @@ -19,12 +19,10 @@ #define KEEPASSXC_NETWORKMANAGER_H #include "config-keepassx.h" -#include #ifdef WITH_XC_NETWORKING -#include -#include -#include + +class QNetworkAccessManager; QNetworkAccessManager* getNetMgr(); #else diff --git a/src/core/PassphraseGenerator.h b/src/core/PassphraseGenerator.h index 5868faab4..bb282f59b 100644 --- a/src/core/PassphraseGenerator.h +++ b/src/core/PassphraseGenerator.h @@ -18,8 +18,6 @@ #ifndef KEEPASSX_PASSPHRASEGENERATOR_H #define KEEPASSX_PASSPHRASEGENERATOR_H -#include -#include #include class PassphraseGenerator diff --git a/src/core/PasswordGenerator.h b/src/core/PasswordGenerator.h index 308142563..7ea7eb155 100644 --- a/src/core/PasswordGenerator.h +++ b/src/core/PasswordGenerator.h @@ -19,8 +19,6 @@ #ifndef KEEPASSX_PASSWORDGENERATOR_H #define KEEPASSX_PASSWORDGENERATOR_H -#include -#include #include typedef QVector PasswordGroup; diff --git a/src/core/PasswordHealth.cpp b/src/core/PasswordHealth.cpp index 583509eb0..7b52fa4ba 100644 --- a/src/core/PasswordHealth.cpp +++ b/src/core/PasswordHealth.cpp @@ -15,11 +15,8 @@ * along with this program. If not, see . */ -#include #include -#include "Database.h" -#include "Entry.h" #include "Group.h" #include "PasswordHealth.h" #include "zxcvbn.h" diff --git a/src/core/PasswordHealth.h b/src/core/PasswordHealth.h index 6f1139997..6e3179253 100644 --- a/src/core/PasswordHealth.h +++ b/src/core/PasswordHealth.h @@ -20,7 +20,6 @@ #include #include -#include class Database; class Entry; diff --git a/src/core/Resources.cpp b/src/core/Resources.cpp index 463abe530..c9eb4cb6c 100644 --- a/src/core/Resources.cpp +++ b/src/core/Resources.cpp @@ -23,7 +23,6 @@ #include #include "config-keepassx.h" -#include "core/Config.h" #include "core/Global.h" Resources* Resources::m_instance(nullptr); diff --git a/src/core/SignalMultiplexer.h b/src/core/SignalMultiplexer.h index b27e1f3a6..727c4a3a3 100644 --- a/src/core/SignalMultiplexer.h +++ b/src/core/SignalMultiplexer.h @@ -18,7 +18,6 @@ #ifndef KEEPASSX_SIGNALMULTIPLEXER_H #define KEEPASSX_SIGNALMULTIPLEXER_H -#include #include class SignalMultiplexer diff --git a/src/core/TimeInfo.cpp b/src/core/TimeInfo.cpp index 9f4faf3a4..5687fe00c 100644 --- a/src/core/TimeInfo.cpp +++ b/src/core/TimeInfo.cpp @@ -17,8 +17,6 @@ #include "TimeInfo.h" -#include "core/Clock.h" - TimeInfo::TimeInfo() : m_expires(false) , m_usageCount(0) diff --git a/src/core/TimeInfo.h b/src/core/TimeInfo.h index de8a37593..077c0a9f3 100644 --- a/src/core/TimeInfo.h +++ b/src/core/TimeInfo.h @@ -19,7 +19,6 @@ #define KEEPASSX_TIMEINFO_H #include -#include #include "core/Compare.h" diff --git a/src/core/Tools.cpp b/src/core/Tools.cpp index d92d1b4a8..2011a2d44 100644 --- a/src/core/Tools.cpp +++ b/src/core/Tools.cpp @@ -20,30 +20,20 @@ #include "Tools.h" #include "config-keepassx.h" -#include "core/Config.h" -#include "core/Translator.h" - #include "git-info.h" -#include + #include -#include #include #include #include #include -#include #include #include -#include #ifdef Q_OS_WIN #include // for Sleep() #endif -#ifdef Q_OS_UNIX -#include // for nanosleep() -#endif - namespace Tools { QString debugInfo() diff --git a/src/core/Tools.h b/src/core/Tools.h index c7bf5093f..e60d46633 100644 --- a/src/core/Tools.h +++ b/src/core/Tools.h @@ -21,12 +21,7 @@ #include "core/Global.h" -#include #include -#include -#include - -#include class QIODevice; class QRegularExpression; diff --git a/src/core/Translator.h b/src/core/Translator.h index 8236ade43..af699ac90 100644 --- a/src/core/Translator.h +++ b/src/core/Translator.h @@ -18,9 +18,7 @@ #ifndef KEEPASSX_TRANSLATOR_H #define KEEPASSX_TRANSLATOR_H -#include -#include -#include +#include class Translator { diff --git a/src/crypto/CryptoHash.cpp b/src/crypto/CryptoHash.cpp index d3d5ee9fe..5177bb86f 100644 --- a/src/crypto/CryptoHash.cpp +++ b/src/crypto/CryptoHash.cpp @@ -18,9 +18,8 @@ #include "CryptoHash.h" -#include "crypto/Crypto.h" - #include + #include #include diff --git a/src/crypto/Random.cpp b/src/crypto/Random.cpp index 430a413d1..02575e31e 100644 --- a/src/crypto/Random.cpp +++ b/src/crypto/Random.cpp @@ -18,12 +18,9 @@ #include "Random.h" #include "core/Global.h" -#include "crypto/Crypto.h" -#include #include -#include #include QSharedPointer Random::m_instance; diff --git a/src/crypto/Random.h b/src/crypto/Random.h index 2a9445a92..d1fba9c80 100644 --- a/src/crypto/Random.h +++ b/src/crypto/Random.h @@ -18,8 +18,6 @@ #ifndef KEEPASSX_RANDOM_H #define KEEPASSX_RANDOM_H -#include -#include #include #include diff --git a/src/crypto/SymmetricCipher.cpp b/src/crypto/SymmetricCipher.cpp index c894ca305..b21a1ef47 100644 --- a/src/crypto/SymmetricCipher.cpp +++ b/src/crypto/SymmetricCipher.cpp @@ -16,9 +16,9 @@ */ #include "SymmetricCipher.h" -#include #include "config-keepassx.h" +#include "format/KeePass2.h" #include #include diff --git a/src/crypto/SymmetricCipher.h b/src/crypto/SymmetricCipher.h index 5bc2caab9..f666582f7 100644 --- a/src/crypto/SymmetricCipher.h +++ b/src/crypto/SymmetricCipher.h @@ -19,11 +19,8 @@ #define KEEPASSX_SYMMETRICCIPHER_H #include -#include +#include #include -#include - -#include "format/KeePass2.h" namespace Botan { diff --git a/src/crypto/kdf/Argon2Kdf.cpp b/src/crypto/kdf/Argon2Kdf.cpp index 979a6825c..59919500e 100644 --- a/src/crypto/kdf/Argon2Kdf.cpp +++ b/src/crypto/kdf/Argon2Kdf.cpp @@ -17,7 +17,7 @@ #include "Argon2Kdf.h" -#include +#include #include #include "format/KeePass2.h" diff --git a/src/crypto/kdf/Kdf.cpp b/src/crypto/kdf/Kdf.cpp index 7c803a12f..0e26f0581 100644 --- a/src/crypto/kdf/Kdf.cpp +++ b/src/crypto/kdf/Kdf.cpp @@ -17,8 +17,6 @@ #include "Kdf.h" -#include - #include "crypto/Random.h" Kdf::Kdf(const QUuid& uuid) diff --git a/src/fdosecrets/FdoSecretsPlugin.cpp b/src/fdosecrets/FdoSecretsPlugin.cpp index 20247a571..b86ae805b 100644 --- a/src/fdosecrets/FdoSecretsPlugin.cpp +++ b/src/fdosecrets/FdoSecretsPlugin.cpp @@ -18,8 +18,6 @@ #include "FdoSecretsPlugin.h" #include "fdosecrets/FdoSecretsSettings.h" -#include "fdosecrets/dbus/DBusMgr.h" -#include "fdosecrets/dbus/DBusTypes.h" #include "fdosecrets/objects/Service.h" #include "fdosecrets/widgets/SettingsWidgetFdoSecrets.h" diff --git a/src/fdosecrets/FdoSecretsPlugin.h b/src/fdosecrets/FdoSecretsPlugin.h index 13f8669f8..ad4e7003a 100644 --- a/src/fdosecrets/FdoSecretsPlugin.h +++ b/src/fdosecrets/FdoSecretsPlugin.h @@ -23,8 +23,6 @@ #include -#include - class DatabaseTabWidget; namespace FdoSecrets diff --git a/src/fdosecrets/FdoSecretsSettings.cpp b/src/fdosecrets/FdoSecretsSettings.cpp index c2ebf9d43..58126733a 100644 --- a/src/fdosecrets/FdoSecretsSettings.cpp +++ b/src/fdosecrets/FdoSecretsSettings.cpp @@ -18,7 +18,6 @@ #include "FdoSecretsSettings.h" #include "core/Config.h" -#include "core/CustomData.h" #include "core/Database.h" #include "core/Metadata.h" diff --git a/src/fdosecrets/dbus/DBusClient.h b/src/fdosecrets/dbus/DBusClient.h index 994a9d4f6..60a72b5fa 100644 --- a/src/fdosecrets/dbus/DBusClient.h +++ b/src/fdosecrets/dbus/DBusClient.h @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include "core/Global.h" diff --git a/src/fdosecrets/dbus/DBusDispatch.cpp b/src/fdosecrets/dbus/DBusDispatch.cpp index eecce574c..4912f1340 100644 --- a/src/fdosecrets/dbus/DBusDispatch.cpp +++ b/src/fdosecrets/dbus/DBusDispatch.cpp @@ -15,17 +15,11 @@ * along with this program. If not, see . */ -#include "DBusMgr.h" - #include "fdosecrets/dbus/DBusObject.h" -#include "fdosecrets/dbus/DBusTypes.h" -#include "fdosecrets/objects/Item.h" -#include "fdosecrets/objects/Service.h" - -#include "core/Global.h" #include #include +#include namespace FdoSecrets { diff --git a/src/fdosecrets/dbus/DBusMgr.cpp b/src/fdosecrets/dbus/DBusMgr.cpp index cd44ce2f9..2b9b038ae 100644 --- a/src/fdosecrets/dbus/DBusMgr.cpp +++ b/src/fdosecrets/dbus/DBusMgr.cpp @@ -17,8 +17,6 @@ #include "DBusMgr.h" -#include "fdosecrets/dbus/DBusConstants.h" -#include "fdosecrets/dbus/DBusTypes.h" #include "fdosecrets/objects/Collection.h" #include "fdosecrets/objects/Item.h" #include "fdosecrets/objects/Prompt.h" @@ -28,10 +26,6 @@ #include "core/Entry.h" #include "core/Tools.h" -#include -#include -#include - namespace FdoSecrets { static const auto IntrospectionService = R"xml( diff --git a/src/fdosecrets/dbus/DBusMgr.h b/src/fdosecrets/dbus/DBusMgr.h index ce4a88fc5..918e5e87d 100644 --- a/src/fdosecrets/dbus/DBusMgr.h +++ b/src/fdosecrets/dbus/DBusMgr.h @@ -20,17 +20,11 @@ #include "fdosecrets/dbus/DBusClient.h" -#include #include -#include #include #include #include -#include -#include -#include - -#include +#include class TestFdoSecrets; diff --git a/src/fdosecrets/dbus/DBusObject.cpp b/src/fdosecrets/dbus/DBusObject.cpp index 63a8df604..6ceed1372 100644 --- a/src/fdosecrets/dbus/DBusObject.cpp +++ b/src/fdosecrets/dbus/DBusObject.cpp @@ -17,8 +17,6 @@ #include "DBusObject.h" -#include -#include #include namespace FdoSecrets diff --git a/src/fdosecrets/dbus/DBusObject.h b/src/fdosecrets/dbus/DBusObject.h index d11778907..d2314438d 100644 --- a/src/fdosecrets/dbus/DBusObject.h +++ b/src/fdosecrets/dbus/DBusObject.h @@ -22,16 +22,7 @@ #include "DBusMgr.h" #include "DBusTypes.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include #ifndef Q_MOC_RUN // define the tag text as empty, so the compiler doesn't see it diff --git a/src/fdosecrets/dbus/DBusTypes.cpp b/src/fdosecrets/dbus/DBusTypes.cpp index 715c95237..e934d4ad1 100644 --- a/src/fdosecrets/dbus/DBusTypes.cpp +++ b/src/fdosecrets/dbus/DBusTypes.cpp @@ -16,9 +16,6 @@ * along with this program. If not, see . */ -#include "DBusTypes.h" - -#include "fdosecrets/dbus/DBusMgr.h" #include "fdosecrets/objects/Collection.h" #include "fdosecrets/objects/Item.h" #include "fdosecrets/objects/Prompt.h" diff --git a/src/fdosecrets/dbus/DBusTypes.h b/src/fdosecrets/dbus/DBusTypes.h index 01171e530..e0e44890f 100644 --- a/src/fdosecrets/dbus/DBusTypes.h +++ b/src/fdosecrets/dbus/DBusTypes.h @@ -21,9 +21,6 @@ #define KEEPASSXC_FDOSECRETS_DBUSTYPES_H #include -#include -#include -#include namespace FdoSecrets { diff --git a/src/fdosecrets/objects/Collection.cpp b/src/fdosecrets/objects/Collection.cpp index 7b86e0d9f..c4e24839b 100644 --- a/src/fdosecrets/objects/Collection.cpp +++ b/src/fdosecrets/objects/Collection.cpp @@ -17,21 +17,15 @@ #include "Collection.h" -#include "fdosecrets/FdoSecretsPlugin.h" #include "fdosecrets/FdoSecretsSettings.h" -#include "fdosecrets/dbus/DBusMgr.h" #include "fdosecrets/objects/Item.h" #include "fdosecrets/objects/Prompt.h" #include "fdosecrets/objects/Service.h" -#include "fdosecrets/objects/Session.h" -#include "core/Config.h" #include "core/Tools.h" -#include "gui/DatabaseTabWidget.h" #include "gui/DatabaseWidget.h" #include -#include namespace FdoSecrets { diff --git a/src/fdosecrets/objects/Collection.h b/src/fdosecrets/objects/Collection.h index d80fc0e3b..690eb0d99 100644 --- a/src/fdosecrets/objects/Collection.h +++ b/src/fdosecrets/objects/Collection.h @@ -23,9 +23,6 @@ #include "core/EntrySearcher.h" -#include -#include - class Database; class DatabaseWidget; class Entry; diff --git a/src/fdosecrets/objects/Item.cpp b/src/fdosecrets/objects/Item.cpp index 56132e721..e6c2831b4 100644 --- a/src/fdosecrets/objects/Item.cpp +++ b/src/fdosecrets/objects/Item.cpp @@ -18,20 +18,15 @@ #include "Item.h" #include "fdosecrets/FdoSecretsPlugin.h" -#include "fdosecrets/dbus/DBusMgr.h" #include "fdosecrets/objects/Collection.h" #include "fdosecrets/objects/Prompt.h" #include "fdosecrets/objects/Service.h" #include "fdosecrets/objects/Session.h" -#include "core/Entry.h" #include "core/EntryAttributes.h" #include "core/Group.h" -#include "core/Metadata.h" #include -#include -#include #include #include diff --git a/src/fdosecrets/objects/Item.h b/src/fdosecrets/objects/Item.h index f246a31e1..e11cdb88c 100644 --- a/src/fdosecrets/objects/Item.h +++ b/src/fdosecrets/objects/Item.h @@ -21,8 +21,6 @@ #include "fdosecrets/dbus/DBusClient.h" #include "fdosecrets/dbus/DBusObject.h" -#include - class Entry; namespace FdoSecrets diff --git a/src/fdosecrets/objects/Prompt.cpp b/src/fdosecrets/objects/Prompt.cpp index 78cc3efa6..6ffbce000 100644 --- a/src/fdosecrets/objects/Prompt.cpp +++ b/src/fdosecrets/objects/Prompt.cpp @@ -17,21 +17,18 @@ #include "Prompt.h" -#include "fdosecrets/FdoSecretsPlugin.h" -#include "fdosecrets/dbus/DBusMgr.h" #include "fdosecrets/objects/Collection.h" #include "fdosecrets/objects/Item.h" #include "fdosecrets/objects/Service.h" #include "fdosecrets/objects/Session.h" #include "fdosecrets/widgets/AccessControlDialog.h" -#include "core/Tools.h" -#include "gui/DatabaseWidget.h" +#include "core/Entry.h" #include "gui/MessageBox.h" #include +#include #include -#include namespace FdoSecrets { diff --git a/src/fdosecrets/objects/Prompt.h b/src/fdosecrets/objects/Prompt.h index ea5afc5d6..e3de1916a 100644 --- a/src/fdosecrets/objects/Prompt.h +++ b/src/fdosecrets/objects/Prompt.h @@ -22,9 +22,6 @@ #include "fdosecrets/dbus/DBusClient.h" #include "fdosecrets/dbus/DBusObject.h" -#include -#include - class QWindow; class DatabaseWidget; diff --git a/src/fdosecrets/objects/Service.cpp b/src/fdosecrets/objects/Service.cpp index 1751efdb2..dc42b632e 100644 --- a/src/fdosecrets/objects/Service.cpp +++ b/src/fdosecrets/objects/Service.cpp @@ -19,7 +19,6 @@ #include "fdosecrets/FdoSecretsPlugin.h" #include "fdosecrets/FdoSecretsSettings.h" -#include "fdosecrets/dbus/DBusMgr.h" #include "fdosecrets/objects/Collection.h" #include "fdosecrets/objects/Item.h" #include "fdosecrets/objects/Prompt.h" @@ -28,10 +27,6 @@ #include "gui/DatabaseTabWidget.h" #include "gui/DatabaseWidget.h" -#include -#include -#include - namespace { constexpr auto DEFAULT_ALIAS = "default"; diff --git a/src/fdosecrets/objects/Service.h b/src/fdosecrets/objects/Service.h index 674e5c225..84eee230d 100644 --- a/src/fdosecrets/objects/Service.h +++ b/src/fdosecrets/objects/Service.h @@ -21,11 +21,6 @@ #include "fdosecrets/dbus/DBusClient.h" #include "fdosecrets/dbus/DBusObject.h" -#include -#include -#include -#include - class DatabaseTabWidget; class DatabaseWidget; class Group; diff --git a/src/fdosecrets/objects/Session.cpp b/src/fdosecrets/objects/Session.cpp index 04c9f6076..1e75c7a8e 100644 --- a/src/fdosecrets/objects/Session.cpp +++ b/src/fdosecrets/objects/Session.cpp @@ -17,8 +17,7 @@ #include "Session.h" -#include "fdosecrets/FdoSecretsPlugin.h" -#include "fdosecrets/dbus/DBusMgr.h" +#include "fdosecrets/objects/Service.h" #include "fdosecrets/objects/SessionCipher.h" #include "core/Tools.h" diff --git a/src/fdosecrets/objects/Session.h b/src/fdosecrets/objects/Session.h index f3366d680..361f7157f 100644 --- a/src/fdosecrets/objects/Session.h +++ b/src/fdosecrets/objects/Session.h @@ -19,11 +19,6 @@ #define KEEPASSXC_FDOSECRETS_SESSION_H #include "fdosecrets/dbus/DBusObject.h" -#include "fdosecrets/objects/Service.h" - -#include -#include -#include namespace FdoSecrets { diff --git a/src/fdosecrets/objects/SessionCipher.cpp b/src/fdosecrets/objects/SessionCipher.cpp index b7129911b..147e820b8 100644 --- a/src/fdosecrets/objects/SessionCipher.cpp +++ b/src/fdosecrets/objects/SessionCipher.cpp @@ -20,6 +20,7 @@ #include "crypto/Random.h" #include "crypto/SymmetricCipher.h" +#include #include #include diff --git a/src/fdosecrets/objects/SessionCipher.h b/src/fdosecrets/objects/SessionCipher.h index e9b6262e5..4f1a2ec42 100644 --- a/src/fdosecrets/objects/SessionCipher.h +++ b/src/fdosecrets/objects/SessionCipher.h @@ -18,7 +18,9 @@ #ifndef KEEPASSXC_FDOSECRETS_SESSIONCIPHER_H #define KEEPASSXC_FDOSECRETS_SESSIONCIPHER_H -#include "fdosecrets/objects/Session.h" +#include "fdosecrets/dbus/DBusTypes.h" + +#include namespace Botan { diff --git a/src/fdosecrets/widgets/AccessControlDialog.cpp b/src/fdosecrets/widgets/AccessControlDialog.cpp index 1cc3a983d..c6ee32a5a 100644 --- a/src/fdosecrets/widgets/AccessControlDialog.cpp +++ b/src/fdosecrets/widgets/AccessControlDialog.cpp @@ -26,7 +26,7 @@ #include -#include +#include AccessControlDialog::AccessControlDialog(QWindow* parent, const QList& entries, diff --git a/src/fdosecrets/widgets/AccessControlDialog.h b/src/fdosecrets/widgets/AccessControlDialog.h index 0c394b123..894413dd0 100644 --- a/src/fdosecrets/widgets/AccessControlDialog.h +++ b/src/fdosecrets/widgets/AccessControlDialog.h @@ -24,7 +24,6 @@ #include #include #include -#include #include #include "core/Global.h" diff --git a/src/fdosecrets/widgets/DatabaseSettingsWidgetFdoSecrets.cpp b/src/fdosecrets/widgets/DatabaseSettingsWidgetFdoSecrets.cpp index 7c7e3abe5..855906098 100644 --- a/src/fdosecrets/widgets/DatabaseSettingsWidgetFdoSecrets.cpp +++ b/src/fdosecrets/widgets/DatabaseSettingsWidgetFdoSecrets.cpp @@ -20,7 +20,6 @@ #include "fdosecrets/FdoSecretsSettings.h" -#include "core/Database.h" #include "core/Group.h" #include "core/Metadata.h" #include "gui/group/GroupModel.h" diff --git a/src/fdosecrets/widgets/RowButtonHelper.cpp b/src/fdosecrets/widgets/RowButtonHelper.cpp index b2f816802..8b0627e99 100644 --- a/src/fdosecrets/widgets/RowButtonHelper.cpp +++ b/src/fdosecrets/widgets/RowButtonHelper.cpp @@ -15,13 +15,10 @@ * along with this program. If not, see . */ -#include "RowButtonHelper.h" - #include -#include #include -#include +#include namespace { diff --git a/src/fdosecrets/widgets/SettingsModels.cpp b/src/fdosecrets/widgets/SettingsModels.cpp index aa2b33ada..d99079abd 100644 --- a/src/fdosecrets/widgets/SettingsModels.cpp +++ b/src/fdosecrets/widgets/SettingsModels.cpp @@ -17,11 +17,8 @@ #include "SettingsModels.h" -#include "fdosecrets/FdoSecretsPlugin.h" #include "fdosecrets/FdoSecretsSettings.h" #include "fdosecrets/dbus/DBusMgr.h" -#include "fdosecrets/objects/Service.h" -#include "fdosecrets/objects/Session.h" #include "gui/DatabaseTabWidget.h" #include "gui/DatabaseWidget.h" diff --git a/src/fdosecrets/widgets/SettingsModels.h b/src/fdosecrets/widgets/SettingsModels.h index e933f5cfa..1482f5093 100644 --- a/src/fdosecrets/widgets/SettingsModels.h +++ b/src/fdosecrets/widgets/SettingsModels.h @@ -21,7 +21,6 @@ #include "fdosecrets/dbus/DBusClient.h" #include -#include class DatabaseTabWidget; class DatabaseWidget; diff --git a/src/fdosecrets/widgets/SettingsWidgetFdoSecrets.cpp b/src/fdosecrets/widgets/SettingsWidgetFdoSecrets.cpp index 5b7b8054b..251f18ed9 100644 --- a/src/fdosecrets/widgets/SettingsWidgetFdoSecrets.cpp +++ b/src/fdosecrets/widgets/SettingsWidgetFdoSecrets.cpp @@ -20,16 +20,12 @@ #include "fdosecrets/FdoSecretsPlugin.h" #include "fdosecrets/FdoSecretsSettings.h" -#include "fdosecrets/dbus/DBusMgr.h" -#include "fdosecrets/objects/Session.h" #include "fdosecrets/widgets/RowButtonHelper.h" #include "fdosecrets/widgets/SettingsModels.h" +#include "objects/Service.h" #include "gui/DatabaseWidget.h" -#include "gui/Icons.h" -#include -#include #include using FdoSecrets::DBusClientPtr; diff --git a/src/fdosecrets/widgets/SettingsWidgetFdoSecrets.h b/src/fdosecrets/widgets/SettingsWidgetFdoSecrets.h index c4a58a5eb..df7bcf7ff 100644 --- a/src/fdosecrets/widgets/SettingsWidgetFdoSecrets.h +++ b/src/fdosecrets/widgets/SettingsWidgetFdoSecrets.h @@ -20,9 +20,7 @@ #include "gui/MessageWidget.h" -#include #include -#include class QAbstractItemView; diff --git a/src/format/CsvExporter.cpp b/src/format/CsvExporter.cpp index 281b94761..bbc8b208a 100644 --- a/src/format/CsvExporter.cpp +++ b/src/format/CsvExporter.cpp @@ -20,7 +20,6 @@ #include -#include "core/Database.h" #include "core/Group.h" bool CsvExporter::exportDatabase(const QString& filename, const QSharedPointer& db) diff --git a/src/format/CsvExporter.h b/src/format/CsvExporter.h index a982ed109..0ce10a6d1 100644 --- a/src/format/CsvExporter.h +++ b/src/format/CsvExporter.h @@ -19,8 +19,8 @@ #ifndef KEEPASSX_CSVEXPORTER_H #define KEEPASSX_CSVEXPORTER_H +#include #include -#include class Database; class Group; diff --git a/src/format/HtmlExporter.cpp b/src/format/HtmlExporter.cpp index e0ce2c800..ea6e9e5c2 100644 --- a/src/format/HtmlExporter.cpp +++ b/src/format/HtmlExporter.cpp @@ -20,8 +20,6 @@ #include #include -#include "core/Database.h" -#include "core/Global.h" #include "core/Group.h" #include "core/Metadata.h" diff --git a/src/format/Kdbx3Reader.cpp b/src/format/Kdbx3Reader.cpp index 752e3943d..5c718d6a0 100644 --- a/src/format/Kdbx3Reader.cpp +++ b/src/format/Kdbx3Reader.cpp @@ -25,10 +25,9 @@ #include "format/KdbxXmlReader.h" #include "format/KeePass2RandomStream.h" #include "streams/HashedBlockStream.h" -#include "streams/QtIOCompressor" +#include "streams/StoreDataStream.h" #include "streams/SymmetricCipherStream.h" - -#include +#include "streams/qtiocompressor.h" bool Kdbx3Reader::readDatabaseImpl(QIODevice* device, const QByteArray& headerData, diff --git a/src/format/Kdbx3Writer.cpp b/src/format/Kdbx3Writer.cpp index fae213234..7ba4c3f36 100644 --- a/src/format/Kdbx3Writer.cpp +++ b/src/format/Kdbx3Writer.cpp @@ -20,15 +20,13 @@ #include -#include "core/Database.h" #include "crypto/CryptoHash.h" #include "crypto/Random.h" #include "format/KdbxXmlWriter.h" -#include "format/KeePass2.h" #include "format/KeePass2RandomStream.h" #include "streams/HashedBlockStream.h" -#include "streams/QtIOCompressor" #include "streams/SymmetricCipherStream.h" +#include "streams/qtiocompressor.h" bool Kdbx3Writer::writeDatabase(QIODevice* device, Database* db) { diff --git a/src/format/Kdbx4Reader.cpp b/src/format/Kdbx4Reader.cpp index 7d583f9fb..c25c3e31b 100644 --- a/src/format/Kdbx4Reader.cpp +++ b/src/format/Kdbx4Reader.cpp @@ -18,6 +18,7 @@ #include "Kdbx4Reader.h" #include +#include #include "core/AsyncTask.h" #include "core/Endian.h" @@ -26,8 +27,9 @@ #include "format/KdbxXmlReader.h" #include "format/KeePass2RandomStream.h" #include "streams/HmacBlockStream.h" -#include "streams/QtIOCompressor" +#include "streams/StoreDataStream.h" #include "streams/SymmetricCipherStream.h" +#include "streams/qtiocompressor.h" bool Kdbx4Reader::readDatabaseImpl(QIODevice* device, const QByteArray& headerData, diff --git a/src/format/Kdbx4Reader.h b/src/format/Kdbx4Reader.h index fc73a1fbd..301d4ff6c 100644 --- a/src/format/Kdbx4Reader.h +++ b/src/format/Kdbx4Reader.h @@ -20,8 +20,6 @@ #include "format/KdbxReader.h" -#include - /** * KDBX4 reader implementation. */ diff --git a/src/format/Kdbx4Writer.cpp b/src/format/Kdbx4Writer.cpp index 9961e021d..cbd6f9511 100644 --- a/src/format/Kdbx4Writer.cpp +++ b/src/format/Kdbx4Writer.cpp @@ -18,18 +18,14 @@ #include "Kdbx4Writer.h" #include -#include -#include "core/CustomData.h" -#include "core/Database.h" -#include "core/Metadata.h" #include "crypto/CryptoHash.h" #include "crypto/Random.h" #include "format/KdbxXmlWriter.h" #include "format/KeePass2RandomStream.h" #include "streams/HmacBlockStream.h" -#include "streams/QtIOCompressor" #include "streams/SymmetricCipherStream.h" +#include "streams/qtiocompressor.h" bool Kdbx4Writer::writeDatabase(QIODevice* device, Database* db) { diff --git a/src/format/KdbxReader.cpp b/src/format/KdbxReader.cpp index 14966bcd2..94ccf3342 100644 --- a/src/format/KdbxReader.cpp +++ b/src/format/KdbxReader.cpp @@ -1,4 +1,3 @@ -#include /* * Copyright (C) 2018 KeePassXC Team @@ -20,8 +19,8 @@ #include "KdbxReader.h" #include "core/Database.h" #include "core/Endian.h" - -#include +#include "crypto/SymmetricCipher.h" +#include "streams/StoreDataStream.h" #define UUID_LENGTH 16 diff --git a/src/format/KdbxReader.h b/src/format/KdbxReader.h index 53e9093ac..cbc13b20b 100644 --- a/src/format/KdbxReader.h +++ b/src/format/KdbxReader.h @@ -19,14 +19,14 @@ #define KEEPASSXC_KDBXREADER_H #include "KeePass2.h" -#include "keys/CompositeKey.h" -#include "streams/StoreDataStream.h" #include #include +class CompositeKey; class Database; class QIODevice; +class StoreDataStream; /** * Abstract KDBX reader base class. diff --git a/src/format/KdbxXmlReader.cpp b/src/format/KdbxXmlReader.cpp index 8466dde7f..c802040c0 100644 --- a/src/format/KdbxXmlReader.cpp +++ b/src/format/KdbxXmlReader.cpp @@ -17,18 +17,14 @@ #include "KdbxXmlReader.h" #include "KeePass2RandomStream.h" -#include "core/Clock.h" #include "core/DatabaseIcons.h" #include "core/Endian.h" -#include "core/Entry.h" -#include "core/Global.h" #include "core/Group.h" #include "core/Tools.h" -#include "streams/QtIOCompressor" +#include "streams/qtiocompressor.h" #include #include -#include #define UUID_LENGTH 16 diff --git a/src/format/KdbxXmlReader.h b/src/format/KdbxXmlReader.h index 562343971..44978b083 100644 --- a/src/format/KdbxXmlReader.h +++ b/src/format/KdbxXmlReader.h @@ -20,17 +20,15 @@ #include "core/Database.h" #include "core/Metadata.h" -#include "core/TimeInfo.h" #include -#include -#include #include class QIODevice; class Group; class Entry; class KeePass2RandomStream; +class TimeInfo; /** * KDBX XML payload reader. diff --git a/src/format/KdbxXmlWriter.cpp b/src/format/KdbxXmlWriter.cpp index 701c246bd..853a64e89 100644 --- a/src/format/KdbxXmlWriter.cpp +++ b/src/format/KdbxXmlWriter.cpp @@ -23,7 +23,7 @@ #include "core/Endian.h" #include "core/Metadata.h" #include "format/KeePass2RandomStream.h" -#include "streams/QtIOCompressor" +#include "streams/qtiocompressor.h" /** * @param version KDBX version diff --git a/src/format/KdbxXmlWriter.h b/src/format/KdbxXmlWriter.h index eaad9f211..c0774fc6c 100644 --- a/src/format/KdbxXmlWriter.h +++ b/src/format/KdbxXmlWriter.h @@ -18,14 +18,9 @@ #ifndef KEEPASSX_KDBXXMLWRITER_H #define KEEPASSX_KDBXXMLWRITER_H -#include -#include #include -#include "core/Database.h" -#include "core/Entry.h" #include "core/Group.h" -#include "core/TimeInfo.h" class KeePass2RandomStream; class Metadata; diff --git a/src/format/KeePass1.h b/src/format/KeePass1.h index caddee441..d91128575 100644 --- a/src/format/KeePass1.h +++ b/src/format/KeePass1.h @@ -18,7 +18,7 @@ #ifndef KEEPASSX_KEEPASS1_H #define KEEPASSX_KEEPASS1_H -#include +#include namespace KeePass1 { diff --git a/src/format/KeePass1Reader.cpp b/src/format/KeePass1Reader.cpp index 4d372b575..e4415af93 100644 --- a/src/format/KeePass1Reader.cpp +++ b/src/format/KeePass1Reader.cpp @@ -18,20 +18,15 @@ #include "KeePass1Reader.h" #include -#include #include -#include "core/Database.h" #include "core/Endian.h" -#include "core/Entry.h" #include "core/Group.h" #include "core/Metadata.h" #include "core/Tools.h" #include "crypto/CryptoHash.h" -#include "crypto/kdf/AesKdf.h" #include "format/KeePass1.h" #include "keys/FileKey.h" -#include "keys/PasswordKey.h" #include "streams/SymmetricCipherStream.h" class KeePass1Key : public CompositeKey diff --git a/src/format/KeePass1Reader.h b/src/format/KeePass1Reader.h index b9ad6ee66..2cb3589cc 100644 --- a/src/format/KeePass1Reader.h +++ b/src/format/KeePass1Reader.h @@ -19,8 +19,6 @@ #define KEEPASSX_KEEPASS1READER_H #include -#include -#include #include class Database; diff --git a/src/format/KeePass2.cpp b/src/format/KeePass2.cpp index bf5bb1cae..cc57ccffa 100644 --- a/src/format/KeePass2.cpp +++ b/src/format/KeePass2.cpp @@ -19,7 +19,6 @@ #include "crypto/CryptoHash.h" #include "crypto/kdf/AesKdf.h" #include "crypto/kdf/Argon2Kdf.h" -#include #define UUID_LENGTH 16 diff --git a/src/format/KeePass2.h b/src/format/KeePass2.h index abb24a800..c42183295 100644 --- a/src/format/KeePass2.h +++ b/src/format/KeePass2.h @@ -18,15 +18,11 @@ #ifndef KEEPASSX_KEEPASS2_H #define KEEPASSX_KEEPASS2_H -#include -#include #include #include -#include -#include +#include -#include "crypto/SymmetricCipher.h" -#include "crypto/kdf/Kdf.h" +class Kdf; namespace KeePass2 { diff --git a/src/format/KeePass2RandomStream.h b/src/format/KeePass2RandomStream.h index d8d8dd0f9..7d48bd266 100644 --- a/src/format/KeePass2RandomStream.h +++ b/src/format/KeePass2RandomStream.h @@ -18,9 +18,6 @@ #ifndef KEEPASSX_KEEPASS2RANDOMSTREAM_H #define KEEPASSX_KEEPASS2RANDOMSTREAM_H -#include - -#include "KeePass2.h" #include "crypto/SymmetricCipher.h" class KeePass2RandomStream diff --git a/src/format/KeePass2Reader.cpp b/src/format/KeePass2Reader.cpp index 6b8742e57..3c9cd23be 100644 --- a/src/format/KeePass2Reader.cpp +++ b/src/format/KeePass2Reader.cpp @@ -19,6 +19,7 @@ #include "format/Kdbx3Reader.h" #include "format/Kdbx4Reader.h" #include "format/KeePass1.h" +#include "keys/CompositeKey.h" #include diff --git a/src/format/KeePass2Reader.h b/src/format/KeePass2Reader.h index 0ea94d48c..a3f5c38b8 100644 --- a/src/format/KeePass2Reader.h +++ b/src/format/KeePass2Reader.h @@ -19,16 +19,8 @@ #define KEEPASSX_KEEPASS2READER_H #include "KdbxReader.h" -#include "core/Database.h" -#include "format/KeePass2.h" -#include "keys/CompositeKey.h" -#include -#include -#include -#include -#include -#include +class CompositeKey; class KeePass2Reader { diff --git a/src/format/KeePass2Writer.cpp b/src/format/KeePass2Writer.cpp index 494341f5e..c23bfaf42 100644 --- a/src/format/KeePass2Writer.cpp +++ b/src/format/KeePass2Writer.cpp @@ -16,12 +16,8 @@ */ #include -#include -#include "core/Database.h" #include "core/Group.h" -#include "core/Metadata.h" -#include "crypto/kdf/AesKdf.h" #include "format/Kdbx3Writer.h" #include "format/Kdbx4Writer.h" #include "format/KeePass2Writer.h" diff --git a/src/format/KeePass2Writer.h b/src/format/KeePass2Writer.h index a88054cae..7b43758af 100644 --- a/src/format/KeePass2Writer.h +++ b/src/format/KeePass2Writer.h @@ -21,7 +21,6 @@ #include "KdbxWriter.h" #include -#include class QIODevice; class Database; diff --git a/src/format/OpData01.cpp b/src/format/OpData01.cpp index 76e729d66..3ded0288c 100644 --- a/src/format/OpData01.cpp +++ b/src/format/OpData01.cpp @@ -21,7 +21,6 @@ #include "crypto/SymmetricCipher.h" #include -#include OpData01::OpData01(QObject* parent) : QObject(parent) diff --git a/src/format/OpVaultReader.cpp b/src/format/OpVaultReader.cpp index c2337fdaf..201354bce 100644 --- a/src/format/OpVaultReader.cpp +++ b/src/format/OpVaultReader.cpp @@ -19,15 +19,13 @@ #include "OpData01.h" #include "core/Group.h" +#include "core/Metadata.h" #include "core/Tools.h" #include "crypto/CryptoHash.h" -#include "crypto/SymmetricCipher.h" -#include "keys/PasswordKey.h" #include #include #include -#include #include diff --git a/src/format/OpVaultReader.h b/src/format/OpVaultReader.h index 846e65dd3..0dff45c2d 100644 --- a/src/format/OpVaultReader.h +++ b/src/format/OpVaultReader.h @@ -20,8 +20,9 @@ #include -#include "core/Database.h" -#include "core/Metadata.h" +class Database; +class Group; +class Entry; /*! * Imports a directory in the 1Password \c opvault format into a \c Database. diff --git a/src/format/OpVaultReaderAttachments.cpp b/src/format/OpVaultReaderAttachments.cpp index 00b3f283b..7c65b7f5a 100644 --- a/src/format/OpVaultReaderAttachments.cpp +++ b/src/format/OpVaultReaderAttachments.cpp @@ -18,13 +18,11 @@ #include "OpData01.h" #include "OpVaultReader.h" -#include "core/Group.h" -#include "core/Tools.h" +#include "core/Entry.h" #include #include #include -#include /*! * This will \c qCritical() if unable to open the file for reading. diff --git a/src/format/OpVaultReaderBandEntry.cpp b/src/format/OpVaultReaderBandEntry.cpp index c9f2045b3..6f79dd637 100644 --- a/src/format/OpVaultReaderBandEntry.cpp +++ b/src/format/OpVaultReaderBandEntry.cpp @@ -27,8 +27,6 @@ #include #include #include -#include -#include bool OpVaultReader::decryptBandEntry(const QJsonObject& bandEntry, QJsonObject& data, diff --git a/src/format/OpVaultReaderSections.cpp b/src/format/OpVaultReaderSections.cpp index b7677ec05..610f997ec 100644 --- a/src/format/OpVaultReaderSections.cpp +++ b/src/format/OpVaultReaderSections.cpp @@ -15,21 +15,15 @@ * along with this program. If not, see . */ -#include "OpData01.h" #include "OpVaultReader.h" -#include "core/Group.h" -#include "core/Tools.h" -#include "crypto/CryptoHash.h" -#include "crypto/SymmetricCipher.h" +#include "core/Entry.h" #include "totp/totp.h" #include #include -#include #include #include -#include namespace { diff --git a/src/gui/AboutDialog.h b/src/gui/AboutDialog.h index bd6b2edb9..9ea0dc802 100644 --- a/src/gui/AboutDialog.h +++ b/src/gui/AboutDialog.h @@ -20,7 +20,6 @@ #define KEEPASSX_ABOUTDIALOG_H #include -#include namespace Ui { diff --git a/src/gui/Application.cpp b/src/gui/Application.cpp index 4e894ae2f..c2c42c24d 100644 --- a/src/gui/Application.cpp +++ b/src/gui/Application.cpp @@ -19,11 +19,7 @@ #include "Application.h" -#include "autotype/AutoType.h" #include "core/Bootstrap.h" -#include "core/Config.h" -#include "core/Global.h" -#include "gui/Icons.h" #include "gui/MainWindow.h" #include "gui/MessageBox.h" #include "gui/osutils/OSUtils.h" @@ -32,10 +28,11 @@ #include #include +#include #include +#include #include #include -#include #if defined(Q_OS_UNIX) #include diff --git a/src/gui/Application.h b/src/gui/Application.h index f71ee86ae..9cbf48e59 100644 --- a/src/gui/Application.h +++ b/src/gui/Application.h @@ -21,10 +21,9 @@ #define KEEPASSX_APPLICATION_H #include -#include +#include #if defined(Q_OS_WIN) || (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) -#include class OSEventFilter; #endif diff --git a/src/gui/ApplicationSettingsWidget.cpp b/src/gui/ApplicationSettingsWidget.cpp index e2363dbf3..3015f0217 100644 --- a/src/gui/ApplicationSettingsWidget.cpp +++ b/src/gui/ApplicationSettingsWidget.cpp @@ -23,15 +23,15 @@ #include "config-keepassx.h" #include "autotype/AutoType.h" -#include "core/Config.h" -#include "core/Global.h" #include "core/Translator.h" #include "gui/Icons.h" #include "gui/MainWindow.h" #include "gui/osutils/OSUtils.h" #include "MessageBox.h" +#ifdef Q_OS_MACOS #include "touchid/TouchID.h" +#endif class ApplicationSettingsWidget::ExtraPage { diff --git a/src/gui/CategoryListWidget.cpp b/src/gui/CategoryListWidget.cpp index 86e12f2f4..3145fbe25 100644 --- a/src/gui/CategoryListWidget.cpp +++ b/src/gui/CategoryListWidget.cpp @@ -23,7 +23,6 @@ #include #include #include -#include CategoryListWidget::CategoryListWidget(QWidget* parent) : QWidget(parent) diff --git a/src/gui/CategoryListWidget.h b/src/gui/CategoryListWidget.h index 7873a3d3e..cbf0ef0eb 100644 --- a/src/gui/CategoryListWidget.h +++ b/src/gui/CategoryListWidget.h @@ -20,7 +20,6 @@ #include #include -#include class CategoryListWidgetDelegate; class QListWidget; diff --git a/src/gui/CloneDialog.cpp b/src/gui/CloneDialog.cpp index 2441b3f17..8ce368a60 100644 --- a/src/gui/CloneDialog.cpp +++ b/src/gui/CloneDialog.cpp @@ -19,11 +19,6 @@ #include "ui_CloneDialog.h" #include "config-keepassx.h" -#include "core/Database.h" -#include "core/Entry.h" -#include "core/Resources.h" -#include "crypto/Crypto.h" -#include "gui/DatabaseWidget.h" CloneDialog::CloneDialog(DatabaseWidget* parent, Database* db, Entry* entry) : QDialog(parent) diff --git a/src/gui/CloneDialog.h b/src/gui/CloneDialog.h index 569938464..8da584c20 100644 --- a/src/gui/CloneDialog.h +++ b/src/gui/CloneDialog.h @@ -19,10 +19,7 @@ #define KEEPASSX_CLONEDIALOG_H #include "core/Database.h" -#include "core/Entry.h" #include "gui/DatabaseWidget.h" -#include -#include namespace Ui { diff --git a/src/gui/DatabaseOpenDialog.cpp b/src/gui/DatabaseOpenDialog.cpp index eaa8877ee..b322a058a 100644 --- a/src/gui/DatabaseOpenDialog.cpp +++ b/src/gui/DatabaseOpenDialog.cpp @@ -16,9 +16,11 @@ */ #include "DatabaseOpenDialog.h" + #include "DatabaseOpenWidget.h" #include "DatabaseWidget.h" -#include "core/Database.h" + +#include #ifdef Q_OS_WIN #include diff --git a/src/gui/DatabaseOpenDialog.h b/src/gui/DatabaseOpenDialog.h index 30ac4c762..44476b876 100644 --- a/src/gui/DatabaseOpenDialog.h +++ b/src/gui/DatabaseOpenDialog.h @@ -22,7 +22,6 @@ #include #include -#include class Database; class DatabaseWidget; diff --git a/src/gui/DatabaseOpenWidget.cpp b/src/gui/DatabaseOpenWidget.cpp index c88ce9a2c..580cb0811 100644 --- a/src/gui/DatabaseOpenWidget.cpp +++ b/src/gui/DatabaseOpenWidget.cpp @@ -19,24 +19,20 @@ #include "DatabaseOpenWidget.h" #include "ui_DatabaseOpenWidget.h" -#include "core/Config.h" -#include "core/Database.h" -#include "crypto/Random.h" -#include "format/KeePass2Reader.h" +#include "config-keepassx.h" #include "gui/FileDialog.h" #include "gui/Icons.h" #include "gui/MainWindow.h" #include "gui/MessageBox.h" #include "keys/ChallengeResponseKey.h" #include "keys/FileKey.h" -#include "keys/PasswordKey.h" -#include "touchid/TouchID.h" -#include "config-keepassx.h" +#ifdef Q_OS_MACOS +#include "touchid/TouchID.h" +#endif #include #include -#include namespace { diff --git a/src/gui/DatabaseOpenWidget.h b/src/gui/DatabaseOpenWidget.h index fffdf8a7a..1742aeb2c 100644 --- a/src/gui/DatabaseOpenWidget.h +++ b/src/gui/DatabaseOpenWidget.h @@ -23,8 +23,8 @@ #include #include "gui/DialogyWidget.h" -#include "keys/CompositeKey.h" +class CompositeKey; class Database; class QFile; diff --git a/src/gui/DatabaseTabWidget.cpp b/src/gui/DatabaseTabWidget.cpp index 6f79873af..fee21f730 100644 --- a/src/gui/DatabaseTabWidget.cpp +++ b/src/gui/DatabaseTabWidget.cpp @@ -18,28 +18,15 @@ #include "DatabaseTabWidget.h" #include -#include -#include #include "autotype/AutoType.h" -#include "core/AsyncTask.h" -#include "core/Config.h" -#include "core/Database.h" -#include "core/Global.h" -#include "core/Group.h" -#include "core/Metadata.h" #include "core/Tools.h" #include "format/CsvExporter.h" #include "format/HtmlExporter.h" -#include "gui/Clipboard.h" -#include "gui/DatabaseOpenDialog.h" -#include "gui/DatabaseWidget.h" #include "gui/DatabaseWidgetStateSync.h" #include "gui/DragTabBar.h" #include "gui/FileDialog.h" #include "gui/MessageBox.h" -#include "gui/entry/EntryView.h" -#include "gui/group/GroupView.h" #ifdef Q_OS_MACOS #include "gui/osutils/macutils/MacUtils.h" #endif diff --git a/src/gui/DatabaseTabWidget.h b/src/gui/DatabaseTabWidget.h index fbb6411f8..583b9c074 100644 --- a/src/gui/DatabaseTabWidget.h +++ b/src/gui/DatabaseTabWidget.h @@ -21,7 +21,6 @@ #include "DatabaseOpenDialog.h" #include "gui/MessageWidget.h" -#include #include class Database; diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp index d2166b70f..18437545d 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -18,36 +18,21 @@ #include "DatabaseWidget.h" -#include #include +#include #include #include -#include -#include -#include #include #include -#include -#include #include #include #include #include "autotype/AutoType.h" -#include "core/Config.h" -#include "core/Database.h" #include "core/EntrySearcher.h" -#include "core/FileWatcher.h" -#include "core/Group.h" #include "core/Merger.h" -#include "core/Metadata.h" -#include "core/Resources.h" -#include "core/Tools.h" -#include "format/KeePass2Reader.h" #include "gui/Clipboard.h" #include "gui/CloneDialog.h" -#include "gui/DatabaseOpenDialog.h" -#include "gui/DatabaseOpenWidget.h" #include "gui/EntryPreviewWidget.h" #include "gui/FileDialog.h" #include "gui/GuiTools.h" @@ -59,22 +44,16 @@ #include "gui/TotpExportSettingsDialog.h" #include "gui/TotpSetupDialog.h" #include "gui/dbsettings/DatabaseSettingsDialog.h" -#include "gui/entry/EditEntryWidget.h" #include "gui/entry/EntryView.h" #include "gui/group/EditGroupWidget.h" #include "gui/group/GroupView.h" #include "gui/reports/ReportsDialog.h" #include "keeshare/KeeShare.h" -#include "touchid/TouchID.h" #ifdef WITH_XC_NETWORKING #include "gui/IconDownloaderDialog.h" #endif -#ifdef Q_OS_LINUX -#include -#endif - #ifdef WITH_XC_SSHAGENT #include "sshagent/SSHAgent.h" #endif diff --git a/src/gui/DatabaseWidget.h b/src/gui/DatabaseWidget.h index dc5dd6e42..ee4a16cde 100644 --- a/src/gui/DatabaseWidget.h +++ b/src/gui/DatabaseWidget.h @@ -20,9 +20,7 @@ #define KEEPASSX_DATABASEWIDGET_H #include -#include #include -#include #include "DatabaseOpenDialog.h" #include "config-keepassx.h" diff --git a/src/gui/DatabaseWidgetStateSync.cpp b/src/gui/DatabaseWidgetStateSync.cpp index 0d8607374..298efc532 100644 --- a/src/gui/DatabaseWidgetStateSync.cpp +++ b/src/gui/DatabaseWidgetStateSync.cpp @@ -19,7 +19,6 @@ #include "DatabaseWidgetStateSync.h" -#include "core/Config.h" #include DatabaseWidgetStateSync::DatabaseWidgetStateSync(QObject* parent) diff --git a/src/gui/DialogyWidget.cpp b/src/gui/DialogyWidget.cpp index 070393933..2885fe384 100644 --- a/src/gui/DialogyWidget.cpp +++ b/src/gui/DialogyWidget.cpp @@ -17,7 +17,6 @@ #include "DialogyWidget.h" -#include #include #include diff --git a/src/gui/DialogyWidget.h b/src/gui/DialogyWidget.h index b0915a277..85e7198f7 100644 --- a/src/gui/DialogyWidget.h +++ b/src/gui/DialogyWidget.h @@ -19,7 +19,6 @@ #define KEEPASSX_DIALOGYWIDGET_H #include -#include class DialogyWidget : public QWidget { diff --git a/src/gui/EditWidget.cpp b/src/gui/EditWidget.cpp index fbd07a82e..92e221607 100644 --- a/src/gui/EditWidget.cpp +++ b/src/gui/EditWidget.cpp @@ -22,8 +22,6 @@ #include #include -#include "core/Resources.h" - EditWidget::EditWidget(QWidget* parent) : DialogyWidget(parent) , m_ui(new Ui::EditWidget()) diff --git a/src/gui/EditWidgetIcons.cpp b/src/gui/EditWidgetIcons.cpp index f1d5689b1..bbac88ac5 100644 --- a/src/gui/EditWidgetIcons.cpp +++ b/src/gui/EditWidgetIcons.cpp @@ -20,14 +20,12 @@ #include "ui_EditWidgetIcons.h" #include -#include #include "core/Config.h" -#include "core/Group.h" +#include "core/Database.h" #include "core/Metadata.h" #include "core/Tools.h" #include "gui/IconModels.h" -#include "gui/MessageBox.h" #ifdef WITH_XC_NETWORKING #include "gui/IconDownloader.h" #endif diff --git a/src/gui/EditWidgetIcons.h b/src/gui/EditWidgetIcons.h index 7d695494c..e0e662848 100644 --- a/src/gui/EditWidgetIcons.h +++ b/src/gui/EditWidgetIcons.h @@ -20,13 +20,9 @@ #define KEEPASSX_EDITWIDGETICONS_H #include -#include #include -#include #include "config-keepassx.h" -#include "core/Entry.h" -#include "core/Global.h" #include "gui/MessageWidget.h" class Database; diff --git a/src/gui/EntryPreviewWidget.cpp b/src/gui/EntryPreviewWidget.cpp index 33754d919..b7d783e6d 100644 --- a/src/gui/EntryPreviewWidget.cpp +++ b/src/gui/EntryPreviewWidget.cpp @@ -21,10 +21,10 @@ #include "Clipboard.h" #include "Font.h" -#include "entry/EntryAttachmentsModel.h" #include "gui/Icons.h" #if defined(WITH_XC_KEESHARE) #include "keeshare/KeeShare.h" +#include "keeshare/KeeShareSettings.h" #endif namespace diff --git a/src/gui/EntryPreviewWidget.h b/src/gui/EntryPreviewWidget.h index 17bd62eb6..335ef26e7 100644 --- a/src/gui/EntryPreviewWidget.h +++ b/src/gui/EntryPreviewWidget.h @@ -21,8 +21,6 @@ #include "config-keepassx.h" #include "gui/DatabaseWidget.h" -#include - namespace Ui { class EntryPreviewWidget; diff --git a/src/gui/FileDialog.cpp b/src/gui/FileDialog.cpp index 406fbe50c..05b1b044f 100644 --- a/src/gui/FileDialog.cpp +++ b/src/gui/FileDialog.cpp @@ -19,8 +19,6 @@ #include "core/Config.h" -#include - FileDialog* FileDialog::m_instance(nullptr); QString FileDialog::getOpenFileName(QWidget* parent, diff --git a/src/gui/Font.h b/src/gui/Font.h index 930d53a2e..d53f0c407 100644 --- a/src/gui/Font.h +++ b/src/gui/Font.h @@ -18,7 +18,7 @@ #ifndef KEEPASSX_FONT_H #define KEEPASSX_FONT_H -#include +class QFont; class Font { diff --git a/src/gui/GuiTools.cpp b/src/gui/GuiTools.cpp index 72932724b..7aeeeb7b0 100644 --- a/src/gui/GuiTools.cpp +++ b/src/gui/GuiTools.cpp @@ -18,8 +18,6 @@ #include "GuiTools.h" #include "core/Config.h" -#include "core/Database.h" -#include "core/Entry.h" #include "core/Group.h" #include "gui/MessageBox.h" diff --git a/src/gui/IconDownloader.cpp b/src/gui/IconDownloader.cpp index d0940f55d..d9a8e693b 100644 --- a/src/gui/IconDownloader.cpp +++ b/src/gui/IconDownloader.cpp @@ -19,9 +19,10 @@ #include "core/Config.h" #include "core/NetworkManager.h" +#include #include #include -#include +#include #define MAX_REDIRECTS 5 diff --git a/src/gui/IconDownloader.h b/src/gui/IconDownloader.h index f3d555300..54d9295e8 100644 --- a/src/gui/IconDownloader.h +++ b/src/gui/IconDownloader.h @@ -19,12 +19,9 @@ #define KEEPASSXC_ICONDOWNLOADER_H #include -#include #include #include -#include "core/Global.h" - class QNetworkReply; class IconDownloader : public QObject diff --git a/src/gui/IconDownloaderDialog.cpp b/src/gui/IconDownloaderDialog.cpp index 207f11d5e..c2d5c8190 100644 --- a/src/gui/IconDownloaderDialog.cpp +++ b/src/gui/IconDownloaderDialog.cpp @@ -18,20 +18,15 @@ #include "IconDownloaderDialog.h" #include "ui_IconDownloaderDialog.h" -#include "core/AsyncTask.h" #include "core/Config.h" +#include "core/Database.h" #include "core/Entry.h" -#include "core/Global.h" -#include "core/Group.h" #include "core/Metadata.h" #include "core/Tools.h" #include "gui/IconDownloader.h" -#include "gui/IconModels.h" -#ifdef Q_OS_MACOS -#include "gui/osutils/macutils/MacUtils.h" -#endif +#include "osutils/OSUtils.h" -#include +#include IconDownloaderDialog::IconDownloaderDialog(QWidget* parent) : QDialog(parent) diff --git a/src/gui/IconDownloaderDialog.h b/src/gui/IconDownloaderDialog.h index 955e85a98..e0a77070f 100644 --- a/src/gui/IconDownloaderDialog.h +++ b/src/gui/IconDownloaderDialog.h @@ -19,15 +19,14 @@ #define KEEPASSX_ICONDOWNLOADERDIALOG_H #include +#include #include -#include - -#include "gui/MessageWidget.h" class Database; class Entry; class CustomIconModel; class IconDownloader; +class QStandardItemModel; namespace Ui { diff --git a/src/gui/Icons.cpp b/src/gui/Icons.cpp index e269e581f..cdebdcc75 100644 --- a/src/gui/Icons.cpp +++ b/src/gui/Icons.cpp @@ -18,14 +18,9 @@ #include "Icons.h" -#include #include -#include #include -#include -#include "config-keepassx.h" -#include "core/Config.h" #include "gui/MainWindow.h" #include "gui/osutils/OSUtils.h" diff --git a/src/gui/Icons.h b/src/gui/Icons.h index a8d3f54ee..d02fd79c4 100644 --- a/src/gui/Icons.h +++ b/src/gui/Icons.h @@ -19,10 +19,7 @@ #ifndef KEEPASSX_ICONS_H #define KEEPASSX_ICONS_H -#include -#include #include -#include class Icons { diff --git a/src/gui/KMessageWidget.cpp b/src/gui/KMessageWidget.cpp index 5a3f4ea88..a7e723692 100644 --- a/src/gui/KMessageWidget.cpp +++ b/src/gui/KMessageWidget.cpp @@ -24,16 +24,13 @@ #include "gui/Icons.h" #include +#include #include -#include -#include #include #include -#include +#include #include #include -#include -#include //--------------------------------------------------------------------- // KMessageWidgetPrivate diff --git a/src/gui/KeePass1OpenWidget.cpp b/src/gui/KeePass1OpenWidget.cpp index d35edc2c6..9a485a7f1 100644 --- a/src/gui/KeePass1OpenWidget.cpp +++ b/src/gui/KeePass1OpenWidget.cpp @@ -18,13 +18,11 @@ #include "KeePass1OpenWidget.h" #include "ui_DatabaseOpenWidget.h" -#include #include #include "core/Database.h" #include "core/Metadata.h" #include "format/KeePass1Reader.h" -#include "gui/MessageBox.h" KeePass1OpenWidget::KeePass1OpenWidget(QWidget* parent) : DatabaseOpenWidget(parent) diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index b910d869c..477e8cf07 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -21,33 +21,29 @@ #include #include -#include +#include #include #include +#include #include #include #include #include "config-keepassx.h" +#include "Application.h" +#include "Clipboard.h" #include "autotype/AutoType.h" -#include "core/Config.h" #include "core/InactivityTimer.h" -#include "core/Metadata.h" #include "core/Resources.h" #include "core/Tools.h" #include "gui/AboutDialog.h" -#include "gui/DatabaseWidget.h" #include "gui/Icons.h" #include "gui/MessageBox.h" #include "gui/SearchWidget.h" #include "gui/osutils/OSUtils.h" -#include "keys/CompositeKey.h" -#include "keys/FileKey.h" -#include "keys/PasswordKey.h" #ifdef Q_OS_MACOS -#include "gui/osutils/macutils/MacUtils.h" #ifdef WITH_XC_TOUCHID #include "touchid/TouchID.h" #endif @@ -82,8 +78,6 @@ #if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) && !defined(QT_NO_DBUS) #include "gui/MainWindowAdaptor.h" -#include -#include #endif const QString MainWindow::BaseWindowTitle = "KeePassXC"; diff --git a/src/gui/MainWindow.h b/src/gui/MainWindow.h index 5cf9995bb..b2f4c11da 100644 --- a/src/gui/MainWindow.h +++ b/src/gui/MainWindow.h @@ -23,12 +23,9 @@ #include #include #include -#include #include #include "core/SignalMultiplexer.h" -#include "gui/Application.h" -#include "gui/Clipboard.h" #include "gui/DatabaseWidget.h" #include "gui/osutils/ScreenLockListener.h" diff --git a/src/gui/MainWindowAdaptor.cpp b/src/gui/MainWindowAdaptor.cpp index 95edfdd9e..cda27fdf5 100644 --- a/src/gui/MainWindowAdaptor.cpp +++ b/src/gui/MainWindowAdaptor.cpp @@ -10,13 +10,6 @@ */ #include "MainWindowAdaptor.h" -#include -#include -#include -#include -#include -#include -#include /* * Implementation of adaptor class MainWindowAdaptor diff --git a/src/gui/MessageBox.cpp b/src/gui/MessageBox.cpp index 317754a62..04e6ccb29 100644 --- a/src/gui/MessageBox.cpp +++ b/src/gui/MessageBox.cpp @@ -19,6 +19,8 @@ #include "MessageBox.h" #include +#include +#include #include QWindow* MessageBox::m_overrideParent(nullptr); diff --git a/src/gui/MessageBox.h b/src/gui/MessageBox.h index dc6ed4a40..46939a535 100644 --- a/src/gui/MessageBox.h +++ b/src/gui/MessageBox.h @@ -19,10 +19,8 @@ #ifndef KEEPASSX_MESSAGEBOX_H #define KEEPASSX_MESSAGEBOX_H -#include #include #include -#include class MessageBox { diff --git a/src/gui/OpVaultOpenWidget.cpp b/src/gui/OpVaultOpenWidget.cpp index a322d2835..cae569cf2 100644 --- a/src/gui/OpVaultOpenWidget.cpp +++ b/src/gui/OpVaultOpenWidget.cpp @@ -17,12 +17,8 @@ #include "OpVaultOpenWidget.h" -#include - #include "core/Database.h" -#include "core/Metadata.h" #include "format/OpVaultReader.h" -#include "gui/MessageBox.h" #include "ui_DatabaseOpenWidget.h" OpVaultOpenWidget::OpVaultOpenWidget(QWidget* parent) diff --git a/src/gui/PasswordEdit.cpp b/src/gui/PasswordEdit.cpp index 61c644696..c83402610 100644 --- a/src/gui/PasswordEdit.cpp +++ b/src/gui/PasswordEdit.cpp @@ -25,10 +25,9 @@ #include "gui/osutils/OSUtils.h" #include "gui/styles/StateColorPalette.h" -#include +#include #include #include -#include PasswordEdit::PasswordEdit(QWidget* parent) : QLineEdit(parent) diff --git a/src/gui/PasswordGeneratorWidget.cpp b/src/gui/PasswordGeneratorWidget.cpp index fd8c7a459..17cd64d82 100644 --- a/src/gui/PasswordGeneratorWidget.cpp +++ b/src/gui/PasswordGeneratorWidget.cpp @@ -20,13 +20,10 @@ #include "ui_PasswordGeneratorWidget.h" #include -#include -#include #include #include #include "core/Config.h" -#include "core/PasswordGenerator.h" #include "core/PasswordHealth.h" #include "core/Resources.h" #include "gui/Clipboard.h" diff --git a/src/gui/PasswordGeneratorWidget.h b/src/gui/PasswordGeneratorWidget.h index 036ea7706..832025d46 100644 --- a/src/gui/PasswordGeneratorWidget.h +++ b/src/gui/PasswordGeneratorWidget.h @@ -20,8 +20,6 @@ #define KEEPASSX_PASSWORDGENERATORWIDGET_H #include -#include -#include #include "core/PassphraseGenerator.h" #include "core/PasswordGenerator.h" diff --git a/src/gui/SearchWidget.cpp b/src/gui/SearchWidget.cpp index 18725c240..21282e269 100644 --- a/src/gui/SearchWidget.cpp +++ b/src/gui/SearchWidget.cpp @@ -21,10 +21,9 @@ #include #include -#include #include -#include "core/Config.h" +#include "core/SignalMultiplexer.h" #include "gui/Icons.h" #include "gui/widgets/PopupHelpWidget.h" diff --git a/src/gui/SearchWidget.h b/src/gui/SearchWidget.h index b2192f54d..820e9fea8 100644 --- a/src/gui/SearchWidget.h +++ b/src/gui/SearchWidget.h @@ -22,9 +22,10 @@ #include #include -#include "core/SignalMultiplexer.h" #include "gui/DatabaseWidget.h" +class SignalMultiplexer; + namespace Ui { class SearchWidget; diff --git a/src/gui/SquareSvgWidget.h b/src/gui/SquareSvgWidget.h index 3fcbbbffb..c59548b74 100644 --- a/src/gui/SquareSvgWidget.h +++ b/src/gui/SquareSvgWidget.h @@ -18,7 +18,7 @@ #ifndef KEEPASSX_SquareSvgWidget_H #define KEEPASSX_SquareSvgWidget_H -#include +#include class SquareSvgWidget : public QSvgWidget { diff --git a/src/gui/TotpDialog.cpp b/src/gui/TotpDialog.cpp index c348b3f27..e856f5d6a 100644 --- a/src/gui/TotpDialog.cpp +++ b/src/gui/TotpDialog.cpp @@ -20,10 +20,11 @@ #include "ui_TotpDialog.h" #include "core/Clock.h" -#include "core/Config.h" #include "gui/Clipboard.h" #include "gui/MainWindow.h" +#include "totp/totp.h" +#include #include TotpDialog::TotpDialog(QWidget* parent, Entry* entry) diff --git a/src/gui/TotpDialog.h b/src/gui/TotpDialog.h index 0ab035185..1782c2de8 100644 --- a/src/gui/TotpDialog.h +++ b/src/gui/TotpDialog.h @@ -20,12 +20,7 @@ #define KEEPASSX_TOTPDIALOG_H #include "core/Database.h" -#include "core/Entry.h" #include "gui/DatabaseWidget.h" -#include -#include -#include -#include namespace Ui { diff --git a/src/gui/TotpExportSettingsDialog.cpp b/src/gui/TotpExportSettingsDialog.cpp index cee9fc824..3699dd20f 100644 --- a/src/gui/TotpExportSettingsDialog.cpp +++ b/src/gui/TotpExportSettingsDialog.cpp @@ -17,23 +17,18 @@ #include "TotpExportSettingsDialog.h" -#include "core/Config.h" -#include "core/Entry.h" #include "gui/Clipboard.h" -#include "gui/DatabaseWidget.h" #include "gui/MainWindow.h" #include "gui/SquareSvgWidget.h" #include "qrcode/QrCode.h" #include "totp/totp.h" +#include #include -#include #include #include #include #include -#include -#include TotpExportSettingsDialog::TotpExportSettingsDialog(DatabaseWidget* parent, Entry* entry) : QDialog(parent) diff --git a/src/gui/TotpExportSettingsDialog.h b/src/gui/TotpExportSettingsDialog.h index 7797533d0..ed58dd073 100644 --- a/src/gui/TotpExportSettingsDialog.h +++ b/src/gui/TotpExportSettingsDialog.h @@ -19,11 +19,7 @@ #define KEEPASSX_TotpExportSettingsDialog_H #include "core/Database.h" -#include "core/Entry.h" #include "gui/DatabaseWidget.h" -#include -#include -#include class QVBoxLayout; class SquareSvgWidget; diff --git a/src/gui/TotpSetupDialog.h b/src/gui/TotpSetupDialog.h index 905b2a2ca..9781b3954 100644 --- a/src/gui/TotpSetupDialog.h +++ b/src/gui/TotpSetupDialog.h @@ -20,10 +20,7 @@ #define KEEPASSX_SETUPTOTPDIALOG_H #include "core/Database.h" -#include "core/Entry.h" #include "gui/DatabaseWidget.h" -#include -#include namespace Ui { diff --git a/src/gui/URLEdit.cpp b/src/gui/URLEdit.cpp index 29cd0bd4f..d249ddd85 100644 --- a/src/gui/URLEdit.cpp +++ b/src/gui/URLEdit.cpp @@ -18,11 +18,7 @@ #include "URLEdit.h" -#include - -#include "core/Config.h" #include "core/Tools.h" -#include "gui/Font.h" #include "gui/Icons.h" #include "gui/styles/StateColorPalette.h" diff --git a/src/gui/UpdateCheckDialog.cpp b/src/gui/UpdateCheckDialog.cpp index 96d3a80ed..da3169901 100644 --- a/src/gui/UpdateCheckDialog.cpp +++ b/src/gui/UpdateCheckDialog.cpp @@ -18,7 +18,11 @@ #include "UpdateCheckDialog.h" #include "ui_UpdateCheckDialog.h" +#include + +#include "config-keepassx.h" #include "gui/Icons.h" +#include "updatecheck/UpdateChecker.h" UpdateCheckDialog::UpdateCheckDialog(QWidget* parent) : QDialog(parent) diff --git a/src/gui/UpdateCheckDialog.h b/src/gui/UpdateCheckDialog.h index 4aec12e04..64e95b989 100644 --- a/src/gui/UpdateCheckDialog.h +++ b/src/gui/UpdateCheckDialog.h @@ -21,10 +21,6 @@ #include "config-keepassx.h" #include "core/Global.h" #include "gui/MessageBox.h" -#include "updatecheck/UpdateChecker.h" -#include -#include -#include namespace Ui { diff --git a/src/gui/WelcomeWidget.h b/src/gui/WelcomeWidget.h index 13850e85a..15f93466c 100644 --- a/src/gui/WelcomeWidget.h +++ b/src/gui/WelcomeWidget.h @@ -20,7 +20,6 @@ #define KEEPASSX_WELCOMEWIDGET_H #include -#include namespace Ui { diff --git a/src/gui/csvImport/CsvImportWidget.cpp b/src/gui/csvImport/CsvImportWidget.cpp index 809fc6e53..61319eea1 100644 --- a/src/gui/csvImport/CsvImportWidget.cpp +++ b/src/gui/csvImport/CsvImportWidget.cpp @@ -19,14 +19,11 @@ #include "CsvImportWidget.h" #include "ui_CsvImportWidget.h" -#include -#include -#include +#include #include "core/Clock.h" #include "format/KeePass2Writer.h" #include "gui/MessageBox.h" -#include "gui/MessageWidget.h" #include "totp/totp.h" // I wanted to make the CSV import GUI future-proof, so if one day you need a new field, diff --git a/src/gui/csvImport/CsvImportWidget.h b/src/gui/csvImport/CsvImportWidget.h index a81550aa1..1711e32a6 100644 --- a/src/gui/csvImport/CsvImportWidget.h +++ b/src/gui/csvImport/CsvImportWidget.h @@ -20,15 +20,11 @@ #define KEEPASSX_CSVIMPORTWIDGET_H #include -#include -#include -#include -#include -#include #include "core/Metadata.h" #include "gui/csvImport/CsvParserModel.h" -#include "keys/PasswordKey.h" + +class QStringListModel; namespace Ui { diff --git a/src/gui/csvImport/CsvImportWizard.cpp b/src/gui/csvImport/CsvImportWizard.cpp index 356435ba9..4595c06d9 100644 --- a/src/gui/csvImport/CsvImportWizard.cpp +++ b/src/gui/csvImport/CsvImportWizard.cpp @@ -18,10 +18,7 @@ #include "CsvImportWizard.h" -#include -#include - -#include "gui/MessageBox.h" +#include CsvImportWizard::CsvImportWizard(QWidget* parent) : DialogyWidget(parent) diff --git a/src/gui/csvImport/CsvImportWizard.h b/src/gui/csvImport/CsvImportWizard.h index 9f7bb720c..084d8794d 100644 --- a/src/gui/csvImport/CsvImportWizard.h +++ b/src/gui/csvImport/CsvImportWizard.h @@ -21,12 +21,10 @@ #include "CsvImportWidget.h" -#include -#include - -#include "core/Database.h" #include "gui/DialogyWidget.h" +class QGridLayout; + class CsvImportWidget; class CsvImportWizard : public DialogyWidget diff --git a/src/gui/csvImport/CsvParserModel.cpp b/src/gui/csvImport/CsvParserModel.cpp index d18db87c5..77abb5931 100644 --- a/src/gui/csvImport/CsvParserModel.cpp +++ b/src/gui/csvImport/CsvParserModel.cpp @@ -18,7 +18,7 @@ #include "CsvParserModel.h" -#include +#include CsvParserModel::CsvParserModel(QObject* parent) : QAbstractTableModel(parent) diff --git a/src/gui/csvImport/CsvParserModel.h b/src/gui/csvImport/CsvParserModel.h index c1d5939d6..2b58b761a 100644 --- a/src/gui/csvImport/CsvParserModel.h +++ b/src/gui/csvImport/CsvParserModel.h @@ -20,7 +20,6 @@ #define KEEPASSX_CSVPARSERMODEL_H #include -#include #include "core/CsvParser.h" #include "core/Group.h" diff --git a/src/gui/databasekey/KeyComponentWidget.cpp b/src/gui/databasekey/KeyComponentWidget.cpp index 7fa23662d..e0cdc0f8a 100644 --- a/src/gui/databasekey/KeyComponentWidget.cpp +++ b/src/gui/databasekey/KeyComponentWidget.cpp @@ -18,7 +18,6 @@ #include "KeyComponentWidget.h" #include "ui_KeyComponentWidget.h" -#include #include KeyComponentWidget::KeyComponentWidget(QWidget* parent) diff --git a/src/gui/databasekey/KeyComponentWidget.h b/src/gui/databasekey/KeyComponentWidget.h index 225aacda4..9ea53da96 100644 --- a/src/gui/databasekey/KeyComponentWidget.h +++ b/src/gui/databasekey/KeyComponentWidget.h @@ -19,7 +19,6 @@ #define KEEPASSXC_KEYCOMPONENTWIDGET_H #include -#include #include namespace Ui diff --git a/src/gui/databasekey/KeyFileEditWidget.h b/src/gui/databasekey/KeyFileEditWidget.h index fc2f91e1a..19054dd39 100644 --- a/src/gui/databasekey/KeyFileEditWidget.h +++ b/src/gui/databasekey/KeyFileEditWidget.h @@ -19,7 +19,6 @@ #define KEEPASSXC_KEYFILEEDITWIDGET_H #include "KeyComponentWidget.h" -#include namespace Ui { diff --git a/src/gui/databasekey/PasswordEditWidget.cpp b/src/gui/databasekey/PasswordEditWidget.cpp index 4f468c12d..5f12f7d19 100644 --- a/src/gui/databasekey/PasswordEditWidget.cpp +++ b/src/gui/databasekey/PasswordEditWidget.cpp @@ -19,7 +19,6 @@ #include "ui_KeyComponentWidget.h" #include "ui_PasswordEditWidget.h" -#include "gui/PasswordGeneratorWidget.h" #include "keys/CompositeKey.h" #include "keys/PasswordKey.h" diff --git a/src/gui/databasekey/PasswordEditWidget.h b/src/gui/databasekey/PasswordEditWidget.h index be6c3f939..6fc9370ad 100644 --- a/src/gui/databasekey/PasswordEditWidget.h +++ b/src/gui/databasekey/PasswordEditWidget.h @@ -19,7 +19,6 @@ #define KEEPASSXC_PASSWORDEDITWIDGET_H #include "KeyComponentWidget.h" -#include namespace Ui { diff --git a/src/gui/databasekey/YubiKeyEditWidget.h b/src/gui/databasekey/YubiKeyEditWidget.h index 9cd12c2a3..e21b632a6 100644 --- a/src/gui/databasekey/YubiKeyEditWidget.h +++ b/src/gui/databasekey/YubiKeyEditWidget.h @@ -19,7 +19,6 @@ #define KEEPASSXC_YUBIKEYEDITWIDGET_H #include "KeyComponentWidget.h" -#include namespace Ui { diff --git a/src/gui/dbsettings/DatabaseSettingsDialog.cpp b/src/gui/dbsettings/DatabaseSettingsDialog.cpp index e2437573a..cefe75052 100644 --- a/src/gui/dbsettings/DatabaseSettingsDialog.cpp +++ b/src/gui/dbsettings/DatabaseSettingsDialog.cpp @@ -26,18 +26,20 @@ #include "DatabaseSettingsWidgetBrowser.h" #endif #include "DatabaseSettingsWidgetMaintenance.h" -#if defined(WITH_XC_KEESHARE) +#ifdef WITH_XC_KEESHARE #include "keeshare/DatabaseSettingsPageKeeShare.h" #endif -#if defined(WITH_XC_FDOSECRETS) +#ifdef WITH_XC_FDOSECRETS #include "fdosecrets/DatabaseSettingsPageFdoSecrets.h" #endif +#ifdef Q_OS_MACOS +#include "touchid/TouchID.h" +#endif #include "core/Config.h" #include "core/Database.h" #include "core/Global.h" #include "gui/Icons.h" -#include "touchid/TouchID.h" #include diff --git a/src/gui/dbsettings/DatabaseSettingsDialog.h b/src/gui/dbsettings/DatabaseSettingsDialog.h index 290810411..512c47a1a 100644 --- a/src/gui/dbsettings/DatabaseSettingsDialog.h +++ b/src/gui/dbsettings/DatabaseSettingsDialog.h @@ -22,8 +22,6 @@ #include "gui/DialogyWidget.h" #include -#include -#include class Database; class DatabaseSettingsWidgetGeneral; diff --git a/src/gui/dbsettings/DatabaseSettingsWidget.cpp b/src/gui/dbsettings/DatabaseSettingsWidget.cpp index c7f7f400d..b2536f203 100644 --- a/src/gui/dbsettings/DatabaseSettingsWidget.cpp +++ b/src/gui/dbsettings/DatabaseSettingsWidget.cpp @@ -18,11 +18,6 @@ #include "DatabaseSettingsWidget.h" #include "core/Database.h" -#include - -#include -#include - DatabaseSettingsWidget::DatabaseSettingsWidget(QWidget* parent) : SettingsWidget(parent) { diff --git a/src/gui/dbsettings/DatabaseSettingsWidget.h b/src/gui/dbsettings/DatabaseSettingsWidget.h index 9efe072b8..243245138 100644 --- a/src/gui/dbsettings/DatabaseSettingsWidget.h +++ b/src/gui/dbsettings/DatabaseSettingsWidget.h @@ -20,8 +20,6 @@ #include "gui/settings/SettingsWidget.h" -#include - class Database; /** diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.cpp b/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.cpp index 7c4aeedd4..aa91fa451 100644 --- a/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.cpp +++ b/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.cpp @@ -21,10 +21,8 @@ #include +#include "browser/BrowserService.h" #include "browser/BrowserSettings.h" -#include "core/Clock.h" -#include "core/Database.h" -#include "core/Entry.h" #include "core/Group.h" #include "core/Metadata.h" #include "gui/MessageBox.h" diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.h b/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.h index 369c8640f..9beb40466 100644 --- a/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.h +++ b/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.h @@ -21,16 +21,13 @@ #include "DatabaseSettingsWidget.h" -#include "browser/BrowserService.h" -#include "core/CustomData.h" -#include "gui/DatabaseTabWidget.h" - #include #include -#include #include +class CustomData; class Database; + namespace Ui { class DatabaseSettingsWidgetBrowser; diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.cpp b/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.cpp index 05228a812..b518ee47d 100644 --- a/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.cpp +++ b/src/gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.cpp @@ -26,9 +26,8 @@ #include "keys/FileKey.h" #include "keys/PasswordKey.h" +#include #include -#include -#include DatabaseSettingsWidgetDatabaseKey::DatabaseSettingsWidgetDatabaseKey(QWidget* parent) : DatabaseSettingsWidget(parent) diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetEncryption.cpp b/src/gui/dbsettings/DatabaseSettingsWidgetEncryption.cpp index 46bdd9993..1a967b773 100644 --- a/src/gui/dbsettings/DatabaseSettingsWidgetEncryption.cpp +++ b/src/gui/dbsettings/DatabaseSettingsWidgetEncryption.cpp @@ -26,9 +26,6 @@ #include "format/KeePass2.h" #include "gui/MessageBox.h" -#include -#include - const char* DatabaseSettingsWidgetEncryption::CD_DECRYPTION_TIME_PREFERENCE_KEY = "KPXC_DECRYPTION_TIME_PREFERENCE"; DatabaseSettingsWidgetEncryption::DatabaseSettingsWidgetEncryption(QWidget* parent) diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetEncryption.h b/src/gui/dbsettings/DatabaseSettingsWidgetEncryption.h index 69388da6b..2c7b5bac9 100644 --- a/src/gui/dbsettings/DatabaseSettingsWidgetEncryption.h +++ b/src/gui/dbsettings/DatabaseSettingsWidgetEncryption.h @@ -22,9 +22,6 @@ #include "crypto/kdf/Kdf.h" -#include -#include - class Database; namespace Ui { diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetGeneral.cpp b/src/gui/dbsettings/DatabaseSettingsWidgetGeneral.cpp index 65d7f52b6..6bc21aec5 100644 --- a/src/gui/dbsettings/DatabaseSettingsWidgetGeneral.cpp +++ b/src/gui/dbsettings/DatabaseSettingsWidgetGeneral.cpp @@ -19,8 +19,6 @@ #include "ui_DatabaseSettingsWidgetGeneral.h" #include "core/Clock.h" -#include "core/Database.h" -#include "core/Entry.h" #include "core/Group.h" #include "core/Metadata.h" #include "gui/MessageBox.h" diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetGeneral.h b/src/gui/dbsettings/DatabaseSettingsWidgetGeneral.h index 7fe65d9ab..9e18d4277 100644 --- a/src/gui/dbsettings/DatabaseSettingsWidgetGeneral.h +++ b/src/gui/dbsettings/DatabaseSettingsWidgetGeneral.h @@ -20,9 +20,6 @@ #include "DatabaseSettingsWidget.h" -#include -#include - class Database; namespace Ui { diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetMaintenance.cpp b/src/gui/dbsettings/DatabaseSettingsWidgetMaintenance.cpp index c6f5173aa..12738a987 100644 --- a/src/gui/dbsettings/DatabaseSettingsWidgetMaintenance.cpp +++ b/src/gui/dbsettings/DatabaseSettingsWidgetMaintenance.cpp @@ -18,10 +18,6 @@ #include "DatabaseSettingsWidgetMaintenance.h" #include "ui_DatabaseSettingsWidgetMaintenance.h" -#include - -#include "core/Database.h" -#include "core/Entry.h" #include "core/Group.h" #include "core/Metadata.h" #include "gui/IconModels.h" diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetMaintenance.h b/src/gui/dbsettings/DatabaseSettingsWidgetMaintenance.h index 5d6a9e54f..5ee6d55fb 100644 --- a/src/gui/dbsettings/DatabaseSettingsWidgetMaintenance.h +++ b/src/gui/dbsettings/DatabaseSettingsWidgetMaintenance.h @@ -20,8 +20,6 @@ #include "DatabaseSettingsWidget.h" -#include - class QItemSelection; class CustomIconModel; class Database; diff --git a/src/gui/dbsettings/DatabaseSettingsWidgetMetaDataSimple.h b/src/gui/dbsettings/DatabaseSettingsWidgetMetaDataSimple.h index c357305d8..d2b739474 100644 --- a/src/gui/dbsettings/DatabaseSettingsWidgetMetaDataSimple.h +++ b/src/gui/dbsettings/DatabaseSettingsWidgetMetaDataSimple.h @@ -20,9 +20,6 @@ #include "DatabaseSettingsWidget.h" -#include -#include - class Database; namespace Ui { diff --git a/src/gui/entry/AutoTypeAssociationsModel.h b/src/gui/entry/AutoTypeAssociationsModel.h index 63340cdca..d0f3f8a96 100644 --- a/src/gui/entry/AutoTypeAssociationsModel.h +++ b/src/gui/entry/AutoTypeAssociationsModel.h @@ -21,7 +21,7 @@ #include #include -#include "core/AutoTypeAssociations.h" +class AutoTypeAssociations; class Entry; diff --git a/src/gui/entry/EditEntryWidget.cpp b/src/gui/entry/EditEntryWidget.cpp index 99bcb28f2..cd73090aa 100644 --- a/src/gui/entry/EditEntryWidget.cpp +++ b/src/gui/entry/EditEntryWidget.cpp @@ -24,29 +24,22 @@ #include "ui_EditEntryWidgetMain.h" #include "ui_EditEntryWidgetSSHAgent.h" -#include #include #include -#include -#include -#include +#include #include -#include -#include #include -#include #include "autotype/AutoType.h" +#include "core/AutoTypeAssociations.h" #include "core/Clock.h" #include "core/Config.h" #include "core/Database.h" #include "core/Entry.h" +#include "core/EntryAttributes.h" #include "core/Metadata.h" -#include "core/PasswordHealth.h" #include "core/TimeDelta.h" -#include "core/Tools.h" #ifdef WITH_XC_SSHAGENT -#include "sshagent/KeeAgentSettings.h" #include "sshagent/OpenSSHKey.h" #include "sshagent/SSHAgent.h" #endif @@ -57,12 +50,10 @@ #include "gui/Clipboard.h" #include "gui/EditWidgetIcons.h" #include "gui/EditWidgetProperties.h" -#include "gui/FileDialog.h" #include "gui/Font.h" #include "gui/Icons.h" #include "gui/MessageBox.h" #include "gui/entry/AutoTypeAssociationsModel.h" -#include "gui/entry/EntryAttachmentsModel.h" #include "gui/entry/EntryAttributesModel.h" #include "gui/entry/EntryHistoryModel.h" diff --git a/src/gui/entry/EditEntryWidget.h b/src/gui/entry/EditEntryWidget.h index e359d1029..47975ac6d 100644 --- a/src/gui/entry/EditEntryWidget.h +++ b/src/gui/entry/EditEntryWidget.h @@ -21,10 +21,7 @@ #include #include -#include #include -#include -#include #include #include "config-keepassx.h" @@ -42,6 +39,7 @@ class EntryAttributesModel; class EntryHistoryModel; class QButtonGroup; class QMenu; +class QScrollArea; class QSortFilterProxyModel; class QStringListModel; #ifdef WITH_XC_SSHAGENT diff --git a/src/gui/entry/EntryAttachmentsModel.cpp b/src/gui/entry/EntryAttachmentsModel.cpp index c27b7fd44..c5d0ff073 100644 --- a/src/gui/entry/EntryAttachmentsModel.cpp +++ b/src/gui/entry/EntryAttachmentsModel.cpp @@ -17,11 +17,9 @@ #include "EntryAttachmentsModel.h" -#include "core/Entry.h" +#include "core/EntryAttachments.h" #include "core/Tools.h" -#include - EntryAttachmentsModel::EntryAttachmentsModel(QObject* parent) : QAbstractListModel(parent) , m_entryAttachments(nullptr) diff --git a/src/gui/entry/EntryAttachmentsWidget.cpp b/src/gui/entry/EntryAttachmentsWidget.cpp index 93557c042..f57f8320f 100644 --- a/src/gui/entry/EntryAttachmentsWidget.cpp +++ b/src/gui/entry/EntryAttachmentsWidget.cpp @@ -4,10 +4,7 @@ #include #include #include -#include -#include #include -#include #include #include "EntryAttachmentsModel.h" diff --git a/src/gui/entry/EntryAttributesModel.cpp b/src/gui/entry/EntryAttributesModel.cpp index bfdb592cd..90ef21bb3 100644 --- a/src/gui/entry/EntryAttributesModel.cpp +++ b/src/gui/entry/EntryAttributesModel.cpp @@ -17,10 +17,7 @@ #include "EntryAttributesModel.h" -#include "core/Entry.h" -#include "core/Tools.h" - -#include +#include "core/EntryAttributes.h" EntryAttributesModel::EntryAttributesModel(QObject* parent) : QAbstractListModel(parent) diff --git a/src/gui/entry/EntryModel.cpp b/src/gui/entry/EntryModel.cpp index 46c559a5a..7b61da042 100644 --- a/src/gui/entry/EntryModel.cpp +++ b/src/gui/entry/EntryModel.cpp @@ -17,13 +17,10 @@ #include "EntryModel.h" -#include +#include #include -#include #include -#include "core/DatabaseIcons.h" -#include "core/Entry.h" #include "core/Group.h" #include "core/Metadata.h" #include "core/PasswordHealth.h" diff --git a/src/gui/entry/EntryURLModel.cpp b/src/gui/entry/EntryURLModel.cpp index 0d1936eb2..3222c7d30 100644 --- a/src/gui/entry/EntryURLModel.cpp +++ b/src/gui/entry/EntryURLModel.cpp @@ -18,13 +18,11 @@ #include "EntryURLModel.h" -#include "core/Entry.h" +#include "core/EntryAttributes.h" #include "core/Tools.h" #include "gui/Icons.h" #include "gui/styles/StateColorPalette.h" -#include - EntryURLModel::EntryURLModel(QObject* parent) : QStandardItemModel(parent) , m_entryAttributes(nullptr) diff --git a/src/gui/group/EditGroupWidget.cpp b/src/gui/group/EditGroupWidget.cpp index 953b55ca2..15d8fd4a5 100644 --- a/src/gui/group/EditGroupWidget.cpp +++ b/src/gui/group/EditGroupWidget.cpp @@ -16,13 +16,13 @@ */ #include "EditGroupWidget.h" -#include "gui/Font.h" #include "ui_EditGroupWidgetMain.h" #include "core/Config.h" #include "core/Metadata.h" #include "gui/EditWidgetIcons.h" #include "gui/EditWidgetProperties.h" +#include "gui/Font.h" #include "gui/Icons.h" #include "gui/MessageBox.h" diff --git a/src/gui/group/EditGroupWidget.h b/src/gui/group/EditGroupWidget.h index ed1bb0179..03e93d2c3 100644 --- a/src/gui/group/EditGroupWidget.h +++ b/src/gui/group/EditGroupWidget.h @@ -19,7 +19,6 @@ #define KEEPASSX_EDITGROUPWIDGET_H #include -#include #include #include "core/Group.h" diff --git a/src/gui/group/GroupModel.cpp b/src/gui/group/GroupModel.cpp index 5feb8d6fe..9a2b745ea 100644 --- a/src/gui/group/GroupModel.cpp +++ b/src/gui/group/GroupModel.cpp @@ -17,14 +17,10 @@ #include "GroupModel.h" -#include #include -#include "core/Database.h" -#include "core/DatabaseIcons.h" #include "core/Group.h" #include "core/Metadata.h" -#include "core/Tools.h" #include "keeshare/KeeShare.h" GroupModel::GroupModel(Database* db, QObject* parent) diff --git a/src/gui/group/GroupView.cpp b/src/gui/group/GroupView.cpp index b9c885d03..83d737bc8 100644 --- a/src/gui/group/GroupView.cpp +++ b/src/gui/group/GroupView.cpp @@ -18,12 +18,10 @@ #include "GroupView.h" #include -#include #include #include #include "core/Config.h" -#include "core/Database.h" #include "core/Group.h" #include "gui/group/GroupModel.h" diff --git a/src/gui/osutils/OSUtils.h b/src/gui/osutils/OSUtils.h index dd1bd8cd1..3fb738ce3 100644 --- a/src/gui/osutils/OSUtils.h +++ b/src/gui/osutils/OSUtils.h @@ -18,9 +18,6 @@ #ifndef KEEPASSXC_OSUTILS_H #define KEEPASSXC_OSUTILS_H -#include "OSUtilsBase.h" -#include - #if defined(Q_OS_WIN) #include "winutils/WinUtils.h" diff --git a/src/gui/osutils/OSUtilsBase.h b/src/gui/osutils/OSUtilsBase.h index 00ad6f0cf..6e96a6a5c 100644 --- a/src/gui/osutils/OSUtilsBase.h +++ b/src/gui/osutils/OSUtilsBase.h @@ -19,7 +19,6 @@ #define KEEPASSXC_OSUTILSBASE_H #include -#include class QWindow; diff --git a/src/gui/osutils/ScreenLockListenerPrivate.cpp b/src/gui/osutils/ScreenLockListenerPrivate.cpp index 21cae07ec..76df0a914 100644 --- a/src/gui/osutils/ScreenLockListenerPrivate.cpp +++ b/src/gui/osutils/ScreenLockListenerPrivate.cpp @@ -20,6 +20,8 @@ #include "macutils/ScreenLockListenerMac.h" #elif defined(Q_OS_UNIX) #include "nixutils/ScreenLockListenerDBus.h" + +#include #elif defined(Q_OS_WIN) #include "winutils/ScreenLockListenerWin.h" #endif diff --git a/src/gui/osutils/ScreenLockListenerPrivate.h b/src/gui/osutils/ScreenLockListenerPrivate.h index a7c080687..8f509280b 100644 --- a/src/gui/osutils/ScreenLockListenerPrivate.h +++ b/src/gui/osutils/ScreenLockListenerPrivate.h @@ -18,7 +18,6 @@ #ifndef SCREENLOCKLISTENERPRIVATE_H #define SCREENLOCKLISTENERPRIVATE_H #include -#include class ScreenLockListenerPrivate : public QObject { diff --git a/src/gui/osutils/nixutils/NixUtils.cpp b/src/gui/osutils/nixutils/NixUtils.cpp index 8c7756e97..db5594ee2 100644 --- a/src/gui/osutils/nixutils/NixUtils.cpp +++ b/src/gui/osutils/nixutils/NixUtils.cpp @@ -16,18 +16,14 @@ */ #include "NixUtils.h" -#include "core/Tools.h" #include -#include #include -#include -#include -#include +#include #include #include #include -#include +#include #include diff --git a/src/gui/osutils/nixutils/NixUtils.h b/src/gui/osutils/nixutils/NixUtils.h index d71b29dac..ac5adb7c9 100644 --- a/src/gui/osutils/nixutils/NixUtils.h +++ b/src/gui/osutils/nixutils/NixUtils.h @@ -20,7 +20,7 @@ #include "gui/osutils/OSUtilsBase.h" #include -#include +#include class NixUtils : public OSUtilsBase, QAbstractNativeEventFilter { diff --git a/src/gui/osutils/nixutils/ScreenLockListenerDBus.cpp b/src/gui/osutils/nixutils/ScreenLockListenerDBus.cpp index 2086e3302..be9b59fd1 100644 --- a/src/gui/osutils/nixutils/ScreenLockListenerDBus.cpp +++ b/src/gui/osutils/nixutils/ScreenLockListenerDBus.cpp @@ -17,10 +17,7 @@ #include "ScreenLockListenerDBus.h" -#include #include -#include -#include #include #include diff --git a/src/gui/osutils/nixutils/ScreenLockListenerDBus.h b/src/gui/osutils/nixutils/ScreenLockListenerDBus.h index 0e473c0cc..e8ba127aa 100644 --- a/src/gui/osutils/nixutils/ScreenLockListenerDBus.h +++ b/src/gui/osutils/nixutils/ScreenLockListenerDBus.h @@ -19,8 +19,6 @@ #define SCREENLOCKLISTENERDBUS_H #include "gui/osutils/ScreenLockListenerPrivate.h" #include -#include -#include class ScreenLockListenerDBus : public ScreenLockListenerPrivate { diff --git a/src/gui/osutils/nixutils/X11Funcs.cpp b/src/gui/osutils/nixutils/X11Funcs.cpp index 113177c1d..8dac9eb78 100644 --- a/src/gui/osutils/nixutils/X11Funcs.cpp +++ b/src/gui/osutils/nixutils/X11Funcs.cpp @@ -17,7 +17,8 @@ #include "X11Funcs.h" -#include "core/Tools.h" +#include +#include #include diff --git a/src/gui/osutils/nixutils/X11Funcs.h b/src/gui/osutils/nixutils/X11Funcs.h index 4fef4055c..a576e81e7 100644 --- a/src/gui/osutils/nixutils/X11Funcs.h +++ b/src/gui/osutils/nixutils/X11Funcs.h @@ -18,11 +18,12 @@ #ifndef KEEPASSXC_X11FUNCS_H #define KEEPASSXC_X11FUNCS_H -#include #include #include +class QChar; + KeySym qcharToNativeKeyCode(const QChar& ch); KeySym qtToNativeKeyCode(Qt::Key key); uint qtToNativeModifiers(Qt::KeyboardModifiers modifiers); diff --git a/src/gui/reports/ReportsDialog.cpp b/src/gui/reports/ReportsDialog.cpp index 2fdc24389..ecd015b89 100644 --- a/src/gui/reports/ReportsDialog.cpp +++ b/src/gui/reports/ReportsDialog.cpp @@ -25,9 +25,10 @@ #include "ReportsWidgetHibp.h" #include "core/Global.h" +#include "core/Group.h" +#ifdef Q_OS_MACOS #include "touchid/TouchID.h" -#include -#include +#endif class ReportsDialog::ExtraPage { diff --git a/src/gui/reports/ReportsDialog.h b/src/gui/reports/ReportsDialog.h index a82d7545e..99da7f25f 100644 --- a/src/gui/reports/ReportsDialog.h +++ b/src/gui/reports/ReportsDialog.h @@ -22,10 +22,6 @@ #include "gui/DialogyWidget.h" #include "gui/entry/EditEntryWidget.h" -#include -#include -#include - class Database; class Entry; class Group; diff --git a/src/gui/reports/ReportsPageHealthcheck.cpp b/src/gui/reports/ReportsPageHealthcheck.cpp index ca99f819e..833de081b 100644 --- a/src/gui/reports/ReportsPageHealthcheck.cpp +++ b/src/gui/reports/ReportsPageHealthcheck.cpp @@ -20,8 +20,6 @@ #include "ReportsWidgetHealthcheck.h" #include "gui/Icons.h" -#include - ReportsPageHealthcheck::ReportsPageHealthcheck() : m_healthWidget(new ReportsWidgetHealthcheck()) { diff --git a/src/gui/reports/ReportsPageHealthcheck.h b/src/gui/reports/ReportsPageHealthcheck.h index 8a85b2d20..329c4f96d 100644 --- a/src/gui/reports/ReportsPageHealthcheck.h +++ b/src/gui/reports/ReportsPageHealthcheck.h @@ -18,8 +18,6 @@ #ifndef KEEPASSXC_REPORTSPAGEHEALTHCHECK_H #define KEEPASSXC_REPORTSPAGEHEALTHCHECK_H -#include - #include "ReportsDialog.h" class ReportsWidgetHealthcheck; diff --git a/src/gui/reports/ReportsPageHibp.cpp b/src/gui/reports/ReportsPageHibp.cpp index 22ac30754..984efa4ba 100644 --- a/src/gui/reports/ReportsPageHibp.cpp +++ b/src/gui/reports/ReportsPageHibp.cpp @@ -20,8 +20,6 @@ #include "ReportsWidgetHibp.h" #include "gui/Icons.h" -#include - ReportsPageHibp::ReportsPageHibp() : m_hibpWidget(new ReportsWidgetHibp()) { diff --git a/src/gui/reports/ReportsPageHibp.h b/src/gui/reports/ReportsPageHibp.h index 9d74347c9..f33758647 100644 --- a/src/gui/reports/ReportsPageHibp.h +++ b/src/gui/reports/ReportsPageHibp.h @@ -18,8 +18,6 @@ #ifndef KEEPASSXC_REPORTSPAGEHIBP_H #define KEEPASSXC_REPORTSPAGEHIBP_H -#include - #include "ReportsDialog.h" class ReportsWidgetHibp; diff --git a/src/gui/reports/ReportsPageStatistics.cpp b/src/gui/reports/ReportsPageStatistics.cpp index cfef828aa..f7fb2f170 100644 --- a/src/gui/reports/ReportsPageStatistics.cpp +++ b/src/gui/reports/ReportsPageStatistics.cpp @@ -20,8 +20,6 @@ #include "ReportsWidgetStatistics.h" #include "gui/Icons.h" -#include - QString ReportsPageStatistics::name() { return QObject::tr("Statistics"); diff --git a/src/gui/reports/ReportsPageStatistics.h b/src/gui/reports/ReportsPageStatistics.h index 00d611ee3..eb50d02c6 100644 --- a/src/gui/reports/ReportsPageStatistics.h +++ b/src/gui/reports/ReportsPageStatistics.h @@ -18,8 +18,6 @@ #ifndef KEEPASSXC_REPORTSPAGESTATISTICS_H #define KEEPASSXC_REPORTSPAGESTATISTICS_H -#include - #include "ReportsDialog.h" class ReportsPageStatistics : public IReportsPage diff --git a/src/gui/reports/ReportsWidget.h b/src/gui/reports/ReportsWidget.h index 631490405..59609acf9 100644 --- a/src/gui/reports/ReportsWidget.h +++ b/src/gui/reports/ReportsWidget.h @@ -20,8 +20,6 @@ #include "gui/settings/SettingsWidget.h" -#include - class Database; /** diff --git a/src/gui/reports/ReportsWidgetHealthcheck.cpp b/src/gui/reports/ReportsWidgetHealthcheck.cpp index f3b40d73b..e6b441a4d 100644 --- a/src/gui/reports/ReportsWidgetHealthcheck.cpp +++ b/src/gui/reports/ReportsWidgetHealthcheck.cpp @@ -19,8 +19,6 @@ #include "ui_ReportsWidgetHealthcheck.h" #include "core/AsyncTask.h" -#include "core/Database.h" -#include "core/Global.h" #include "core/Group.h" #include "core/Metadata.h" #include "core/PasswordHealth.h" @@ -29,7 +27,6 @@ #include "gui/styles/StateColorPalette.h" #include -#include #include #include #include diff --git a/src/gui/reports/ReportsWidgetHealthcheck.h b/src/gui/reports/ReportsWidgetHealthcheck.h index cf83af269..2046326a1 100644 --- a/src/gui/reports/ReportsWidgetHealthcheck.h +++ b/src/gui/reports/ReportsWidgetHealthcheck.h @@ -19,9 +19,6 @@ #define KEEPASSXC_REPORTSWIDGETHEALTHCHECK_H #include "gui/entry/EntryModel.h" -#include -#include -#include #include class Database; diff --git a/src/gui/reports/ReportsWidgetHibp.cpp b/src/gui/reports/ReportsWidgetHibp.cpp index b15a4ccd5..f84be1a18 100644 --- a/src/gui/reports/ReportsWidgetHibp.cpp +++ b/src/gui/reports/ReportsWidgetHibp.cpp @@ -19,14 +19,10 @@ #include "ui_ReportsWidgetHibp.h" #include "config-keepassx.h" -#include "core/Database.h" -#include "core/Global.h" #include "core/Group.h" #include "core/Metadata.h" -#include "core/PasswordHealth.h" #include "gui/GuiTools.h" #include "gui/Icons.h" -#include "gui/MessageBox.h" #include #include diff --git a/src/gui/reports/ReportsWidgetHibp.h b/src/gui/reports/ReportsWidgetHibp.h index bccd59781..2955358ad 100644 --- a/src/gui/reports/ReportsWidgetHibp.h +++ b/src/gui/reports/ReportsWidgetHibp.h @@ -21,9 +21,6 @@ #include "config-keepassx.h" #include "gui/entry/EntryModel.h" -#include -#include -#include #include #ifdef WITH_XC_NETWORKING diff --git a/src/gui/reports/ReportsWidgetStatistics.cpp b/src/gui/reports/ReportsWidgetStatistics.cpp index 200eae940..649e7c5a0 100644 --- a/src/gui/reports/ReportsWidgetStatistics.cpp +++ b/src/gui/reports/ReportsWidgetStatistics.cpp @@ -19,13 +19,12 @@ #include "ui_ReportsWidgetStatistics.h" #include "core/AsyncTask.h" -#include "core/Database.h" -#include "core/Global.h" #include "core/Group.h" #include "core/Metadata.h" #include "core/PasswordHealth.h" #include "gui/Icons.h" +#include #include namespace diff --git a/src/gui/styles/base/BaseStyle.cpp b/src/gui/styles/base/BaseStyle.cpp index 504126552..0068943b4 100644 --- a/src/gui/styles/base/BaseStyle.cpp +++ b/src/gui/styles/base/BaseStyle.cpp @@ -22,42 +22,28 @@ #include "BaseStyle.h" #include "phantomcolor.h" -#include +#include #include #include #include #include #include #include -#include -#include #include #include #include -#include -#include -#include -#include -#include -#include -#include #include -#include #include #include #include -#include -#include #include -#include -#include +#include #ifdef Q_OS_MACOS +#include #include #endif -#include - #include "gui/Icons.h" QT_BEGIN_NAMESPACE diff --git a/src/gui/styles/base/phantomcolor.cpp b/src/gui/styles/base/phantomcolor.cpp index 3689cfc3f..a11ab3c92 100644 --- a/src/gui/styles/base/phantomcolor.cpp +++ b/src/gui/styles/base/phantomcolor.cpp @@ -27,8 +27,8 @@ */ #include "phantomcolor.h" -#include #include +#include namespace Phantom { diff --git a/src/gui/styles/dark/DarkStyle.cpp b/src/gui/styles/dark/DarkStyle.cpp index a43419667..3c4731b2d 100644 --- a/src/gui/styles/dark/DarkStyle.cpp +++ b/src/gui/styles/dark/DarkStyle.cpp @@ -16,14 +16,18 @@ */ #include "DarkStyle.h" -#include "gui/osutils/OSUtils.h" #include +#include #include #include #include #include +#ifdef Q_OS_MACOS +#include "gui/osutils/OSUtils.h" +#endif + DarkStyle::DarkStyle() : BaseStyle() { diff --git a/src/gui/styles/dark/DarkStyle.h b/src/gui/styles/dark/DarkStyle.h index 3de05c065..01f272552 100644 --- a/src/gui/styles/dark/DarkStyle.h +++ b/src/gui/styles/dark/DarkStyle.h @@ -19,7 +19,6 @@ #define KEEPASSXC_DARKSTYLE_H #include "gui/styles/base/BaseStyle.h" -#include class DarkStyle : public BaseStyle { diff --git a/src/gui/styles/light/LightStyle.cpp b/src/gui/styles/light/LightStyle.cpp index 537e483ba..93cfeb632 100644 --- a/src/gui/styles/light/LightStyle.cpp +++ b/src/gui/styles/light/LightStyle.cpp @@ -16,15 +16,18 @@ */ #include "LightStyle.h" -#include "gui/ApplicationSettingsWidget.h" -#include "gui/osutils/OSUtils.h" #include +#include #include #include #include #include +#ifdef Q_OS_MACOS +#include "gui/osutils/OSUtils.h" +#endif + LightStyle::LightStyle() : BaseStyle() { diff --git a/src/gui/styles/light/LightStyle.h b/src/gui/styles/light/LightStyle.h index 87e202502..0acbb98ba 100644 --- a/src/gui/styles/light/LightStyle.h +++ b/src/gui/styles/light/LightStyle.h @@ -19,7 +19,6 @@ #define KEEPASSXC_LIGHTSTYLE_H #include "gui/styles/base/BaseStyle.h" -#include class LightStyle : public BaseStyle { diff --git a/src/gui/widgets/ElidedLabel.cpp b/src/gui/widgets/ElidedLabel.cpp index 5e71fbceb..5190ac577 100644 --- a/src/gui/widgets/ElidedLabel.cpp +++ b/src/gui/widgets/ElidedLabel.cpp @@ -17,8 +17,6 @@ #include "ElidedLabel.h" -#include - namespace { const QString htmlLinkTemplate("%2"); diff --git a/src/gui/widgets/PopupHelpWidget.cpp b/src/gui/widgets/PopupHelpWidget.cpp index 2a604dce9..0d37348b9 100644 --- a/src/gui/widgets/PopupHelpWidget.cpp +++ b/src/gui/widgets/PopupHelpWidget.cpp @@ -17,7 +17,7 @@ #include "PopupHelpWidget.h" -#include +#include #include "gui/MainWindow.h" diff --git a/src/gui/wizard/NewDatabaseWizard.cpp b/src/gui/wizard/NewDatabaseWizard.cpp index 533b5de62..03bede632 100644 --- a/src/gui/wizard/NewDatabaseWizard.cpp +++ b/src/gui/wizard/NewDatabaseWizard.cpp @@ -20,15 +20,11 @@ #include "NewDatabaseWizardPageEncryption.h" #include "NewDatabaseWizardPageMetaData.h" -#include "core/Database.h" #include "core/Global.h" #include "core/Group.h" -#include "core/Resources.h" -#include "format/KeePass2.h" #include #include -#include NewDatabaseWizard::NewDatabaseWizard(QWidget* parent) : QWizard(parent) diff --git a/src/gui/wizard/NewDatabaseWizard.h b/src/gui/wizard/NewDatabaseWizard.h index fd18f7b22..116283c5d 100644 --- a/src/gui/wizard/NewDatabaseWizard.h +++ b/src/gui/wizard/NewDatabaseWizard.h @@ -19,7 +19,6 @@ #define KEEPASSXC_NEWDATABASEWIZARD_H #include -#include #include class Database; diff --git a/src/gui/wizard/NewDatabaseWizardPage.cpp b/src/gui/wizard/NewDatabaseWizardPage.cpp index c0c9401c7..dd2d69d39 100644 --- a/src/gui/wizard/NewDatabaseWizardPage.cpp +++ b/src/gui/wizard/NewDatabaseWizardPage.cpp @@ -1,4 +1,3 @@ -#include /* * Copyright (C) 2018 KeePassXC Team @@ -23,8 +22,6 @@ #include "core/Database.h" #include "gui/dbsettings/DatabaseSettingsWidget.h" -#include - NewDatabaseWizardPage::NewDatabaseWizardPage(QWidget* parent) : QWizardPage(parent) , m_ui(new Ui::NewDatabaseWizardPage()) diff --git a/src/gui/wizard/NewDatabaseWizardPage.h b/src/gui/wizard/NewDatabaseWizardPage.h index 02df31027..185e6f8ca 100644 --- a/src/gui/wizard/NewDatabaseWizardPage.h +++ b/src/gui/wizard/NewDatabaseWizardPage.h @@ -19,7 +19,6 @@ #define KEEPASSXC_NEWDATABASEWIZARDPAGE_H #include -#include #include class Database; diff --git a/src/gui/wizard/NewDatabaseWizardPageDatabaseKey.cpp b/src/gui/wizard/NewDatabaseWizardPageDatabaseKey.cpp index a71b3f6c8..3cd2abd31 100644 --- a/src/gui/wizard/NewDatabaseWizardPageDatabaseKey.cpp +++ b/src/gui/wizard/NewDatabaseWizardPageDatabaseKey.cpp @@ -17,7 +17,6 @@ #include "NewDatabaseWizardPageDatabaseKey.h" #include "gui/dbsettings/DatabaseSettingsWidgetDatabaseKey.h" -#include NewDatabaseWizardPageDatabaseKey::NewDatabaseWizardPageDatabaseKey(QWidget* parent) : NewDatabaseWizardPage(parent) diff --git a/src/gui/wizard/NewDatabaseWizardPageMetaData.h b/src/gui/wizard/NewDatabaseWizardPageMetaData.h index 01b6fc47c..7a21f2894 100644 --- a/src/gui/wizard/NewDatabaseWizardPageMetaData.h +++ b/src/gui/wizard/NewDatabaseWizardPageMetaData.h @@ -20,9 +20,6 @@ #include "NewDatabaseWizardPage.h" -#include -#include - class Database; class NewDatabaseWizardPageMetaData : public NewDatabaseWizardPage diff --git a/src/keeshare/DatabaseSettingsPageKeeShare.cpp b/src/keeshare/DatabaseSettingsPageKeeShare.cpp index 3eb414bab..f197c3e66 100644 --- a/src/keeshare/DatabaseSettingsPageKeeShare.cpp +++ b/src/keeshare/DatabaseSettingsPageKeeShare.cpp @@ -18,12 +18,8 @@ #include "DatabaseSettingsPageKeeShare.h" #include "core/Database.h" -#include "core/Group.h" #include "gui/Icons.h" #include "keeshare/DatabaseSettingsWidgetKeeShare.h" -#include "keeshare/KeeShare.h" - -#include QString DatabaseSettingsPageKeeShare::name() { diff --git a/src/keeshare/DatabaseSettingsPageKeeShare.h b/src/keeshare/DatabaseSettingsPageKeeShare.h index 7d03876e0..1de48eae8 100644 --- a/src/keeshare/DatabaseSettingsPageKeeShare.h +++ b/src/keeshare/DatabaseSettingsPageKeeShare.h @@ -18,10 +18,6 @@ #ifndef KEEPASSXC_DATABASESETTINGSPAGEKEESHARE_H #define KEEPASSXC_DATABASESETTINGSPAGEKEESHARE_H -#include -#include -#include - #include "gui/dbsettings/DatabaseSettingsDialog.h" class DatabaseSettingsPageKeeShare : public IDatabaseSettingsPage diff --git a/src/keeshare/DatabaseSettingsWidgetKeeShare.cpp b/src/keeshare/DatabaseSettingsWidgetKeeShare.cpp index 85315c332..e72a86384 100644 --- a/src/keeshare/DatabaseSettingsWidgetKeeShare.cpp +++ b/src/keeshare/DatabaseSettingsWidgetKeeShare.cpp @@ -19,13 +19,10 @@ #include "DatabaseSettingsWidgetKeeShare.h" #include "ui_DatabaseSettingsWidgetKeeShare.h" -#include "core/Database.h" #include "core/Group.h" -#include "core/Metadata.h" #include "keeshare/KeeShare.h" #include "keeshare/KeeShareSettings.h" -#include #include DatabaseSettingsWidgetKeeShare::DatabaseSettingsWidgetKeeShare(QWidget* parent) diff --git a/src/keeshare/DatabaseSettingsWidgetKeeShare.h b/src/keeshare/DatabaseSettingsWidgetKeeShare.h index cd4d362d7..bebc0feeb 100644 --- a/src/keeshare/DatabaseSettingsWidgetKeeShare.h +++ b/src/keeshare/DatabaseSettingsWidgetKeeShare.h @@ -19,7 +19,6 @@ #define KEEPASSXC_DATABASESETTINGSWIDGETKEESHARE_H #include -#include #include class Database; diff --git a/src/keeshare/KeeShare.cpp b/src/keeshare/KeeShare.cpp index 1ae19c9da..4287481d9 100644 --- a/src/keeshare/KeeShare.cpp +++ b/src/keeshare/KeeShare.cpp @@ -16,17 +16,9 @@ */ #include "KeeShare.h" -#include "core/CustomData.h" -#include "core/Database.h" #include "core/DatabaseIcons.h" #include "core/Group.h" -#include "core/Metadata.h" #include "keeshare/ShareObserver.h" -#include "keeshare/Signature.h" - -#include -#include -#include namespace { diff --git a/src/keeshare/KeeShare.h b/src/keeshare/KeeShare.h index 3a847fd0e..d9d580e01 100644 --- a/src/keeshare/KeeShare.h +++ b/src/keeshare/KeeShare.h @@ -19,12 +19,18 @@ #define KEEPASSXC_KEESHARE_H #include -#include #include #include "core/Config.h" #include "gui/MessageWidget.h" -#include "keeshare/KeeShareSettings.h" + +namespace KeeShareSettings +{ + struct Own; + struct Active; + struct Foreign; + struct Reference; +} // namespace KeeShareSettings class Group; class Database; diff --git a/src/keeshare/KeeShareSettings.cpp b/src/keeshare/KeeShareSettings.cpp index 9cd399030..c2679feb7 100644 --- a/src/keeshare/KeeShareSettings.cpp +++ b/src/keeshare/KeeShareSettings.cpp @@ -17,25 +17,14 @@ #include "KeeShareSettings.h" -#include "core/CustomData.h" -#include "core/Database.h" -#include "core/DatabaseIcons.h" -#include "core/Group.h" -#include "core/Metadata.h" #include "crypto/Random.h" -#include "keeshare/Signature.h" -#include -#include -#include #include #include -#include -#include +#include #include #include -#include namespace KeeShareSettings { diff --git a/src/keeshare/KeeShareSettings.h b/src/keeshare/KeeShareSettings.h index 80500fdf2..ad6ca9c5b 100644 --- a/src/keeshare/KeeShareSettings.h +++ b/src/keeshare/KeeShareSettings.h @@ -18,8 +18,6 @@ #ifndef KEEPASSXC_KEESHARESETTINGS_H #define KEEPASSXC_KEESHARESETTINGS_H -#include -#include #include #include diff --git a/src/keeshare/SettingsPageKeeShare.cpp b/src/keeshare/SettingsPageKeeShare.cpp index 0661f3b47..7cfa56484 100644 --- a/src/keeshare/SettingsPageKeeShare.cpp +++ b/src/keeshare/SettingsPageKeeShare.cpp @@ -17,14 +17,9 @@ #include "SettingsPageKeeShare.h" -#include "core/Database.h" -#include "core/Group.h" #include "gui/DatabaseTabWidget.h" #include "gui/Icons.h" -#include "gui/MessageWidget.h" -#include "keeshare/KeeShare.h" #include "keeshare/SettingsWidgetKeeShare.h" -#include #include SettingsPageKeeShare::SettingsPageKeeShare(DatabaseTabWidget* tabWidget) diff --git a/src/keeshare/SettingsPageKeeShare.h b/src/keeshare/SettingsPageKeeShare.h index 975f64393..5aa60a844 100644 --- a/src/keeshare/SettingsPageKeeShare.h +++ b/src/keeshare/SettingsPageKeeShare.h @@ -18,9 +18,7 @@ #ifndef KEEPASSXC_SETTINGSPAGEKEESHARE_H #define KEEPASSXC_SETTINGSPAGEKEESHARE_H -#include #include -#include #include "gui/ApplicationSettingsWidget.h" diff --git a/src/keeshare/SettingsWidgetKeeShare.cpp b/src/keeshare/SettingsWidgetKeeShare.cpp index 429655b5b..ccff95447 100644 --- a/src/keeshare/SettingsWidgetKeeShare.cpp +++ b/src/keeshare/SettingsWidgetKeeShare.cpp @@ -18,13 +18,10 @@ #include "SettingsWidgetKeeShare.h" #include "ui_SettingsWidgetKeeShare.h" -#include "core/Config.h" -#include "core/Group.h" -#include "core/Metadata.h" +#include "config-keepassx.h" #include "gui/FileDialog.h" #include "gui/MessageBox.h" #include "keeshare/KeeShare.h" -#include "keeshare/KeeShareSettings.h" #include #include diff --git a/src/keeshare/SettingsWidgetKeeShare.h b/src/keeshare/SettingsWidgetKeeShare.h index 16e089a2e..bb29e8937 100644 --- a/src/keeshare/SettingsWidgetKeeShare.h +++ b/src/keeshare/SettingsWidgetKeeShare.h @@ -19,7 +19,6 @@ #define KEEPASSXC_SETTINGSWIDGETKEESHARE_H #include -#include #include #include "gui/MessageWidget.h" diff --git a/src/keeshare/ShareExport.cpp b/src/keeshare/ShareExport.cpp index fc34dff9f..ac1d4ddec 100644 --- a/src/keeshare/ShareExport.cpp +++ b/src/keeshare/ShareExport.cpp @@ -27,7 +27,7 @@ #include #if defined(WITH_XC_KEESHARE_SECURE) -#include +#include #include #endif diff --git a/src/keeshare/ShareExport.h b/src/keeshare/ShareExport.h index db54b2258..5a52371ef 100644 --- a/src/keeshare/ShareExport.h +++ b/src/keeshare/ShareExport.h @@ -19,7 +19,6 @@ #include -#include "keeshare/KeeShareSettings.h" #include "keeshare/ShareObserver.h" class Database; diff --git a/src/keeshare/ShareImport.cpp b/src/keeshare/ShareImport.cpp index 88ef8374c..309ff29af 100644 --- a/src/keeshare/ShareImport.cpp +++ b/src/keeshare/ShareImport.cpp @@ -28,7 +28,7 @@ #include #if defined(WITH_XC_KEESHARE_SECURE) -#include +#include #include #endif diff --git a/src/keeshare/ShareObserver.cpp b/src/keeshare/ShareObserver.cpp index d2547be42..a30cced2d 100644 --- a/src/keeshare/ShareObserver.cpp +++ b/src/keeshare/ShareObserver.cpp @@ -16,10 +16,7 @@ */ #include "ShareObserver.h" -#include "core/Config.h" -#include "core/Database.h" #include "core/FileWatcher.h" -#include "core/Global.h" #include "core/Group.h" #include "keeshare/KeeShare.h" #include "keeshare/ShareExport.h" diff --git a/src/keeshare/ShareObserver.h b/src/keeshare/ShareObserver.h index 8b881142d..7126946a9 100644 --- a/src/keeshare/ShareObserver.h +++ b/src/keeshare/ShareObserver.h @@ -20,8 +20,6 @@ #include #include -#include -#include #include "gui/MessageWidget.h" #include "keeshare/KeeShareSettings.h" diff --git a/src/keeshare/Signature.cpp b/src/keeshare/Signature.cpp index 8143d943f..029ca97ef 100644 --- a/src/keeshare/Signature.cpp +++ b/src/keeshare/Signature.cpp @@ -19,6 +19,8 @@ #include "crypto/Random.h" +#include + bool Signature::create(const QByteArray& data, QSharedPointer key, QString& signature) { // TODO HNH: currently we publish the signature in our own non-standard format - it would diff --git a/src/keeshare/group/EditGroupPageKeeShare.cpp b/src/keeshare/group/EditGroupPageKeeShare.cpp index bf44fd30f..36936fb14 100644 --- a/src/keeshare/group/EditGroupPageKeeShare.cpp +++ b/src/keeshare/group/EditGroupPageKeeShare.cpp @@ -20,8 +20,6 @@ #include "gui/Icons.h" #include "keeshare/group/EditGroupWidgetKeeShare.h" -#include - EditGroupPageKeeShare::EditGroupPageKeeShare(EditGroupWidget* widget) { Q_UNUSED(widget); diff --git a/src/keeshare/group/EditGroupWidgetKeeShare.cpp b/src/keeshare/group/EditGroupWidgetKeeShare.cpp index 74b016198..70a24ba2c 100644 --- a/src/keeshare/group/EditGroupWidgetKeeShare.cpp +++ b/src/keeshare/group/EditGroupWidgetKeeShare.cpp @@ -18,11 +18,8 @@ #include "EditGroupWidgetKeeShare.h" #include "ui_EditGroupWidgetKeeShare.h" -#include "core/Config.h" -#include "core/CustomData.h" +#include "KeeShareSettings.h" #include "core/Group.h" -#include "core/Metadata.h" -#include "core/Resources.h" #include "gui/FileDialog.h" #include "keeshare/KeeShare.h" diff --git a/src/keeshare/group/EditGroupWidgetKeeShare.h b/src/keeshare/group/EditGroupWidgetKeeShare.h index ae4ae193c..aaa3ebbd3 100644 --- a/src/keeshare/group/EditGroupWidgetKeeShare.h +++ b/src/keeshare/group/EditGroupWidgetKeeShare.h @@ -19,7 +19,6 @@ #define KEEPASSXC_EDITGROUPWIDGETKEESHARE_H #include -#include #include class Group; diff --git a/src/keys/ChallengeResponseKey.h b/src/keys/ChallengeResponseKey.h index 745cc4934..e4856f18a 100644 --- a/src/keys/ChallengeResponseKey.h +++ b/src/keys/ChallengeResponseKey.h @@ -22,11 +22,6 @@ #include "Key.h" #include "drivers/YubiKey.h" -#include -#include - -#include - class ChallengeResponseKey : public Key { public: diff --git a/src/keys/CompositeKey.cpp b/src/keys/CompositeKey.cpp index c1f9f9f48..5a51f4d5e 100644 --- a/src/keys/CompositeKey.cpp +++ b/src/keys/CompositeKey.cpp @@ -17,13 +17,11 @@ */ #include "CompositeKey.h" -#include -#include +#include #include -#include "core/Global.h" #include "crypto/CryptoHash.h" -#include "crypto/kdf/AesKdf.h" +#include "crypto/kdf/Kdf.h" #include "keys/ChallengeResponseKey.h" QUuid CompositeKey::UUID("76a7ae25-a542-4add-9849-7c06be945b94"); diff --git a/src/keys/CompositeKey.h b/src/keys/CompositeKey.h index 3f3978e46..8ef1d676c 100644 --- a/src/keys/CompositeKey.h +++ b/src/keys/CompositeKey.h @@ -19,9 +19,7 @@ #ifndef KEEPASSX_COMPOSITEKEY_H #define KEEPASSX_COMPOSITEKEY_H -#include #include -#include #include "keys/Key.h" diff --git a/src/keys/FileKey.cpp b/src/keys/FileKey.cpp index a9ee27626..d7231198d 100644 --- a/src/keys/FileKey.cpp +++ b/src/keys/FileKey.cpp @@ -23,6 +23,7 @@ #include "crypto/Random.h" #include +#include QUuid FileKey::UUID("a584cbc4-c9b4-437e-81bb-362ca9709273"); diff --git a/src/keys/FileKey.h b/src/keys/FileKey.h index 2e104ba5a..7b04445af 100644 --- a/src/keys/FileKey.h +++ b/src/keys/FileKey.h @@ -19,7 +19,6 @@ #ifndef KEEPASSX_FILEKEY_H #define KEEPASSX_FILEKEY_H -#include #include #include "keys/Key.h" diff --git a/src/keys/Key.h b/src/keys/Key.h index 985f383d2..e8b6b581b 100644 --- a/src/keys/Key.h +++ b/src/keys/Key.h @@ -19,7 +19,6 @@ #ifndef KEEPASSX_KEY_H #define KEEPASSX_KEY_H -#include #include class Key diff --git a/src/keys/PasswordKey.cpp b/src/keys/PasswordKey.cpp index ae60786ef..d665dfd87 100644 --- a/src/keys/PasswordKey.cpp +++ b/src/keys/PasswordKey.cpp @@ -16,12 +16,10 @@ */ #include "PasswordKey.h" -#include "core/Tools.h" #include "crypto/CryptoHash.h" -#include -#include +#include QUuid PasswordKey::UUID("77e90411-303a-43f2-b773-853b05635ead"); diff --git a/src/keys/PasswordKey.h b/src/keys/PasswordKey.h index e8542d88b..4ce2b9865 100644 --- a/src/keys/PasswordKey.h +++ b/src/keys/PasswordKey.h @@ -20,8 +20,7 @@ #include -#include -#include +#include #include "keys/Key.h" diff --git a/src/keys/drivers/YubiKey.cpp b/src/keys/drivers/YubiKey.cpp index b3911ff8b..c55a0267e 100644 --- a/src/keys/drivers/YubiKey.cpp +++ b/src/keys/drivers/YubiKey.cpp @@ -16,15 +16,11 @@ * along with this program. If not, see . */ -#include - #include #include #include #include -#include -#include "core/Global.h" #include "core/Tools.h" #include "crypto/Random.h" diff --git a/src/main.cpp b/src/main.cpp index 1dba5f426..f6f68769c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -18,12 +18,10 @@ #include #include -#include #include #include "cli/Utils.h" #include "config-keepassx.h" -#include "core/Config.h" #include "core/Tools.h" #include "crypto/Crypto.h" #include "gui/Application.h" diff --git a/src/proxy/NativeMessagingProxy.cpp b/src/proxy/NativeMessagingProxy.cpp index f5839e92b..5cffc6c77 100644 --- a/src/proxy/NativeMessagingProxy.cpp +++ b/src/proxy/NativeMessagingProxy.cpp @@ -19,7 +19,8 @@ #include "browser/BrowserShared.h" #include -#include +#include +#include #include @@ -30,7 +31,6 @@ #include #else #include -#include #endif NativeMessagingProxy::NativeMessagingProxy() diff --git a/src/proxy/NativeMessagingProxy.h b/src/proxy/NativeMessagingProxy.h index 75e6f03ac..935fc7741 100644 --- a/src/proxy/NativeMessagingProxy.h +++ b/src/proxy/NativeMessagingProxy.h @@ -19,8 +19,6 @@ #define NATIVEMESSAGINGPROXY_H #include -#include -#include class QWinEventNotifier; class QSocketNotifier; diff --git a/src/proxy/keepassxc-proxy.cpp b/src/proxy/keepassxc-proxy.cpp index b2a2b1458..d7d859309 100644 --- a/src/proxy/keepassxc-proxy.cpp +++ b/src/proxy/keepassxc-proxy.cpp @@ -22,9 +22,7 @@ #include #ifndef Q_OS_WIN -#include #include -#include // (C) Gist: https://gist.github.com/azadkuh/a2ac6869661ebd3f8588 void ignoreUnixSignals(std::initializer_list ignoreSignals) diff --git a/src/qrcode/QrCode.cpp b/src/qrcode/QrCode.cpp index 961bcfa8d..15c1e4223 100644 --- a/src/qrcode/QrCode.cpp +++ b/src/qrcode/QrCode.cpp @@ -18,15 +18,10 @@ #include "QrCode.h" #include "QrCode_p.h" -#include #include -#include -#include #include -#include #include #include -#include QrCodePrivate::QrCodePrivate() : m_qrcode(nullptr) diff --git a/src/qrcode/QrCode.h b/src/qrcode/QrCode.h index ffb49d139..2165d108f 100644 --- a/src/qrcode/QrCode.h +++ b/src/qrcode/QrCode.h @@ -19,7 +19,6 @@ #define KEEPASSX_QRCODE_H #include -#include class QImage; class QIODevice; diff --git a/src/sshagent/ASN1Key.cpp b/src/sshagent/ASN1Key.cpp index 7fafbeb2b..b91caab1b 100644 --- a/src/sshagent/ASN1Key.cpp +++ b/src/sshagent/ASN1Key.cpp @@ -18,6 +18,7 @@ #include "ASN1Key.h" #include "BinaryStream.h" +#include "OpenSSHKey.h" namespace { diff --git a/src/sshagent/ASN1Key.h b/src/sshagent/ASN1Key.h index 58dbcd4df..316789419 100644 --- a/src/sshagent/ASN1Key.h +++ b/src/sshagent/ASN1Key.h @@ -19,8 +19,8 @@ #ifndef KEEPASSXC_ASN1KEY_H #define KEEPASSXC_ASN1KEY_H -#include "OpenSSHKey.h" -#include +class QByteArray; +class OpenSSHKey; namespace ASN1Key { diff --git a/src/sshagent/AgentSettingsPage.h b/src/sshagent/AgentSettingsPage.h index 33f29b055..3c80db2aa 100644 --- a/src/sshagent/AgentSettingsPage.h +++ b/src/sshagent/AgentSettingsPage.h @@ -20,7 +20,6 @@ #define AGENTSETTINGSPAGE_H #include "gui/ApplicationSettingsWidget.h" -#include "gui/DatabaseTabWidget.h" class AgentSettingsPage : public ISettingsPage { diff --git a/src/sshagent/AgentSettingsWidget.cpp b/src/sshagent/AgentSettingsWidget.cpp index 3db5431fc..74c3959f1 100644 --- a/src/sshagent/AgentSettingsWidget.cpp +++ b/src/sshagent/AgentSettingsWidget.cpp @@ -20,9 +20,6 @@ #include "SSHAgent.h" #include "ui_AgentSettingsWidget.h" -#include "core/Config.h" -#include - AgentSettingsWidget::AgentSettingsWidget(QWidget* parent) : QWidget(parent) , m_ui(new Ui::AgentSettingsWidget()) diff --git a/src/sshagent/AgentSettingsWidget.h b/src/sshagent/AgentSettingsWidget.h index fcc65818c..67c41ffde 100644 --- a/src/sshagent/AgentSettingsWidget.h +++ b/src/sshagent/AgentSettingsWidget.h @@ -20,6 +20,7 @@ #define AGENTSETTINGSWIDGET_H #include +#include #include namespace Ui diff --git a/src/sshagent/BinaryStream.h b/src/sshagent/BinaryStream.h index 6f95039ec..0bc06e845 100644 --- a/src/sshagent/BinaryStream.h +++ b/src/sshagent/BinaryStream.h @@ -20,8 +20,6 @@ #define KEEPASSXC_BINARYSTREAM_H #include -#include -#include class BinaryStream : QObject { diff --git a/src/sshagent/KeeAgentSettings.cpp b/src/sshagent/KeeAgentSettings.cpp index 767017d6f..73c1bbc69 100644 --- a/src/sshagent/KeeAgentSettings.cpp +++ b/src/sshagent/KeeAgentSettings.cpp @@ -17,9 +17,19 @@ */ #include "KeeAgentSettings.h" + +#include "OpenSSHKey.h" #include "core/Database.h" +#include "core/Entry.h" #include "core/Tools.h" +#include +#include +#include +#include +#include +#include + KeeAgentSettings::KeeAgentSettings() { reset(); diff --git a/src/sshagent/KeeAgentSettings.h b/src/sshagent/KeeAgentSettings.h index d60e07596..ffc14044e 100644 --- a/src/sshagent/KeeAgentSettings.h +++ b/src/sshagent/KeeAgentSettings.h @@ -19,11 +19,12 @@ #ifndef KEEAGENTSETTINGS_H #define KEEAGENTSETTINGS_H -#include "OpenSSHKey.h" -#include "core/Entry.h" -#include "core/EntryAttachments.h" -#include -#include +#include + +class Entry; +class EntryAttachments; +class OpenSSHKey; +class QXmlStreamReader; class KeeAgentSettings { diff --git a/src/sshagent/OpenSSHKey.cpp b/src/sshagent/OpenSSHKey.cpp index 4160bf7e7..84f154906 100644 --- a/src/sshagent/OpenSSHKey.cpp +++ b/src/sshagent/OpenSSHKey.cpp @@ -20,10 +20,8 @@ #include "ASN1Key.h" #include "BinaryStream.h" -#include "core/Tools.h" #include "crypto/SymmetricCipher.h" -#include #include #include diff --git a/src/sshagent/SSHAgent.cpp b/src/sshagent/SSHAgent.cpp index 81610e7d4..3ba110a1f 100644 --- a/src/sshagent/SSHAgent.cpp +++ b/src/sshagent/SSHAgent.cpp @@ -18,17 +18,18 @@ #include "SSHAgent.h" -#include "BinaryStream.h" -#include "OpenSSHKey.h" #include "core/Config.h" -#include "core/Database.h" #include "core/Group.h" #include "core/Metadata.h" +#include "sshagent/BinaryStream.h" #include "sshagent/KeeAgentSettings.h" -#include +#include +#include +#include #ifdef Q_OS_WIN +#include #include #endif diff --git a/src/sshagent/SSHAgent.h b/src/sshagent/SSHAgent.h index 2318fdffd..53f06b807 100644 --- a/src/sshagent/SSHAgent.h +++ b/src/sshagent/SSHAgent.h @@ -20,11 +20,11 @@ #define KEEPASSXC_SSHAGENT_H #include -#include -#include #include "OpenSSHKey.h" -#include "sshagent/KeeAgentSettings.h" + +class KeeAgentSettings; +class Database; class SSHAgent : public QObject { diff --git a/src/streams/HashedBlockStream.cpp b/src/streams/HashedBlockStream.cpp index 879960223..7cc25d1ea 100644 --- a/src/streams/HashedBlockStream.cpp +++ b/src/streams/HashedBlockStream.cpp @@ -17,8 +17,6 @@ #include "HashedBlockStream.h" -#include - #include "core/Endian.h" #include "crypto/CryptoHash.h" diff --git a/src/streams/HmacBlockStream.cpp b/src/streams/HmacBlockStream.cpp index ccfefcba7..bb9eb477e 100644 --- a/src/streams/HmacBlockStream.cpp +++ b/src/streams/HmacBlockStream.cpp @@ -17,8 +17,6 @@ #include "HmacBlockStream.h" -#include - #include "core/Endian.h" #include "crypto/CryptoHash.h" diff --git a/src/streams/QtIOCompressor b/src/streams/QtIOCompressor deleted file mode 100644 index 350ed4b02..000000000 --- a/src/streams/QtIOCompressor +++ /dev/null @@ -1 +0,0 @@ -#include "qtiocompressor.h" diff --git a/src/totp/totp.cpp b/src/totp/totp.cpp index 1936cce75..82d9bb832 100644 --- a/src/totp/totp.cpp +++ b/src/totp/totp.cpp @@ -17,16 +17,16 @@ */ #include "totp.h" + #include "core/Base32.h" #include "core/Clock.h" -#include #include -#include -#include +#include #include #include #include + #include static QList totpEncoders{ diff --git a/src/totp/totp.h b/src/totp/totp.h index e21f55571..c34ac164d 100644 --- a/src/totp/totp.h +++ b/src/totp/totp.h @@ -19,10 +19,8 @@ #ifndef QTOTP_H #define QTOTP_H -#include +#include #include -#include -#include class QUrl; diff --git a/src/touchid/TouchID.h b/src/touchid/TouchID.h index b33075886..27a07417e 100644 --- a/src/touchid/TouchID.h +++ b/src/touchid/TouchID.h @@ -5,10 +5,7 @@ #define TOUCHID_AVAILABLE 1 #define TOUCHID_NOT_AVAILABLE 0 -#include #include -#include -#include class TouchID { diff --git a/src/updatecheck/UpdateChecker.cpp b/src/updatecheck/UpdateChecker.cpp index 262aab86a..ff2240628 100644 --- a/src/updatecheck/UpdateChecker.cpp +++ b/src/updatecheck/UpdateChecker.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include const QString UpdateChecker::ErrorVersion("error"); diff --git a/src/updatecheck/UpdateChecker.h b/src/updatecheck/UpdateChecker.h index 5af85537a..ecd546352 100644 --- a/src/updatecheck/UpdateChecker.h +++ b/src/updatecheck/UpdateChecker.h @@ -18,7 +18,6 @@ #ifndef KEEPASSXC_UPDATECHECK_H #define KEEPASSXC_UPDATECHECK_H #include -#include class QNetworkReply; diff --git a/tests/TestAutoType.cpp b/tests/TestAutoType.cpp index ee1906dd4..32b4b1e49 100644 --- a/tests/TestAutoType.cpp +++ b/tests/TestAutoType.cpp @@ -17,14 +17,15 @@ */ #include "TestAutoType.h" -#include "TestGlobal.h" #include +#include #include "autotype/AutoType.h" #include "autotype/AutoTypePlatformPlugin.h" #include "autotype/test/AutoTypeTestInterface.h" #include "core/Config.h" +#include "core/Group.h" #include "core/Resources.h" #include "crypto/Crypto.h" #include "gui/MessageBox.h" diff --git a/tests/TestBase32.cpp b/tests/TestBase32.cpp index 1fe61f9f3..4c14e4b46 100644 --- a/tests/TestBase32.cpp +++ b/tests/TestBase32.cpp @@ -16,9 +16,10 @@ */ #include "TestBase32.h" -#include "TestGlobal.h" #include "core/Base32.h" +#include + QTEST_GUILESS_MAIN(TestBase32) void TestBase32::testDecode() diff --git a/tests/TestBrowser.cpp b/tests/TestBrowser.cpp index 1d95edd67..d21fbcffa 100644 --- a/tests/TestBrowser.cpp +++ b/tests/TestBrowser.cpp @@ -17,12 +17,14 @@ #include "TestBrowser.h" -#include "TestGlobal.h" #include "browser/BrowserSettings.h" +#include "core/Group.h" #include "core/Tools.h" #include "crypto/Crypto.h" -#include +#include +#include + #include using namespace Botan::Sodium; diff --git a/tests/TestBrowser.h b/tests/TestBrowser.h index cab7d0aaa..8a699cf6d 100644 --- a/tests/TestBrowser.h +++ b/tests/TestBrowser.h @@ -22,7 +22,6 @@ #include "browser/BrowserAction.h" #include "browser/BrowserService.h" -#include "core/Group.h" class TestBrowser : public QObject { diff --git a/tests/TestCli.cpp b/tests/TestCli.cpp index 8a14cb88b..e56ad240f 100644 --- a/tests/TestCli.cpp +++ b/tests/TestCli.cpp @@ -20,7 +20,6 @@ #include "config-keepassx-tests.h" #include "core/Bootstrap.h" #include "core/Config.h" -#include "core/Entry.h" #include "core/Group.h" #include "core/Metadata.h" #include "core/Tools.h" @@ -53,6 +52,7 @@ #include #include +#include #include QTEST_MAIN(TestCli) diff --git a/tests/TestCli.h b/tests/TestCli.h index b868b1485..1d294c1cc 100644 --- a/tests/TestCli.h +++ b/tests/TestCli.h @@ -19,10 +19,6 @@ #define KEEPASSXC_TESTCLI_H #include -#include -#include -#include -#include #include "util/TemporaryFile.h" diff --git a/tests/TestConfig.cpp b/tests/TestConfig.cpp index 1ce6c14ec..1177ac585 100644 --- a/tests/TestConfig.cpp +++ b/tests/TestConfig.cpp @@ -17,11 +17,9 @@ #include "TestConfig.h" -#include #include #include "config-keepassx-tests.h" -#include "core/Config.h" #include "util/TemporaryFile.h" QTEST_GUILESS_MAIN(TestConfig) diff --git a/tests/TestCryptoHash.cpp b/tests/TestCryptoHash.cpp index 7cc6f7c17..1307512d6 100644 --- a/tests/TestCryptoHash.cpp +++ b/tests/TestCryptoHash.cpp @@ -16,11 +16,12 @@ */ #include "TestCryptoHash.h" -#include "TestGlobal.h" #include "crypto/Crypto.h" #include "crypto/CryptoHash.h" +#include + QTEST_GUILESS_MAIN(TestCryptoHash) void TestCryptoHash::initTestCase() diff --git a/tests/TestCsvExporter.cpp b/tests/TestCsvExporter.cpp index 8e7e6021d..4854da111 100644 --- a/tests/TestCsvExporter.cpp +++ b/tests/TestCsvExporter.cpp @@ -17,10 +17,11 @@ */ #include "TestCsvExporter.h" -#include "TestGlobal.h" #include +#include +#include "core/Group.h" #include "crypto/Crypto.h" #include "format/CsvExporter.h" #include "totp/totp.h" diff --git a/tests/TestCsvParser.h b/tests/TestCsvParser.h index 9db091666..df6038e9e 100644 --- a/tests/TestCsvParser.h +++ b/tests/TestCsvParser.h @@ -20,8 +20,6 @@ #define KEEPASSX_TESTCSVPARSER_H #include -#include -#include #include #include "core/CsvParser.h" diff --git a/tests/TestDatabase.cpp b/tests/TestDatabase.cpp index 82b0c790d..ed5846b7b 100644 --- a/tests/TestDatabase.cpp +++ b/tests/TestDatabase.cpp @@ -17,11 +17,13 @@ */ #include "TestDatabase.h" -#include "TestGlobal.h" +#include #include +#include #include "config-keepassx-tests.h" +#include "core/Group.h" #include "core/Metadata.h" #include "core/Tools.h" #include "crypto/Crypto.h" diff --git a/tests/TestDeletedObjects.cpp b/tests/TestDeletedObjects.cpp index 150249879..b86902efc 100644 --- a/tests/TestDeletedObjects.cpp +++ b/tests/TestDeletedObjects.cpp @@ -16,12 +16,13 @@ */ #include "TestDeletedObjects.h" -#include "TestGlobal.h" #include "config-keepassx-tests.h" +#include "core/Group.h" #include "crypto/Crypto.h" #include "format/KdbxXmlReader.h" #include "format/KeePass2.h" +#include QTEST_GUILESS_MAIN(TestDeletedObjects) diff --git a/tests/TestEntry.cpp b/tests/TestEntry.cpp index c6cb1271d..a74a8bd8c 100644 --- a/tests/TestEntry.cpp +++ b/tests/TestEntry.cpp @@ -16,12 +16,13 @@ * along with this program. If not, see . */ -#include +#include #include "TestEntry.h" -#include "TestGlobal.h" #include "core/Clock.h" +#include "core/Group.h" #include "core/Metadata.h" +#include "core/TimeInfo.h" #include "crypto/Crypto.h" QTEST_GUILESS_MAIN(TestEntry) diff --git a/tests/TestEntryModel.cpp b/tests/TestEntryModel.cpp index 52b9dbec5..724d3f5c1 100644 --- a/tests/TestEntryModel.cpp +++ b/tests/TestEntryModel.cpp @@ -16,12 +16,11 @@ */ #include "TestEntryModel.h" -#include "TestGlobal.h" #include +#include #include "core/DatabaseIcons.h" -#include "core/Entry.h" #include "core/Group.h" #include "crypto/Crypto.h" #include "gui/IconModels.h" diff --git a/tests/TestEntrySearcher.cpp b/tests/TestEntrySearcher.cpp index 1b8b4f5b8..e9b49d6b7 100644 --- a/tests/TestEntrySearcher.cpp +++ b/tests/TestEntrySearcher.cpp @@ -16,7 +16,9 @@ */ #include "TestEntrySearcher.h" -#include "TestGlobal.h" +#include "core/Group.h" + +#include QTEST_GUILESS_MAIN(TestEntrySearcher) diff --git a/tests/TestEntrySearcher.h b/tests/TestEntrySearcher.h index 4e3e99a43..becd5f20d 100644 --- a/tests/TestEntrySearcher.h +++ b/tests/TestEntrySearcher.h @@ -20,8 +20,8 @@ #include +#include "core/Entry.h" #include "core/EntrySearcher.h" -#include "core/Group.h" class TestEntrySearcher : public QObject { diff --git a/tests/TestFdoSecrets.cpp b/tests/TestFdoSecrets.cpp index a7528f6ab..e4d8cca22 100644 --- a/tests/TestFdoSecrets.cpp +++ b/tests/TestFdoSecrets.cpp @@ -17,16 +17,14 @@ #include "TestFdoSecrets.h" -#include "TestGlobal.h" - #include "core/EntrySearcher.h" -#include "crypto/Crypto.h" +#include "core/Group.h" #include "crypto/Random.h" -#include "fdosecrets/dbus/DBusMgr.h" #include "fdosecrets/objects/Collection.h" -#include "fdosecrets/objects/Item.h" #include "fdosecrets/objects/SessionCipher.h" +#include + QTEST_GUILESS_MAIN(TestFdoSecrets) void TestFdoSecrets::testDhIetf1024Sha256Aes128CbcPkcs7() diff --git a/tests/TestGlobal.h b/tests/TestGlobal.h index c85e60faf..7b7fb816a 100644 --- a/tests/TestGlobal.h +++ b/tests/TestGlobal.h @@ -20,9 +20,6 @@ #include "core/Group.h" -#include -#include - namespace QTest { diff --git a/tests/TestGroup.cpp b/tests/TestGroup.cpp index ad3c8ca8e..4bcad7a4c 100644 --- a/tests/TestGroup.cpp +++ b/tests/TestGroup.cpp @@ -17,12 +17,13 @@ */ #include "TestGroup.h" -#include "TestGlobal.h" #include "mock/MockClock.h" -#include +#include #include +#include +#include "core/Group.h" #include "core/Metadata.h" #include "crypto/Crypto.h" diff --git a/tests/TestGroup.h b/tests/TestGroup.h index 9de86fd2c..cb15f7114 100644 --- a/tests/TestGroup.h +++ b/tests/TestGroup.h @@ -20,7 +20,6 @@ #define KEEPASSX_TESTGROUP_H #include "core/Database.h" -#include class TestGroup : public QObject { diff --git a/tests/TestGroupModel.cpp b/tests/TestGroupModel.cpp index ecdc24052..6d7e58c41 100644 --- a/tests/TestGroupModel.cpp +++ b/tests/TestGroupModel.cpp @@ -16,10 +16,11 @@ */ #include "TestGroupModel.h" -#include "TestGlobal.h" #include +#include +#include "core/Group.h" #include "crypto/Crypto.h" #include "gui/group/GroupModel.h" #include "modeltest.h" diff --git a/tests/TestHashedBlockStream.cpp b/tests/TestHashedBlockStream.cpp index 90c96582f..9c45d8770 100644 --- a/tests/TestHashedBlockStream.cpp +++ b/tests/TestHashedBlockStream.cpp @@ -16,9 +16,8 @@ */ #include "TestHashedBlockStream.h" -#include "TestGlobal.h" -#include +#include #include "FailDevice.h" #include "crypto/Crypto.h" diff --git a/tests/TestHibp.cpp b/tests/TestHibp.cpp index f1682bccd..65e858cbe 100644 --- a/tests/TestHibp.cpp +++ b/tests/TestHibp.cpp @@ -17,17 +17,12 @@ #include "TestHibp.h" -#include "config-keepassx-tests.h" - -#include "core/Database.h" -#include "core/Entry.h" #include "core/Group.h" #include "core/HibpOffline.h" #include "crypto/Crypto.h" #include #include -#include #include #include diff --git a/tests/TestIconDownloader.h b/tests/TestIconDownloader.h index 52db4d5ec..cd3d036e1 100644 --- a/tests/TestIconDownloader.h +++ b/tests/TestIconDownloader.h @@ -21,7 +21,6 @@ #include #include -#include class TestIconDownloader : public QObject { diff --git a/tests/TestKdbx2.cpp b/tests/TestKdbx2.cpp index 2ddcbf11f..bf22be375 100644 --- a/tests/TestKdbx2.cpp +++ b/tests/TestKdbx2.cpp @@ -16,9 +16,9 @@ */ #include "TestKdbx2.h" -#include "TestGlobal.h" #include "config-keepassx-tests.h" +#include "core/Group.h" #include "core/Metadata.h" #include "crypto/Crypto.h" #include "format/KeePass2Reader.h" @@ -26,6 +26,7 @@ #include "keys/PasswordKey.h" #include +#include QTEST_GUILESS_MAIN(TestKdbx2) diff --git a/tests/TestKdbx3.cpp b/tests/TestKdbx3.cpp index 92fd2c752..27fa70c11 100644 --- a/tests/TestKdbx3.cpp +++ b/tests/TestKdbx3.cpp @@ -16,7 +16,6 @@ */ #include "TestKdbx3.h" -#include "TestGlobal.h" #include "config-keepassx-tests.h" #include "core/Metadata.h" @@ -26,6 +25,7 @@ #include "format/KeePass2Reader.h" #include "format/KeePass2Writer.h" #include "keys/PasswordKey.h" +#include QTEST_GUILESS_MAIN(TestKdbx3) diff --git a/tests/TestKdbx4.cpp b/tests/TestKdbx4.cpp index 46eaacc84..ae52f8de4 100644 --- a/tests/TestKdbx4.cpp +++ b/tests/TestKdbx4.cpp @@ -16,7 +16,6 @@ */ #include "TestKdbx4.h" -#include "TestGlobal.h" #include "config-keepassx-tests.h" #include "core/Metadata.h" @@ -28,6 +27,7 @@ #include "keys/FileKey.h" #include "keys/PasswordKey.h" #include "mock/MockChallengeResponseKey.h" +#include int main(int argc, char* argv[]) { diff --git a/tests/TestKeePass1Reader.cpp b/tests/TestKeePass1Reader.cpp index cf0aa414e..9983cf74c 100644 --- a/tests/TestKeePass1Reader.cpp +++ b/tests/TestKeePass1Reader.cpp @@ -16,11 +16,12 @@ */ #include "TestKeePass1Reader.h" -#include "TestGlobal.h" #include +#include #include "config-keepassx-tests.h" +#include "core/Group.h" #include "core/Metadata.h" #include "crypto/Crypto.h" #include "format/KeePass1Reader.h" diff --git a/tests/TestKeePass2Format.cpp b/tests/TestKeePass2Format.cpp index 2aa3948ae..bbe9f3c3e 100644 --- a/tests/TestKeePass2Format.cpp +++ b/tests/TestKeePass2Format.cpp @@ -16,18 +16,18 @@ */ #include "TestKeePass2Format.h" -#include "TestGlobal.h" #include "mock/MockClock.h" +#include "core/Group.h" #include "core/Metadata.h" #include "crypto/Crypto.h" -#include "format/KdbxXmlReader.h" #include "keys/FileKey.h" #include "keys/PasswordKey.h" #include "mock/MockChallengeResponseKey.h" #include "FailDevice.h" #include "config-keepassx-tests.h" +#include void TestKeePass2Format::initTestCase() { diff --git a/tests/TestKeePass2Format.h b/tests/TestKeePass2Format.h index 728d73ba9..e332d372d 100644 --- a/tests/TestKeePass2Format.h +++ b/tests/TestKeePass2Format.h @@ -19,9 +19,6 @@ #define KEEPASSXC_TESTKEEPASS2FORMAT_H #include -#include -#include -#include #include "core/Database.h" diff --git a/tests/TestKeePass2RandomStream.cpp b/tests/TestKeePass2RandomStream.cpp index bc7e16b99..b627454e2 100644 --- a/tests/TestKeePass2RandomStream.cpp +++ b/tests/TestKeePass2RandomStream.cpp @@ -16,13 +16,15 @@ */ #include "TestKeePass2RandomStream.h" -#include "TestGlobal.h" #include "crypto/Crypto.h" #include "crypto/CryptoHash.h" #include "crypto/SymmetricCipher.h" +#include "format/KeePass2.h" #include "format/KeePass2RandomStream.h" +#include + QTEST_GUILESS_MAIN(TestKeePass2RandomStream) void TestKeePass2RandomStream::initTestCase() diff --git a/tests/TestKeys.cpp b/tests/TestKeys.cpp index 9fa75f795..2530db667 100644 --- a/tests/TestKeys.cpp +++ b/tests/TestKeys.cpp @@ -17,18 +17,20 @@ */ #include "TestKeys.h" -#include "TestGlobal.h" #include +#include #include "config-keepassx-tests.h" +#include "core/Database.h" #include "core/Metadata.h" #include "crypto/Crypto.h" #include "crypto/CryptoHash.h" #include "crypto/kdf/AesKdf.h" #include "format/KeePass2Reader.h" #include "format/KeePass2Writer.h" +#include "keys/CompositeKey.h" #include "keys/FileKey.h" #include "keys/PasswordKey.h" #include "mock/MockChallengeResponseKey.h" diff --git a/tests/TestMerge.cpp b/tests/TestMerge.cpp index 1d40c0c65..8018861e8 100644 --- a/tests/TestMerge.cpp +++ b/tests/TestMerge.cpp @@ -16,7 +16,6 @@ */ #include "TestMerge.h" -#include "TestGlobal.h" #include "mock/MockClock.h" #include "core/Merger.h" @@ -24,6 +23,7 @@ #include "crypto/Crypto.h" #include +#include QTEST_GUILESS_MAIN(TestMerge) diff --git a/tests/TestMerge.h b/tests/TestMerge.h index 93a66428a..cb17ac8fb 100644 --- a/tests/TestMerge.h +++ b/tests/TestMerge.h @@ -19,9 +19,6 @@ #define KEEPASSX_TESTMERGE_H #include "core/Database.h" -#include -#include -#include #include class TestMerge : public QObject diff --git a/tests/TestModified.cpp b/tests/TestModified.cpp index 4c54c8b2f..d331739eb 100644 --- a/tests/TestModified.cpp +++ b/tests/TestModified.cpp @@ -21,8 +21,6 @@ #include #include -#include "core/Clock.h" -#include "core/Database.h" #include "core/Group.h" #include "core/Metadata.h" #include "crypto/Crypto.h" diff --git a/tests/TestOpVaultReader.cpp b/tests/TestOpVaultReader.cpp index dc5c04e3f..aa95880a0 100644 --- a/tests/TestOpVaultReader.cpp +++ b/tests/TestOpVaultReader.cpp @@ -18,22 +18,15 @@ #include "TestOpVaultReader.h" #include "config-keepassx-tests.h" -#include "core/Database.h" #include "core/Group.h" #include "core/Metadata.h" -#include "core/Tools.h" #include "crypto/Crypto.h" #include "format/OpVaultReader.h" #include "totp/totp.h" -#include -#include -#include #include -#include #include #include -#include QTEST_GUILESS_MAIN(TestOpVaultReader) diff --git a/tests/TestOpenSSHKey.cpp b/tests/TestOpenSSHKey.cpp index 2a880ab1c..c4048bdd1 100644 --- a/tests/TestOpenSSHKey.cpp +++ b/tests/TestOpenSSHKey.cpp @@ -16,11 +16,12 @@ */ #include "TestOpenSSHKey.h" -#include "TestGlobal.h" #include "crypto/Crypto.h" #include "sshagent/BinaryStream.h" #include "sshagent/OpenSSHKey.h" +#include + QTEST_GUILESS_MAIN(TestOpenSSHKey) void TestOpenSSHKey::initTestCase() diff --git a/tests/TestPasswordHealth.cpp b/tests/TestPasswordHealth.cpp index 238b78b92..25c531585 100644 --- a/tests/TestPasswordHealth.cpp +++ b/tests/TestPasswordHealth.cpp @@ -16,10 +16,11 @@ */ #include "TestPasswordHealth.h" -#include "TestGlobal.h" #include "core/PasswordHealth.h" +#include + QTEST_GUILESS_MAIN(TestPasswordHealth) void TestPasswordHealth::initTestCase() diff --git a/tests/TestRandomGenerator.cpp b/tests/TestRandomGenerator.cpp index ae6dfb4e8..e353070bb 100644 --- a/tests/TestRandomGenerator.cpp +++ b/tests/TestRandomGenerator.cpp @@ -16,9 +16,7 @@ */ #include "TestRandomGenerator.h" -#include "TestGlobal.h" -#include "core/Endian.h" #include "core/Global.h" #include "crypto/Random.h" diff --git a/tests/TestSSHAgent.cpp b/tests/TestSSHAgent.cpp index a3137eb31..bb62da20b 100644 --- a/tests/TestSSHAgent.cpp +++ b/tests/TestSSHAgent.cpp @@ -16,11 +16,13 @@ */ #include "TestSSHAgent.h" -#include "TestGlobal.h" #include "core/Config.h" #include "crypto/Crypto.h" +#include "sshagent/KeeAgentSettings.h" #include "sshagent/SSHAgent.h" +#include + QTEST_GUILESS_MAIN(TestSSHAgent) void TestSSHAgent::initTestCase() diff --git a/tests/TestSSHAgent.h b/tests/TestSSHAgent.h index bb9fa5459..e23422b6b 100644 --- a/tests/TestSSHAgent.h +++ b/tests/TestSSHAgent.h @@ -19,7 +19,6 @@ #define TESTSSHAGENT_H #include "sshagent/OpenSSHKey.h" -#include #include #include #include diff --git a/tests/TestSharing.cpp b/tests/TestSharing.cpp index b54076ed5..865ce9a41 100644 --- a/tests/TestSharing.cpp +++ b/tests/TestSharing.cpp @@ -16,27 +16,15 @@ */ #include "TestSharing.h" -#include "TestGlobal.h" -#include -#include -#include +#include #include -#include -#include "config-keepassx-tests.h" -#include "core/Metadata.h" #include "crypto/Crypto.h" #include "crypto/Random.h" -#include "format/KeePass2Writer.h" #include "keeshare/KeeShareSettings.h" -#include "keys/PasswordKey.h" -#include #include -#include - -#include QTEST_GUILESS_MAIN(TestSharing) diff --git a/tests/TestSharing.h b/tests/TestSharing.h index f3e45faf2..bba627f64 100644 --- a/tests/TestSharing.h +++ b/tests/TestSharing.h @@ -19,7 +19,6 @@ #define KEEPASSXC_TESTSHARING_H #include -#include namespace Botan { diff --git a/tests/TestSignature.cpp b/tests/TestSignature.cpp index f4a3dbe59..1c454504e 100644 --- a/tests/TestSignature.cpp +++ b/tests/TestSignature.cpp @@ -17,16 +17,14 @@ */ #include "TestSignature.h" -#include "TestGlobal.h" -#include +#include #include "crypto/Crypto.h" #include "crypto/Random.h" #include "keeshare/Signature.h" #include -#include #include QTEST_GUILESS_MAIN(TestSignature) diff --git a/tests/TestSymmetricCipher.cpp b/tests/TestSymmetricCipher.cpp index de6b2c1c0..77a80e271 100644 --- a/tests/TestSymmetricCipher.cpp +++ b/tests/TestSymmetricCipher.cpp @@ -17,12 +17,13 @@ */ #include "TestSymmetricCipher.h" -#include "TestGlobal.h" #include +#include +#include #include "crypto/Crypto.h" -#include "crypto/SymmetricCipher.h" +#include "format/KeePass2.h" #include "streams/SymmetricCipherStream.h" QTEST_GUILESS_MAIN(TestSymmetricCipher) diff --git a/tests/TestTools.cpp b/tests/TestTools.cpp index cdce6e04e..c79af477c 100644 --- a/tests/TestTools.cpp +++ b/tests/TestTools.cpp @@ -17,7 +17,6 @@ #include "TestTools.h" -#include #include QTEST_GUILESS_MAIN(TestTools) diff --git a/tests/TestTotp.cpp b/tests/TestTotp.cpp index 5eb9f6e53..b83e7d296 100644 --- a/tests/TestTotp.cpp +++ b/tests/TestTotp.cpp @@ -17,11 +17,13 @@ */ #include "TestTotp.h" -#include "TestGlobal.h" +#include "core/Entry.h" #include "crypto/Crypto.h" #include "totp/totp.h" +#include + QTEST_GUILESS_MAIN(TestTotp) void TestTotp::initTestCase() diff --git a/tests/TestUpdateCheck.cpp b/tests/TestUpdateCheck.cpp index ff709cd56..df2643fad 100644 --- a/tests/TestUpdateCheck.cpp +++ b/tests/TestUpdateCheck.cpp @@ -16,10 +16,11 @@ */ #include "TestUpdateCheck.h" -#include "TestGlobal.h" #include "crypto/Crypto.h" #include "updatecheck/UpdateChecker.h" +#include + QTEST_GUILESS_MAIN(TestUpdateCheck) void TestUpdateCheck::initTestCase() diff --git a/tests/TestYkChallengeResponseKey.cpp b/tests/TestYkChallengeResponseKey.cpp index 8ae57d0f4..aab5e6fe5 100644 --- a/tests/TestYkChallengeResponseKey.cpp +++ b/tests/TestYkChallengeResponseKey.cpp @@ -18,15 +18,14 @@ */ #include "TestYkChallengeResponseKey.h" -#include "TestGlobal.h" #include "core/Tools.h" #include "crypto/Crypto.h" #include "keys/ChallengeResponseKey.h" #include -#include #include +#include QTEST_GUILESS_MAIN(TestYubiKeyChallengeResponse) diff --git a/tests/gui/TestGui.cpp b/tests/gui/TestGui.cpp index e9d7fcd19..6047c3426 100644 --- a/tests/gui/TestGui.cpp +++ b/tests/gui/TestGui.cpp @@ -17,19 +17,10 @@ */ #include "TestGui.h" -#include "TestGlobal.h" #include "gui/Application.h" -#include -#include #include #include -#include -#include -#include -#include -#include -#include #include #include #include @@ -37,27 +28,15 @@ #include #include #include -#include #include -#include -#include #include "config-keepassx-tests.h" -#include "core/Config.h" -#include "core/Database.h" -#include "core/Entry.h" -#include "core/Group.h" -#include "core/Metadata.h" -#include "core/PasswordHealth.h" #include "core/Tools.h" #include "crypto/Crypto.h" -#include "crypto/kdf/AesKdf.h" -#include "format/KeePass2Reader.h" #include "gui/ApplicationSettingsWidget.h" #include "gui/CategoryListWidget.h" #include "gui/CloneDialog.h" #include "gui/DatabaseTabWidget.h" -#include "gui/DatabaseWidget.h" #include "gui/EntryPreviewWidget.h" #include "gui/FileDialog.h" #include "gui/MessageBox.h" @@ -66,7 +45,6 @@ #include "gui/SearchWidget.h" #include "gui/TotpDialog.h" #include "gui/TotpSetupDialog.h" -#include "gui/databasekey/KeyComponentWidget.h" #include "gui/databasekey/KeyFileEditWidget.h" #include "gui/databasekey/PasswordEditWidget.h" #include "gui/dbsettings/DatabaseSettingsDialog.h" @@ -77,7 +55,6 @@ #include "gui/group/GroupView.h" #include "gui/wizard/NewDatabaseWizard.h" #include "keys/FileKey.h" -#include "keys/PasswordKey.h" #define TEST_MODAL_NO_WAIT(TEST_CODE) \ bool dialogFinished = false; \ diff --git a/tests/gui/TestGui.h b/tests/gui/TestGui.h index b41e22227..0185c544d 100644 --- a/tests/gui/TestGui.h +++ b/tests/gui/TestGui.h @@ -22,12 +22,6 @@ #include "gui/MainWindow.h" #include "util/TemporaryFile.h" -#include -#include -#include -#include -#include - class Database; class DatabaseTabWidget; class DatabaseWidget; diff --git a/tests/gui/TestGuiBrowser.cpp b/tests/gui/TestGuiBrowser.cpp index fca5b42e8..bcc218240 100644 --- a/tests/gui/TestGuiBrowser.cpp +++ b/tests/gui/TestGuiBrowser.cpp @@ -17,33 +17,24 @@ */ #include "TestGuiBrowser.h" -#include "TestGlobal.h" #include "gui/Application.h" -#include -#include -#include -#include +#include +#include #include #include #include #include #include +#include #include #include "browser/BrowserService.h" #include "config-keepassx-tests.h" -#include "core/Config.h" -#include "core/Database.h" -#include "core/Entry.h" -#include "core/Tools.h" #include "crypto/Crypto.h" #include "gui/DatabaseTabWidget.h" -#include "gui/DatabaseWidget.h" #include "gui/FileDialog.h" #include "gui/MessageBox.h" -#include "gui/PasswordEdit.h" -#include "gui/dbsettings/DatabaseSettingsDialog.h" #include "gui/entry/EditEntryWidget.h" #include "gui/entry/EntryView.h" diff --git a/tests/gui/TestGuiBrowser.h b/tests/gui/TestGuiBrowser.h index 818a36952..d34a97f01 100644 --- a/tests/gui/TestGuiBrowser.h +++ b/tests/gui/TestGuiBrowser.h @@ -22,12 +22,6 @@ #include "gui/MainWindow.h" #include "util/TemporaryFile.h" -#include -#include -#include -#include -#include - class Database; class DatabaseTabWidget; class DatabaseWidget; diff --git a/tests/gui/TestGuiFdoSecrets.cpp b/tests/gui/TestGuiFdoSecrets.cpp index 1e8834e97..a8dae4476 100644 --- a/tests/gui/TestGuiFdoSecrets.cpp +++ b/tests/gui/TestGuiFdoSecrets.cpp @@ -19,23 +19,17 @@ #include "fdosecrets/FdoSecretsPlugin.h" #include "fdosecrets/FdoSecretsSettings.h" -#include "fdosecrets/dbus/DBusClient.h" -#include "fdosecrets/dbus/DBusMgr.h" #include "fdosecrets/objects/Collection.h" #include "fdosecrets/objects/Item.h" #include "fdosecrets/objects/SessionCipher.h" #include "fdosecrets/widgets/AccessControlDialog.h" -#include "TestGlobal.h" #include "config-keepassx-tests.h" -#include "core/Config.h" #include "core/Tools.h" #include "crypto/Crypto.h" -#include "crypto/Random.h" #include "gui/Application.h" #include "gui/DatabaseTabWidget.h" -#include "gui/DatabaseWidget.h" #include "gui/FileDialog.h" #include "gui/MainWindow.h" #include "gui/MessageBox.h" @@ -46,10 +40,7 @@ #include #include #include -#include - -#include -#include +#include int main(int argc, char* argv[]) { diff --git a/tests/gui/TestGuiFdoSecrets.h b/tests/gui/TestGuiFdoSecrets.h index e25472ae0..a53da4088 100644 --- a/tests/gui/TestGuiFdoSecrets.h +++ b/tests/gui/TestGuiFdoSecrets.h @@ -21,9 +21,6 @@ #include #include #include -#include -#include -#include #include "fdosecrets/dbus/DBusTypes.h" diff --git a/tests/gui/TestGuiPixmaps.cpp b/tests/gui/TestGuiPixmaps.cpp index a6644f547..1c78b8962 100644 --- a/tests/gui/TestGuiPixmaps.cpp +++ b/tests/gui/TestGuiPixmaps.cpp @@ -16,10 +16,12 @@ */ #include "TestGuiPixmaps.h" -#include "TestGlobal.h" #include "core/DatabaseIcons.h" #include "core/Metadata.h" + +#include "core/Group.h" #include "crypto/Crypto.h" +#include void TestGuiPixmaps::initTestCase() { diff --git a/tests/gui/TestGuiPixmaps.h b/tests/gui/TestGuiPixmaps.h index da55643a4..4f73d7e0d 100644 --- a/tests/gui/TestGuiPixmaps.h +++ b/tests/gui/TestGuiPixmaps.h @@ -19,8 +19,6 @@ #define KEEPASSX_TESTGUIPIXMAPS_H #include -#include -#include class TestGuiPixmaps : public QObject { diff --git a/tests/modeltest.cpp b/tests/modeltest.cpp index 6bf8124cf..8f7c95484 100644 --- a/tests/modeltest.cpp +++ b/tests/modeltest.cpp @@ -33,7 +33,6 @@ #include "modeltest.h" -#include #include /*! diff --git a/tests/util/FdoSecretsProxy.h b/tests/util/FdoSecretsProxy.h index c8bcafb7b..8240eedbd 100644 --- a/tests/util/FdoSecretsProxy.h +++ b/tests/util/FdoSecretsProxy.h @@ -20,17 +20,8 @@ #include "fdosecrets/dbus/DBusTypes.h" -#include -#include -#include -#include -#include -#include -#include #include -#include - /** * Mimic the interface of QDBusPendingReply so the same code can be used in test */ diff --git a/tests/util/TemporaryFile.cpp b/tests/util/TemporaryFile.cpp index 3b1e3a589..413f03305 100644 --- a/tests/util/TemporaryFile.cpp +++ b/tests/util/TemporaryFile.cpp @@ -17,8 +17,6 @@ #include "TemporaryFile.h" -#include - TemporaryFile::TemporaryFile() : TemporaryFile(nullptr) {