Allow pinning files to ensure that they are always open

This patch allows pinning files within a session. Pinning a file puts
it at the top of the Open Documents list, and prevents Close All
from closing it until it is unpinned.

This is useful for files that should always be open for a given
session.

[ChangeLog] Files can now be pinned via the context menu.
Pinning a file keeps it at the top of the Open Documents list,
and prevents Close All and similar actions from closing it
until it is unpinned. This provides a way to quickly close any
open files without closing important ones.

Change-Id: If47a599fb272db4c78a71eabe6fb29215a9a8a11
Fixes: QTCREATORBUG-21899
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Mitch Curtis
2019-02-22 15:46:19 +01:00
parent 19f2da8048
commit fe21a7a77e
19 changed files with 222 additions and 46 deletions

View File

@@ -43,6 +43,8 @@ const Icon LOCKED({
{QLatin1String(":/utils/images/locked.png"), Theme::PanelTextColorDark}}, Icon::Tint);
const Icon UNLOCKED_TOOLBAR({
{QLatin1String(":/utils/images/unlocked.png"), Theme::IconsBaseColor}});
const Icon PINNED({
{QLatin1String(":/utils/images/pinned.png"), Theme::PanelTextColorDark}}, Icon::Tint);
const Icon NEXT({
{QLatin1String(":/utils/images/next.png"), Theme::IconsWarningColor}}, Icon::MenuTintedStyle);
const Icon NEXT_TOOLBAR({