Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
15 : BApplication(signature)
16{
17}
18
20{
21 QWindowSystemInterface::handleApplicationTermination<QWindowSystemInterface::SynchronousDelivery>();
22 return true;
23}
24
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);
37 }
38 }
39 }
40
41 BApplication::RefsReceived(message);
42}
static QCoreApplication * instance() noexcept
Returns a pointer to the application's QCoreApplication (or QGuiApplication/QApplication) instance.
static void postEvent(QObject *receiver, QEvent *event, int priority=Qt::NormalEventPriority)
The QFileOpenEvent class provides an event that will be sent when there is a request to open a file o...
Definition qevent.h:848
static QString decodeName(const QByteArray &localFileName)
This does the reverse of QFile::encodeName() using localFileName.
Definition qfile.h:162
void RefsReceived(BMessage *message) override
bool QuitRequested() override
QHaikuApplication(const char *signature)
GLenum GLenum GLsizei count
GLenum type
GLuint GLsizei const GLchar * message
GLint ref
GLsizei const GLchar *const * path