Include card_info.h over card_database.h if able (#5841)

* Move a typedef to card_info.h

* Include card_info.h over card_database.h if able
This commit is contained in:
RickyRister 2025-04-16 21:38:57 -07:00 committed by GitHub
parent 854208ea0a
commit 2189fc0a96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 37 additions and 38 deletions

View file

@ -1,7 +1,7 @@
#ifndef TAB_GENERIC_DECK_EDITOR_H
#define TAB_GENERIC_DECK_EDITOR_H
#include "../../game/cards/card_database.h"
#include "../../game/cards/card_info.h"
#include "../menus/deck_editor/deck_editor_menu.h"
#include "../ui/widgets/deck_editor/deck_editor_card_info_dock_widget.h"
#include "../ui/widgets/deck_editor/deck_editor_database_display_widget.h"

View file

@ -1,7 +1,7 @@
#ifndef TAB_EDHREC_H
#define TAB_EDHREC_H
#include "../../../../game/cards/card_database.h"
#include "../../../../game/cards/card_info.h"
#include "../../../ui/widgets/general/layout_containers/flow_widget.h"
#include "../../tab.h"
#include "edhrec_commander_api_response_display_widget.h"

View file

@ -1,7 +1,7 @@
#ifndef WINDOW_DECKEDITOR_H
#define WINDOW_DECKEDITOR_H
#include "../../game/cards/card_database.h"
#include "../../game/cards/card_info.h"
#include "../game_logic/key_signals.h"
#include "../ui/widgets/visual_deck_storage/deck_preview/deck_preview_deck_tags_display_widget.h"
#include "abstract_tab_deck_editor.h"

View file

@ -1,7 +1,7 @@
#ifndef PICTURELOADER_H
#define PICTURELOADER_H
#include "../../../game/cards/card_database.h"
#include "../../../game/cards/card_info.h"
#include "picture_loader_worker.h"
#include <QLoggingCategory>

View file

@ -1,7 +1,7 @@
#ifndef PICTURE_LOADER_WORKER_H
#define PICTURE_LOADER_WORKER_H
#include "../../../game/cards/card_database.h"
#include "../../../game/cards/card_info.h"
#include "picture_to_load.h"
#include <QLoggingCategory>

View file

@ -1,7 +1,7 @@
#ifndef PICTURE_TO_LOAD_H
#define PICTURE_TO_LOAD_H
#include "../../../game/cards/card_database.h"
#include "../../../game/cards/card_info.h"
#include <QLoggingCategory>

View file

@ -1,7 +1,7 @@
#ifndef COLOR_IDENTITY_WIDGET_H
#define COLOR_IDENTITY_WIDGET_H
#include "../../../../../game/cards/card_database.h"
#include "../../../../../game/cards/card_info.h"
#include <QHBoxLayout>
#include <QWidget>

View file

@ -1,7 +1,7 @@
#ifndef MANA_COST_WIDGET_H
#define MANA_COST_WIDGET_H
#include "../../../../../game/cards/card_database.h"
#include "../../../../../game/cards/card_info.h"
#include <QHBoxLayout>
#include <QWidget>

View file

@ -2,7 +2,7 @@
#define CARD_GROUP_DISPLAY_WIDGET_H
#include "../../../../../deck/deck_list_model.h"
#include "../../../../../game/cards/card_database.h"
#include "../../../../../game/cards/card_info.h"
#include "../../general/display/banner_widget.h"
#include "../card_info_picture_with_text_overlay_widget.h"
#include "../card_size_widget.h"

View file

@ -1,7 +1,7 @@
#ifndef CARDINFOWIDGET_H
#define CARDINFOWIDGET_H
#include "../../../../game/cards/card_database.h"
#include "../../../../game/cards/card_info.h"
#include <QComboBox>
#include <QFrame>

View file

@ -1,7 +1,7 @@
#ifndef CARDFRAME_H
#define CARDFRAME_H
#include "../../../../game/cards/card_database.h"
#include "../../../../game/cards/card_info.h"
#include <QPushButton>
#include <QTabWidget>

View file

@ -1,7 +1,7 @@
#ifndef CARD_PICTURE_ENLARGED_WIDGET_H
#define CARD_PICTURE_ENLARGED_WIDGET_H
#include "../../../../game/cards/card_database.h"
#include "../../../../game/cards/card_info.h"
#include <QPixmap>
#include <QWidget>

View file

@ -1,7 +1,7 @@
#ifndef CARD_INFO_PICTURE_H
#define CARD_INFO_PICTURE_H
#include "../../../../game/cards/card_database.h"
#include "../../../../game/cards/card_info.h"
#include "card_info_picture_enlarged_widget.h"
#include <QTimer>

View file

@ -1,7 +1,7 @@
#ifndef CARDINFOTEXT_H
#define CARDINFOTEXT_H
#include "../../../../game/cards/card_database.h"
#include "../../../../game/cards/card_info.h"
#include <QFrame>
class QLabel;

View file

@ -2,7 +2,7 @@
#define DECK_CARD_ZONE_DISPLAY_WIDGET_H
#include "../../../../deck/deck_list_model.h"
#include "../../../../game/cards/card_database.h"
#include "../../../../game/cards/card_info.h"
#include "../general/display/banner_widget.h"
#include "../general/layout_containers/overlap_widget.h"
#include "card_info_picture_with_text_overlay_widget.h"

View file

@ -2,7 +2,7 @@
#define DECK_EDITOR_DECK_DOCK_WIDGET_H
#include "../../../../deck/custom_line_edit.h"
#include "../../../../game/cards/card_database.h"
#include "../../../../game/cards/card_info.h"
#include "../../../game_logic/key_signals.h"
#include "../../../tabs/abstract_tab_deck_editor.h"
#include "../visual_deck_storage/deck_preview/deck_preview_deck_tags_display_widget.h"

View file

@ -3,7 +3,7 @@
#include "../../../../deck/deck_list_model.h"
#include "../../../../deck/deck_loader.h"
#include "../../../../game/cards/card_database.h"
#include "../../../../game/cards/card_info.h"
#include "../../../tabs/abstract_tab_deck_editor.h"
#include "../general/display/dynamic_font_size_push_button.h"

View file

@ -2,7 +2,7 @@
#define PRINTING_SELECTOR_H
#include "../../../../deck/deck_list_model.h"
#include "../../../../game/cards/card_database.h"
#include "../../../../game/cards/card_info.h"
#include "../cards/card_size_widget.h"
#include "../general/layout_containers/flow_widget.h"
#include "../quick_settings/settings_button_widget.h"

View file

@ -2,7 +2,7 @@
#define PRINTING_SELECTOR_CARD_DISPLAY_WIDGET_H
#include "../../../../deck/deck_list_model.h"
#include "../../../../game/cards/card_database.h"
#include "../../../../game/cards/card_info.h"
#include "../../../tabs/abstract_tab_deck_editor.h"
#include "printing_selector_card_overlay_widget.h"
#include "set_name_and_collectors_number_display_widget.h"

View file

@ -3,7 +3,7 @@
#include "../../../../client/ui/widgets/cards/card_info_picture_widget.h"
#include "../../../../deck/deck_list_model.h"
#include "../../../../game/cards/card_database.h"
#include "../../../../game/cards/card_info.h"
#include "../../../tabs/abstract_tab_deck_editor.h"
#include "all_zones_card_amount_widget.h"
#include "card_amount_widget.h"

View file

@ -1,7 +1,7 @@
#ifndef DECKLISTMODEL_H
#define DECKLISTMODEL_H
#include "../game/cards/card_database.h"
#include "../game/cards/card_info.h"
#include "decklist.h"
#include <QAbstractItemModel>

View file

@ -1,7 +1,7 @@
#ifndef DLG_EDIT_TOKENS_H
#define DLG_EDIT_TOKENS_H
#include "../game/cards/card_database.h"
#include "../game/cards/card_info.h"
#include <QDialog>

View file

@ -2,7 +2,7 @@
#include "arrow_item.h"
#include "../../settings/cache_settings.h"
#include "../cards/card_database.h"
#include "../cards/card_info.h"
#include "../cards/card_item.h"
#include "../player/player.h"
#include "../player/player_target.h"

View file

@ -2,7 +2,7 @@
#define ABSTRACTCARDITEM_H
#include "../board/arrow_target.h"
#include "card_database.h"
#include "card_info.h"
class Player;

View file

@ -28,9 +28,6 @@ enum LoadStatus
NoCards
};
typedef QHash<QString, CardInfoPtr> CardNameMap;
typedef QHash<QString, CardSetPtr> SetNameMap;
class CardDatabase : public QObject
{
Q_OBJECT

View file

@ -1,7 +1,7 @@
#ifndef CARDDATABASE_PARSER_H
#define CARDDATABASE_PARSER_H
#include "../card_database.h"
#include "../card_info.h"
#include <QIODevice>
#include <QString>

View file

@ -25,6 +25,9 @@ typedef QSharedPointer<CardInfo> CardInfoPtr;
typedef QSharedPointer<CardSet> CardSetPtr;
typedef QMap<QString, QList<CardInfoPerSet>> CardInfoPerSetMap;
typedef QHash<QString, CardInfoPtr> CardNameMap;
typedef QHash<QString, CardSetPtr> SetNameMap;
Q_DECLARE_METATYPE(CardInfoPtr)
class CardSet : public QList<CardInfoPtr>

View file

@ -8,8 +8,8 @@
#include "../zones/card_zone.h"
#include "../zones/table_zone.h"
#include "../zones/view_zone.h"
#include "card_database.h"
#include "card_drag_item.h"
#include "card_info.h"
#include "pb/serverinfo_card.pb.h"
#include <QApplication>

View file

@ -1,6 +1,6 @@
#include "card_list.h"
#include "card_database.h"
#include "card_info.h"
#include "card_item.h"
#include <QDebug>

View file

@ -1,7 +1,7 @@
#include "deck_view.h"
#include "../../client/ui/theme_manager.h"
#include "../../game/cards/card_database.h"
#include "../../game/cards/card_info.h"
#include "../../settings/cache_settings.h"
#include "decklist.h"

View file

@ -1,7 +1,7 @@
#ifndef FILTER_STRING_H
#define FILTER_STRING_H
#include "../cards/card_database.h"
#include "../cards/card_info.h"
#include "filter_tree.h"
#include <QLoggingCategory>

View file

@ -4,7 +4,7 @@
#include "../../client/tearoff_menu.h"
#include "../../dialogs/dlg_create_token.h"
#include "../board/abstract_graphics_item.h"
#include "../cards/card_database.h"
#include "../cards/card_info.h"
#include "../filters/filter_string.h"
#include "pb/card_attributes.pb.h"
#include "pb/game_event.pb.h"

View file

@ -3,8 +3,8 @@
#include "../../client/ui/theme_manager.h"
#include "../../settings/cache_settings.h"
#include "../board/arrow_item.h"
#include "../cards/card_database.h"
#include "../cards/card_drag_item.h"
#include "../cards/card_info.h"
#include "../cards/card_item.h"
#include "../player/player.h"
#include "pb/command_move_card.pb.h"

View file

@ -1,8 +1,8 @@
#include "view_zone.h"
#include "../../server/pending_command.h"
#include "../cards/card_database.h"
#include "../cards/card_drag_item.h"
#include "../cards/card_info.h"
#include "../cards/card_item.h"
#include "../player/player.h"
#include "pb/command_dump_zone.pb.h"

View file

@ -28,7 +28,6 @@
#include "client/ui/window_main.h"
#include "dialogs/dlg_settings.h"
#include "featureset.h"
#include "game/cards/card_database.h"
#include "rng_sfmt.h"
#include "settings/cache_settings.h"
#include "utility/logger.h"

View file

@ -1,7 +1,7 @@
#ifndef CARD_INFO_COMPARATOR_H
#define CARD_INFO_COMPARATOR_H
#include "../game/cards/card_database.h"
#include "../game/cards/card_info.h"
#include <QStringList>
#include <QVariant>

View file

@ -1,7 +1,7 @@
#ifndef SET_PRIORITY_COMPARATOR_H
#define SET_PRIORITY_COMPARATOR_H
#include "../game/cards/card_database.h"
#include "../game/cards/card_info.h"
class SetPriorityComparator
{