summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/testcon/mainwindow.cpp10
-rw-r--r--tools/testcon/mainwindow.h2
-rw-r--r--tools/testcon/mainwindow.ui6
3 files changed, 18 insertions, 0 deletions
diff --git a/tools/testcon/mainwindow.cpp b/tools/testcon/mainwindow.cpp
index 0b0f9fc..bc69264 100644
--- a/tools/testcon/mainwindow.cpp
+++ b/tools/testcon/mainwindow.cpp
@@ -357,6 +357,16 @@ void MainWindow::on_actionScriptingRun_triggered()
#endif
}
+void MainWindow::on_actionFreeUnusedDLLs_triggered()
+{
+ // Explicitly unload unused DLLs with no remaining references.
+ // This is also done automatically after 10min and in low memory situations.
+
+ // must call twice due to DllCanUnloadNow implementation in qaxserverdll
+ CoFreeUnusedLibrariesEx(0, 0);
+ CoFreeUnusedLibrariesEx(0, 0);
+}
+
#ifdef QT_NO_QAXSCRIPT
static inline void noScriptMessage(QWidget *parent)
{
diff --git a/tools/testcon/mainwindow.h b/tools/testcon/mainwindow.h
index 6f713c7..2c8d687 100644
--- a/tools/testcon/mainwindow.h
+++ b/tools/testcon/mainwindow.h
@@ -83,6 +83,8 @@ protected slots:
void on_actionScriptingLoad_triggered();
void on_actionScriptingRun_triggered();
+ void on_actionFreeUnusedDLLs_triggered();
+
private:
QAxWidget *activeAxWidget() const;
QList<QAxWidget *> axWidgets() const;
diff --git a/tools/testcon/mainwindow.ui b/tools/testcon/mainwindow.ui
index 0320f7f..ad3443c 100644
--- a/tools/testcon/mainwindow.ui
+++ b/tools/testcon/mainwindow.ui
@@ -364,6 +364,7 @@
<addaction name="actionFreezeEvents" />
<addaction name="actionGroupLogging" />
<addaction name="LoggingMenu" />
+ <addaction name="actionFreeUnusedDLLs"/>
</widget>
<addaction name="FileMenu" />
<addaction name="ContainerMenu" />
@@ -602,6 +603,11 @@
<string>&amp;Run Macro...</string>
</property>
</action>
+ <action name="actionFreeUnusedDLLs">
+ <property name="text" >
+ <string>Free Unused DLLs</string>
+ </property>
+ </action>
<actiongroup name="actionGroupLogging" >
<action name="actionLogSignals" >
<property name="objectName" >