Skip to content

Commit

Permalink
update version to 3.2beta
Browse files Browse the repository at this point in the history
  • Loading branch information
royqh1979 committed Nov 2, 2024
1 parent 03f868d commit e7edb51
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 28 deletions.
20 changes: 10 additions & 10 deletions RedPandaIDE/RedPandaIDE.pro
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ CONFIG += embed_translations
CONFIG += ENABLE_SDCC

# uncomment the following line to enable Lua-based add-on support
# CONFIG += ENABLE_LUA_ADDON
CONFIG += ENABLE_LUA_ADDON

APP_NAME = RedPandaCPP

Expand Down Expand Up @@ -242,9 +242,9 @@ SOURCES += \

HEADERS += \
SimpleIni.h \
addon/api.h \
addon/executor.h \
addon/runtime.h \
addon/luaapi.h \
addon/luaexecutor.h \
addon/luaruntime.h \
autolinkmanager.h \
caretlist.h \
codesnippetsmanager.h \
Expand Down Expand Up @@ -451,14 +451,14 @@ ENABLE_LUA_ADDON {
DEFINES += ENABLE_LUA_ADDON

SOURCES += \
addon/api.cpp \
addon/executor.cpp \
addon/runtime.cpp
addon/luaapi.cpp \
addon/luaexecutor.cpp \
addon/luaruntime.cpp

HEADERS += \
addon/api.h \
addon/executor.h \
addon/runtime.h
addon/luaapi.h \
addon/luaexecutor.h \
addon/luaruntime.h
}

ENABLE_VCS {
Expand Down
4 changes: 2 additions & 2 deletions RedPandaIDE/addon/luaapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "api.h"
#include "luaapi.h"

#include <QtCore>
#include <QApplication>
Expand All @@ -34,7 +34,7 @@
#include "utils.h"
#include "settings.h"
#include "thememanager.h"
#include "runtime.h"
#include "luaruntime.h"

#ifdef Q_OS_WINDOWS
// added in Windows 11 21H2, declare our version to support old SDKs.
Expand Down
6 changes: 3 additions & 3 deletions RedPandaIDE/addon/luaapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef ADDON_API_H
#define ADDON_API_H
#ifndef ADDON_LUA_API_H
#define ADDON_LUA_API_H

struct lua_State;

Expand Down Expand Up @@ -45,4 +45,4 @@ extern "C" int luaApi_System_readRegistry(lua_State *L) noexcept;

extern "C" int luaApi_Util_format(lua_State *L) noexcept;

#endif // ADDON_API_H
#endif // ADDON_LUA_API_H
9 changes: 6 additions & 3 deletions RedPandaIDE/addon/luaexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "executor.h"
#include "luaexecutor.h"

#include <lua/lua.hpp>

#include "api.h"
#include "runtime.h"
#include "luaapi.h"
#include "luaruntime.h"

namespace AddOn {

namespace Lua {

static QMap<QString, QMap<QString, lua_CFunction>> apiGroups{
{"C_Debug",
{
Expand Down Expand Up @@ -177,4 +179,5 @@ QJsonObject CompilerHintExecutor::operator()(const QByteArray &script) {
throw LuaError("Compiler hint script must return an object.");
}

} //namespace Lua
} // namespace AddOn
10 changes: 6 additions & 4 deletions RedPandaIDE/addon/luaexecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef ADDON_EXECUTOR_H
#define ADDON_EXECUTOR_H
#ifndef ADDON_LUA_EXECUTOR_H
#define ADDON_LUA_EXECUTOR_H

#include <QJsonValue>
#include <QJsonObject>
#include <QStringList>
#include <chrono>

namespace AddOn {
namespace Lua {

// simple, stateless Lua executor
class SimpleExecutor {
Expand Down Expand Up @@ -53,6 +54,7 @@ class CompilerHintExecutor : private SimpleExecutor {
QJsonObject operator()(const QByteArray &script);
};

}
} // Namespace Lua
} // Namespace Addon

#endif // ADDON_EXECUTOR_H
#endif // ADDON_LUA_EXECUTOR_H
2 changes: 1 addition & 1 deletion RedPandaIDE/addon/luaruntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "runtime.h"
#include "luaruntime.h"

#include <lua/lua.hpp>

Expand Down
6 changes: 3 additions & 3 deletions RedPandaIDE/addon/luaruntime.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef ADDON_RUNTIME_H
#define ADDON_RUNTIME_H
#ifndef ADDON_LUA_RUNTIME_H
#define ADDON_LUA_RUNTIME_H

#include <chrono>

Expand Down Expand Up @@ -128,4 +128,4 @@ class RaiiLuaState {

}

#endif // ADDON_RUNTIME_H
#endif // ADDON_LUA_RUNTIME_H
2 changes: 1 addition & 1 deletion RedPandaIDE/thememanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ AppTheme::AppTheme(const QString &filename, ThemeType type, ThemeCategory catego
}
#ifdef ENABLE_LUA_ADDON
case ThemeType::Lua: {
obj = AddOn::ThemeExecutor{}(content, filename);
obj = AddOn::Lua::ThemeExecutor{}(content, filename);
break;
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion version.inc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
APP_VERSION="3.2"
APP_VERSION_SUFFIX="alpha"
APP_VERSION_SUFFIX="beta"

0 comments on commit e7edb51

Please sign in to comment.