diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-04-05 16:20:05 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-04-05 16:20:05 +0530 |
| commit | 09cdcd15b31469c839831cad534fec9896999b60 (patch) | |
| tree | 4aea664837807d06b2056c83191143fb9a8f3d54 /templates | |
| parent | c4413f3cca0a0750af9881276162b70f3489b499 (diff) | |
| download | null-browser-09cdcd15b31469c839831cad534fec9896999b60.tar.gz null-browser-09cdcd15b31469c839831cad534fec9896999b60.zip | |
Refactor event queue out of router
Diffstat (limited to '')
| -rwxr-xr-x | templates/class.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/templates/class.sh b/templates/class.sh index ad60acf..e49b99d 100755 --- a/templates/class.sh +++ b/templates/class.sh @@ -7,7 +7,9 @@ path="$2" [ -z "$class_name" ] && exit 1 -if ! [ -z "$path" ]; then +if [ -z "$path" ]; then + path="$path/" +else mkdir -p "./src/$path" fi @@ -15,17 +17,15 @@ fi echo "#pragma once class $class_name { - Q_OBJECT - public: $class_name(); }; -" > "./src/$path/$class_name.hpp" +" > "./src/$path$class_name.hpp" # Implementation echo " -#include \"$path/$class_name.hpp\" +#include \"$path$class_name.hpp\" $class_name::$class_name() {} -" > "./src/$path/$class_name.cpp" +" > "./src/$path$class_name.cpp" |
