シンボル名の変更

プロジェクト内のすべてのファイルのシンボル名を変更できます。

クラス名を変更すると、そのクラス名に一致するファイル名も変更できます。

プロジェクト内の C++ シンボルの名前を変更するには

  1. エディターでシンボルにカーソルを置きます。
  2. Tools >C++ >Rename Symbol Under Cursor に移動するか、Ctrl+Shift+R を選択します。

    Python のシンボルの名前を変更するには、キーボードショートカットを使います。

プロジェクト内の QML タイプの名前を変更するには、Tools >QML/JS >Rename Symbol Under Cursor に移動するか、Ctrl+Shift+R を選択します。

Search Results は、現在のプロジェクトにあるシンボルのインスタンスの場所と数を示します。

カーソル下のシンボルの名前を変更する

選択したインスタンスをすべて置き換えるには、Replace with に新しいシンボルの名前を入力し、Replace を選択します。インスタンスを省略するには、インスタンスの横のチェックボックスをオフにします。

注: この操作により、Search Results にリストされたすべてのファイル内のシンボルの選択されたすべてのインスタンスが置き換えられます。 この操作を元に戻すことはできません。

シンボルがクラスの場合は、Rename files を選択して、クラス名と一致するファイル名も変更します。

注: ローカルシンボルの名前を変更しても、Search Results は開きません。シンボルのインスタンスはコードで強調表示され、シンボルを編集できます。ローカル・シンボルのすべてのインスタンスは、入力と同時に変更されます。

シンボルの検索」、「クイックフィックスの設定の指定」、「クイックフィックス」、「C++ クイックフィックス」、「クイックフィックスの適用」、「QML クイックフィックス」も参照してください

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.