[Qt-creator] XCode style

Will Stokes wstokes at gmail.com
Wed Oct 7 15:46:42 CEST 2009


As I suggested earlier, I think QtCreator should try to ship with
default color schemes for a variety of other IDE's. This way those of
us who are coming over from another IDE can adapt more easily. I
wasn't sure how to contribute this but attached is my attempt at an
XCode style. It's not a perfect match just yet because QtCreator
doesn't support coloring class and function names. If that could be
added in the future I would be happy to update this style.

Another suggestion. I noticed QtCreator on the Mac is putting custom
styles under:
~/.config/Nokia/qtcreator/styles

That's really not standard Mac practice. That's a more Linuxy
approach. Instead custom styles should be placed under:
~/Library/Application Support/Qt Creator/styles

Similarly, QtCreator's preference file should not be under:
~/.config/Nokia/QtCreator.ini

and instead should be under:
~/Library/Preferences/com.nokia.com.QtCreator.plist

This can be accomplished by creating the QSettings object a little
differently, e.g.:

  qApp->setOrganizationName("Nokia");
  qApp->setOrganizationDomain("nokia.com");
  qApp->setApplicationName("Qt Creator");

#ifdef Q_OS_MAC
  QSettings::Format settingsFormat(QSettings::NativeFormat);
#else
  QSettings::Format settingsFormat(QSettings::IniFormat);
#endif

  QSettings* settings = new QSettings(settingsFormat,
                                      QSettings::UserScope,
                                      qApp->organizationName(),
                                      qApp->applicationName());
  settings->setFallbacksEnabled(false); //prevent from searching more
global like pref files...

Anyways, hopefully this style can be merged into the trunk somehow so
it'll ship with future versions of QtCreator, and I hope QtCreator can
behave more like a native Mac app in the future as well. That latter
should be more than possible since my Qt app does without any real
hassle.

-Will
-------------- next part --------------
A non-text attachment was scrubbed...
Name: XCode.xml
Type: text/xml
Size: 1702 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20091007/c053629c/attachment.xml 


More information about the Qt-creator-old mailing list