1 | /* -*- C++ -*- |
---|---|
2 | This file is part of ThreadWeaver. |
3 | |
4 | SPDX-FileCopyrightText: 2005-2014 Mirko Boehm <mirko@kde.org> |
5 | |
6 | SPDX-License-Identifier: LGPL-2.0-or-later |
7 | */ |
8 | |
9 | #include <QThread> |
10 | |
11 | #include "PriorityDecorator.h" |
12 | |
13 | using namespace ThreadWeaver; |
14 | |
15 | PriorityDecorator::PriorityDecorator(int priority, ThreadWeaver::JobInterface *job, bool autoDelete) |
16 | : IdDecorator(job, autoDelete) |
17 | , m_priority(priority) |
18 | { |
19 | } |
20 | |
21 | void PriorityDecorator::run(JobPointer self, Thread *thread) |
22 | { |
23 | IdDecorator::run(self, thread); |
24 | } |
25 | |
26 | int PriorityDecorator::priority() const |
27 | { |
28 | return m_priority; |
29 | } |
30 |