downgradle qt to 5.15.2
This commit is contained in:
		| @@ -1,6 +1,6 @@ | |||||||
| QT += quick | QT += quick | ||||||
|  |  | ||||||
| CONFIG += c++11 | CONFIG += c++14 | ||||||
|  |  | ||||||
| # The following define makes your compiler emit warnings if you use | # The following define makes your compiler emit warnings if you use | ||||||
| # any Qt feature that has been marked deprecated (the exact warnings | # any Qt feature that has been marked deprecated (the exact warnings | ||||||
|   | |||||||
| @@ -1,5 +1,7 @@ | |||||||
| #include "NativeExecutor.h" | #include "NativeExecutor.h" | ||||||
|  |  | ||||||
|  | #include <QDebug> | ||||||
|  |  | ||||||
| NativeExecutor::NativeExecutor() { | NativeExecutor::NativeExecutor() { | ||||||
|   mJSEngine = new QJSEngine(); |   mJSEngine = new QJSEngine(); | ||||||
|   mJSEngine->installExtensions(QJSEngine::AllExtensions); |   mJSEngine->installExtensions(QJSEngine::AllExtensions); | ||||||
|   | |||||||
| @@ -35,14 +35,16 @@ void DoricModalPlugin::toast(QString jsValueString, QString callbackId) { | |||||||
|             .at(0) |             .at(0) | ||||||
|             ->childItems() |             ->childItems() | ||||||
|             .at(0) |             .at(0) | ||||||
|  |             ->childItems() | ||||||
|  |             .at(0) | ||||||
|             ->setProperty("text", msg); |             ->setProperty("text", msg); | ||||||
|  |  | ||||||
|         std::function setX = [window, parentWindow]() { |         std::function<void()> setX = [window, parentWindow]() { | ||||||
|           window->setProperty("x", |           window->setProperty("x", | ||||||
|                               (parentWindow->width() - window->width()) / 2.f + |                               (parentWindow->width() - window->width()) / 2.f + | ||||||
|                                   parentWindow->x()); |                                   parentWindow->x()); | ||||||
|         }; |         }; | ||||||
|         std::function setY = [window, parentWindow, gravity]() { |         std::function<void()> setY = [window, parentWindow, gravity]() { | ||||||
|           if ((gravity & DoricGravity::DoricGravityBottom) == |           if ((gravity & DoricGravity::DoricGravityBottom) == | ||||||
|               DoricGravity::DoricGravityBottom) { |               DoricGravity::DoricGravityBottom) { | ||||||
|             window->setProperty("y", parentWindow->height() - window->height() - |             window->setProperty("y", parentWindow->height() - window->height() - | ||||||
| @@ -101,12 +103,12 @@ void DoricModalPlugin::alert(QString jsValueString, QString callbackId) { | |||||||
|         QQuickWindow *parentWindow = |         QQuickWindow *parentWindow = | ||||||
|             getContext()->getRootNode()->getRootView()->window(); |             getContext()->getRootNode()->getRootView()->window(); | ||||||
|  |  | ||||||
|         std::function setX = [window, parentWindow]() { |         std::function<void()> setX = [window, parentWindow]() { | ||||||
|           window->setProperty("x", |           window->setProperty("x", | ||||||
|                               (parentWindow->width() - window->width()) / 2.f + |                               (parentWindow->width() - window->width()) / 2.f + | ||||||
|                                   parentWindow->x()); |                                   parentWindow->x()); | ||||||
|         }; |         }; | ||||||
|         std::function setY = [window, parentWindow]() { |         std::function<void()> setY = [window, parentWindow]() { | ||||||
|           window->setProperty("y", |           window->setProperty("y", | ||||||
|                               (parentWindow->height() - window->height()) / 2 + |                               (parentWindow->height() - window->height()) / 2 + | ||||||
|                                   parentWindow->y()); |                                   parentWindow->y()); | ||||||
| @@ -156,12 +158,12 @@ void DoricModalPlugin::confirm(QString jsValueString, QString callbackId) { | |||||||
|         QQuickWindow *parentWindow = |         QQuickWindow *parentWindow = | ||||||
|             getContext()->getRootNode()->getRootView()->window(); |             getContext()->getRootNode()->getRootView()->window(); | ||||||
|  |  | ||||||
|         std::function setX = [window, parentWindow]() { |         std::function<void()> setX = [window, parentWindow]() { | ||||||
|           window->setProperty("x", |           window->setProperty("x", | ||||||
|                               (parentWindow->width() - window->width()) / 2.f + |                               (parentWindow->width() - window->width()) / 2.f + | ||||||
|                                   parentWindow->x()); |                                   parentWindow->x()); | ||||||
|         }; |         }; | ||||||
|         std::function setY = [window, parentWindow]() { |         std::function<void()> setY = [window, parentWindow]() { | ||||||
|           window->setProperty("y", |           window->setProperty("y", | ||||||
|                               (parentWindow->height() - window->height()) / 2 + |                               (parentWindow->height() - window->height()) / 2 + | ||||||
|                                   parentWindow->y()); |                                   parentWindow->y()); | ||||||
| @@ -211,12 +213,12 @@ void DoricModalPlugin::prompt(QString jsValueString, QString callbackId) { | |||||||
|         QQuickWindow *parentWindow = |         QQuickWindow *parentWindow = | ||||||
|             getContext()->getRootNode()->getRootView()->window(); |             getContext()->getRootNode()->getRootView()->window(); | ||||||
|  |  | ||||||
|         std::function setX = [window, parentWindow]() { |         std::function<void()> setX = [window, parentWindow]() { | ||||||
|           window->setProperty("x", |           window->setProperty("x", | ||||||
|                               (parentWindow->width() - window->width()) / 2.f + |                               (parentWindow->width() - window->width()) / 2.f + | ||||||
|                                   parentWindow->x()); |                                   parentWindow->x()); | ||||||
|         }; |         }; | ||||||
|         std::function setY = [window, parentWindow]() { |         std::function<void()> setY = [window, parentWindow]() { | ||||||
|           window->setProperty("y", |           window->setProperty("y", | ||||||
|                               (parentWindow->height() - window->height()) / 2 + |                               (parentWindow->height() - window->height()) / 2 + | ||||||
|                                   parentWindow->y()); |                                   parentWindow->y()); | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| import QtQuick 2.12 | import QtQuick 2.12 | ||||||
| import QtQuick.Controls 2.12 | import QtQuick.Controls 2.12 | ||||||
|  |  | ||||||
| Window { | ApplicationWindow { | ||||||
|     id: window |     id: window | ||||||
|  |  | ||||||
|     flags: flags | Qt.WindowStaysOnTopHint | Qt.Tool | Qt.FramelessWindowHint |     flags: flags | Qt.WindowStaysOnTopHint | Qt.Tool | Qt.FramelessWindowHint | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| import QtQuick 2.12 | import QtQuick 2.12 | ||||||
| import QtQuick.Controls 2.12 | import QtQuick.Controls 2.12 | ||||||
|  |  | ||||||
| Window { | ApplicationWindow { | ||||||
|     id: window |     id: window | ||||||
|  |  | ||||||
|     flags: flags | Qt.WindowStaysOnTopHint | Qt.Tool | Qt.FramelessWindowHint |     flags: flags | Qt.WindowStaysOnTopHint | Qt.Tool | Qt.FramelessWindowHint | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ import QtQuick 2.12 | |||||||
| import QtQuick.Controls 2.12 | import QtQuick.Controls 2.12 | ||||||
| import QtQuick.Layouts 1.15 | import QtQuick.Layouts 1.15 | ||||||
|  |  | ||||||
| Window { | ApplicationWindow { | ||||||
|     id: window |     id: window | ||||||
|  |  | ||||||
|     flags: flags | Qt.WindowStaysOnTopHint | Qt.Tool | Qt.FramelessWindowHint |     flags: flags | Qt.WindowStaysOnTopHint | Qt.Tool | Qt.FramelessWindowHint | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ import QtQuick 2.12 | |||||||
| import QtQuick.Controls 2.5 | import QtQuick.Controls 2.5 | ||||||
| import QtQuick.Layouts 1.15 | import QtQuick.Layouts 1.15 | ||||||
|  |  | ||||||
| Window { | ApplicationWindow { | ||||||
|     id: window |     id: window | ||||||
|  |  | ||||||
|     flags: flags | Qt.WindowStaysOnTopHint  | Qt.Tool | Qt.FramelessWindowHint | Qt.WindowTransparentForInput |     flags: flags | Qt.WindowStaysOnTopHint  | Qt.Tool | Qt.FramelessWindowHint | Qt.WindowTransparentForInput | ||||||
|   | |||||||
| @@ -48,7 +48,7 @@ void DoricGroupNode::configChildNode() { | |||||||
|             oldNode->blend(model["props"]); |             oldNode->blend(model["props"]); | ||||||
|           } else { |           } else { | ||||||
|             // Replace this view |             // Replace this view | ||||||
|             mChildNodes.remove(idx); |             mChildNodes.removeAt(idx); | ||||||
|             oldNode->getNodeView()->setParent(nullptr); |             oldNode->getNodeView()->setParent(nullptr); | ||||||
|             oldNode->getNodeView()->setParentItem(nullptr); |             oldNode->getNodeView()->setParentItem(nullptr); | ||||||
|             oldNode->getNodeView()->deleteLater(); |             oldNode->getNodeView()->deleteLater(); | ||||||
| @@ -132,7 +132,7 @@ void DoricGroupNode::configChildNode() { | |||||||
|   int size = mChildNodes.size(); |   int size = mChildNodes.size(); | ||||||
|   for (int idx = mChildViewIds.size(); idx < size; idx++) { |   for (int idx = mChildViewIds.size(); idx < size; idx++) { | ||||||
|     DoricViewNode *viewNode = mChildNodes.at(mChildViewIds.size()); |     DoricViewNode *viewNode = mChildNodes.at(mChildViewIds.size()); | ||||||
|     mChildNodes.remove(mChildViewIds.size()); |     mChildNodes.removeAt(mChildViewIds.size()); | ||||||
|     viewNode->getNodeView()->setParent(nullptr); |     viewNode->getNodeView()->setParent(nullptr); | ||||||
|     viewNode->getNodeView()->setParentItem(nullptr); |     viewNode->getNodeView()->setParentItem(nullptr); | ||||||
|     viewNode->getNodeView()->deleteLater(); |     viewNode->getNodeView()->deleteLater(); | ||||||
|   | |||||||
| @@ -153,7 +153,7 @@ void DoricViewNode::requestLayout() {} | |||||||
| void DoricViewNode::callJSResponse(QString funcId, QVariantList args) { | void DoricViewNode::callJSResponse(QString funcId, QVariantList args) { | ||||||
|   QVariantList nArgs; |   QVariantList nArgs; | ||||||
|   QList<QString> idList = getIdList(); |   QList<QString> idList = getIdList(); | ||||||
|   nArgs.append(idList); |   nArgs.append(QVariant(idList)); | ||||||
|   nArgs.append(funcId); |   nArgs.append(funcId); | ||||||
|   foreach (const QVariant &arg, args) |   foreach (const QVariant &arg, args) | ||||||
|     nArgs.append(arg); |     nArgs.append(arg); | ||||||
|   | |||||||
| @@ -492,9 +492,9 @@ void DoricLayouts::setFrame() { | |||||||
|               << " measuredX: " << this->measuredX |               << " measuredX: " << this->measuredX | ||||||
|               << " measuredY: " << this->measuredY; |               << " measuredY: " << this->measuredY; | ||||||
|  |  | ||||||
|   if (qFabs(this->measuredWidth - this->view->width() >= 0.00001f)) |   if (qAbs(this->measuredWidth - this->view->width() >= 0.00001f)) | ||||||
|     this->view->setProperty("width", this->measuredWidth); |     this->view->setProperty("width", this->measuredWidth); | ||||||
|   if (qFabs(this->measuredHeight - this->view->height() >= 0.00001f)) |   if (qAbs(this->measuredHeight - this->view->height() >= 0.00001f)) | ||||||
|     this->view->setProperty("height", this->measuredHeight); |     this->view->setProperty("height", this->measuredHeight); | ||||||
|  |  | ||||||
|   this->view->setProperty("x", this->measuredX); |   this->view->setProperty("x", this->measuredX); | ||||||
|   | |||||||
| @@ -14,7 +14,7 @@ public: | |||||||
|     QFile *file = new QFile(resource.fileName()); |     QFile *file = new QFile(resource.fileName()); | ||||||
|     file->open(QFile::ReadOnly | QFile::Text); |     file->open(QFile::ReadOnly | QFile::Text); | ||||||
|     QTextStream in(file); |     QTextStream in(file); | ||||||
|     in.setEncoding(QStringConverter::Encoding::Utf8); |     in.setAutoDetectUnicode(true); | ||||||
|     QString content = in.readAll(); |     QString content = in.readAll(); | ||||||
|     file->close(); |     file->close(); | ||||||
|     delete file; |     delete file; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user