Symbiatch - maailma on rikki

Qt Creator is Broken, Horribly

19.03.2011 09.51 - mobiili ohjelmointi 

Better to write a separate story about this problem I ran into. It's a big one, really. It might not affect that many people, but it did me. And it's a possibility for a disaster.

As many people know, the Symbian SDK is still in the dark ages. It can't handle spaces in path names. Stupid. And since I'm not an idiot, I don't want to have all my projects in some C:\mystuff. I want to have them where they belong and that is under my profile directory. Which, of course, has spaces in the path.

Tried to compile a Qt app. Didn't work, the spaces. Ok. Copied the project to c:\nokiaisstupid\project\ (not really, but I'm pissed off right now). Compiled, it works. Nice.

Opened a QML file from the Qt Creator. Edited it. Ran in the simulator. Nothing changed. What the heck? Changed something else. Nothing. Strange.

Changed the original file. Changes were visible. Umm, what? Qt Creator opens files from the new location, but builds them from the old! That's nice. And no, clean all doesn't fix it.

Let's remove the original file altogether. Ran just fine. Edited the new file. Still uses the old file. Which doesn't even exist anymore! So it caches stuff somewhere like an idiot?

Clean all. Rebuild all. Still using the old version. Which still doesn't exist.

Search all files in the project directory for the old path. Not found. Search all files in the project directory for main.qml. All point to the new path.

Close the simulator. Close Qt Creator. Still the old version!

So, where the hell is this old version cached? Why does Qt Creator still use it, even though the path is not in the project files, the file doesn't exist etc?

Oh well, let's build a deployment SIS for the device. Maybe it'll notice that something's missing then. Nope! 329 warnings from the Qt SDK itself, none from my code. No errors. SIS created.

Install SIS on device. Oh, right. I can't install the smart installer version, since it doesn't seem to work on E7. Let's send the stupid installer version then. Wow! It uses the new version. As it should.

So, I'm stuck in a situation where Qt Creator doesn't realize that it should use the new file. It keeps its old version somewhere deep inside the simulator and doesn't give up on it.

How about it, Nokia? A quick fix for this in order? Or should I just never create projects in one place and then move them? And recreate the whole project that's currently not working?

The root cause for all this is the stupidity that is simulator work: there is a separate build folder for simulator stuff. Which has a separate makefile. And the build directory is per user. And the path stayed the same. And the makefile has a relative path (as it should). So it just kept on copying the wrong files.

So the fix as I see it: don't use any stupid separate folder for the simulator! Everything I do on a project X should be either inside the project X's folder or somewhere in simulator's/Qt Creator's folder structure. No folders should be created anywhere else. It's just stupid. Oh, right. You can't do that. Since Qmake does not support build directories below the source directory. Cool. But it still builds this one quite nicely without problems when I put it under the source folder. Maybe I'm just lucky.

Or at least use relative paths or give an error message. Yes, there is a warning, but it doesn't say why or what things will be caused by not fixing paths by hand.

So there. I'm sure this will go under "a minor thing that nobody notices since they'll never move files around."

Recap: when Qt Creator creates makefiles for building, please use absolute paths. Also, please use a folder under ProgramData or some other reasonable place. Don't clutter my project folder with Project-build-desktop, Project-build-Symbian, Project-build-maemo etc. They're not my projects. They're just build results. Which are NOT laid out like this in any other IDE that I know of.

Please? Pretty please?

Comment

Add comment

Name:
Email:
Homepage:
Kotisivu:
Comment:

Comments

Jutut.fi  |  Omat jutut  |  Muiden jutut  |  Kategoriat  |  kirjaudu