-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
117 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
QT += qml quick quick_private | ||
|
||
HEADERS += $$PWD/src/plugin.h \ | ||
$$PWD/src/nodejs/filesystem.h \ | ||
$$PWD/src/nodejs/path.h \ | ||
$$PWD/src/nodejs/process.h | ||
$$PWD/src/nodejs/process.h \ | ||
$$PWD/src/nodejs/basemodule.h | ||
|
||
SOURCES += $$PWD/src/plugin.cpp \ | ||
$$PWD/src/nodejs/filesystem.cpp \ | ||
$$PWD/src/nodejs/path.cpp \ | ||
$$PWD/src/nodejs/process.cpp | ||
$$PWD/src/nodejs/process.cpp \ | ||
$$PWD/src/nodejs/basemodule.cpp | ||
|
||
RESOURCES += $$PWD/resources.qrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Quickly - ES6 and Node.js-like environment for QML | ||
* | ||
* Copyright (C) 2016 Michael Spencer <sonrisesoftware@gmail.com> | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
#include "basemodule.h" | ||
|
||
#include <QFile> | ||
#include <QTextStream> | ||
#include <private/qv8engine_p.h> | ||
|
||
void BaseModule::throwException(const QString &message) const | ||
{ | ||
QV8Engine::getV4(m_engine)->throwError(message); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Quickly - ES6 and Node.js-like environment for QML | ||
* | ||
* Copyright (C) 2016 Michael Spencer <sonrisesoftware@gmail.com> | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
#ifndef BASE_MODULE_H | ||
#define BASE_MODULE_H | ||
|
||
#include <QObject> | ||
|
||
#include <QString> | ||
#include <QQmlEngine> | ||
|
||
class BaseModule : public QObject | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
BaseModule(QQmlEngine *engine = nullptr) : QObject(engine), m_engine(engine) {} | ||
|
||
protected: | ||
void throwException(const QString &message) const; | ||
|
||
private: | ||
QQmlEngine *m_engine; | ||
}; | ||
|
||
#endif // BASE_MODULE_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Sample File |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters