mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-26 13:27:05 +08:00
fix bug #351
This commit is contained in:
parent
05251e085c
commit
d485ec9e3b
@ -20,20 +20,6 @@
|
||||
#include "FluNetwork.h"
|
||||
#include "QRCode.h"
|
||||
|
||||
int major = 1;
|
||||
int minor = 0;
|
||||
auto uri = "FluentUI";
|
||||
|
||||
FluentUI* FluentUI::m_instance = nullptr;
|
||||
|
||||
FluentUI *FluentUI::getInstance()
|
||||
{
|
||||
if(FluentUI::m_instance == nullptr){
|
||||
FluentUI::m_instance = new FluentUI;
|
||||
}
|
||||
return FluentUI::m_instance;
|
||||
}
|
||||
|
||||
void FluentUI::registerTypes(QQmlEngine *engine){
|
||||
initializeEngine(engine,uri);
|
||||
registerTypes(uri);
|
||||
|
@ -3,17 +3,20 @@
|
||||
|
||||
#include <QObject>
|
||||
#include <QQmlEngine>
|
||||
#include "singleton.h"
|
||||
|
||||
class FluentUI : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
static FluentUI *getInstance();
|
||||
SINGLETONG(FluentUI)
|
||||
Q_DECL_EXPORT void registerTypes(QQmlEngine *engine);
|
||||
void registerTypes(const char *uri);
|
||||
void initializeEngine(QQmlEngine *engine, const char *uri);
|
||||
private:
|
||||
static FluentUI* m_instance;
|
||||
const int major = 1;
|
||||
const int minor = 0;
|
||||
const char *uri = "FluentUI";
|
||||
};
|
||||
|
||||
#endif // FLUENTUI_H
|
||||
|
Loading…
Reference in New Issue
Block a user