Removed web settings related code from WebNode.

This commit is contained in:
Relintai 2022-07-06 23:54:07 +02:00
parent 83160ae6cf
commit eb251fef19
2 changed files with 0 additions and 42 deletions

View File

@ -9,10 +9,6 @@
#include "modules/database/database_connection.h"
#include "web_server_request.h"
#if WEB_SETTINGS_ENABLED
#include "core/settings/settings.h"
#endif
#include "web_permission.h"
#include "web_server.h"
@ -65,21 +61,6 @@ String WebNode::get_full_uri_parent(const bool slash_at_the_end) {
return uri;
}
#if WEB_SETTINGS_ENABLED
Settings *WebNode::get_settings() {
if (_settings) {
return _settings;
}
return Settings::get_singleton();
}
void WebNode::set_settings(Settings *settings) {
_settings = settings;
// todo send event to children when it's implemented?
}
#endif
Ref<WebPermission> WebNode::get_web_permission() {
return _web_permission;
}
@ -416,11 +397,6 @@ WebNode::WebNode() {
//_database = nullptr;
//#endif
#if WEB_SETTINGS_ENABLED
// same for this
_settings = nullptr;
#endif
_routing_enabled = true;
_index_node = nullptr;
}
@ -436,11 +412,6 @@ void WebNode::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_full_uri", "slash_at_the_end "), &WebNode::get_full_uri, true);
ClassDB::bind_method(D_METHOD("get_full_uri_parent", "slash_at_the_end "), &WebNode::get_full_uri_parent, true);
//#if WEB_SETTINGS_ENABLED
// Settings *get_settings();
// void set_settings(Settings * settings);
//#endif
ClassDB::bind_method(D_METHOD("get_web_permission"), &WebNode::get_web_permission);
ClassDB::bind_method(D_METHOD("set_web_permission", "val"), &WebNode::set_web_permission);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "web_permission", PROPERTY_HINT_RESOURCE_TYPE, "WebPermission"), "set_web_permission", "get_web_permission");

View File

@ -9,9 +9,6 @@
#include "scene/main/node.h"
class WebServerRequest;
#if WEB_SETTINGS_ENABLED
class Settings;
#endif
class WebServer;
class WebPermission;
@ -38,12 +35,6 @@ public:
String get_full_uri(const bool slash_at_the_end = true);
String get_full_uri_parent(const bool slash_at_the_end = true);
//Maybe this settings class could be a resource, also it needs a new name
#if WEB_SETTINGS_ENABLED
Settings *get_settings();
void set_settings(Settings *settings);
#endif
Ref<WebPermission> get_web_permission();
void set_web_permission(const Ref<WebPermission> &wp);
@ -113,10 +104,6 @@ protected:
String _uri_segment;
#if WEB_SETTINGS_ENABLED
Settings *_settings;
#endif
#ifdef MODULE_DATABASE_ENABLED
Ref<Database> _database;
#endif