Append VDS tutorial steps via reference instead of copy

This commit is contained in:
Lukas Brübach 2026-08-09 03:36:09 +02:00
parent aa1225dab3
commit d03b04a211
3 changed files with 3 additions and 5 deletions

View file

@ -135,7 +135,7 @@ TutorialSequence DeckViewContainer::generateTutorialSequence()
{this, tr("There are multiple ways to select a deck:\n\n- From a local file" {this, tr("There are multiple ways to select a deck:\n\n- From a local file"
"\n- From the contents of your clipboard\nFrom an external online service")}); "\n- From the contents of your clipboard\nFrom an external online service")});
deckViewContainerSequence = visualDeckStorageWidget->generateTutorialSequence(deckViewContainerSequence); visualDeckStorageWidget->generateTutorialSequence(deckViewContainerSequence);
return deckViewContainerSequence; return deckViewContainerSequence;
} }

View file

@ -158,7 +158,7 @@ VisualDeckStorageWidget::VisualDeckStorageWidget(QWidget *parent) : QWidget(pare
} }
} }
TutorialSequence VisualDeckStorageWidget::generateTutorialSequence(TutorialSequence vdsSequence) void VisualDeckStorageWidget::generateTutorialSequence(TutorialSequence &vdsSequence)
{ {
vdsSequence.addStep( vdsSequence.addStep(
{this, tr("This is the visual deck storage. It displays all the files and folders located in " {this, tr("This is the visual deck storage. It displays all the files and folders located in "
@ -178,8 +178,6 @@ TutorialSequence VisualDeckStorageWidget::generateTutorialSequence(TutorialSeque
vdsSequence.addStep({scrollArea, tr("This is where all your local decks will be displayed. You can customize their " vdsSequence.addStep({scrollArea, tr("This is where all your local decks will be displayed. You can customize their "
"display status using the cogwheel in the top right.\nYou can select a deck by " "display status using the cogwheel in the top right.\nYou can select a deck by "
"double-clicking it.\n\nRight-click a deck for more options.")}); "double-clicking it.\n\nRight-click a deck for more options.")});
return vdsSequence;
} }
void VisualDeckStorageWidget::refreshIfPossible() void VisualDeckStorageWidget::refreshIfPossible()

View file

@ -44,7 +44,7 @@ public:
void setShareSelectedFiles(const QStringList &paths); void setShareSelectedFiles(const QStringList &paths);
void clearShareSelection(); void clearShareSelection();
void setShareAvailable(bool available); void setShareAvailable(bool available);
TutorialSequence generateTutorialSequence(TutorialSequence vdsSequence); void generateTutorialSequence(TutorialSequence &vdsSequence);
VisualDeckStorageTagFilterWidget *tagFilterWidget; VisualDeckStorageTagFilterWidget *tagFilterWidget;
bool deckPreviewSelectionAnimationEnabled; bool deckPreviewSelectionAnimationEnabled;