Skip to content

Commit

Permalink
Upgrade deps (#562)
Browse files Browse the repository at this point in the history
* upgrade qode

* 0.20.0

* dep updates

* formatting and fix exports

* fix type rename
  • Loading branch information
a7ul committed May 13, 2020
1 parent f8a3f41 commit 1bd0a5c
Show file tree
Hide file tree
Showing 11 changed files with 4,300 additions and 2,985 deletions.
7,208 changes: 4,259 additions & 2,949 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "@nodegui/nodegui",
"version": "0.19.0",
"version": "0.20.0",
"description": "A cross platform library to build native desktop apps.",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down Expand Up @@ -28,7 +28,7 @@
},
"dependencies": {
"@nodegui/artifact-installer": "^1.1.0",
"@nodegui/qode": "^2.0.4",
"@nodegui/qode": "^2.1.0",
"cmake-js": "^6.1.0",
"cross-env": "^7.0.0",
"cuid": "^2.1.6",
Expand All @@ -41,21 +41,21 @@
"devDependencies": {
"@types/bindings": "^1.3.0",
"@types/jest": "^25.2.1",
"@types/node": "^13.11.1",
"@typescript-eslint/eslint-plugin": "^2.28.0",
"@typescript-eslint/parser": "^2.28.0",
"@types/node": "^13.13.6",
"@typescript-eslint/eslint-plugin": "^2.33.0",
"@typescript-eslint/parser": "^2.33.0",
"clang-format": "^1.3.0",
"eslint": "^6.6.0",
"eslint-config-prettier": "^6.5.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.3",
"husky": "^4.2.5",
"jest": "^25.3.0",
"jest": "^25.5.4",
"prebuild": "^10.0.0",
"prettier": "^2.0.4",
"ts-jest": "^25.3.1",
"typedoc": "^0.17.4",
"prettier": "^2.0.5",
"ts-jest": "^25.5.1",
"typedoc": "^0.17.6",
"typedoc-plugin-markdown": "^2.2.14",
"typescript": "^3.8.3"
"typescript": "^3.9.2"
},
"binary": {
"napi_versions": [
Expand Down
4 changes: 2 additions & 2 deletions src/cpp/include/nodegui/QtWidgets/QWidget/qwidget_macro.h
Expand Up @@ -378,13 +378,13 @@
this->instance->addAction(actionWrap->getInternalInstance()); \
return env.Null(); \
} \
Napi::Value removeAction(const Napi::CallbackInfo& info) { \
Napi::Value removeAction(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
Napi::Object actionObject = info[0].As<Napi::Object>(); \
QActionWrap* actionWrap = \
Napi::ObjectWrap<QActionWrap>::Unwrap(actionObject); \
this->instance->removeAction(actionWrap->getInternalInstance()); \
this->instance->removeAction(actionWrap->getInternalInstance()); \
return env.Null(); \
} \
Napi::Value repolish(const Napi::CallbackInfo& info) { \
Expand Down
23 changes: 11 additions & 12 deletions src/cpp/lib/QtGui/QPen/qpen_wrap.cpp
Expand Up @@ -2,24 +2,24 @@

#include "Extras/Utils/nutils.h"
#include "QtCore/QVariant/qvariant_wrap.h"
#include "QtGui/QColor/qcolor_wrap.h"
#include "QtGui/QBrush/qbrush_wrap.h"
#include "QtGui/QColor/qcolor_wrap.h"
#include "QtGui/QPixmap/qpixmap_wrap.h"

Napi::FunctionReference QPenWrap::constructor;

Napi::Object QPenWrap::init(Napi::Env env, Napi::Object exports) {
Napi::HandleScope scope(env);
char CLASSNAME[] = "QPen";
Napi::Function func = DefineClass(
env, CLASSNAME,
{InstanceMethod("setColor", &QPenWrap::setColor),
InstanceMethod("color", &QPenWrap::color),
InstanceMethod("setStyle", &QPenWrap::setStyle),
InstanceMethod("style", &QPenWrap::style),
InstanceMethod("setCapStyle", &QPenWrap::setCapStyle),
InstanceMethod("setWidth", &QPenWrap::setWidth),
COMPONENT_WRAPPED_METHODS_EXPORT_DEFINE(QPenWrap)});
Napi::Function func =
DefineClass(env, CLASSNAME,
{InstanceMethod("setColor", &QPenWrap::setColor),
InstanceMethod("color", &QPenWrap::color),
InstanceMethod("setStyle", &QPenWrap::setStyle),
InstanceMethod("style", &QPenWrap::style),
InstanceMethod("setCapStyle", &QPenWrap::setCapStyle),
InstanceMethod("setWidth", &QPenWrap::setWidth),
COMPONENT_WRAPPED_METHODS_EXPORT_DEFINE(QPenWrap)});
constructor = Napi::Persistent(func);
exports.Set(CLASSNAME, func);
return exports;
Expand Down Expand Up @@ -73,8 +73,7 @@ Napi::Value QPenWrap::setStyle(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
Napi::HandleScope scope(env);

Qt::PenStyle style =
(Qt::PenStyle)info[0].As<Napi::Number>().Int32Value();
Qt::PenStyle style = (Qt::PenStyle)info[0].As<Napi::Number>().Int32Value();
this->instance->setStyle(style);
return env.Null();
}
Expand Down
6 changes: 4 additions & 2 deletions src/cpp/lib/QtWidgets/QPainter/qpainter_wrap.cpp
Expand Up @@ -71,7 +71,8 @@ Napi::Value QPainterWrap::drawPath(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
Napi::HandleScope scope(env);
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();
this->instance->drawPath(*path);
return env.Null();
Expand All @@ -80,7 +81,8 @@ Napi::Value QPainterWrap::strokePath(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
Napi::HandleScope scope(env);
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();
Napi::Object penObject = info[1].As<Napi::Object>();
QPenWrap* penWrap = Napi::ObjectWrap<QPenWrap>::Unwrap(penObject);
Expand Down
4 changes: 3 additions & 1 deletion src/cpp/lib/QtWidgets/QPainterPath/qpainterpath_wrap.cpp
Expand Up @@ -22,7 +22,9 @@ Napi::Object QPainterPathWrap::init(Napi::Env env, Napi::Object exports) {
return exports;
}

QPainterPath* QPainterPathWrap::getInternalInstance() { return this->instance.get(); }
QPainterPath* QPainterPathWrap::getInternalInstance() {
return this->instance.get();
}
QPainterPathWrap::~QPainterPathWrap() { this->instance.reset(); }

QPainterPathWrap::QPainterPathWrap(const Napi::CallbackInfo& info)
Expand Down
6 changes: 4 additions & 2 deletions src/cpp/lib/QtWidgets/QTreeWidget/qtreewidget_wrap.cpp
Expand Up @@ -15,8 +15,10 @@ Napi::Object QTreeWidgetWrap::init(Napi::Env env, Napi::Object exports) {
env, CLASSNAME,
{InstanceMethod("addTopLevelItem", &QTreeWidgetWrap::addTopLevelItem),
InstanceMethod("addTopLevelItems", &QTreeWidgetWrap::addTopLevelItems),
InstanceMethod("insertTopLevelItem",&QTreeWidgetWrap::insertTopLevelItem),
InstanceMethod("insertTopLevelItems", &QTreeWidgetWrap::insertTopLevelItems),
InstanceMethod("insertTopLevelItem",
&QTreeWidgetWrap::insertTopLevelItem),
InstanceMethod("insertTopLevelItems",
&QTreeWidgetWrap::insertTopLevelItems),
InstanceMethod("selectedItems", &QTreeWidgetWrap::selectedItems),
InstanceMethod("setColumnCount", &QTreeWidgetWrap::setColumnCount),
InstanceMethod("setColumnWidth", &QTreeWidgetWrap::setColumnWidth),
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/main.cpp
Expand Up @@ -14,7 +14,6 @@
#include "QtCore/QVariant/qvariant_wrap.h"
#include "QtGui/QApplication/qapplication_wrap.h"
#include "QtGui/QBrush/qbrush_wrap.h"
#include "QtGui/QPen/qpen_wrap.h"
#include "QtGui/QClipboard/qclipboard_wrap.h"
#include "QtGui/QColor/qcolor_wrap.h"
#include "QtGui/QCursor/qcursor_wrap.h"
Expand All @@ -25,6 +24,7 @@
#include "QtGui/QIcon/qicon_wrap.h"
#include "QtGui/QKeySequence/qkeysequence_wrap.h"
#include "QtGui/QMovie/qmovie_wrap.h"
#include "QtGui/QPen/qpen_wrap.h"
#include "QtGui/QPicture/qpicture_wrap.h"
#include "QtGui/QPixmap/qpixmap_wrap.h"
#include "QtGui/QStyle/qstyle_wrap.h"
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Expand Up @@ -69,7 +69,7 @@ export {
LayoutMode,
Movement,
ResizeMode,
ViewMode,
ListViewMode,
} from './lib/QtWidgets/QListView';
export { QListWidget, QListWidgetSignals } from './lib/QtWidgets/QListWidget';
export { QListWidgetItem } from './lib/QtWidgets/QListWidgetItem';
Expand Down
6 changes: 3 additions & 3 deletions src/lib/QtWidgets/QListView.ts
Expand Up @@ -94,10 +94,10 @@ export abstract class NodeListView<Signals extends QListViewSignals> extends QAb
uniformItemSizes(): boolean {
return this.property('uniformItemSizes').toBool();
}
setViewMode(mode: ViewMode): void {
setViewMode(mode: ListViewMode): void {
this.setProperty('viewMode', mode);
}
viewMode(): ViewMode {
viewMode(): ListViewMode {
return this.property('viewMode').toInt();
}
setWordWrap(on: boolean): void {
Expand Down Expand Up @@ -138,7 +138,7 @@ export enum ResizeMode {
Adjust,
}

export enum ViewMode {
export enum ListViewMode {
ListMode,
IconMode,
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/QtWidgets/QWidget.ts
Expand Up @@ -253,7 +253,7 @@ export abstract class NodeWidget<Signals extends QWidgetSignals> extends YogaWid
this.native.addAction(action.native);
this.actions.add(action);
return action;
}
}
removeAction(action: QAction): void {
this.native.removeAction(action.native);
this.actions.delete(action);
Expand Down

0 comments on commit 1bd0a5c

Please sign in to comment.