summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaroline Chao <caroline.chao@nokia.com>2012-01-03 10:26:32 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-05 08:45:56 +0100
commita8495549d05aa6588a333eb2bc79d5cc0eb48376 (patch)
tree0ec30167c7f098ecfd792e0780e045e5423733a0
parent1d63b9beb976093e728c7fb174923fc60b82d7df (diff)
CodeCoverage: Remove releaseCoverageTool() function.
QLibraryPrivate::release() can be called multiple times and it is not appropriate to unregister and save the executed data for a library there. The library may still be used when it is released and it seems safer to save its data only once and probably when the application ends. Not calling __coveragescanner_unregister_library does not affect the coverage data. Calling __coveragescanner_register_library at load time without calling __coveragescanner_unregister_library means the plugin will stay loaded until the application ends. Removing the call to releaseCoverageTool() is so acceptable since the data will be saved when the application exits. Task-number: QTQAINFRA-416. Change-Id: I3135d2e203ecacfeff4a5b8ffdcd4d62fbc1db33 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
-rw-r--r--src/corelib/plugin/qlibrary.cpp21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index eeec831d4a..f20abb660d 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -430,25 +430,6 @@ static void installCoverageTool(QLibraryPrivate *libPrivate)
#endif
}
-static void releaseCoverageTool(QLibraryPrivate *libPrivate)
-{
-#ifdef __COVERAGESCANNER__
- /*
- __COVERAGESCANNER__ is defined when Qt has been instrumented for code
- coverage by TestCocoon.
- Here is the code to save the execution data.
- See comments about initialization in QLibraryPrivate::load().
- */
- if (libPrivate->pHnd) {
- __coveragescanner_save();
- __coveragescanner_clear();
- __coveragescanner_unregister_library(libPrivate->fileName.toLocal8Bit());
- }
-#else
- Q_UNUSED(libPrivate);
-#endif
-}
-
typedef QMap<QString, QLibraryPrivate*> LibraryMap;
struct LibraryData {
@@ -545,8 +526,6 @@ bool QLibraryPrivate::unload()
void QLibraryPrivate::release()
{
- releaseCoverageTool(this);
-
QMutexLocker locker(qt_library_mutex());
if (!libraryRefCount.deref())
delete this;