fix cpp lints

This commit is contained in:
Atul R 2020-02-22 21:44:23 +01:00
parent 56ee8418b8
commit 683d4b6cd8
5 changed files with 28 additions and 26 deletions

View File

@ -2,11 +2,11 @@
#include <napi.h>
#include "napplication.hpp"
#include <QPointer>
#include "Extras/Export/export.h"
#include "QtCore/QObject/qobject_macro.h"
#include "napplication.hpp"
class DLL_EXPORT QApplicationWrap : public Napi::ObjectWrap<QApplicationWrap> {
QOBJECT_WRAPPED_METHODS_DECLARATION

View File

@ -1,4 +1,4 @@
#pragma once
namespace qodeIntegration {
void integrate();
void integrate();
}

View File

@ -1,8 +1,8 @@
#pragma once
// From Qode headers
namespace qode {
extern int qode_argc;
extern char **qode_argv;
typedef int (*QodeCustomRunLoopFunc)();
extern void InjectCustomRunLoop(QodeCustomRunLoopFunc customRunLoop);
extern int qode_argc;
extern char **qode_argv;
typedef int (*QodeCustomRunLoopFunc)();
extern void InjectCustomRunLoop(QodeCustomRunLoopFunc customRunLoop);
} // namespace qode

View File

@ -1,4 +1,5 @@
#include "QtGui/QApplication/qapplication_wrap.h"
#include "Extras/Utils/nutils.h"
#include "QtGui/QClipboard/qclipboard_wrap.h"
#include "QtGui/QStyle/qstyle_wrap.h"

View File

@ -1,29 +1,30 @@
#include "core/Integration/integration.h"
#include <QFont>
#include "core/Integration/integration.h"
#include "core/Integration/qode-api.h"
#include "QtGui/QApplication/napplication.hpp"
#include "core/Integration/qode-api.h"
namespace qodeIntegration {
static NApplication* app;
static NApplication* app;
int QtRunLoopWrapper() {
int exitCode = app->exec();
// if(exitCode != 0){
exit(exitCode);
// }
return 0;
}
int QtRunLoopWrapper() {
int exitCode = app->exec();
// if(exitCode != 0){
exit(exitCode);
// }
return 0;
}
void integrate() {
// Bootstrap Qt
app = new NApplication(qode::qode_argc, qode::qode_argv);
qode::InjectCustomRunLoop(&QtRunLoopWrapper);
// Other init settings
QFont f = QApplication::font();
if (f.defaultFamily().isEmpty()) {
f.setFamily("Sans-Serif");
QApplication::setFont(f);
}
void integrate() {
// Bootstrap Qt
app = new NApplication(qode::qode_argc, qode::qode_argv);
qode::InjectCustomRunLoop(&QtRunLoopWrapper);
// Other init settings
QFont f = QApplication::font();
if (f.defaultFamily().isEmpty()) {
f.setFamily("Sans-Serif");
QApplication::setFont(f);
}
}
} // namespace qodeIntegration