summaryrefslogtreecommitdiffstats
path: root/parts/filecreate/filecreate_filetype.h
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2019-12-16 23:07:15 +0100
committerSlávek Banko <slavek.banko@axis.cz>2019-12-17 17:02:33 +0100
commit2903268646b878941de5a0bd0cfbc5c74a538879 (patch)
treeadbd590401aab003ed2e905eb316f53f84c86967 /parts/filecreate/filecreate_filetype.h
parent45c6d651358e9a288326a06a0b51c37bca9b1392 (diff)
downloadtdevelop-2903268646b878941de5a0bd0cfbc5c74a538879.tar.gz
tdevelop-2903268646b878941de5a0bd0cfbc5c74a538879.zip
Fix crash on creating new file if a specific file type is selected
from the popup menu on the New file icon. This relates to issue #4. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit ae5e2adcf39a6c7abbcd874e40e05bbbff428e2c)
Diffstat (limited to 'parts/filecreate/filecreate_filetype.h')
-rw-r--r--parts/filecreate/filecreate_filetype.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/parts/filecreate/filecreate_filetype.h b/parts/filecreate/filecreate_filetype.h
index 4b050708..e2d2a279 100644
--- a/parts/filecreate/filecreate_filetype.h
+++ b/parts/filecreate/filecreate_filetype.h
@@ -40,10 +40,13 @@ public:
bool enabled() const { return m_enabled; }
void setSubtypesEnabled(bool enabled = true);
-
+
void addSubtype(const FileType * subtype) { m_subtypes.append(subtype); }
TQPtrList<FileType> subtypes() const { return m_subtypes; }
-
+
+ void setId(int id) { m_id = id; }
+ int id() const { return m_id; }
+
private:
TQString m_name;
TQString m_ext;
@@ -53,9 +56,10 @@ private:
TQString m_descr;
bool m_enabled;
-
+
TQPtrList<FileType> m_subtypes;
+ int m_id;
};
}