26 lines
1.2 KiB
Diff
Executable File
26 lines
1.2 KiB
Diff
Executable File
Index: scons-1.3.0/engine/SCons/Tool/qt.py
|
|
===================================================================
|
|
--- scons-1.3.0.orig/engine/SCons/Tool/qt.py
|
|
+++ scons-1.3.0/engine/SCons/Tool/qt.py
|
|
@@ -139,7 +139,10 @@ class _Automoc:
|
|
# c or fortran source
|
|
continue
|
|
#cpp_contents = comment.sub('', cpp.get_text_contents())
|
|
- cpp_contents = cpp.get_text_contents()
|
|
+ try:
|
|
+ cpp_contents = cpp.get_text_contents()
|
|
+ except AttributeError: # non-existant file
|
|
+ cpp_contents = None
|
|
h=None
|
|
for h_ext in header_extensions:
|
|
# try to find the header file in the corresponding source
|
|
@@ -162,7 +165,7 @@ class _Automoc:
|
|
#moc_cpp.target_scanner = SCons.Defaults.CScan
|
|
if debug:
|
|
print "scons: qt: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(h), str(moc_cpp))
|
|
- if cpp and q_object_search.search(cpp_contents):
|
|
+ if cpp_contents and cpp and q_object_search.search(cpp_contents):
|
|
# cpp file with Q_OBJECT macro found -> add moc
|
|
# (to be included in cpp)
|
|
moc = env.Moc(cpp)
|