Details
-
Suggestion
-
Resolution: Fixed
-
Not Evaluated
-
Qt Creator 8.0.1
-
None
-
macOS 10.14.6 (x86_64)
Qt Creator 8.0.1
Description
Performing a certain sequence of operations, and opening certain files puts Qt Creator into a broken state where even parts of the GUI don't work correctly anymore. Please follow the instructions below to reproduce the problem.
I work with igraph. Please clone the repo, https://github.com/igraph/igraph/
I use a QBS project, not CMake. I write the entire QBS project file here for completeness, although it likely does not make a difference for reproducing the problem. This project file should be placed in the parent directory of the `igraph` directory.
import qbs Product { type: ["library"] Depends { name: "cpp" } files: [ "igraph/**/*.c", "igraph/**/*.cpp", "igraph/**/*.cc", "igraph/**/*.h", "igraph/**/*.hh", "igraph/**/*.hpp", "igraph/**/*.pmt", "igraph/**/*.inc", "igraph/**/*.l", "igraph/**/*.y", ] cpp.cLanguageVersion: "c99" cpp.cxxLanguageVersion: "c++11" cpp.includePaths: base.concat([ "igraph/build/include", "igraph/build/src/f2c", "igraph", "igraph/include", "igraph/src", "igraph/vendor/cs", "igraph/vendor", "igraph/vendor/glpk", "igraph/vendor/glpk/api", "igraph/vendor/glpk/env", "igraph/vendor/glpk/draft", "igraph/build/src", // for config.h with cmake ]) cpp.defines: base.concat([ "PRPACK_IGRAPH_SUPPORT" ]) cpp.commonCompilerFlags: base.concat([ "-Wunused-function", "-Wunused-variable", "-Wpedantic" ]) FileTagger { patterns: "*.pmt" fileTags: ["c"] } FileTagger { patterns: "*.c" fileTags: ["c"] } }
Before opening the project with Qt Creator, configure igraph with CMake.
cd igraph mkdir build && cd build cmake ..
Now open the project with Qt Creator and let it index the files.
Steps to trigger the problem:
- Use the "type to locate" box to jump to the `igraph_stack_init()` function (type `: igraph_stack_i`). This function is correctly found src/core/stack.pmt, even though it is implemented with a preprocessor-based templating system that Qt Creator does not understand.
- Now open the `include/igraph_stack_pmt.h` file.
- At the top of the editor there is a dropdown to choose which currently open file to edit. Click this dropdown and try to switch back to stack.pmt.
When clicking "stack.pmt", nothing happens. The list of open files does not even disappear. It is impossible to switch files. Furthermore, Qt Creator is now in a broken state and many operations are unrealiable. It must be restarted before it becomes safe to use again.