Skip to content

Instantly share code, notes, and snippets.

@Uflex
Uflex / clang-format_config.md
Last active November 3, 2019 16:19
Configuration of clang-format for QtCreator

Clang-format in QtCreator

Edit: QtCreator 3.1 introduced a new plugin called Beautifier that supports clang-format. You still have to install the clang tools separately but you don't have to add them as external tools anymore. The plugin can be configured in the options dialog under the beautifier tab > Clang Format. Add a new style and copy the configuration below without the curly braces.

QtCreator doesn't allow using clang-format by default. Watch QTCREATORBUG-10111 for a better integration. As of today, you should use it as an external tool, either replacing your selection or the entire file. If you choose to replace the file, you will have to save it before launching the tool and QtCreator will reload the file, making it impossible to undo/redo afterwards. If you choose to replace your selection, you often have to select the whole function, otherwise you will lose the indentation; clang-format doesn't seem to k

@ebibibi
ebibibi / Auto-Logon.ps1
Created October 31, 2012 14:09
Windowsに指定したユーザー名、パスワードで自動ログオンをさせるPowerShellスクリプトです。
Param(
$DefaultUserName = "",
$DefaultPassword = "",
$DefaultDomainName = ""
)
$RegLogonKey = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
Set-itemproperty -path $RegLogonKey -name "AutoAdminLogon" -value 1
Set-itemproperty -path $RegLogonKey -name "DefaultUsername" -value $DefaultUserName