revisions

This commit is contained in:
pls.153 2024-05-23 10:28:06 +02:00
parent f02422ddfe
commit ce8b07845c
31 changed files with 2 additions and 92 deletions

View file

@ -4,8 +4,6 @@
#include <QMessageBox> #include <QMessageBox>
#include <QtDebug> #include <QtDebug>
QT_BEGIN_NAMESPACE
QObject* ini() { QObject* ini() {
// any QObject inherited class will do // any QObject inherited class will do
static QObject* cpp = nullptr; static QObject* cpp = nullptr;
@ -37,4 +35,3 @@ QVariant CPP::callLisp(const QVariant& arg) {
return ecl_fun("cl:format", false, "~R", arg); return ecl_fun("cl:format", false, "~R", arg);
} }
QT_END_NAMESPACE

View file

@ -8,8 +8,6 @@
#define LIB_EXPORT #define LIB_EXPORT
#endif #endif
QT_BEGIN_NAMESPACE
extern "C" { LIB_EXPORT QObject* ini(); } extern "C" { LIB_EXPORT QObject* ini(); }
class CPP : public QObject { class CPP : public QObject {
@ -23,4 +21,3 @@ public:
Q_INVOKABLE QVariant callLisp(const QVariant&); Q_INVOKABLE QVariant callLisp(const QVariant&);
}; };
QT_END_NAMESPACE

View file

@ -8,8 +8,6 @@
#include <ecl_fun.h> #include <ecl_fun.h>
#endif #endif
QT_BEGIN_NAMESPACE
QObject* ini() { QObject* ini() {
static QObject* qt = nullptr; static QObject* qt = nullptr;
if (qt == nullptr) { if (qt == nullptr) {
@ -30,4 +28,3 @@ QVariant QT::rotateImage(const QVariant& imagePath, const QVariant& angle) {
return imagePath; return imagePath;
} }
QT_END_NAMESPACE

View file

@ -8,8 +8,6 @@
#define LIB_EXPORT #define LIB_EXPORT
#endif #endif
QT_BEGIN_NAMESPACE
extern "C" { LIB_EXPORT QObject* ini(); } extern "C" { LIB_EXPORT QObject* ini(); }
class QT : public QObject { class QT : public QObject {
@ -19,4 +17,3 @@ public:
Q_INVOKABLE QVariant rotateImage(const QVariant&, const QVariant&); Q_INVOKABLE QVariant rotateImage(const QVariant&, const QVariant&);
}; };
QT_END_NAMESPACE

View file

@ -23,8 +23,6 @@ Q_DECLARE_METATYPE (TextCursor*)
Q_DECLARE_METATYPE (SyntaxHighlighter*) Q_DECLARE_METATYPE (SyntaxHighlighter*)
Q_DECLARE_METATYPE (QTextDocument*) Q_DECLARE_METATYPE (QTextDocument*)
QT_BEGIN_NAMESPACE
QObject* ini() { QObject* ini() {
static QObject* qt = nullptr; static QObject* qt = nullptr;
if (qt == nullptr) { if (qt == nullptr) {
@ -364,4 +362,3 @@ QVariant QT::sendToUlisp(const QVariant &vData) {
} }
#endif #endif
QT_END_NAMESPACE

View file

@ -24,8 +24,6 @@
#define DELETE_LATER(var) \ #define DELETE_LATER(var) \
QTimer::singleShot(0, var, &QObject::deleteLater) QTimer::singleShot(0, var, &QObject::deleteLater)
QT_BEGIN_NAMESPACE
extern "C" { LIB_EXPORT QObject* ini(); } extern "C" { LIB_EXPORT QObject* ini(); }
#if (defined Q_OS_UNIX) && !(defined NO_USB) #if (defined Q_OS_UNIX) && !(defined NO_USB)
@ -119,4 +117,3 @@ public:
#endif #endif
}; };
QT_END_NAMESPACE

View file

@ -8,8 +8,6 @@
#include <QtCore/private/qandroidextras_p.h> #include <QtCore/private/qandroidextras_p.h>
#endif #endif
QT_BEGIN_NAMESPACE
static void clearEventualExceptions() { static void clearEventualExceptions() {
#if (QT_VERSION < 0x060000) #if (QT_VERSION < 0x060000)
QAndroidJniEnvironment env; QAndroidJniEnvironment env;
@ -138,4 +136,3 @@ void QT::iniJni() {
clearEventualExceptions(); clearEventualExceptions();
} }
QT_END_NAMESPACE

View file

@ -20,11 +20,11 @@ public Q_SLOTS:
public: public:
static USB_ME* _this; static USB_ME* _this;
bool ready = false;
QtAndroidService* emitter = nullptr; QtAndroidService* emitter = nullptr;
Connection* con = nullptr; Connection* con = nullptr;
QTimer timer; QTimer timer;
QByteArrayList packets; QByteArrayList packets;
bool ready = false;
void received(const QByteArray&); void received(const QByteArray&);

View file

@ -2,11 +2,8 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
QT_BEGIN_NAMESPACE
QVariant QT::keepScreenOn(const QVariant& on) { QVariant QT::keepScreenOn(const QVariant& on) {
[UIApplication sharedApplication].idleTimerDisabled = on.toBool() ? YES : NO; [UIApplication sharedApplication].idleTimerDisabled = on.toBool() ? YES : NO;
return on; return on;
} }
QT_END_NAMESPACE

View file

@ -25,8 +25,6 @@
#include "connection/connection.h" #include "connection/connection.h"
#endif #endif
QT_BEGIN_NAMESPACE
QObject* ini() { QObject* ini() {
static QObject* qt = nullptr; static QObject* qt = nullptr;
if (qt == nullptr) { if (qt == nullptr) {
@ -255,4 +253,3 @@ QVariant QT::localIp() {
return QVariant(); return QVariant();
} }
QT_END_NAMESPACE

View file

@ -16,8 +16,6 @@
class Connection; class Connection;
#endif #endif
QT_BEGIN_NAMESPACE
extern "C" { LIB_EXPORT QObject* ini(); } extern "C" { LIB_EXPORT QObject* ini(); }
class QT : public QObject { class QT : public QObject {
@ -67,4 +65,3 @@ public:
#endif #endif
}; };
QT_END_NAMESPACE

View file

@ -108,7 +108,7 @@ USB permission.
## WiFi ## WiFi
If you have a radio with intgrated WiFi (like LILYGO T-Beam, HELTEC v3), you If you have a radio with intgrated WiFi (like LILYGO T-Beam, Heltec v3), you
can setup your WiFi connection using the Python CLI: can setup your WiFi connection using the Python CLI:
``` ```
meshtastic \ meshtastic \

View file

@ -2,8 +2,6 @@
#include <QtAndroid> #include <QtAndroid>
#include <QAndroidJniEnvironment> #include <QAndroidJniEnvironment>
QT_BEGIN_NAMESPACE
QVariant QT::keepScreenOn(const QVariant& on) { QVariant QT::keepScreenOn(const QVariant& on) {
QtAndroid::runOnAndroidThread([&] { QtAndroid::runOnAndroidThread([&] {
QAndroidJniObject activity = QtAndroid::androidActivity(); QAndroidJniObject activity = QtAndroid::androidActivity();
@ -23,4 +21,3 @@ QVariant QT::keepScreenOn(const QVariant& on) {
return on; return on;
} }
QT_END_NAMESPACE

View file

@ -3,8 +3,6 @@
#include <QObject> #include <QObject>
#include <QVariant> #include <QVariant>
QT_BEGIN_NAMESPACE
extern "C" { QObject* ini(); } extern "C" { QObject* ini(); }
class QT : public QObject { class QT : public QObject {
@ -14,4 +12,3 @@ public:
Q_INVOKABLE QVariant keepScreenOn(const QVariant& = true); Q_INVOKABLE QVariant keepScreenOn(const QVariant& = true);
}; };
QT_END_NAMESPACE

View file

@ -2,11 +2,8 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
QT_BEGIN_NAMESPACE
QVariant QT::keepScreenOn(const QVariant& on) { QVariant QT::keepScreenOn(const QVariant& on) {
[UIApplication sharedApplication].idleTimerDisabled = on.toBool() ? YES : NO; [UIApplication sharedApplication].idleTimerDisabled = on.toBool() ? YES : NO;
return on; return on;
} }
QT_END_NAMESPACE

View file

@ -6,8 +6,6 @@
#include <QtAndroid> #include <QtAndroid>
#include <QAndroidJniEnvironment> #include <QAndroidJniEnvironment>
QT_BEGIN_NAMESPACE
static int getIntField(const char* name) { static int getIntField(const char* name) {
QAndroidJniObject activity = QtAndroid::androidActivity(); QAndroidJniObject activity = QtAndroid::androidActivity();
return static_cast<int>(activity.getField<jint>(name)); return static_cast<int>(activity.getField<jint>(name));
@ -47,4 +45,3 @@ QVariant QT::heartRateAccuracy() {
return getIntField("_heart_rate_accuracy_"); return getIntField("_heart_rate_accuracy_");
} }
QT_END_NAMESPACE

View file

@ -3,8 +3,6 @@
#include <QObject> #include <QObject>
#include <QVariant> #include <QVariant>
QT_BEGIN_NAMESPACE
extern "C" { QObject* ini(); } extern "C" { QObject* ini(); }
class QT : public QObject { class QT : public QObject {
@ -17,4 +15,3 @@ public:
Q_INVOKABLE QVariant heartRateAccuracy(); Q_INVOKABLE QVariant heartRateAccuracy();
}; };
QT_END_NAMESPACE

View file

@ -24,8 +24,6 @@
#endif #endif
#endif #endif
QT_BEGIN_NAMESPACE
void iniCLFunctions() { void iniCLFunctions() {
cl_object l_qml(STRING("QML")); cl_object l_qml(STRING("QML"));
if (cl_find_package(l_qml) == ECL_NIL) { if (cl_find_package(l_qml) == ECL_NIL) {
@ -962,4 +960,3 @@ cl_object qapropos2(cl_object l_search, cl_object l_obj, cl_object l_no_offset)
return ECL_NIL; return ECL_NIL;
} }
QT_END_NAMESPACE

View file

@ -6,8 +6,6 @@
#include <QList> #include <QList>
#include <QVariant> #include <QVariant>
QT_BEGIN_NAMESPACE
#define DEFUN(name, c_name, num_args) \ #define DEFUN(name, c_name, num_args) \
ecl_def_c_function(ecl_read_from_cstring(name), (cl_objectfn_fixed)c_name, num_args); ecl_def_c_function(ecl_read_from_cstring(name), (cl_objectfn_fixed)c_name, num_args);
@ -92,4 +90,3 @@ cl_object set_shutdown_p (cl_object);
void iniCLFunctions(); void iniCLFunctions();
void error_msg(const char*, cl_object); void error_msg(const char*, cl_object);
QT_END_NAMESPACE

View file

@ -5,8 +5,6 @@
#include <QVariant> #include <QVariant>
QT_BEGIN_NAMESPACE
extern QVariant ecl_fun( extern QVariant ecl_fun(
const QByteArray&, const QByteArray&,
const QVariant& = QVariant(), const QVariant& = QVariant(),
@ -26,4 +24,3 @@ extern QVariant ecl_fun(
const QVariant& = QVariant(), const QVariant& = QVariant(),
const QVariant& = QVariant()); const QVariant& = QVariant());
QT_END_NAMESPACE

View file

@ -16,8 +16,6 @@
#include <QRectF> #include <QRectF>
#include <ecl/ecl.h> #include <ecl/ecl.h>
QT_BEGIN_NAMESPACE
#define STRING(s) ecl_make_constant_base_string(s, -1) #define STRING(s) ecl_make_constant_base_string(s, -1)
#define STRING_COPY(s) (s ? ecl_make_simple_base_string(s, -1) : ECL_NIL) #define STRING_COPY(s) (s ? ecl_make_simple_base_string(s, -1) : ECL_NIL)
@ -535,4 +533,3 @@ void ini_lisp() {
si_safe_eval(2, ecl_read_from_cstring((char*)lisp_code), ECL_NIL); si_safe_eval(2, ecl_read_from_cstring((char*)lisp_code), ECL_NIL);
} }
QT_END_NAMESPACE

View file

@ -10,8 +10,6 @@
class QQuickView; class QQuickView;
QT_BEGIN_NAMESPACE
#define EVAL_ERROR_VALUE -1 #define EVAL_ERROR_VALUE -1
typedef void (*lisp_ini)(cl_object); typedef void (*lisp_ini)(cl_object);
@ -46,5 +44,3 @@ public Q_SLOTS:
void exitEventLoop() { eventLoop->exit(); } void exitEventLoop() { eventLoop->exit(); }
}; };
QT_END_NAMESPACE

View file

@ -7,8 +7,6 @@
#include <QtGui/QGuiApplication> #include <QtGui/QGuiApplication>
#include <QtGui/QInputMethodEvent> #include <QtGui/QInputMethodEvent>
QT_BEGIN_NAMESPACE
#define STRING(s) ecl_make_constant_base_string(s, -1) #define STRING(s) ecl_make_constant_base_string(s, -1)
#define DEFUN(name, c_name, num_args) \ #define DEFUN(name, c_name, num_args) \
@ -126,4 +124,3 @@ Q_SIGNALS:
#endif #endif
}; };
QT_END_NAMESPACE

View file

@ -6,8 +6,6 @@
#include <QtGui/QColor> #include <QtGui/QColor>
#include <QtQml/QJSValue> #include <QtQml/QJSValue>
QT_BEGIN_NAMESPACE
static void warning_msg(const char* message, cl_object l_args) { static void warning_msg(const char* message, cl_object l_args) {
STATIC_SYMBOL (s_error_output, "*ERROR-OUTPUT*") STATIC_SYMBOL (s_error_output, "*ERROR-OUTPUT*")
cl_format(4, cl_format(4,
@ -346,4 +344,3 @@ cl_object from_qobject_pointer(QObject* qobject) {
ecl_make_unsigned_integer(reinterpret_cast<quintptr>(qobject))); ecl_make_unsigned_integer(reinterpret_cast<quintptr>(qobject)));
} }
QT_END_NAMESPACE

View file

@ -6,8 +6,6 @@
#include <QRectF> #include <QRectF>
#include <QVariant> #include <QVariant>
QT_BEGIN_NAMESPACE
#define STRING(s) ecl_make_constant_base_string(s, -1) #define STRING(s) ecl_make_constant_base_string(s, -1)
#define STRING_COPY(s) (s ? ecl_make_simple_base_string(s, -1) : ECL_NIL) #define STRING_COPY(s) (s ? ecl_make_simple_base_string(s, -1) : ECL_NIL)
@ -96,4 +94,3 @@ cl_object from_qobject_pointer(QObject*);
QString toCamelCase(const QString&); QString toCamelCase(const QString&);
QT_END_NAMESPACE

View file

@ -2,8 +2,6 @@
#include "lqml.h" #include "lqml.h"
#include "ecl_fun.h" #include "ecl_fun.h"
QT_BEGIN_NAMESPACE
static QVariant qmlApply(QObject* caller, static QVariant qmlApply(QObject* caller,
const QString& function, const QString& function,
const QVariantList& arguments) { const QVariantList& arguments) {
@ -112,4 +110,3 @@ QVariant Lisp::apply(const QJSValue& caller_or_function,
return qmlApply(caller, function, arguments); return qmlApply(caller, function, arguments);
} }
QT_END_NAMESPACE

View file

@ -2,8 +2,6 @@
#include <QtQml> #include <QtQml>
QT_BEGIN_NAMESPACE
class Lisp : public QObject { class Lisp : public QObject {
Q_OBJECT Q_OBJECT
@ -34,4 +32,3 @@ public:
const QJSValue& = QJSValue()); const QJSValue& = QJSValue());
}; };
QT_END_NAMESPACE

View file

@ -3,8 +3,6 @@
#include "ecl_ext.h" #include "ecl_ext.h"
#include <QVariant> #include <QVariant>
QT_BEGIN_NAMESPACE
static QHash<QByteArray, void*> lisp_functions; static QHash<QByteArray, void*> lisp_functions;
static cl_object lisp_apply(cl_object l_fun, cl_object l_args) { static cl_object lisp_apply(cl_object l_fun, cl_object l_args) {
@ -97,5 +95,3 @@ QVariant ecl_fun(const QByteArray& pkgFun,
return QVariant(); return QVariant();
} }
QT_END_NAMESPACE

View file

@ -2,8 +2,6 @@
#include <QVariant> #include <QVariant>
QT_BEGIN_NAMESPACE
QVariant ecl_fun( QVariant ecl_fun(
const QByteArray&, const QByteArray&,
const QVariant& = QVariant(), const QVariant& = QVariant(),
@ -23,4 +21,3 @@ QVariant ecl_fun(
const QVariant& = QVariant(), const QVariant& = QVariant(),
const QVariant& = QVariant()); const QVariant& = QVariant());
QT_END_NAMESPACE

View file

@ -1,7 +1,5 @@
#include "single_shot.h" #include "single_shot.h"
QT_BEGIN_NAMESPACE
SingleShot::SingleShot(int msec, void* fun) SingleShot::SingleShot(int msec, void* fun)
: function(fun) { : function(fun) {
id = startTimer(msec); id = startTimer(msec);
@ -21,5 +19,3 @@ void SingleShot::timerEvent(QTimerEvent*) {
deleteLater(); deleteLater();
} }
QT_END_NAMESPACE

View file

@ -5,8 +5,6 @@
#include <ecl/ecl.h> #include <ecl/ecl.h>
#include <QObject> #include <QObject>
QT_BEGIN_NAMESPACE
class SingleShot : public QObject { class SingleShot : public QObject {
Q_OBJECT Q_OBJECT
@ -20,4 +18,3 @@ protected:
void timerEvent(QTimerEvent*) override; void timerEvent(QTimerEvent*) override;
}; };
QT_END_NAMESPACE