aboutsummaryrefslogtreecommitdiff
path: root/templates/qwidget.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtemplates/qwidget.sh (renamed from templates/qclass.sh)7
1 files changed, 4 insertions, 3 deletions
diff --git a/templates/qclass.sh b/templates/qwidget.sh
index 8ad085a..6706e19 100755
--- a/templates/qclass.sh
+++ b/templates/qwidget.sh
@@ -7,8 +7,9 @@ path="$2"
[ -z "$class_name" ] && exit 1
-mkdir -p "./include/$path";
-mkdir -p "./src/$path";
+if ! [ -z "$path" ]; then
+ mkdir -p "./src/$path"
+fi
# Header
echo "#pragma once
@@ -22,7 +23,7 @@ class $class_name : public QWidget {
public:
$class_name();
};
-" > "./include/$path/$class_name.hpp"
+" > "./src/$path/$class_name.hpp"
# Implementation
echo "#include <QtCore>