How to use the tilde character ("~") in a text macro in Qt Creator?
-
wrote on 13 Jan 2018, 13:13 last edited by Robert Hairgrove
I would like to create the text macros "\~english" and "\~german" for use in Doxygen comments (used for language switching).
I was able to create macros, but they appear without the tilde, i.e. "\english". When I record the macro with two backslashes, I get "\\english". With two tildes, I get "\english".
Is there any way to preserve the tilde in the macro?
-
wrote on 13 Jan 2018, 13:21 last edited by yuvaram
-
I would like to create the text macros "\~english" and "\~german" for use in Doxygen comments (used for language switching).
I was able to create macros, but they appear without the tilde, i.e. "\english". When I record the macro with two backslashes, I get "\\english". With two tildes, I get "\english".
Is there any way to preserve the tilde in the macro?
Your Text Editing Macros works fine for me! I'm on Ubuntu 16.04 x64, QtCreator 4.5.0 based on Qt 5.10.
Which platform are you using?
-
Your Text Editing Macros works fine for me! I'm on Ubuntu 16.04 x64, QtCreator 4.5.0 based on Qt 5.10.
Which platform are you using?
wrote on 13 Jan 2018, 13:55 last edited byThis post is deleted! -
Try this,
Tested example.!
@yuvaram I guess @Robert-Hairgrove means Creators "Text Editing Macros" function (in the Tools menu).
Or am I wrong, Robert?
-
wrote on 13 Jan 2018, 14:33 last edited by Robert Hairgrove
Thanks for the suggestions. However, I am not talking about C++ macros, but editing macros used while typing code in Qt Creator.
I want to use these within comment blocks which are used by Doxygen to generate documentation of the source code. C++ macros are not expanded within comment blocks.
-
@yuvaram I guess @Robert-Hairgrove means Creators "Text Editing Macros" function (in the Tools menu).
Or am I wrong, Robert?
wrote on 13 Jan 2018, 15:28 last edited by@aha_1980 -- Thank you, this is correct!
I am using Qt Creator 4.2.1 based on Qt 5.8.0 (also on Ubuntu 16.04 LTS).Should I upgrade my Qt installation?
-
@aha_1980 -- Thank you, this is correct!
I am using Qt Creator 4.2.1 based on Qt 5.8.0 (also on Ubuntu 16.04 LTS).Should I upgrade my Qt installation?
Should I upgrade my Qt installation?
(Can only speak for myself): I would upgrade Creator.
-
wrote on 14 Jan 2018, 10:45 last edited by
In the meantime, it seems to be a problem with dead keys in my current keyboard layout (German/Swiss). I cannot enter any characters into a macro which are produced by pressing a dead key followed by the space bar.
As a workaround, I think I shall set up macros with a substitute character instead of the tilde and then do a global search and replace at the end of the day.
Thank you for all the suggestions!
-
In the meantime, it seems to be a problem with dead keys in my current keyboard layout (German/Swiss). I cannot enter any characters into a macro which are produced by pressing a dead key followed by the space bar.
As a workaround, I think I shall set up macros with a substitute character instead of the tilde and then do a global search and replace at the end of the day.
Thank you for all the suggestions!
maybe you can edit an recorded macro? in the end, it must be stored somewhere... (cannot check now, have only the phone)
-
maybe you can edit an recorded macro? in the end, it must be stored somewhere... (cannot check now, have only the phone)
wrote on 15 Jan 2018, 10:32 last edited by@aha_1980 - I tried finding it with grep ... no luck, though. Probably easier just to do search & replace.
-
Continuation is here: QTCREATORBUG-20890
-
Continuation is here: QTCREATORBUG-20890
wrote on 1 Aug 2018, 11:38 last edited by@aha_1980 - Thanks for posting the follow-up!
-
@aha_1980 - Thanks for posting the follow-up!
@Robert-Hairgrove I had a Déjà-vu when I read the bugreport :)