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