Tip: 'Enclose in QLatin1String'
-
This 'refactoring' tool saved me a lot of typing today. It will wrap your string with a QLatin1String().
Right click on a char string and choose 'Refactor/Enclose in QLatin1String', that's it.
-
Even easier: use the Alt-Enter shortcut for this. Saves taking off your hands from the keyboard and a few mouse clicks.
-
Damn, I refuse, it's too easy :)
Hmm, where did you find out about 'Alt-Enter'?
Is the shortcut "context sensitive refactoring tools"?
-
If it gets easier, even monkeys can do code;) I still refuse to use QLatin1String, because I'm expecting UTF-8 everywhere.
-
[quote author="mario" date="1302854298"]Damn, I refuse, it's too easy :)
Hmm, where did you find out about 'Alt-Enter'?
Is the shortcut "context sensitive refactoring tools"?[/quote]
I learned about it in a conversation in a "topic":http://developer.qt.nokia.com/forums/viewthread/4382/ here with Tobias, and it is the shortcut for what the Qt Creator team refers to as a C++ Quick Fix operation.
-
Andre: Thanks for the link to the conversation, good read.