Originally Posted by
wysota
Which changes what exactly? qt.conf will redirect that as well.
You still fail in giving a concrete reference.
You can probably even point Qt to read the configuration from within the resource system in your binary
Probably, maybe, supposedly... until you show us either a concrete setting in qt.conf or a Qt API (URLs please!) we simply have to assume that such a possibility does not exist.
From within your program which is totally under your control.
No, no, no, no! Is that so hard to understand?!
1. somewhere in the Qt code com.trolltech is "hardcoded"
2. Qt uses this domain to store its own "Qt settings"
3. The application (until proven otherwise) has NO control over that location
Where in the above 3 points do you not agree? Or what did you not understand? That drives me crazy, honestly! Each time I give you an argument, you simply ignore it, twist it, and later on you come again and state the opposite to what I wrote earlier. We are turning in circles here.
Oh and yes, I'll stop argueing with you, too - For a moment I really thought you would seriously want to engage in a constructive discussion, but it is a waste of time. You just don't seem to want to understand what we are actually discussing here...
Untill you call the constructor of Q(Core)Application, nothing will be written anywhere, I assure you.
Oh, thanks a lot for that assurance: You could have as well suggested not to #include any of the Qt headers, or not write any code at all!
We are talking "Qt desktop applications" here! Not even a simple Qt "Hello World!" would work without instantiating at least QCoreApplication!
So what exactly is your point here!
It is you - by instantiating QCoreApplication - who causes initialization of a couple of things which might cause things like regeneration of the plugin cache which then saves the cache to the location under the Trolltech domain
You don't say! Mine and how many other Qt applications in this world exactly do instantiate at least QCoreApplication?
Are you seriously suggesting to simply avoid instantiating Q(Core)Application in your app and then submit that app to the Mac store? Or what on earth is your point here?!
But I am a bit afraid that would fail because of the following:
2.8 "Apps that are not very useful or do not provide any lasting entertainment value may be rejected"
No seriously, what's your point here? Your argument is ridiculous! WE KNOW THAT INSTANTIATING QCOREAPPLICATION INSTANTIATES QT RESOURCES! (and somewhere along that way reads/writes the Qt Settings) So honestly, what's your point here?!
(note it is still called Trolltech and not Nokia although since over two years Trolltech is owned by Nokia - have you thought why?)
Oh, is that so? Now that changes the whole situation then...
No, it wouldn't, it only modifies the Mac-related file.
Well then... but we are not discussing the implementation of the patch itself anyway.
But the quality of it doesn't change the fact the meritorical changes as such can't be accepted to Qt.
You seem to be very sure of what you say... well, Nokia opened an issue for that, so we will see...
Ahhh...! Did we not agree that we focus on the "Qt Settings" aka ~/Library/Preferences/com.trolltech.plist?
How come you argue now with QDesktopSettings?
can't suddenly start pointing elsewhere because it breaks a myriad of other applications.
No one said otherwise! WE KNOW THAT CHANGING THE QDESKTOPSERVICES LOCATIONS (WITHOUT FURTHER PRE-CAUTIONS) BRAKES COMPATIBILTY! Unfortunatelly we are currently NOT talking about QDesktopSettings! We are talking for quite a while now about the "Qt Settings", for God's sake! Don't take arguments from one thing (QDesktopSettings) and apply them to something different (com.trolltech.plist)!
But it simply can't be solved on a global level like this.
It can't be solved on a discussion level with you, agreed. For me the discussion takes place elsewhere now...
I can imagine that again qt.conf may be used to change the way this specific setting works to comply with someone's requirements and at the same time provide a fallback to the default behaviour of what we have today.
So why don't you use your imagination and show us - again - the concrete Qt API and/or qt.conf setting, which you seem to be so sure it exists, and enlighten us? Many Qt developers would be greatly thankful, including me! And again, I am talking about the control of the location of ~/Library/Preferences/com.trolltech.plist - NOTHING ELSE! Is that so hard for you to understand? I mean, it can't get any simpler than that (oh, and just for you, before you quote me wrong again: "that" refers to the fact that it cannot get any simpler, not to this "paragraph" or your "imagination" or any other word of your choice I wrote recently!).
The thing is you can do the same thing today without modifying Qt. That was my point all along.
So please, please, please, why don't you tell us how to control the location of com.trolltech.plist? You seem to know more than Nokia and every other developer on qt-interest, stack overflow and Qt Centre in this respect...
If you want to know what (and foremost why) qt.conf does and how it works then spend a while over Qt's source code and documentation and find out yourself if my explanations so far were not clear enough.
Yes, right, I will forward your suggestion to all developers and to Nokia. Because now it is Totally Clear(tm) what you meant, we just have to "spend a while over Qt's source code and documenation and find out" ourselves.
Just the very first line from the docs:
You seem to have an exeptional talent to only quote what serves your own purpose of argument. Let me complement your quote: "The qt.conf file overrides the hard-coded paths that are compiled into the Qt library." Just the next sentence in the referenced docs sais:
"These paths are accessible using the QLibraryInfo class."
Aha, so what are these paths? Let's follow the link given in the Qt docs:
http://doc.qt.nokia.com/latest/qlibr...yLocation-enum
QLibraryInfo::PrefixPath 0 The
default prefix
for all paths.
QLibraryInfo::DocumentationPath 1 The location
for documentation upon install.
...
....
QLibraryInfo::DemosPath 9 The location
for demos upon install.
QLibraryInfo::PrefixPath 0 The default prefix for all paths.
QLibraryInfo::DocumentationPath 1 The location for documentation upon install.
QLibraryInfo::HeadersPath 2 The location for all headers.
...
QLibraryInfo::SettingsPath 8 The location for Qt settings.
....
QLibraryInfo::DemosPath 9 The location for demos upon install.
To copy to clipboard, switch view to plain text mode
Haleluja! And believe it or not, I already wrote that:
(My own quote from some previous post):
Why? Because none of these mentioned paths refers to the location of ~/Library/Preferences/com.trolltech.plist! The only candidate member (and I guess that's the one which mis-lead you, but which you did not even care to mention so far in this discussion) would be QLibraryInfo::SettingsPath - which I tested already a few days ago, but that's NOT the desired setting! On Windows it points to (e.g.) C:/Qt/4.7.1.
And going a bit further these FILE paths could not work, not even in principle, because on Windows these settings are in the REGISTRY! So no way these FILE paths could point to that! (I agree on Mac they could, but I am pretty sure on Mac SettingsPath would point somewhere to /Library/Frameworks/Qt/... or the like. But certainly NOT to ~/Library/Preferences/com.trolltech.plist!
#include <QtCore/QLibraryInfo>
#include <QtCore/QCoreApplication>
int main(int argc, char *argv[])
{
qDebug("SettingsPath: %s", qPrintable(path));
qDebug("DataPath: %s", qPrintable(path));
return 0;
}
#include <QtCore/QLibraryInfo>
#include <QtCore/QCoreApplication>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QString path = QLibraryInfo::location(QLibraryInfo::SettingsPath);
qDebug("SettingsPath: %s", qPrintable(path));
path = QLibraryInfo::location(QLibraryInfo::DataPath);
qDebug("DataPath: %s", qPrintable(path));
return 0;
}
To copy to clipboard, switch view to plain text mode
<zynism>"Oh, look Mom! What a surprise, we instantiated QCoreApplication! Damn, we could not even submit this to the App Store now...!"</zynism>
The End.
Oliver
Bookmarks