[Development] Summary of renaming changes

Shawn Rutledge shawn.rutledge at digia.com
Thu Oct 18 19:09:33 CEST 2012


On Thu, Oct 18, 2012 at 08:30:03AM -0700, Thiago Macieira wrote:
> After all of my patches are integrated, here are the changes that will happen:
> 
> - bin:
> The following tools have been renamed:
> 
> 	qmlviewer -> qml1viewer
> 	[qml1plugindump had already been renamed]
> 
> 	qmlscene	-> qml2scene

I have another idea in mind for qmlviewer...

You can configure your system so that double-clicking a .qml file opens it in qmlviewer.
This would be a nice use case to suggest/support, because it's silly to be required to
write a boilerplate C++ launcher for every little app or utility that you write in QML.
However if your system is a Mac, the double-click trick isn't workable for Qt Quick 2, 
because qmlscene is not built as an application package.  It makes sense that it isn't, 
because it has no UI if it is not given a qml file to run on the command line.  So I think 
we need to make qmlviewer version-agnostic, rather than simply allowing it to become 
obsolete.  That way we can keep the same UI (menus and built-in tools) which is
already there.  And we won't need to rename it from version to version.

This will depend on detecting the version at load time (if all else fails, just a 
regex pass to find the import statement) and we have to make sure the scene graph 
will get along with the widgets.  But I think the window can be just a QWindow with a 
menubar rather than a QMainWindow.  I plan to try it pretty soon and see how it goes.

qmlscene would then continue in its present role of a command-line tool strictly for 
Qt Quick 2 (and maybe newer versions later); so maybe it doesn't need to be renamed?




More information about the Development mailing list