mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-07 08:35:16 -04:00
Implement Android intent handling in qml app
AndroidManifest.xml register activity as an handler for retroshare links RetroShareQmlActivity...NativeCalls.cpp bring the intent data from java to C++ and then to QML QMl mainWindow uses URI.js to parse the received uri Create a singleton for qml engine so it is reachable from NativeCalls
This commit is contained in:
parent
29a3d105c4
commit
533dbef0c7
15 changed files with 239 additions and 26 deletions
32
retroshare-qml-app/src/singletonqmlengine.h
Normal file
32
retroshare-qml-app/src/singletonqmlengine.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
#pragma once
|
||||
/*
|
||||
* libresapi local socket client
|
||||
* Copyright (C) 2017 Gioacchino Mazzurco <gio@eigenlab.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <QQmlApplicationEngine>
|
||||
|
||||
struct SingletonQmlEngine
|
||||
{
|
||||
static QQmlApplicationEngine& instance()
|
||||
{
|
||||
static QQmlApplicationEngine engine;
|
||||
return engine;
|
||||
}
|
||||
|
||||
private:
|
||||
SingletonQmlEngine();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue