Opened 12 years ago

Closed 11 years ago

#36280 closed defect (fixed)

qt4-creator-mac cannot find QMLViewer

Reported by: macports@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: qt4-creator-mac

Description

Although qt4-creator-mac automatically detects the QMake binary and Qt libraries of the installed version of qt4-mac, it fails to find the QmlViewer application. This is because it only searches for it in the directory containing the QMake binary (/opt/local/bin), but the application is actually installed in ${qt_apps_dir} (/Applications/MacPorts/Qt4) instead.

To reproduce this issue, open the "Preferences", go to the "Build & Run" section and select the "Qt Versions" tab. If QmlViewer is not found, a warning icon appears next to the selected Qt version and the description says "No qmlviewer installed."

The solution is to enhance the application-finding mechanism of qt4-creator-mac to explicitly search in ${qt_apps_dir} as well. I'm going to add a patch shortly which does this.

Attachments (1)

qt4-creator-mac-qmlviewer.patch (2.3 KB) - added by macports@… 12 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 12 years ago by macports@…

Okay... to reproduce, it may still be necessary to manually specify the path to qmake in the "Preferences" dialog if you're not starting Qt Creator from a shell. Looks like Qt Creator needs to be taught about the MacPorts installation prefix in order to find binaries correctly. This also affects the search for the Valgrind tool, for instance. I'll look into that as well and post an updated patch here.

As for the current fix, I decided to not hardcode "/Applications/MacPorts/Qt4/" into the patch, but take ${qt_apps_dir} from the MacPorts configuration instead and "patch the patch" accordingly using reinplace. :-)

Last edited 12 years ago by macports@… (previous) (diff)

comment:2 Changed 12 years ago by macports@…

The above revised patch now fixes three issues:

  1. QMLViewer not being found as described in the initial comment
  2. QMake and the Qt libraries not being detected automatically
  3. Other utilities which lie in /opt/local/bin (such as valgrind) not being found automatically

Unfortunately, I can't edit the title of this ticket to reflect this.

Changed 12 years ago by macports@…

comment:3 Changed 11 years ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: newclosed

In r99012, danke.

Note: See TracTickets for help on using tickets.