diff options
author | Slávek Banko <[email protected]> | 2019-12-16 23:07:15 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2019-12-16 23:07:15 +0100 |
commit | ae5e2adcf39a6c7abbcd874e40e05bbbff428e2c (patch) | |
tree | acf956c61c43960e5c1257ef053991ac61ba1816 /parts/filecreate/filecreate_part.h | |
parent | 6fa6e46d9d7becae27a8e1534ec5da8833ff7c17 (diff) | |
download | tdevelop-ae5e2adcf39a6c7abbcd874e40e05bbbff428e2c.tar.gz tdevelop-ae5e2adcf39a6c7abbcd874e40e05bbbff428e2c.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 <[email protected]>
Diffstat (limited to 'parts/filecreate/filecreate_part.h')
-rw-r--r-- | parts/filecreate/filecreate_part.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/parts/filecreate/filecreate_part.h b/parts/filecreate/filecreate_part.h index 9d090493..ab870791 100644 --- a/parts/filecreate/filecreate_part.h +++ b/parts/filecreate/filecreate_part.h @@ -68,6 +68,13 @@ public: */ FileType * getType(const TQString & ext, const TQString subtype = TQString()); /** + * Finds the file type object for a given file type or subtype ID. + * IDs for file types are not persistent. ID is a sequence number assigned when + * reading file type definitions from an XML file. Negative numbers are assigned + * for custom file types. + */ + FileType * getType(int id); + /** * Finds the file type object for a given extension and optionally subtype. * You can omit the subtype and specify the extension as ext-subtype if you wish. * Returns only enabled type (i.e. used in the project). @@ -93,9 +100,9 @@ public slots: /** * Called from TDEToolBarPopupMenu to request a new file action - * @param pFileType is acutally a pointer to FileType + * @param fileTypeId is a sequence number that identifies a particular FileType */ - void slotNewFilePopup(int pFileType); + void slotNewFilePopup(int fileTypeId); protected slots: void slotNoteFiletype(const FileType * filetype); |