Many example project names in addons are called Example

Hi! I was wondering if you can think of a solution to this:

Some addons have just one example, called example. If you open several such examples in QtCreator, they are all called example in the project selector on the left, and I think only one of them works. If you only have one project open it’s no issue, you probably know where you are. But sometimes I have 15 projects open.

Any ideas on how to deal with this? Maybe the qbs generator script could prepend the project name when generating the .qbs file, so instead of creating a project called example, it would create one called ofxCerealExample?

It could do this by detecting if the project is called example? Or just by offering a text field that lets you always rename the project that is going to be imported, so the task is left to the user? (instead of always naming the project matching the folder name)

What do you think?

the problem is the qtcreator wizard is too restricted, you can’t really add much logic to it but if there’s some kind of validation rule that allow to do something like this that would be great

Could this work?

QBS Import project

  • Screen 1 asks for project path to import (unchanged)
  • Screen 2 asks for openFrameworks path AND name of project to create (a text field pre-populated with the project folder name). This would let you change it from example to something different.
  • Screen 3 Project Management (unchanged)

That would be convenient not only for the duplicate example case, but to produce a new .qbs project file with different settings for the same src, or in case you don’t want the project to be called as the folder (imagine you have folders nodejs and openframeworks inside TheProject: you don’t want the qbs project to be called openframeworks but TheProject.qbs instead).

yeah that sounds good!