summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/rcc/main.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tools/rcc/main.cpp b/src/tools/rcc/main.cpp
index 99833101d2..5ded9a9b78 100644
--- a/src/tools/rcc/main.cpp
+++ b/src/tools/rcc/main.cpp
@@ -283,7 +283,13 @@ int runRcc(int argc, char *argv[])
return 1;
}
}
- return library.output(out, temp, errorDevice) ? 0 : 1;
+ bool success = library.output(out, temp, errorDevice);
+ if (!success) {
+ // erase the output file if we failed
+ out.remove();
+ return 1;
+ }
+ return 0;
}
Q_CORE_EXPORT extern QBasicAtomicInt qt_qhash_seed; // from qhash.cpp