update to use fmt-based apis

Not complete, but a first big stab converting users of Mu::Error and
various g_warning & friends, format to the new libfmt-based APIs.
This commit is contained in:
Dirk-Jan C. Binnema
2023-07-05 23:10:13 +03:00
parent 742ca33740
commit 4920b56671
46 changed files with 435 additions and 449 deletions

View File

@ -623,7 +623,7 @@ cmd_help(const CLI::App& app, Options& opts)
return show_manpage(opts, "mu-" + opts.help.command);
return Err(Error::Code::Command,
"no help available for '%s'", opts.help.command.c_str());
"no help available for '{}'", opts.help.command);
}
bool
@ -660,7 +660,7 @@ Options::make(int argc, char *argv[])
CLI::App app{"mu mail indexer/searcher", "mu"};
app.description(R"(mu mail indexer/searcher
Copyright (C) 2008-2022 Dirk-Jan C. Binnema
Copyright (C) 2008-2023 Dirk-Jan C. Binnema
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
@ -743,7 +743,7 @@ There is NO WARRANTY, to the extent permitted by law.
} catch (const CLI::CallForVersion&) {
std::cout << "version " << PACKAGE_VERSION << "\n";
} catch (const CLI::ParseError& pe) {
return Err(Error::Code::InvalidArgument, "%s", pe.what());
return Err(Error::Code::InvalidArgument, "{}", pe.what());
} catch (...) {
return Err(Error::Code::Internal, "error parsing arguments");
}