mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-26 08:33:54 -07:00
Prototype intents
Took 53 minutes Took 6 seconds
This commit is contained in:
parent
d791e7d0ff
commit
47a80ddb12
8 changed files with 133 additions and 10 deletions
|
|
@ -24,6 +24,7 @@
|
|||
#include "client/settings/cache_settings.h"
|
||||
#include "client/sound_engine.h"
|
||||
#include "database/interface/settings_card_preference_provider.h"
|
||||
#include "interface/intents/intent_open_local_deck.h"
|
||||
#include "interface/logger.h"
|
||||
#include "interface/pixel_map_generator.h"
|
||||
#include "interface/theme_manager.h"
|
||||
|
|
@ -320,11 +321,8 @@ int main(int argc, char *argv[])
|
|||
if (file.startsWith("cockatrice://")) {
|
||||
// ui.openUrl(QUrl(file));
|
||||
} else if (QFileInfo(file).exists()) {
|
||||
std::optional<LoadedDeck> deckOpt =
|
||||
DeckLoader::loadFromFile(file, DeckFileFormat::getFormatFromName(file), true);
|
||||
if (deckOpt) {
|
||||
ui.getTabSupervisor()->openDeckInNewTab(deckOpt.value());
|
||||
}
|
||||
auto openDeckIntent = new IntentOpenLocalDeck(ui.getTabSupervisor(), file);
|
||||
openDeckIntent->execute();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -334,11 +332,8 @@ int main(int argc, char *argv[])
|
|||
if (file.startsWith("cockatrice://")) {
|
||||
// ui.openUrl(QUrl(file));
|
||||
} else if (QFileInfo(file).exists()) {
|
||||
std::optional<LoadedDeck> deckOpt =
|
||||
DeckLoader::loadFromFile(file, DeckFileFormat::getFormatFromName(file), true);
|
||||
if (deckOpt) {
|
||||
ui.getTabSupervisor()->openDeckInNewTab(deckOpt.value());
|
||||
}
|
||||
auto openDeckIntent = new IntentOpenLocalDeck(ui.getTabSupervisor(), file);
|
||||
openDeckIntent->execute();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue