mirror of
https://github.com/lubosz/overte.git
synced 2025-04-26 16:55:31 +02:00
Removing duplicate declaration
This commit is contained in:
parent
fdf2f8395d
commit
9fbd5d79e4
5 changed files with 4 additions and 32 deletions
interface/src/ui
libraries/ui/src
|
@ -15,7 +15,7 @@
|
|||
#include "DependencyManager.h"
|
||||
#include "AddressManager.h"
|
||||
|
||||
QML_DIALOG_DEF(AddressBarDialog)
|
||||
HIFI_QML_DEF(AddressBarDialog)
|
||||
|
||||
AddressBarDialog::AddressBarDialog(QQuickItem* parent) : OffscreenQmlDialog(parent) {
|
||||
auto addressManager = DependencyManager::get<AddressManager>();
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
class AddressBarDialog : public OffscreenQmlDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
QML_DIALOG_DECL
|
||||
HIFI_QML_DECL
|
||||
|
||||
public:
|
||||
AddressBarDialog(QQuickItem* parent = nullptr);
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "Menu.h"
|
||||
#include <NetworkingConstants.h>
|
||||
|
||||
QML_DIALOG_DEF(LoginDialog)
|
||||
HIFI_QML_DEF(LoginDialog)
|
||||
|
||||
LoginDialog::LoginDialog(QQuickItem *parent) : OffscreenQmlDialog(parent), _rootUrl(NetworkingConstants::METAVERSE_SERVER_URL.toString()) {
|
||||
connect(&AccountManager::getInstance(), &AccountManager::loginComplete,
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
class LoginDialog : public OffscreenQmlDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
QML_DIALOG_DECL
|
||||
HIFI_QML_DECL
|
||||
|
||||
Q_PROPERTY(QString statusText READ statusText WRITE setStatusText NOTIFY statusTextChanged)
|
||||
Q_PROPERTY(QString rootUrl READ rootUrl)
|
||||
|
|
|
@ -16,34 +16,6 @@
|
|||
|
||||
#include "OffscreenUi.h"
|
||||
|
||||
#define QML_DIALOG_DECL \
|
||||
private: \
|
||||
static const QString NAME; \
|
||||
static const QUrl QML; \
|
||||
public: \
|
||||
static void registerType(); \
|
||||
static void show(std::function<void(QQmlContext*, QObject*)> f = [](QQmlContext*, QObject*) {}); \
|
||||
static void toggle(std::function<void(QQmlContext*, QObject*)> f = [](QQmlContext*, QObject*) {}); \
|
||||
private:
|
||||
|
||||
#define QML_DIALOG_DEF(x) \
|
||||
const QUrl x::QML = QUrl(#x ".qml"); \
|
||||
const QString x::NAME = #x; \
|
||||
\
|
||||
void x::registerType() { \
|
||||
qmlRegisterType<x>("Hifi", 1, 0, NAME.toLocal8Bit().constData()); \
|
||||
} \
|
||||
\
|
||||
void x::show(std::function<void(QQmlContext*, QObject*)> f) { \
|
||||
auto offscreenUi = DependencyManager::get<OffscreenUi>(); \
|
||||
offscreenUi->show(QML, NAME, f); \
|
||||
} \
|
||||
\
|
||||
void x::toggle(std::function<void(QQmlContext*, QObject*)> f) { \
|
||||
auto offscreenUi = DependencyManager::get<OffscreenUi>(); \
|
||||
offscreenUi->toggle(QML, NAME, f); \
|
||||
}
|
||||
|
||||
class OffscreenQmlDialog : public QQuickItem
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
Loading…
Reference in a new issue