Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-15055

Rename global variables renames unrelated variables outside project

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • Qt Creator 3.5.0
    • C/C++/Obj-C++ Support
    • None
    • Linux, gcc 4.8

      Qt Creator 3.5 at 0780c1d7634d4e7c9314deba14f370d1f2a14ea6 with test project using Qt 5.6 qtbase at 35793cea28c4bd1d6d8fbae884d9ae3c19745c61

      • With code like:
        #include <QCoreApplication>
        #include <QMetaType>
        
        const char *dummy[] =   {"bla"};
        
        int main(int argc, char *argv[])
        {
            QCoreApplication a(argc, argv);
            return a.exec();
        }
        
      • Right click on "dummy", choose Refactor/Rename
      • Briefly wonder that the bottom pane for renaming pops up and inline editing is not possible
      • Rename "dummy" to something else
      • Compile the project
      • Marvel at gazillons of error messages

      What happened is parameter "dummy" of qRegisterNormalizedMetaType() at qtbase/src/corelib/kernel/qmetatype.h:1678 got renamed, too.

        1. qtcreatorbug15055_qtbase.diff
          0.8 kB
          Friedemann Kleint
        2. qtcreatorbug15055.zip
          0.8 kB
          Friedemann Kleint
        3. qtcreatorbug15055_log.txt
          5 kB
          Friedemann Kleint
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kosjar Nikolai Kosjar
            kleint Friedemann Kleint
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes