Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F34606987
task_p.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
1 KB
Subscribers
None
task_p.h
View Options
/* -*- mode: c++; c-basic-offset:4 -*-
crypto/task_p.h
This file is part of Kleopatra, the KDE keymanager
SPDX-FileCopyrightText: 2007 Klarälvdalens Datakonsult AB
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include
<crypto/task.h>
#include
<QString>
#include
<QTimer>
namespace
Kleo
{
namespace
Crypto
{
class
SimpleTask
:
public
Task
{
Q_OBJECT
public
:
explicit
SimpleTask
(
const
QString
&
label
)
:
m_result
(),
m_label
(
label
)
{}
void
setResult
(
const
std
::
shared_ptr
<
const
Task
::
Result
>
&
res
)
{
m_result
=
res
;
}
GpgME
::
Protocol
protocol
()
const
override
{
return
GpgME
::
UnknownProtocol
;
}
QString
label
()
const
override
{
return
m_label
;
}
void
cancel
()
override
{}
private
:
void
doStart
()
override
{
QTimer
::
singleShot
(
0
,
this
,
&
SimpleTask
::
slotEmitResult
);
}
unsigned
long
long
inputSize
()
const
override
{
return
0
;
}
private
Q_SLOTS
:
void
slotEmitResult
()
{
emitResult
(
m_result
);
}
private
:
std
::
shared_ptr
<
const
Task
::
Result
>
m_result
;
QString
m_label
;
};
}
}
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Jan 18, 11:34 PM (23 h, 25 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
a2/77/3fff1f06cba90bbc1525cfc20cd0
Attached To
rKLEOPATRA Kleopatra
Event Timeline
Log In to Comment