File: HelloWorld.cpp

package info (click to toggle)
kf6-threadweaver 6.20.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,320 kB
  • sloc: cpp: 7,554; python: 33; sh: 13; makefile: 5
file content (24 lines) | stat: -rw-r--r-- 496 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* -*- C++ -*-
    This file is part of ThreadWeaver.

    SPDX-FileCopyrightText: 2005-2014 Mirko Boehm <mirko@kde.org>

    SPDX-License-Identifier: LGPL-2.0-or-later
*/

//@@snippet_begin(sample-helloworld)
#include <ThreadWeaver/ThreadWeaver>

#include <QCoreApplication>
#include <QDebug>

int main(int argc, char **argv)
{
    QCoreApplication app(argc, argv);

    using namespace ThreadWeaver;
    stream() << make_job([]() {
        qDebug() << "Hello World!";
    });
}
//@@snippet_end