Page MenuHome GnuPG

debug.cpp
No OneTemporary

debug.cpp

/*
kleo/debug.cpp
This file is part of libkleopatra, the KDE keymanagement library
SPDX-FileCopyrightText: 2021, 2022 g10 Code GmbH
SPDX-FileContributor: Ingo Klöcker <dev@ingo-kloecker.de>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include <config-libkleo.h>
#include "debug.h"
#include "keygroup.h"
#include <libkleo/formatting.h>
#include <QDebug>
using namespace Kleo;
QDebug operator<<(QDebug debug, const GpgME::Key &key)
{
const bool oldSetting = debug.autoInsertSpaces();
debug.nospace() << "GpgME::Key(";
if (key.isNull()) {
debug << "null";
} else if (key.primaryFingerprint()) {
debug << Formatting::summaryLine(key) << ", fpr: " << key.primaryFingerprint();
} else {
debug << Formatting::summaryLine(key) << ", id: " << key.keyID();
}
debug << ')';
debug.setAutoInsertSpaces(oldSetting);
return debug.maybeSpace();
}
QDebug operator<<(QDebug debug, const Kleo::KeyGroup &group)
{
const bool oldSetting = debug.autoInsertSpaces();
if (group.isNull()) {
debug << "Null";
} else {
debug.nospace() << group.name() << " (id: " << group.id() << ", source: " << group.source() << ", keys: " << group.keys().size()
<< ", isImmutable: " << group.isImmutable() << ")";
}
debug.setAutoInsertSpaces(oldSetting);
return debug.maybeSpace();
}

File Metadata

Mime Type
text/x-c
Expires
Tue, Dec 9, 1:10 AM (1 d, 6 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
d0/4e/9d0506111d9374df6204df34bfdb

Event Timeline