aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--automoc/kde4automoc.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/automoc/kde4automoc.cpp b/automoc/kde4automoc.cpp
index 81075dec..f79c0ca8 100644
--- a/automoc/kde4automoc.cpp
+++ b/automoc/kde4automoc.cpp
@@ -234,12 +234,16 @@ bool AutoMoc::run()
QTextStream outStream(&outfile);
outStream << "/* This file is autogenerated, do not edit */\n";
- // run moc on the remaining headers and include them in the _automoc.cpp file
- end = notIncludedMocs.constEnd();
- it = notIncludedMocs.constBegin();
- for (; it != end; ++it) {
- generateMoc(it.key(), it.value());
- outStream << "#include \"" << it.value() << "\"\n";
+ if (notIncludedMocs.isEmpty()) {
+ outStream << "enum some_compilers { need_more_than_nothing };\n";
+ } else {
+ // run moc on the remaining headers and include them in the _automoc.cpp file
+ end = notIncludedMocs.constEnd();
+ it = notIncludedMocs.constBegin();
+ for (; it != end; ++it) {
+ generateMoc(it.key(), it.value());
+ outStream << "#include \"" << it.value() << "\"\n";
+ }
}
outfile.close();