December 19, 2010

scarleton scarleton
Lab Rat
117 posts

lower case filenames

Page  
1

I have been doing Qt programming within Visual Studio for a number of months now. I always camel case for both class names and file names, so I am always unchecking the “Lower case file names” option in the Visual Studio plug-in to create Qt classes.

Well, I just went to create my first C++ class in Qt Creator and that option isn’t there! I sure would love to see it get added in the future. Or is this something I could add myself and submit? If so, how would one go about doing that?

Sam

28 replies

December 19, 2010

Milot Shala Milot Shala
Lab Rat
396 posts

I think that can be very useful. Right now I am using lower case filenames and camel case class names, but when I have a large list of files sometimes I get lost.

I think this should be marked as feature request in the Qt Creator on the bug tracker.

December 19, 2010

Vass Vass
Ant Farmer
743 posts

CamelCase in filenames is not good idea for my opinion, because in Unix/Mac OS filenames case sensitive. It make more problems.

 Signature 


Vasiliy

December 19, 2010

scarleton scarleton
Lab Rat
117 posts

Vass,

First off, I am only seeking this to be an option (as a side note, it would be great if the system would remember which option).

I do have a question for you, since I am planing on taking this application to OSX, why does the case sensitivity cause problems on Unix/OSX? I would think that all lower case would be no different from a mix of lower and upper as long as you get it right:) What am I missing?

Sam

December 19, 2010

Vass Vass
Ant Farmer
743 posts

scarleton wrote:

…as long as you get it right…

If you make case mistake in include directive on windows platform – all be ok.
But if it will on Unix – application isn’t compile.

 Signature 


Vasiliy

December 19, 2010

QtK QtK
Lab Rat
1140 posts

+1 May be someone should raise a feature request.

December 19, 2010

scarleton scarleton
Lab Rat
117 posts

I would be glad to put in a feature request, if someone would be so kind as to enlighten me as to how. I found the Jiri page for bugs, but nothing for features.

December 19, 2010

Vass Vass
Ant Farmer
743 posts

scarleton, go to http://bugreports.qt.nokia.com/, sign in, click “+ create issue” and see:
create issue

 Signature 


Vasiliy

December 19, 2010

Gerolf Gerolf
Robot Herder
3254 posts

Hi scarleton. Can you please post the link to the feature request when you made it?
Thanks

 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

December 19, 2010

Tobias Hunger Tobias Hunger
Robot Herder
3387 posts

Tools->Options->C++->File Naming has a checkbox “Lowercase file names” for me. Is that what you are looking for?

We generally encourage all lowercase filenames since some file systems are case sensitive while others are not. This can cause quite a mess if you are not consistent with your file name casing. So you can put “Something.h” as well as “something.h” into your project in one system and those end up being one file in another (which one depends on the order you copy the files).

December 19, 2010

Gerolf Gerolf
Robot Herder
3254 posts

Hi,
That was what I meant. It’s always a type of finding :-))
Thanks a lot Tobias.

 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

December 19, 2010

Vass Vass
Ant Farmer
743 posts

Tobias Hunger Wow, I don’t knew it has setting, but I said above about problem with camelCase filenames :)

 Signature 


Vasiliy

December 19, 2010

Milot Shala Milot Shala
Lab Rat
396 posts

Same here, good to have such option.

December 19, 2010

scarleton scarleton
Lab Rat
117 posts

Gerolf wrote:
Hi scarleton. Can you please post the link to the feature request when you made it?
Thanks
Sure thing:

http://bugreports.qt.nokia.com/browse/QTCREATORBUG-3420

December 19, 2010

scarleton scarleton
Lab Rat
117 posts

Tobias Hunger wrote:
Tools->Options->C++->File Naming has a checkbox “Lowercase file names” for me. Is that what you are looking for?
That is it, exactly. Now if it where on the C++ Class Wizard, folk could find it easier :)

Tobias Hunger wrote:
We generally encourage all lowercase filenames since some file systems are case sensitive while others are not. This can cause quite a mess if you are not consistent with your file name casing. So you can put “Something.h” as well as “something.h” into your project in one system and those end up being one file in another (which one depends on the order you copy the files).
I simply don’t follow the logic here, with regards to C++, that is. The whole language is case sensitive, Considering this is the programming language I started in, it is always my habit, even in languages which are NOT case sensitive to make sure that the case is consistent, what ever they might be. I find this to improve readability as much as anything else.

What I don’t get is why Unix programmers that live in a world of case sensitive filenames just punt and make everything lower case. I know I REALLY wish Windows was case sensitive because it drives me batty trying to change the case of a filename, I always have to totally rename it to something new and change it back wit the correct case.

But then I am one of those that hates the fact that SQL isn’t case sensitive, wish it was:)

April 25, 2011

mzimmers mzimmers
Lab Rat
529 posts

I’d like to reopen this thread. I had used camelCase when naming my files. Now that I see it’s not such a good idea, I’d like to change to all lowercase while I still have just a handful of files.

Unfortunately, Creator seems to be getting confused. I changed one filename, but both the old and new versions of the file seem to “exist” now. For example, if I go into a different file, select a class name, and do the “Find Usages” command, both versions of the filename show up.

I’ve copied the file to another location, deleted it through Qt (including deleting the file permanently), quit and re-started Creator, and re-added the file, and this still happens. Is this a bug, or am I leaving out a step?

And…what’s the recommended way to fix all of my filenames within Creator?

Thanks.

Page  
1

  ‹‹ How to use QT Creator to create a sidebar and implement close-buttons for tabs?      Qt Creator lookin in the wrong place for QML files ››

You must log in to post a reply. Not a member yet? Register here!