Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qhaikuapplication.cpp
Go to the documentation of this file.
1
// Copyright (C) 2015 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Tobias Koenig <tobias.koenig@kdab.com>
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
#
include
"qhaikuapplication.h"
5
6
#
include
<
QCoreApplication
>
7
#
include
<
QFileOpenEvent
>
8
9
#
include
<
qpa
/
qwindowsysteminterface
.
h
>
10
11
#
include
<
Entry
.
h
>
12
#
include
<
Path
.
h
>
13
14
QHaikuApplication
::
QHaikuApplication
(
const
char
*signature)
15
:
BApplication
(
signature
)
16
{
17
}
18
19
bool
QHaikuApplication
::
QuitRequested
()
20
{
21
QWindowSystemInterface::handleApplicationTermination<QWindowSystemInterface::SynchronousDelivery>();
22
return
true
;
23
}
24
25
void
QHaikuApplication
::
RefsReceived
(BMessage* message)
26
{
27
uint32 type;
28
int32 count;
29
30
const
status_t status = message->GetInfo(
"refs"
, &type, &count);
31
if
(status == B_OK && type == B_REF_TYPE) {
32
entry_ref ref;
33
for
(int32 i = 0; i < count; ++i) {
34
if
(message->FindRef(
"refs"
, i, &ref) == B_OK) {
35
const
BPath path(&ref);
36
QCoreApplication::postEvent(QCoreApplication::instance(),
new
QFileOpenEvent(QFile::decodeName(path.Path())));
37
}
38
}
39
}
40
41
BApplication::RefsReceived(message);
42
}
QHaikuApplication
Definition
qhaikuapplication.h:12
QHaikuApplication::RefsReceived
void RefsReceived(BMessage *message) override
Definition
qhaikuapplication.cpp:25
QHaikuApplication::QuitRequested
bool QuitRequested() override
Definition
qhaikuapplication.cpp:19
QHaikuApplication::QHaikuApplication
QHaikuApplication(const char *signature)
Definition
qhaikuapplication.cpp:14
qtbase
src
plugins
platforms
haiku
qhaikuapplication.cpp
Generated on
for Qt by
1.18.0