Prefer version numbered Qt binaries to plain named ones (i.e. moc-qt5 to plain moc). Closes #104.

pull/107/head
Jussi Pakkanen 10 years ago
parent 58d68f3d10
commit 5401a98fbf
  1. 12
      modules/qt4.py
  2. 12
      modules/qt5.py

@ -23,15 +23,15 @@ class Qt4Module():
mlog.log('Detecting Qt tools.')
# The binaries have different names on different
# distros. Joy.
self.moc = dependencies.ExternalProgram('moc', silent=True)
if not self.moc.found():
self.moc = dependencies.ExternalProgram('moc-qt4', silent=True)
self.uic = dependencies.ExternalProgram('uic', silent=True)
if not self.uic.found():
if not self.moc.found():
self.moc = dependencies.ExternalProgram('moc', silent=True)
self.uic = dependencies.ExternalProgram('uic-qt4', silent=True)
self.rcc = dependencies.ExternalProgram('rcc', silent=True)
if not self.rcc.found():
if not self.uic.found():
self.uic = dependencies.ExternalProgram('uic', silent=True)
self.rcc = dependencies.ExternalProgram('rcc-qt4', silent=True)
if not self.rcc.found():
self.rcc = dependencies.ExternalProgram('rcc', silent=True)
# Moc, uic and rcc write their version strings to stderr.
# Moc and rcc return a non-zero result when doing so.
# What kind of an idiot thought that was a good idea?

@ -24,15 +24,15 @@ class Qt5Module():
mlog.log('Detecting Qt tools.')
# The binaries have different names on different
# distros. Joy.
self.moc = dependencies.ExternalProgram('moc', silent=True)
if not self.moc.found():
self.moc = dependencies.ExternalProgram('moc-qt5', silent=True)
self.uic = dependencies.ExternalProgram('uic', silent=True)
if not self.uic.found():
if not self.moc.found():
self.moc = dependencies.ExternalProgram('moc', silent=True)
self.uic = dependencies.ExternalProgram('uic-qt5', silent=True)
self.rcc = dependencies.ExternalProgram('rcc', silent=True)
if not self.rcc.found():
if not self.uic.found():
self.uic = dependencies.ExternalProgram('uic', silent=True)
self.rcc = dependencies.ExternalProgram('rcc-qt5', silent=True)
if not self.rcc.found():
self.rcc = dependencies.ExternalProgram('rcc', silent=True)
# Moc, uic and rcc write their version strings to stderr.
# Moc and rcc return a non-zero result when doing so.
# What kind of an idiot thought that was a good idea?

Loading…
Cancel
Save