Skip to content

Commit

Permalink
fix: member variable 'GpgOperaContext::ascii' is not initialized in t…
Browse files Browse the repository at this point in the history
…he constructor
  • Loading branch information
saturneric committed Jan 27, 2025
1 parent 5d2b020 commit a5ab3a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/ui/struct/GpgOperaResultContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ namespace GpgFrontend::UI {
GpgOperaContext::GpgOperaContext(QContainer<OperaWaitingCb>& operas,
QContainer<GpgOperaResult>& opera_results,
GpgKeyList& keys, GpgKeyList& singer_keys,
QStringList& unknown_fprs)
QStringList& unknown_fprs, bool ascii)
: operas(operas),
opera_results(opera_results),
keys(keys),
singer_keys(singer_keys),
unknown_fprs(unknown_fprs) {}
unknown_fprs(unknown_fprs),
ascii(ascii) {}

auto GpgOperaContexts::GetContextPath(int category) -> QStringList& {
if (!categories.contains(category)) categories[category] = {};
Expand Down Expand Up @@ -73,7 +74,7 @@ auto GpgOperaContexts::GetContext(int category)
if (GetContextPath(category).empty()) return nullptr;

auto context = QSharedPointer<GpgOperaContext>::create(
operas, opera_results, keys, singer_keys, unknown_fprs);
operas, opera_results, keys, singer_keys, unknown_fprs, ascii);
context->ascii = ascii;

context->paths = GetContextPath(category);
Expand Down
2 changes: 1 addition & 1 deletion src/ui/struct/GpgOperaResultContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct GpgOperaContext {

GpgOperaContext(QContainer<OperaWaitingCb>& operas,
QContainer<GpgOperaResult>& opera_results, GpgKeyList& keys,
GpgKeyList& singer_keys, QStringList& unknown_fprs);
GpgKeyList& singer_keys, QStringList& unknown_fprs, bool ascii);
};

struct GpgOperaContexts {
Expand Down

0 comments on commit a5ab3a6

Please sign in to comment.