Upgrade deps (#562)
* upgrade qode * 0.20.0 * dep updates * formatting and fix exports * fix type rename
This commit is contained in:
parent
f8a3f4186c
commit
1bd0a5ca10
2448
package-lock.json
generated
2448
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
22
package.json
22
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nodegui/nodegui",
|
"name": "@nodegui/nodegui",
|
||||||
"version": "0.19.0",
|
"version": "0.20.0",
|
||||||
"description": "A cross platform library to build native desktop apps.",
|
"description": "A cross platform library to build native desktop apps.",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
@ -28,7 +28,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nodegui/artifact-installer": "^1.1.0",
|
"@nodegui/artifact-installer": "^1.1.0",
|
||||||
"@nodegui/qode": "^2.0.4",
|
"@nodegui/qode": "^2.1.0",
|
||||||
"cmake-js": "^6.1.0",
|
"cmake-js": "^6.1.0",
|
||||||
"cross-env": "^7.0.0",
|
"cross-env": "^7.0.0",
|
||||||
"cuid": "^2.1.6",
|
"cuid": "^2.1.6",
|
||||||
@ -41,21 +41,21 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/bindings": "^1.3.0",
|
"@types/bindings": "^1.3.0",
|
||||||
"@types/jest": "^25.2.1",
|
"@types/jest": "^25.2.1",
|
||||||
"@types/node": "^13.11.1",
|
"@types/node": "^13.13.6",
|
||||||
"@typescript-eslint/eslint-plugin": "^2.28.0",
|
"@typescript-eslint/eslint-plugin": "^2.33.0",
|
||||||
"@typescript-eslint/parser": "^2.28.0",
|
"@typescript-eslint/parser": "^2.33.0",
|
||||||
"clang-format": "^1.3.0",
|
"clang-format": "^1.3.0",
|
||||||
"eslint": "^6.6.0",
|
"eslint": "^6.6.0",
|
||||||
"eslint-config-prettier": "^6.5.0",
|
"eslint-config-prettier": "^6.11.0",
|
||||||
"eslint-plugin-prettier": "^3.1.3",
|
"eslint-plugin-prettier": "^3.1.3",
|
||||||
"husky": "^4.2.5",
|
"husky": "^4.2.5",
|
||||||
"jest": "^25.3.0",
|
"jest": "^25.5.4",
|
||||||
"prebuild": "^10.0.0",
|
"prebuild": "^10.0.0",
|
||||||
"prettier": "^2.0.4",
|
"prettier": "^2.0.5",
|
||||||
"ts-jest": "^25.3.1",
|
"ts-jest": "^25.5.1",
|
||||||
"typedoc": "^0.17.4",
|
"typedoc": "^0.17.6",
|
||||||
"typedoc-plugin-markdown": "^2.2.14",
|
"typedoc-plugin-markdown": "^2.2.14",
|
||||||
"typescript": "^3.8.3"
|
"typescript": "^3.9.2"
|
||||||
},
|
},
|
||||||
"binary": {
|
"binary": {
|
||||||
"napi_versions": [
|
"napi_versions": [
|
||||||
|
|||||||
@ -378,13 +378,13 @@
|
|||||||
this->instance->addAction(actionWrap->getInternalInstance()); \
|
this->instance->addAction(actionWrap->getInternalInstance()); \
|
||||||
return env.Null(); \
|
return env.Null(); \
|
||||||
} \
|
} \
|
||||||
Napi::Value removeAction(const Napi::CallbackInfo& info) { \
|
Napi::Value removeAction(const Napi::CallbackInfo& info) { \
|
||||||
Napi::Env env = info.Env(); \
|
Napi::Env env = info.Env(); \
|
||||||
Napi::HandleScope scope(env); \
|
Napi::HandleScope scope(env); \
|
||||||
Napi::Object actionObject = info[0].As<Napi::Object>(); \
|
Napi::Object actionObject = info[0].As<Napi::Object>(); \
|
||||||
QActionWrap* actionWrap = \
|
QActionWrap* actionWrap = \
|
||||||
Napi::ObjectWrap<QActionWrap>::Unwrap(actionObject); \
|
Napi::ObjectWrap<QActionWrap>::Unwrap(actionObject); \
|
||||||
this->instance->removeAction(actionWrap->getInternalInstance()); \
|
this->instance->removeAction(actionWrap->getInternalInstance()); \
|
||||||
return env.Null(); \
|
return env.Null(); \
|
||||||
} \
|
} \
|
||||||
Napi::Value repolish(const Napi::CallbackInfo& info) { \
|
Napi::Value repolish(const Napi::CallbackInfo& info) { \
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
#include "Extras/Utils/nutils.h"
|
#include "Extras/Utils/nutils.h"
|
||||||
#include "QtCore/QVariant/qvariant_wrap.h"
|
#include "QtCore/QVariant/qvariant_wrap.h"
|
||||||
#include "QtGui/QColor/qcolor_wrap.h"
|
|
||||||
#include "QtGui/QBrush/qbrush_wrap.h"
|
#include "QtGui/QBrush/qbrush_wrap.h"
|
||||||
|
#include "QtGui/QColor/qcolor_wrap.h"
|
||||||
#include "QtGui/QPixmap/qpixmap_wrap.h"
|
#include "QtGui/QPixmap/qpixmap_wrap.h"
|
||||||
|
|
||||||
Napi::FunctionReference QPenWrap::constructor;
|
Napi::FunctionReference QPenWrap::constructor;
|
||||||
@ -11,15 +11,15 @@ Napi::FunctionReference QPenWrap::constructor;
|
|||||||
Napi::Object QPenWrap::init(Napi::Env env, Napi::Object exports) {
|
Napi::Object QPenWrap::init(Napi::Env env, Napi::Object exports) {
|
||||||
Napi::HandleScope scope(env);
|
Napi::HandleScope scope(env);
|
||||||
char CLASSNAME[] = "QPen";
|
char CLASSNAME[] = "QPen";
|
||||||
Napi::Function func = DefineClass(
|
Napi::Function func =
|
||||||
env, CLASSNAME,
|
DefineClass(env, CLASSNAME,
|
||||||
{InstanceMethod("setColor", &QPenWrap::setColor),
|
{InstanceMethod("setColor", &QPenWrap::setColor),
|
||||||
InstanceMethod("color", &QPenWrap::color),
|
InstanceMethod("color", &QPenWrap::color),
|
||||||
InstanceMethod("setStyle", &QPenWrap::setStyle),
|
InstanceMethod("setStyle", &QPenWrap::setStyle),
|
||||||
InstanceMethod("style", &QPenWrap::style),
|
InstanceMethod("style", &QPenWrap::style),
|
||||||
InstanceMethod("setCapStyle", &QPenWrap::setCapStyle),
|
InstanceMethod("setCapStyle", &QPenWrap::setCapStyle),
|
||||||
InstanceMethod("setWidth", &QPenWrap::setWidth),
|
InstanceMethod("setWidth", &QPenWrap::setWidth),
|
||||||
COMPONENT_WRAPPED_METHODS_EXPORT_DEFINE(QPenWrap)});
|
COMPONENT_WRAPPED_METHODS_EXPORT_DEFINE(QPenWrap)});
|
||||||
constructor = Napi::Persistent(func);
|
constructor = Napi::Persistent(func);
|
||||||
exports.Set(CLASSNAME, func);
|
exports.Set(CLASSNAME, func);
|
||||||
return exports;
|
return exports;
|
||||||
@ -73,8 +73,7 @@ Napi::Value QPenWrap::setStyle(const Napi::CallbackInfo& info) {
|
|||||||
Napi::Env env = info.Env();
|
Napi::Env env = info.Env();
|
||||||
Napi::HandleScope scope(env);
|
Napi::HandleScope scope(env);
|
||||||
|
|
||||||
Qt::PenStyle style =
|
Qt::PenStyle style = (Qt::PenStyle)info[0].As<Napi::Number>().Int32Value();
|
||||||
(Qt::PenStyle)info[0].As<Napi::Number>().Int32Value();
|
|
||||||
this->instance->setStyle(style);
|
this->instance->setStyle(style);
|
||||||
return env.Null();
|
return env.Null();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,7 +71,8 @@ Napi::Value QPainterWrap::drawPath(const Napi::CallbackInfo& info) {
|
|||||||
Napi::Env env = info.Env();
|
Napi::Env env = info.Env();
|
||||||
Napi::HandleScope scope(env);
|
Napi::HandleScope scope(env);
|
||||||
Napi::Object pathObject = info[0].As<Napi::Object>();
|
Napi::Object pathObject = info[0].As<Napi::Object>();
|
||||||
QPainterPathWrap* pathWrap = Napi::ObjectWrap<QPainterPathWrap>::Unwrap(pathObject);
|
QPainterPathWrap* pathWrap =
|
||||||
|
Napi::ObjectWrap<QPainterPathWrap>::Unwrap(pathObject);
|
||||||
QPainterPath* path = pathWrap->getInternalInstance();
|
QPainterPath* path = pathWrap->getInternalInstance();
|
||||||
this->instance->drawPath(*path);
|
this->instance->drawPath(*path);
|
||||||
return env.Null();
|
return env.Null();
|
||||||
@ -80,7 +81,8 @@ Napi::Value QPainterWrap::strokePath(const Napi::CallbackInfo& info) {
|
|||||||
Napi::Env env = info.Env();
|
Napi::Env env = info.Env();
|
||||||
Napi::HandleScope scope(env);
|
Napi::HandleScope scope(env);
|
||||||
Napi::Object pathObject = info[0].As<Napi::Object>();
|
Napi::Object pathObject = info[0].As<Napi::Object>();
|
||||||
QPainterPathWrap* pathWrap = Napi::ObjectWrap<QPainterPathWrap>::Unwrap(pathObject);
|
QPainterPathWrap* pathWrap =
|
||||||
|
Napi::ObjectWrap<QPainterPathWrap>::Unwrap(pathObject);
|
||||||
QPainterPath* path = pathWrap->getInternalInstance();
|
QPainterPath* path = pathWrap->getInternalInstance();
|
||||||
Napi::Object penObject = info[1].As<Napi::Object>();
|
Napi::Object penObject = info[1].As<Napi::Object>();
|
||||||
QPenWrap* penWrap = Napi::ObjectWrap<QPenWrap>::Unwrap(penObject);
|
QPenWrap* penWrap = Napi::ObjectWrap<QPenWrap>::Unwrap(penObject);
|
||||||
|
|||||||
@ -22,7 +22,9 @@ Napi::Object QPainterPathWrap::init(Napi::Env env, Napi::Object exports) {
|
|||||||
return exports;
|
return exports;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPainterPath* QPainterPathWrap::getInternalInstance() { return this->instance.get(); }
|
QPainterPath* QPainterPathWrap::getInternalInstance() {
|
||||||
|
return this->instance.get();
|
||||||
|
}
|
||||||
QPainterPathWrap::~QPainterPathWrap() { this->instance.reset(); }
|
QPainterPathWrap::~QPainterPathWrap() { this->instance.reset(); }
|
||||||
|
|
||||||
QPainterPathWrap::QPainterPathWrap(const Napi::CallbackInfo& info)
|
QPainterPathWrap::QPainterPathWrap(const Napi::CallbackInfo& info)
|
||||||
|
|||||||
@ -15,8 +15,10 @@ Napi::Object QTreeWidgetWrap::init(Napi::Env env, Napi::Object exports) {
|
|||||||
env, CLASSNAME,
|
env, CLASSNAME,
|
||||||
{InstanceMethod("addTopLevelItem", &QTreeWidgetWrap::addTopLevelItem),
|
{InstanceMethod("addTopLevelItem", &QTreeWidgetWrap::addTopLevelItem),
|
||||||
InstanceMethod("addTopLevelItems", &QTreeWidgetWrap::addTopLevelItems),
|
InstanceMethod("addTopLevelItems", &QTreeWidgetWrap::addTopLevelItems),
|
||||||
InstanceMethod("insertTopLevelItem",&QTreeWidgetWrap::insertTopLevelItem),
|
InstanceMethod("insertTopLevelItem",
|
||||||
InstanceMethod("insertTopLevelItems", &QTreeWidgetWrap::insertTopLevelItems),
|
&QTreeWidgetWrap::insertTopLevelItem),
|
||||||
|
InstanceMethod("insertTopLevelItems",
|
||||||
|
&QTreeWidgetWrap::insertTopLevelItems),
|
||||||
InstanceMethod("selectedItems", &QTreeWidgetWrap::selectedItems),
|
InstanceMethod("selectedItems", &QTreeWidgetWrap::selectedItems),
|
||||||
InstanceMethod("setColumnCount", &QTreeWidgetWrap::setColumnCount),
|
InstanceMethod("setColumnCount", &QTreeWidgetWrap::setColumnCount),
|
||||||
InstanceMethod("setColumnWidth", &QTreeWidgetWrap::setColumnWidth),
|
InstanceMethod("setColumnWidth", &QTreeWidgetWrap::setColumnWidth),
|
||||||
|
|||||||
@ -14,7 +14,6 @@
|
|||||||
#include "QtCore/QVariant/qvariant_wrap.h"
|
#include "QtCore/QVariant/qvariant_wrap.h"
|
||||||
#include "QtGui/QApplication/qapplication_wrap.h"
|
#include "QtGui/QApplication/qapplication_wrap.h"
|
||||||
#include "QtGui/QBrush/qbrush_wrap.h"
|
#include "QtGui/QBrush/qbrush_wrap.h"
|
||||||
#include "QtGui/QPen/qpen_wrap.h"
|
|
||||||
#include "QtGui/QClipboard/qclipboard_wrap.h"
|
#include "QtGui/QClipboard/qclipboard_wrap.h"
|
||||||
#include "QtGui/QColor/qcolor_wrap.h"
|
#include "QtGui/QColor/qcolor_wrap.h"
|
||||||
#include "QtGui/QCursor/qcursor_wrap.h"
|
#include "QtGui/QCursor/qcursor_wrap.h"
|
||||||
@ -25,6 +24,7 @@
|
|||||||
#include "QtGui/QIcon/qicon_wrap.h"
|
#include "QtGui/QIcon/qicon_wrap.h"
|
||||||
#include "QtGui/QKeySequence/qkeysequence_wrap.h"
|
#include "QtGui/QKeySequence/qkeysequence_wrap.h"
|
||||||
#include "QtGui/QMovie/qmovie_wrap.h"
|
#include "QtGui/QMovie/qmovie_wrap.h"
|
||||||
|
#include "QtGui/QPen/qpen_wrap.h"
|
||||||
#include "QtGui/QPicture/qpicture_wrap.h"
|
#include "QtGui/QPicture/qpicture_wrap.h"
|
||||||
#include "QtGui/QPixmap/qpixmap_wrap.h"
|
#include "QtGui/QPixmap/qpixmap_wrap.h"
|
||||||
#include "QtGui/QStyle/qstyle_wrap.h"
|
#include "QtGui/QStyle/qstyle_wrap.h"
|
||||||
|
|||||||
@ -69,7 +69,7 @@ export {
|
|||||||
LayoutMode,
|
LayoutMode,
|
||||||
Movement,
|
Movement,
|
||||||
ResizeMode,
|
ResizeMode,
|
||||||
ViewMode,
|
ListViewMode,
|
||||||
} from './lib/QtWidgets/QListView';
|
} from './lib/QtWidgets/QListView';
|
||||||
export { QListWidget, QListWidgetSignals } from './lib/QtWidgets/QListWidget';
|
export { QListWidget, QListWidgetSignals } from './lib/QtWidgets/QListWidget';
|
||||||
export { QListWidgetItem } from './lib/QtWidgets/QListWidgetItem';
|
export { QListWidgetItem } from './lib/QtWidgets/QListWidgetItem';
|
||||||
|
|||||||
@ -94,10 +94,10 @@ export abstract class NodeListView<Signals extends QListViewSignals> extends QAb
|
|||||||
uniformItemSizes(): boolean {
|
uniformItemSizes(): boolean {
|
||||||
return this.property('uniformItemSizes').toBool();
|
return this.property('uniformItemSizes').toBool();
|
||||||
}
|
}
|
||||||
setViewMode(mode: ViewMode): void {
|
setViewMode(mode: ListViewMode): void {
|
||||||
this.setProperty('viewMode', mode);
|
this.setProperty('viewMode', mode);
|
||||||
}
|
}
|
||||||
viewMode(): ViewMode {
|
viewMode(): ListViewMode {
|
||||||
return this.property('viewMode').toInt();
|
return this.property('viewMode').toInt();
|
||||||
}
|
}
|
||||||
setWordWrap(on: boolean): void {
|
setWordWrap(on: boolean): void {
|
||||||
@ -138,7 +138,7 @@ export enum ResizeMode {
|
|||||||
Adjust,
|
Adjust,
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ViewMode {
|
export enum ListViewMode {
|
||||||
ListMode,
|
ListMode,
|
||||||
IconMode,
|
IconMode,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -253,7 +253,7 @@ export abstract class NodeWidget<Signals extends QWidgetSignals> extends YogaWid
|
|||||||
this.native.addAction(action.native);
|
this.native.addAction(action.native);
|
||||||
this.actions.add(action);
|
this.actions.add(action);
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
removeAction(action: QAction): void {
|
removeAction(action: QAction): void {
|
||||||
this.native.removeAction(action.native);
|
this.native.removeAction(action.native);
|
||||||
this.actions.delete(action);
|
this.actions.delete(action);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user