App: Use more local methods to trigger memory trim timer

The global event filter function is executed often, for events
originating deep in the widget hierarchy even multiple times.

Triggering the timer only by mouse and key presses on the main
application and on texteditor is less intrusive and still happens
often enough (TM).

Change-Id: I848d55a347bd62d12e8523965d1750c59da33116
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2022-08-02 11:04:10 +02:00
parent 9177649cab
commit df4155f617
6 changed files with 45 additions and 31 deletions

View File

@@ -832,6 +832,11 @@ void ICore::registerWindow(QWidget *window, const Context &context)
new WindowSupport(window, context); // deletes itself when widget is destroyed
}
void ICore::restartTrimmer()
{
m_mainwindow->restartTrimmer();
}
/*!
Opens files using \a filePaths and \a flags like it would be
done if they were given to \QC on the command line, or