From ae5e2adcf39a6c7abbcd874e40e05bbbff428e2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Mon, 16 Dec 2019 23:07:15 +0100 Subject: 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. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- parts/filecreate/filecreate_part.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'parts/filecreate/filecreate_part.h') 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 @@ -67,6 +67,13 @@ public: * You can omit the subtype and specify the extension as ext-subtype if you wish. */ 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. @@ -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); -- cgit v1.2.1