From 7022fc27142350414afd4bba2f0e6688bc263ffd Mon Sep 17 00:00:00 2001
From: CrSjimo
Date: Tue, 28 Oct 2025 23:45:50 +0800
Subject: [PATCH 001/319] Fix svscraft QtShaderTools linking
---
.github/actions/initialize-build-environment/action.yml | 2 +-
src/libs/3rdparty/svscraft | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/actions/initialize-build-environment/action.yml b/.github/actions/initialize-build-environment/action.yml
index 2d35b2f5..f92910ef 100644
--- a/.github/actions/initialize-build-environment/action.yml
+++ b/.github/actions/initialize-build-environment/action.yml
@@ -45,5 +45,5 @@ runs:
uses: jurplel/install-qt-action@v4
with:
version: ${{ inputs.qt_version }}
- modules: qt5compat
+ modules: qt5compat qtshadertools
cache: true
diff --git a/src/libs/3rdparty/svscraft b/src/libs/3rdparty/svscraft
index db265541..eb10eb99 160000
--- a/src/libs/3rdparty/svscraft
+++ b/src/libs/3rdparty/svscraft
@@ -1 +1 @@
-Subproject commit db26554132eebdc78f7f2ecfa684e8920f1e2bfb
+Subproject commit eb10eb9933528dc072af7074f801b889fd0d6144
From 678d831e0e44c5d047f0f1605f03bb96454b7d30 Mon Sep 17 00:00:00 2001
From: CrSjimo
Date: Wed, 29 Oct 2025 00:19:42 +0800
Subject: [PATCH 002/319] Update choruskit
---
src/libs/3rdparty/choruskit | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libs/3rdparty/choruskit b/src/libs/3rdparty/choruskit
index 00cbb74c..20df2897 160000
--- a/src/libs/3rdparty/choruskit
+++ b/src/libs/3rdparty/choruskit
@@ -1 +1 @@
-Subproject commit 00cbb74c1c39b54bbd7178fbd4bc9e5f6cbdb1d9
+Subproject commit 20df2897ebacae703a6e4ff4d73e26d43d59daa7
From 7bcc340f5d56a2a4e3ee4f3b702c58c746cba031 Mon Sep 17 00:00:00 2001
From: CrSjimo
Date: Sun, 2 Nov 2025 21:23:27 +0800
Subject: [PATCH 003/319] Update clang format
---
.clang-format | 370 ++++++++++++------
.../uishell/src/AchievementProxyModel.cpp | 20 +-
.../uishell/src/AchievementProxyModel_p.h | 3 +-
.../uishell/src/ActionLayoutsEditorHelper.cpp | 7 +-
.../uishell/src/ActionLayoutsEditorHelper_p.h | 3 +-
.../uishell/src/DigitalClockLabel_p.h | 3 +-
.../uishell/src/InvisibleCentralWidget_p.h | 3 +-
.../uishell/src/LyricsSubtreeProxyModel.cpp | 1 +
.../uishell/src/LyricsSubtreeProxyModel_p.h | 1 +
.../uishell/src/PluginManagerHelper.cpp | 10 +-
.../uishell/src/PluginManagerHelper_p.h | 5 +-
.../uishell/src/RecentFilesProxyModel.cpp | 2 +-
.../uishell/src/RecentFilesProxyModel_p.h | 3 +-
.../uishell/src/SettingCatalogModel.cpp | 14 +-
.../uishell/src/SettingCatalogModel_p.h | 3 +-
.../SettingCatalogSortFilterProxyModel.cpp | 28 +-
.../SettingCatalogSortFilterProxyModel_p.h | 5 +-
.../uishell/src/SettingPageWidgetDialog.cpp | 1 -
.../uishell/src/SettingPageWidgetDialog_p.h | 4 +-
.../uishell/src/SubtreeProxyModel.cpp | 24 +-
.../application/uishell/src/UIShellGlobal.h | 4 +-
src/libs/application/uishell/src/USDef_p.h | 5 +-
.../uishell/src/WindowAgentForeign_p.h | 3 +-
.../internal/achievementplugin.cpp | 14 +-
.../achievement/internal/achievementplugin.h | 1 -
.../internal/addons/achievementaddon.cpp | 4 +-
.../internal/addons/achievementaddon.h | 5 +-
src/plugins/audio/internal/audioplugin.cpp | 17 +-
src/plugins/audio/internal/audioplugin.h | 5 +-
.../dialogs/audiotroubleshootingdialog.cpp | 31 +-
.../dialogs/audiotroubleshootingdialog.h | 3 +-
.../internal/settings/audioandmidipage.cpp | 2 +-
.../internal/settings/audioandmidipage.h | 3 +-
.../internal/settings/audiooutputpage.cpp | 4 +-
.../audio/internal/settings/audiooutputpage.h | 3 +-
.../internal/subsystems/outputsystem.cpp | 7 +-
.../audio/internal/subsystems/outputsystem.h | 1 -
.../utils/audiooutputsettingshelper.cpp | 157 ++++----
.../utils/audiooutputsettingshelper.h | 10 +-
src/plugins/coreplugin/core/coreinterface.cpp | 81 ++--
src/plugins/coreplugin/core/coreinterface.h | 3 +-
.../coreplugin/core/notificationmessage.h | 4 +-
src/plugins/coreplugin/core/quickinput.cpp | 46 ++-
src/plugins/coreplugin/core/quickinput.h | 3 +-
src/plugins/coreplugin/core/quickinput_p.h | 6 +-
src/plugins/coreplugin/core/quickpick.cpp | 41 +-
src/plugins/coreplugin/core/quickpick.h | 3 +-
src/plugins/coreplugin/core/quickpick_p.h | 6 +-
src/plugins/coreplugin/coreglobal.h | 4 +-
.../internal/actions/actionhelper.cpp | 6 +-
.../internal/actions/findactionsmodel.cpp | 15 +-
.../internal/addon/editactionsaddon.cpp | 6 +-
.../internal/addon/findactionsaddon.cpp | 10 +-
.../internal/addon/metadataaddon.cpp | 13 +-
.../coreplugin/internal/addon/metadataaddon.h | 2 +-
.../internal/addon/notificationaddon.cpp | 13 +-
.../addon/projectstartuptimeraddon.cpp | 18 +-
.../addon/projectwindownavigatoraddon.cpp | 12 +-
.../addon/projectwindownavigatoraddon.h | 2 +-
.../internal/addon/recentfileaddon.cpp | 14 +-
.../internal/addon/recentfileaddon.h | 2 +-
.../internal/addon/timelineaddon.cpp | 39 +-
.../internal/addon/viewvisibilityaddon.cpp | 9 +-
.../internal/addon/workspaceaddon.cpp | 52 ++-
.../internal/behaviorpreference.cpp | 8 +-
.../coreplugin/internal/behaviorpreference.h | 3 +-
.../colorscheme/colorschemecollection.cpp | 251 ++++++------
.../colorschemewelcomewizardpagehelper.h | 3 +-
.../coreplugin/internal/coreplugin.cpp | 115 +++---
src/plugins/coreplugin/internal/coreplugin.h | 4 +-
.../internal/extras/coreachievementsmodel.h | 4 +-
.../notification/notificationmanager.cpp | 23 +-
.../notification/notificationmanager.h | 2 +-
.../internal/settings/appearancepage.cpp | 2 +-
.../internal/settings/colorschemepage.cpp | 21 +-
.../internal/settings/colorschemepage.h | 4 +-
.../internal/settings/filebackuppage.cpp | 4 +-
.../internal/settings/filebackuppage.h | 2 +-
.../internal/settings/generalpage.cpp | 19 +-
.../internal/settings/generalpage.h | 1 -
.../internal/settings/keymappage.cpp | 11 +-
.../coreplugin/internal/settings/logpage.cpp | 6 +-
.../coreplugin/internal/settings/logpage.h | 2 +-
.../coreplugin/internal/settings/menupage.cpp | 19 +-
.../coreplugin/internal/settings/menupage.h | 1 -
.../internal/settings/timeindicatorpage.cpp | 2 +-
.../projectwindowworkspacelayout.cpp | 6 +-
.../workspace/projectwindowworkspacelayout.h | 5 +-
.../projectwindowworkspacemanager.cpp | 119 +++---
.../workspace/projectwindowworkspacemanager.h | 1 -
.../coreplugin/project/editactionshandler.h | 3 +-
.../project/editactionshandlerregistry.cpp | 64 ++-
.../project/editactionshandlerregistry.h | 2 +-
.../project/projectdocumentcontext.cpp | 26 +-
.../project/projectdocumentcontext.h | 1 -
.../project/projectdocumentcontext_p.h | 1 -
.../coreplugin/project/projecttimeline.cpp | 2 +-
.../coreplugin/project/projecttimeline.h | 9 +-
.../windows/actionwindowinterfacebase.cpp | 10 +-
.../windows/actionwindowinterfacebase.h | 4 +-
.../windows/homewindowinterface.cpp | 4 +-
.../coreplugin/windows/homewindowinterface.h | 5 +-
.../windows/projectwindowinterface.cpp | 92 +++--
.../windows/projectwindowinterface.h | 5 +-
.../internal/addons/maintenanceaddon.cpp | 19 +-
.../internal/addons/maintenanceaddon.h | 5 +-
.../internal/applicationupdatechecker.cpp | 36 +-
.../internal/applicationupdatechecker.h | 10 +-
.../internal/applicationupdatechecker_p.h | 10 +-
.../internal/maintenanceplugin.cpp | 5 +-
.../maintenance/internal/maintenanceplugin.h | 1 -
.../internal/settings/updatepage.cpp | 16 +-
.../internal/settings/updatepage.h | 4 +-
.../internal/addons/welcomewizardaddon.cpp | 7 +-
.../internal/addons/welcomewizardaddon.h | 5 +-
.../internal/welcomewizardplugin.h | 1 -
116 files changed, 1128 insertions(+), 1056 deletions(-)
diff --git a/.clang-format b/.clang-format
index f3affdec..e59adbd6 100644
--- a/.clang-format
+++ b/.clang-format
@@ -1,130 +1,252 @@
-# References:
-# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
-# https://code.qt.io/cgit/qt/qt5.git/tree/_clang-format
-
+Language: Cpp
BasedOnStyle: LLVM
-
-Standard: c++20
-
-# 指针和引用的对齐方式。
-# 可能的值有:
-# PAS_Left (在配置中: Left) 指针左对齐。
-# PAS_Right (在配置中: Right) 指针右对齐。
-# PAS_Middle (在配置中: Middle) 指针中间对齐。
-PointerAlignment: Right
-
-# public/protected/private 等访问修饰符偏移量
AccessModifierOffset: -4
-
-# 缩进长度
-IndentWidth: 4
-
-# 连续空行的最大数
-MaxEmptyLinesToKeep: 999
-
-# 在OC中的@property后面添加一个空格。例如:使用“@property (readonly)”而不是“@property(readonly)”
-ObjCSpaceAfterProperty: true
-
-# OC块中所拍的字符数
-ObjCBlockIndentWidth: 4
-
-# 取决于值, 语句“int f() { return 0; }”可以被放到一个单行。
-# 可能的值有:
-# SFS_None (在配置中: None) 从不合并方法或函数到单独的一行。
-# SFS_Empty (在配置中: Empty) 仅合并空的函数。
-# SFS_Inline (在配置中: Inline) 仅合并类中定义的方法或函数. 意味着 “empty”.
-# SFS_All (在配置中: All) 合并所有的方法适应单行.
-AllowShortFunctionsOnASingleLine: None
-
-# 如果为真(true), 语句“if (a) return;” 能被放到单行。
-AllowShortIfStatementsOnASingleLine: false
-
-# 如果为真(true), 对齐注释。
-AlignTrailingComments: true
-
-# 如果为真,对齐连续的宏定义
-AlignConsecutiveMacros: true
-
-# 如果为真(true),将会在“[”之后和“]”之前插入空格。
-SpacesInSquareBrackets: false
-
-# 如果为真(true), 将会在“(”之后和“)”之前插入空格。
-SpacesInParentheses : false
-
-# 如果为真(true), 校准连续的声明。
-# 这将会校准连续多行的声明的名字。这将会导致像下面这样的格式:
-# int aaaa = 12;
-# float b = 23;
-# std::string ccc = 23;
-AlignConsecutiveDeclarations: false
-
-# 如果为真(true),连续调整多行
-# 这将会调整连续行中的分配操作符。这将会导致像下面这样的格式:
-# int aaaa = 12;
-# int b = 23;
-# int ccc = 23;
-AlignConsecutiveAssignments: false
-
-# 如果为假(false),移除分配操作符(=)前空格。
-SpaceBeforeAssignmentOperators: true
-
-# 如果为真(true), 将会在字面量容器中插入空格(例如 OC和Javascript的数组和字典字面量)。
-SpacesInContainerLiterals: false
-
-# 缩进case标签
+AlignAfterOpenBracket: BlockIndent
+AlignArrayOfStructures: None
+AlignConsecutiveAssignments:
+ Enabled: false
+AlignConsecutiveDeclarations:
+ Enabled: false
+AlignConsecutiveMacros:
+ Enabled: false
+AlignConsecutiveShortCaseStatements:
+ Enabled: false
+AlignEscapedNewlines: Left
+AlignOperands: Align
+AlignTrailingComments:
+ Kind: Never
+AllowAllArgumentsOnNextLine: true
+AllowAllParametersOfDeclarationOnNextLine: true
+AllowBreakBeforeNoexceptSpecifier: Never
+AllowShortBlocksOnASingleLine: Empty
+AllowShortCaseLabelsOnASingleLine: true
+AllowShortEnumsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: All
+AllowShortIfStatementsOnASingleLine: Never
+AllowShortLambdasOnASingleLine: All
+AllowShortLoopsOnASingleLine: false
+AlwaysBreakAfterDefinitionReturnType: None
+AlwaysBreakAfterReturnType: None
+AlwaysBreakBeforeMultilineStrings: false
+AlwaysBreakTemplateDeclarations: MultiLine
+AttributeMacros:
+ - __capability
+BinPackArguments: true
+BinPackParameters: true
+BitFieldColonSpacing: Both
+BraceWrapping:
+ AfterCaseLabel: false
+ AfterClass: false
+ AfterControlStatement: Never
+ AfterEnum: false
+ AfterExternBlock: false
+ AfterFunction: false
+ AfterNamespace: false
+ AfterObjCDeclaration: false
+ AfterStruct: false
+ AfterUnion: false
+ BeforeCatch: false
+ BeforeElse: false
+ BeforeLambdaBody: false
+ BeforeWhile: false
+ IndentBraces: false
+ SplitEmptyFunction: true
+ SplitEmptyRecord: true
+ SplitEmptyNamespace: true
+BreakAfterAttributes: Leave
+BreakAfterJavaFieldAnnotations: false
+BreakArrays: true
+BreakBeforeBinaryOperators: None
+BreakBeforeConceptDeclarations: Always
+BreakBeforeBraces: Attach
+BreakBeforeInlineASMColon: OnlyMultiline
+BreakBeforeTernaryOperators: true
+BreakConstructorInitializers: BeforeColon
+BreakInheritanceList: BeforeColon
+BreakStringLiterals: true
+ColumnLimit: 0
+CommentPragmas: '^ IWYU pragma:'
+CompactNamespaces: false
+ConstructorInitializerIndentWidth: 4
+ContinuationIndentWidth: 4
+Cpp11BracedListStyle: true
+DerivePointerAlignment: false
+DisableFormat: false
+EmptyLineAfterAccessModifier: Never
+EmptyLineBeforeAccessModifier: LogicalBlock
+ExperimentalAutoDetectBinPacking: false
+FixNamespaceComments: false
+ForEachMacros: [foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE]
+IfMacros:
+ - KJ_IF_MAYBE
+IncludeBlocks: Regroup
+IncludeCategories:
+ # Local headers
+ - Regex: '^".*\.h"$'
+ Priority: -999
+ # Qt public
+ - Regex: '^<(Q[a-zA-Z0-9_]+|qt_[a-zA-Z0-9_]+\.h|qqml_[a-zA-Z0-9_]+\.h)>$'
+ Priority: 201
+ # Qt qpa
+ - Regex: '^$'
+ Priority: 202
+ # Qt private
+ - Regex: '^$'
+ Priority: 203
+ # Windows platform-specific
+ - Regex: '^<[a-zA-Z0-9_]+\.h>$'
+ Priority: 1
+ # C++ standard library
+ - Regex: '^<[a-z0-9_]+>$'
+ Priority: 2
+ # Boost
+ - Regex: '^ AchievementProxyModel::roleNames() const {
static const QHash roles{
- {USDef::AR_IdRole, "id" },
- {USDef::AR_NameRole, "name" },
+ {USDef::AR_IdRole, "id"},
+ {USDef::AR_NameRole, "name"},
{USDef::AR_DescriptionRole, "description"},
- {USDef::AR_IconRole, "icon" },
- {USDef::AR_IconColorRole, "iconColor" },
- {USDef::AR_HiddenRole, "hidden" },
- {CompletedRole, "completed" },
+ {USDef::AR_IconRole, "icon"},
+ {USDef::AR_IconColorRole, "iconColor"},
+ {USDef::AR_HiddenRole, "hidden"},
+ {CompletedRole, "completed"},
};
return roles;
}
@@ -33,7 +33,7 @@ namespace UIShell {
const QString id = QIdentityProxyModel::data(index, USDef::AR_IdRole).toString();
return m_completedAchievements.contains(id);
}
-
+
// For all other roles, delegate to the parent implementation
return QIdentityProxyModel::data(index, role);
}
@@ -68,7 +68,7 @@ namespace UIShell {
bool AchievementProxyModel::handleAchievementCompleted(const QString &id, bool completed) {
bool changed = false;
-
+
if (completed) {
// Add to completed achievements if not already present
if (!m_completedAchievements.contains(id)) {
@@ -82,7 +82,7 @@ namespace UIShell {
changed = true;
}
}
-
+
if (changed) {
// Use cached mapping to find the model index directly
const QModelIndex idx = indexForId(id);
diff --git a/src/libs/application/uishell/src/AchievementProxyModel_p.h b/src/libs/application/uishell/src/AchievementProxyModel_p.h
index 0951aac0..89e63893 100644
--- a/src/libs/application/uishell/src/AchievementProxyModel_p.h
+++ b/src/libs/application/uishell/src/AchievementProxyModel_p.h
@@ -1,9 +1,10 @@
#ifndef UISHELL_ACHIEVEMENTPROXYMODEL_P_H
#define UISHELL_ACHIEVEMENTPROXYMODEL_P_H
-#include
#include
+#include
+
namespace UIShell {
class AchievementProxyModel : public QIdentityProxyModel {
diff --git a/src/libs/application/uishell/src/ActionLayoutsEditorHelper.cpp b/src/libs/application/uishell/src/ActionLayoutsEditorHelper.cpp
index 22fc422a..863d7d13 100644
--- a/src/libs/application/uishell/src/ActionLayoutsEditorHelper.cpp
+++ b/src/libs/application/uishell/src/ActionLayoutsEditorHelper.cpp
@@ -54,10 +54,7 @@ namespace UIShell {
--len;
if (len == 0)
break;
- } else if (s.at(pos) == QLatin1Char('(') && len >= 4 &&
- s.at(pos + 1) == QLatin1Char('&') &&
- s.at(pos + 2) != QLatin1Char('&') &&
- s.at(pos + 3) == QLatin1Char(')')) {
+ } else if (s.at(pos) == QLatin1Char('(') && len >= 4 && s.at(pos + 1) == QLatin1Char('&') && s.at(pos + 2) != QLatin1Char('&') && s.at(pos + 3) == QLatin1Char(')')) {
// a mnemonic with format "\s*(&X)"
int n = 0;
while (idx > n && text.at(idx - n - 1).isSpace())
@@ -66,7 +63,7 @@ namespace UIShell {
pos += 4;
len -= 4;
continue;
- }
+ }
text[idx] = s.at(pos);
++pos;
++idx;
diff --git a/src/libs/application/uishell/src/ActionLayoutsEditorHelper_p.h b/src/libs/application/uishell/src/ActionLayoutsEditorHelper_p.h
index bab17ed9..e93f500f 100644
--- a/src/libs/application/uishell/src/ActionLayoutsEditorHelper_p.h
+++ b/src/libs/application/uishell/src/ActionLayoutsEditorHelper_p.h
@@ -1,9 +1,10 @@
#ifndef UISHELL_ACTIONLAYOUTSEDITORHELPER_P_H
#define UISHELL_ACTIONLAYOUTSEDITORHELPER_P_H
-#include
#include
+#include
+
class QJSValue;
namespace QAK {
diff --git a/src/libs/application/uishell/src/DigitalClockLabel_p.h b/src/libs/application/uishell/src/DigitalClockLabel_p.h
index 786df684..d8f6a409 100644
--- a/src/libs/application/uishell/src/DigitalClockLabel_p.h
+++ b/src/libs/application/uishell/src/DigitalClockLabel_p.h
@@ -1,9 +1,10 @@
#ifndef UISHELL_DIGITALCLOCKLABEL_P_H
#define UISHELL_DIGITALCLOCKLABEL_P_H
-#include
#include
+#include
+
#include
namespace UIShell {
diff --git a/src/libs/application/uishell/src/InvisibleCentralWidget_p.h b/src/libs/application/uishell/src/InvisibleCentralWidget_p.h
index c358e4cb..d0681076 100644
--- a/src/libs/application/uishell/src/InvisibleCentralWidget_p.h
+++ b/src/libs/application/uishell/src/InvisibleCentralWidget_p.h
@@ -1,9 +1,10 @@
#ifndef DIFFSCOPE_UISHELL_INVISIBLECENTRALWIDGET_P_H
#define DIFFSCOPE_UISHELL_INVISIBLECENTRALWIDGET_P_H
+#include
+
#include
#include
-#include
namespace UIShell {
diff --git a/src/libs/application/uishell/src/LyricsSubtreeProxyModel.cpp b/src/libs/application/uishell/src/LyricsSubtreeProxyModel.cpp
index 343138a6..5183e73c 100644
--- a/src/libs/application/uishell/src/LyricsSubtreeProxyModel.cpp
+++ b/src/libs/application/uishell/src/LyricsSubtreeProxyModel.cpp
@@ -1,4 +1,5 @@
#include "LyricsSubtreeProxyModel_p.h"
+
#include
namespace UIShell {
diff --git a/src/libs/application/uishell/src/LyricsSubtreeProxyModel_p.h b/src/libs/application/uishell/src/LyricsSubtreeProxyModel_p.h
index be8f3107..7f722d31 100644
--- a/src/libs/application/uishell/src/LyricsSubtreeProxyModel_p.h
+++ b/src/libs/application/uishell/src/LyricsSubtreeProxyModel_p.h
@@ -2,6 +2,7 @@
#define UISHELL_LYRICSSUBTREEPROXYMODEL_P_H
#include "SubtreeProxyModel_p.h"
+
#include
namespace UIShell {
diff --git a/src/libs/application/uishell/src/PluginManagerHelper.cpp b/src/libs/application/uishell/src/PluginManagerHelper.cpp
index 466d0604..8dc7df72 100644
--- a/src/libs/application/uishell/src/PluginManagerHelper.cpp
+++ b/src/libs/application/uishell/src/PluginManagerHelper.cpp
@@ -5,8 +5,8 @@
#include
-#include
#include
+#include
#include
#include
@@ -106,8 +106,6 @@ namespace UIShell {
return result;
}
-
-
PluginCollectionHelper::PluginCollectionHelper(ExtensionSystem::PluginCollection *pluginCollection, PluginManagerHelper *parent) : QObject(parent), m_pluginCollection(pluginCollection) {
}
@@ -129,8 +127,6 @@ namespace UIShell {
return result;
}
-
-
PluginManagerHelper::PluginManagerHelper(QObject *parent) : QObject(parent) {
}
@@ -138,9 +134,7 @@ namespace UIShell {
QList PluginManagerHelper::pluginCollections() {
QList result;
- std::ranges::transform(ExtensionSystem::PluginManager::pluginCollections(),
- std::back_inserter(result),
- [=, this](auto *p) { return getHelper(p); });
+ std::ranges::transform(ExtensionSystem::PluginManager::pluginCollections(), std::back_inserter(result), [=, this](auto *p) { return getHelper(p); });
return result;
}
PluginSpecHelper *PluginManagerHelper::findPlugin(const QString &name) {
diff --git a/src/libs/application/uishell/src/PluginManagerHelper_p.h b/src/libs/application/uishell/src/PluginManagerHelper_p.h
index b707cdc9..2a37e74f 100644
--- a/src/libs/application/uishell/src/PluginManagerHelper_p.h
+++ b/src/libs/application/uishell/src/PluginManagerHelper_p.h
@@ -1,10 +1,11 @@
#ifndef UISHELL_PLUGINMANAGERHELPER_H
#define UISHELL_PLUGINMANAGERHELPER_H
-#include
-#include
#include
+#include
+#include
+
namespace ExtensionSystem {
class PluginSpec;
class PluginCollection;
diff --git a/src/libs/application/uishell/src/RecentFilesProxyModel.cpp b/src/libs/application/uishell/src/RecentFilesProxyModel.cpp
index 1a0c93cc..88991d09 100644
--- a/src/libs/application/uishell/src/RecentFilesProxyModel.cpp
+++ b/src/libs/application/uishell/src/RecentFilesProxyModel.cpp
@@ -11,7 +11,7 @@ namespace UIShell {
}
RecentFilesProxyModel::~RecentFilesProxyModel() = default;
QHash RecentFilesProxyModel::roleNames() const {
- static const QHash m {
+ static const QHash m{
{USDef::RF_NameRole, "name"},
{USDef::RF_PathRole, "path"},
{USDef::RF_LastModifiedTextRole, "lastModifiedText"},
diff --git a/src/libs/application/uishell/src/RecentFilesProxyModel_p.h b/src/libs/application/uishell/src/RecentFilesProxyModel_p.h
index d71ef1f6..da95dd3b 100644
--- a/src/libs/application/uishell/src/RecentFilesProxyModel_p.h
+++ b/src/libs/application/uishell/src/RecentFilesProxyModel_p.h
@@ -1,9 +1,10 @@
#ifndef UISHELL_RECENTFILESPROXYMODEL_P_H
#define UISHELL_RECENTFILESPROXYMODEL_P_H
-#include
#include
+#include
+
namespace UIShell {
class RecentFilesProxyModel : public QSortFilterProxyModel {
diff --git a/src/libs/application/uishell/src/SettingCatalogModel.cpp b/src/libs/application/uishell/src/SettingCatalogModel.cpp
index deea5d34..f987b310 100644
--- a/src/libs/application/uishell/src/SettingCatalogModel.cpp
+++ b/src/libs/application/uishell/src/SettingCatalogModel.cpp
@@ -1,7 +1,7 @@
#include "SettingCatalogModel_p.h"
-#include
#include
+#include
namespace UIShell {
@@ -108,10 +108,10 @@ namespace UIShell {
}
switch (role) {
- case Qt::DisplayRole:
- return QVariant::fromValue(page);
- default:
- return QVariant();
+ case Qt::DisplayRole:
+ return QVariant::fromValue(page);
+ default:
+ return QVariant();
}
}
@@ -149,7 +149,7 @@ namespace UIShell {
// Find the parent of the added page
Core::ISettingPage *parentPage = page->parentPage();
-
+
if (!parentPage) {
// Top-level page added
auto pages = m_catalog->pages();
@@ -235,7 +235,7 @@ namespace UIShell {
return parentPage->pages().indexOf(page);
}
- static Core::ISettingPage *findPageById(const QList &pages, const QString &id) {
+ static Core::ISettingPage *findPageById(const QList &pages, const QString &id) {
for (Core::ISettingPage *page : pages) {
if (page && page->id() == id) {
return page;
diff --git a/src/libs/application/uishell/src/SettingCatalogModel_p.h b/src/libs/application/uishell/src/SettingCatalogModel_p.h
index ba1f2f82..7a277151 100644
--- a/src/libs/application/uishell/src/SettingCatalogModel_p.h
+++ b/src/libs/application/uishell/src/SettingCatalogModel_p.h
@@ -1,9 +1,10 @@
#ifndef UISHELL_SETTINGCATALOGMODEL_P_H
#define UISHELL_SETTINGCATALOGMODEL_P_H
-#include
#include
+#include
+
namespace Core {
class SettingCatalog;
class ISettingPage;
diff --git a/src/libs/application/uishell/src/SettingCatalogSortFilterProxyModel.cpp b/src/libs/application/uishell/src/SettingCatalogSortFilterProxyModel.cpp
index 21d5f230..e8ab4a81 100644
--- a/src/libs/application/uishell/src/SettingCatalogSortFilterProxyModel.cpp
+++ b/src/libs/application/uishell/src/SettingCatalogSortFilterProxyModel.cpp
@@ -21,10 +21,10 @@ namespace UIShell {
if (m_filterKeyword == keyword) {
return;
}
-
+
m_filterKeyword = keyword;
emit filterKeywordChanged();
-
+
// Trigger filter update
invalidateFilter();
}
@@ -38,17 +38,17 @@ namespace UIShell {
if (m_filterKeyword.isEmpty()) {
return true;
}
-
+
QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
if (!index.isValid()) {
return false;
}
-
+
Core::ISettingPage *page = pageForIndex(index);
if (!page) {
return false;
}
-
+
// Use ISettingPage::matches() to check if the page matches the filter keyword
return page->matches(m_filterKeyword);
}
@@ -57,22 +57,22 @@ namespace UIShell {
if (!index.isValid()) {
return nullptr;
}
-
+
// Get the page from the model data
QVariant data = sourceModel()->data(index, Qt::DisplayRole);
if (!data.isValid()) {
return nullptr;
}
-
+
// The SettingCatalogModel returns ISettingPage* as QVariant
- return data.value();
+ return data.value();
}
QModelIndex SettingCatalogSortFilterProxyModel::findFirstMatch() const {
if (!sourceModel()) {
return {};
}
-
+
// Start depth-first search from the root
return findFirstMatchRecursive(QModelIndex());
}
@@ -81,29 +81,29 @@ namespace UIShell {
if (!sourceModel()) {
return {};
}
-
+
int rowCount = sourceModel()->rowCount(parent);
-
+
for (int row = 0; row < rowCount; ++row) {
QModelIndex sourceIndex = sourceModel()->index(row, 0, parent);
if (!sourceIndex.isValid()) {
continue;
}
-
+
// Check if current item matches
Core::ISettingPage *page = pageForIndex(sourceIndex);
if (filterKeyword().isEmpty() || (page && page->matches(m_filterKeyword))) {
// Map from source model index to proxy model index
return mapFromSource(sourceIndex);
}
-
+
// Recursively search children (depth-first)
QModelIndex childMatch = findFirstMatchRecursive(sourceIndex);
if (childMatch.isValid()) {
return childMatch;
}
}
-
+
return {};
}
diff --git a/src/libs/application/uishell/src/SettingCatalogSortFilterProxyModel_p.h b/src/libs/application/uishell/src/SettingCatalogSortFilterProxyModel_p.h
index 89044ed2..5dc69f6d 100644
--- a/src/libs/application/uishell/src/SettingCatalogSortFilterProxyModel_p.h
+++ b/src/libs/application/uishell/src/SettingCatalogSortFilterProxyModel_p.h
@@ -1,9 +1,10 @@
#ifndef UISHELL_SETTINGCATALOGSORTFILTERPROXYMODEL_P_H
#define UISHELL_SETTINGCATALOGSORTFILTERPROXYMODEL_P_H
-#include
#include
+#include
+
namespace Core {
class ISettingPage;
}
@@ -36,7 +37,7 @@ namespace UIShell {
private:
Core::ISettingPage *pageForIndex(const QModelIndex &index) const;
QModelIndex findFirstMatchRecursive(const QModelIndex &parent) const;
-
+
QString m_filterKeyword;
};
diff --git a/src/libs/application/uishell/src/SettingPageWidgetDialog.cpp b/src/libs/application/uishell/src/SettingPageWidgetDialog.cpp
index 73fe89dd..0f370614 100644
--- a/src/libs/application/uishell/src/SettingPageWidgetDialog.cpp
+++ b/src/libs/application/uishell/src/SettingPageWidgetDialog.cpp
@@ -30,5 +30,4 @@ namespace UIShell {
emit widgetChanged();
}
-
}
diff --git a/src/libs/application/uishell/src/SettingPageWidgetDialog_p.h b/src/libs/application/uishell/src/SettingPageWidgetDialog_p.h
index 39be74be..5dbc51f3 100644
--- a/src/libs/application/uishell/src/SettingPageWidgetDialog_p.h
+++ b/src/libs/application/uishell/src/SettingPageWidgetDialog_p.h
@@ -1,9 +1,10 @@
#ifndef UISHELL_SETTINGPAGEWIDGETDIALOG_P_H
#define UISHELL_SETTINGPAGEWIDGETDIALOG_P_H
+#include
+
#include
#include
-#include
namespace UIShell {
@@ -28,7 +29,6 @@ namespace UIShell {
private:
QWidget *m_widget{};
-
};
}
diff --git a/src/libs/application/uishell/src/SubtreeProxyModel.cpp b/src/libs/application/uishell/src/SubtreeProxyModel.cpp
index fb620c28..5de7782e 100644
--- a/src/libs/application/uishell/src/SubtreeProxyModel.cpp
+++ b/src/libs/application/uishell/src/SubtreeProxyModel.cpp
@@ -46,7 +46,7 @@ namespace UIShell {
QList pathFromRoot;
QModelIndex sourceParent = m_rootIndex;
if (parent.isValid()) {
- SubtreeProxyItemData *parentData = static_cast(parent.internalPointer());
+ SubtreeProxyItemData *parentData = static_cast(parent.internalPointer());
if (parentData) {
pathFromRoot = parentData->pathFromRoot;
pathFromRoot.append(parent.row());
@@ -73,7 +73,7 @@ namespace UIShell {
if (!sourceModel() || !child.isValid() || !m_rootIndex.isValid()) {
return QModelIndex();
}
- SubtreeProxyItemData *itemData = static_cast(child.internalPointer());
+ SubtreeProxyItemData *itemData = static_cast(child.internalPointer());
if (!itemData || itemData->pathFromRoot.isEmpty()) {
return QModelIndex();
}
@@ -163,18 +163,12 @@ namespace UIShell {
}
QAbstractProxyModel::setSourceModel(sourceModel);
if (sourceModel) {
- connect(sourceModel, &QAbstractItemModel::dataChanged,
- this, &SubtreeProxyModel::sourceDataChanged);
- connect(sourceModel, &QAbstractItemModel::rowsAboutToBeInserted,
- this, &SubtreeProxyModel::sourceRowsAboutToBeInserted);
- connect(sourceModel, &QAbstractItemModel::rowsInserted,
- this, &SubtreeProxyModel::sourceRowsInserted);
- connect(sourceModel, &QAbstractItemModel::rowsAboutToBeRemoved,
- this, &SubtreeProxyModel::sourceRowsAboutToBeRemoved);
- connect(sourceModel, &QAbstractItemModel::rowsRemoved,
- this, &SubtreeProxyModel::sourceRowsRemoved);
- connect(sourceModel, &QAbstractItemModel::modelReset,
- this, &SubtreeProxyModel::sourceModelReset);
+ connect(sourceModel, &QAbstractItemModel::dataChanged, this, &SubtreeProxyModel::sourceDataChanged);
+ connect(sourceModel, &QAbstractItemModel::rowsAboutToBeInserted, this, &SubtreeProxyModel::sourceRowsAboutToBeInserted);
+ connect(sourceModel, &QAbstractItemModel::rowsInserted, this, &SubtreeProxyModel::sourceRowsInserted);
+ connect(sourceModel, &QAbstractItemModel::rowsAboutToBeRemoved, this, &SubtreeProxyModel::sourceRowsAboutToBeRemoved);
+ connect(sourceModel, &QAbstractItemModel::rowsRemoved, this, &SubtreeProxyModel::sourceRowsRemoved);
+ connect(sourceModel, &QAbstractItemModel::modelReset, this, &SubtreeProxyModel::sourceModelReset);
}
beginResetModel();
endResetModel();
@@ -281,7 +275,7 @@ namespace UIShell {
if (!proxyIndex.isValid() || !m_rootIndex.isValid()) {
return QModelIndex();
}
- SubtreeProxyItemData *itemData = static_cast(proxyIndex.internalPointer());
+ SubtreeProxyItemData *itemData = static_cast(proxyIndex.internalPointer());
if (!itemData) {
return QModelIndex();
}
diff --git a/src/libs/application/uishell/src/UIShellGlobal.h b/src/libs/application/uishell/src/UIShellGlobal.h
index bc6ad25c..f3c5ce6a 100644
--- a/src/libs/application/uishell/src/UIShellGlobal.h
+++ b/src/libs/application/uishell/src/UIShellGlobal.h
@@ -4,9 +4,9 @@
#include
#if defined(UISHELL_LIBRARY)
-# define UISHELL_EXPORT Q_DECL_EXPORT
+# define UISHELL_EXPORT Q_DECL_EXPORT
#else
-# define UISHELL_EXPORT Q_DECL_IMPORT
+# define UISHELL_EXPORT Q_DECL_IMPORT
#endif
#endif //DIFFSCOPE_UISHELL_UISHELLGLOBAL_H
diff --git a/src/libs/application/uishell/src/USDef_p.h b/src/libs/application/uishell/src/USDef_p.h
index b45829ad..2f8104c1 100644
--- a/src/libs/application/uishell/src/USDef_p.h
+++ b/src/libs/application/uishell/src/USDef_p.h
@@ -1,10 +1,11 @@
#ifndef UISHELL_USDEF_P_H
#define UISHELL_USDEF_P_H
-#include
+#include
#include
-#include
+
+#include
namespace UIShell {
diff --git a/src/libs/application/uishell/src/WindowAgentForeign_p.h b/src/libs/application/uishell/src/WindowAgentForeign_p.h
index 8cbf26e5..74d236da 100644
--- a/src/libs/application/uishell/src/WindowAgentForeign_p.h
+++ b/src/libs/application/uishell/src/WindowAgentForeign_p.h
@@ -1,9 +1,10 @@
#ifndef UISHELL_WINDOWAGENTFOREIGN_P_H
#define UISHELL_WINDOWAGENTFOREIGN_P_H
-#include
#include
+#include
+
#include
namespace UIShell {
diff --git a/src/plugins/achievement/internal/achievementplugin.cpp b/src/plugins/achievement/internal/achievementplugin.cpp
index 3e225239..f5f54089 100644
--- a/src/plugins/achievement/internal/achievementplugin.cpp
+++ b/src/plugins/achievement/internal/achievementplugin.cpp
@@ -2,13 +2,13 @@
#include
-#include
-
#include
#include
#include
+#include
+
#include
#include
#include
@@ -43,11 +43,11 @@ namespace Achievement {
if (component.isError()) {
qFatal() << component.errorString();
}
- auto o = component.createWithInitialProperties({
- {"models", QVariant::fromValue(Core::RuntimeInterface::instance()->getObjects("org.diffscope.achievements"))},
- {"settings", QVariant::fromValue(Core::RuntimeInterface::settings())},
- {"settingCategory", "org.diffscope.achievements"}
- });
+ auto o = component.createWithInitialProperties(
+ {{"models", QVariant::fromValue(Core::RuntimeInterface::instance()->getObjects("org.diffscope.achievements"))},
+ {"settings", QVariant::fromValue(Core::RuntimeInterface::settings())},
+ {"settingCategory", "org.diffscope.achievements"}}
+ );
o->setParent(this);
AchievementAddOn::setWindow(qobject_cast(o));
}
diff --git a/src/plugins/achievement/internal/achievementplugin.h b/src/plugins/achievement/internal/achievementplugin.h
index 547d9c83..3000574e 100644
--- a/src/plugins/achievement/internal/achievementplugin.h
+++ b/src/plugins/achievement/internal/achievementplugin.h
@@ -15,7 +15,6 @@ namespace Achievement {
bool initialize(const QStringList &arguments, QString *errorMessage) override;
void extensionsInitialized() override;
bool delayedInitialize() override;
-
};
}
diff --git a/src/plugins/achievement/internal/addons/achievementaddon.cpp b/src/plugins/achievement/internal/addons/achievementaddon.cpp
index 43f98303..ab9028a7 100644
--- a/src/plugins/achievement/internal/addons/achievementaddon.cpp
+++ b/src/plugins/achievement/internal/addons/achievementaddon.cpp
@@ -27,9 +27,7 @@ namespace Achievement {
if (component.isError()) {
qFatal() << component.errorString();
}
- auto o = component.createWithInitialProperties({
- {"addOn", QVariant::fromValue(this)}
- });
+ auto o = component.createWithInitialProperties({{"addOn", QVariant::fromValue(this)}});
o->setParent(this);
QMetaObject::invokeMethod(o, "registerToContext", windowInterface->actionContext());
}
diff --git a/src/plugins/achievement/internal/addons/achievementaddon.h b/src/plugins/achievement/internal/addons/achievementaddon.h
index e3321507..67384762 100644
--- a/src/plugins/achievement/internal/addons/achievementaddon.h
+++ b/src/plugins/achievement/internal/addons/achievementaddon.h
@@ -1,11 +1,12 @@
#ifndef DIFFSCOPE_ACHIEVEMENT_ACHIEVEMENTADDON_H
#define DIFFSCOPE_ACHIEVEMENT_ACHIEVEMENTADDON_H
-#include
#include
#include
+#include
+
namespace Achievement {
class AchievementAddOn : public Core::WindowInterfaceAddOn {
@@ -13,7 +14,7 @@ namespace Achievement {
QML_ELEMENT
QML_UNCREATABLE("")
Q_PROPERTY(QQuickWindow *window READ window CONSTANT)
- public:
+ public:
explicit AchievementAddOn(QObject *parent = nullptr);
~AchievementAddOn() override;
diff --git a/src/plugins/audio/internal/audioplugin.cpp b/src/plugins/audio/internal/audioplugin.cpp
index 006030fd..ba18a118 100644
--- a/src/plugins/audio/internal/audioplugin.cpp
+++ b/src/plugins/audio/internal/audioplugin.cpp
@@ -1,10 +1,8 @@
#include "audioplugin.h"
#include
-#include
#include
-
-#include
+#include
#include
#include
@@ -12,12 +10,14 @@
#include
+#include
+
#include
-#include
"
"This application is distributed "
"AS IS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or "
- "implied.
")
+ "implied."
+ )
.arg(QStringLiteral("apache.org/licenses"));
@@ -175,11 +177,11 @@ namespace Core {
"Build date: %3
"
"Toolchain: %4 %5 %6"
"")
- .arg(QStringLiteral(APPLICATION_GIT_BRANCH), //
+ .arg(QStringLiteral(APPLICATION_GIT_BRANCH), //
QStringLiteral(APPLICATION_GIT_LAST_COMMIT_HASH), //
- QLocale().toString(QDateTime::fromString(QStringLiteral(APPLICATION_BUILD_TIME), Qt::ISODate).toLocalTime()), //
- QStringLiteral(APPLICATION_COMPILER_ARCH), //
- QStringLiteral(APPLICATION_COMPILER_ID), //
+ QLocale().toString(QDateTime::fromString(QStringLiteral(APPLICATION_BUILD_TIME), Qt::ISODate).toLocalTime()), //
+ QStringLiteral(APPLICATION_COMPILER_ARCH), //
+ QStringLiteral(APPLICATION_COMPILER_ID), //
QStringLiteral(APPLICATION_COMPILER_VERSION));
QQmlComponent component(RuntimeInterface::qmlEngine(), "SVSCraft.UIComponents", "MessageBoxDialog");
@@ -187,14 +189,7 @@ namespace Core {
icon.setSource(QUrl("image://appicon/app"));
icon.setWidth(64);
icon.setHeight(64);
- QScopedPointer mb(qobject_cast(component.createWithInitialProperties({
- {"title", tr("About %1").arg(appName)},
- {"textFormat", Qt::RichText },
- {"text", appName.toHtmlEscaped() },
- {"informativeText", aboutInfo + licenseInfo + buildInfo},
- {"width", 480},
- {"icon", QVariant::fromValue(icon)}
- })));
+ QScopedPointer mb(qobject_cast(component.createWithInitialProperties({{"title", tr("About %1").arg(appName)}, {"textFormat", Qt::RichText}, {"text", appName.toHtmlEscaped()}, {"informativeText", aboutInfo + licenseInfo + buildInfo}, {"width", 480}, {"icon", QVariant::fromValue(icon)}})));
Q_ASSERT(mb);
mb->setTransientParent(parent);
mb->show();
@@ -256,11 +251,11 @@ namespace Core {
settings->endGroup();
auto path = QFileDialog::getOpenFileName(
- nullptr,
- {},
- defaultOpenDir,
- CoreInterface::dspxFileFilter(true)
- );
+ nullptr,
+ {},
+ defaultOpenDir,
+ CoreInterface::dspxFileFilter(true)
+ );
if (path.isEmpty())
return {};
@@ -284,7 +279,6 @@ namespace Core {
}
return QObject::eventFilter(watched, event);
}
-
};
auto listener = new ExposedListener(win);
win->installEventFilter(listener);
@@ -359,8 +353,7 @@ namespace Core {
d.init();
}
-
}
-#include "moc_coreinterface.cpp"
#include "coreinterface.moc"
+#include "moc_coreinterface.cpp"
diff --git a/src/plugins/coreplugin/core/coreinterface.h b/src/plugins/coreplugin/core/coreinterface.h
index a33cbe94..5c30f673 100644
--- a/src/plugins/coreplugin/core/coreinterface.h
+++ b/src/plugins/coreplugin/core/coreinterface.h
@@ -1,9 +1,10 @@
#ifndef DIFFSCOPE_COREPLUGIN_COREINTERFACE_H
#define DIFFSCOPE_COREPLUGIN_COREINTERFACE_H
+#include
+
#include
#include
-#include
#include
diff --git a/src/plugins/coreplugin/core/notificationmessage.h b/src/plugins/coreplugin/core/notificationmessage.h
index 05518c37..24f5ede4 100644
--- a/src/plugins/coreplugin/core/notificationmessage.h
+++ b/src/plugins/coreplugin/core/notificationmessage.h
@@ -1,9 +1,10 @@
#ifndef DIFFSCOPE_COREPLUGIN_NOTIFICATIONMESSAGE_H
#define DIFFSCOPE_COREPLUGIN_NOTIFICATIONMESSAGE_H
-#include
#include
+#include
+
#include
#include
@@ -91,7 +92,6 @@ namespace Core {
private:
QScopedPointer d_ptr;
-
};
}
diff --git a/src/plugins/coreplugin/core/quickinput.cpp b/src/plugins/coreplugin/core/quickinput.cpp
index 111c2c0f..1a5d9f60 100644
--- a/src/plugins/coreplugin/core/quickinput.cpp
+++ b/src/plugins/coreplugin/core/quickinput.cpp
@@ -2,8 +2,8 @@
#include "quickinput_p.h"
#include
-#include
#include
+#include
#include
#include
@@ -121,10 +121,10 @@ namespace Core {
QMetaObject::invokeMethod(d->inputPalette, "close");
d->clearInputPalette();
}
-
+
d->windowHandle = windowHandle;
Q_EMIT windowHandleChanged(windowHandle);
-
+
// If should be visible, open in new window
if (d->visible && windowHandle) {
show();
@@ -150,14 +150,14 @@ namespace Core {
void QuickInput::show() {
Q_D(QuickInput);
-
+
// Check windowHandle
if (!d->windowHandle) {
Q_EMIT rejected();
Q_EMIT finished(QVariant());
return;
}
-
+
// Get window object
QWindow *window = d->windowHandle->window();
if (!window) {
@@ -165,7 +165,7 @@ namespace Core {
Q_EMIT finished(QVariant());
return;
}
-
+
// Get InputPalette object
QObject *inputPalette = window->property("inputPalette").value();
if (!inputPalette) {
@@ -173,30 +173,30 @@ namespace Core {
Q_EMIT finished(QVariant());
return;
}
-
+
// If InputPalette is already open, close it first
bool isVisible = inputPalette->property("visible").toBool();
if (isVisible) {
QMetaObject::invokeMethod(inputPalette, "close");
}
-
+
// Clean up old connections
d->clearInputPalette();
-
+
// Set new InputPalette
d->inputPalette = inputPalette;
d->connectInputPalette();
d->syncToInputPalette();
-
+
// Listen for windowHandle destroyed signal
connect(d->windowHandle, &QObject::destroyed, this, &QuickInput::handleWindowHandleDestroyed, Qt::UniqueConnection);
-
+
// Set visible state
if (!d->visible) {
d->visible = true;
Q_EMIT visibleChanged(true);
}
-
+
// Delay opening InputPalette
QTimer::singleShot(0, [inputPalette]() {
QMetaObject::invokeMethod(inputPalette, "open");
@@ -245,29 +245,32 @@ namespace Core {
void QuickInputPrivate::connectInputPalette() {
Q_Q(QuickInput);
- if (!inputPalette) return;
-
+ if (!inputPalette)
+ return;
+
// Connect InputPalette signals
q->connect(inputPalette, SIGNAL(accepted()), q, SIGNAL(accepted()));
q->connect(inputPalette, SIGNAL(rejected()), q, SLOT(reject()));
q->connect(inputPalette, SIGNAL(finished(QVariant)), q, SLOT(done(QVariant)));
q->connect(inputPalette, SIGNAL(attemptingAcceptButFailed()), q, SIGNAL(attemptingAcceptButFailed()));
-
+
// Connect property change signals for bidirectional sync
q->connect(inputPalette, SIGNAL(textChanged()), q, SLOT(updateFromInputPalette()));
}
void QuickInputPrivate::disconnectInputPalette() {
Q_Q(QuickInput);
- if (!inputPalette) return;
-
+ if (!inputPalette)
+ return;
+
// Disconnect all connections
QObject::disconnect(inputPalette, nullptr, q, nullptr);
}
void QuickInputPrivate::syncToInputPalette() {
- if (!inputPalette) return;
-
+ if (!inputPalette)
+ return;
+
// Sync properties to InputPalette
inputPalette->setProperty("placeholderText", placeholderText);
inputPalette->setProperty("promptText", promptText);
@@ -285,8 +288,9 @@ namespace Core {
void QuickInput::updateFromInputPalette() {
Q_D(QuickInput);
- if (!d->inputPalette) return;
-
+ if (!d->inputPalette)
+ return;
+
// Read properties from InputPalette and update, avoiding circular updates
QString newText = d->inputPalette->property("text").toString();
if (d->text != newText) {
diff --git a/src/plugins/coreplugin/core/quickinput.h b/src/plugins/coreplugin/core/quickinput.h
index 9a57df18..59895e8d 100644
--- a/src/plugins/coreplugin/core/quickinput.h
+++ b/src/plugins/coreplugin/core/quickinput.h
@@ -1,9 +1,10 @@
#ifndef DIFFSCOPE_COREPLUGIN_QUICKINPUT_H
#define DIFFSCOPE_COREPLUGIN_QUICKINPUT_H
+#include
+
#include
#include
-#include
#include
diff --git a/src/plugins/coreplugin/core/quickinput_p.h b/src/plugins/coreplugin/core/quickinput_p.h
index a0d696d4..8792a09e 100644
--- a/src/plugins/coreplugin/core/quickinput_p.h
+++ b/src/plugins/coreplugin/core/quickinput_p.h
@@ -1,12 +1,12 @@
#ifndef DIFFSCOPE_COREPLUGIN_QUICKINPUT_P_H
#define DIFFSCOPE_COREPLUGIN_QUICKINPUT_P_H
-#include
-
#include
#include
+#include
+
namespace Core {
class QuickInputPrivate {
@@ -21,7 +21,7 @@ namespace Core {
QPointer windowHandle;
bool visible{false};
QPointer inputPalette;
-
+
void connectInputPalette();
void disconnectInputPalette();
void syncToInputPalette();
diff --git a/src/plugins/coreplugin/core/quickpick.cpp b/src/plugins/coreplugin/core/quickpick.cpp
index 4eb4dccf..00832175 100644
--- a/src/plugins/coreplugin/core/quickpick.cpp
+++ b/src/plugins/coreplugin/core/quickpick.cpp
@@ -1,10 +1,10 @@
#include "quickpick.h"
#include "quickpick_p.h"
+#include
#include
-#include
#include
-#include
+#include
namespace Core {
@@ -102,10 +102,10 @@ namespace Core {
QMetaObject::invokeMethod(d->commandPalette, "close");
d->clearCommandPalette();
}
-
+
d->windowHandle = windowHandle;
Q_EMIT windowHandleChanged(windowHandle);
-
+
// If should be visible, open in new window
if (d->visible && windowHandle) {
show();
@@ -131,14 +131,14 @@ namespace Core {
void QuickPick::show() {
Q_D(QuickPick);
-
+
// Check windowHandle
if (!d->windowHandle) {
Q_EMIT rejected();
Q_EMIT finished(-1);
return;
}
-
+
// Get window object
QWindow *window = d->windowHandle->window();
if (!window) {
@@ -146,7 +146,7 @@ namespace Core {
Q_EMIT finished(-1);
return;
}
-
+
// Get CommandPalette object
QObject *commandPalette = window->property("commandPalette").value();
if (!commandPalette) {
@@ -154,30 +154,30 @@ namespace Core {
Q_EMIT finished(-1);
return;
}
-
+
// If CommandPalette is already open, close it first
bool isVisible = commandPalette->property("visible").toBool();
if (isVisible) {
QMetaObject::invokeMethod(commandPalette, "close");
}
-
+
// Clean up old connections
d->clearCommandPalette();
-
+
// Set new CommandPalette
d->commandPalette = commandPalette;
d->connectCommandPalette();
d->syncToCommandPalette();
-
+
// Listen for windowHandle destroyed signal
connect(d->windowHandle, &QObject::destroyed, this, &QuickPick::handleWindowHandleDestroyed, Qt::UniqueConnection);
-
+
// Set visible state
if (!d->visible) {
d->visible = true;
Q_EMIT visibleChanged(true);
}
-
+
// Delay opening CommandPalette
QTimer::singleShot(0, [commandPalette]() {
QMetaObject::invokeMethod(commandPalette, "open");
@@ -221,13 +221,14 @@ namespace Core {
void QuickPickPrivate::connectCommandPalette() {
Q_Q(QuickPick);
- if (!commandPalette) return;
-
+ if (!commandPalette)
+ return;
+
// Connect CommandPalette signals
q->connect(commandPalette, SIGNAL(accepted()), q, SIGNAL(accepted()));
q->connect(commandPalette, SIGNAL(rejected()), q, SLOT(reject()));
q->connect(commandPalette, SIGNAL(finished(int)), q, SLOT(done(int)));
-
+
// Connect property change signals for bidirectional sync
q->connect(commandPalette, SIGNAL(filterTextChanged()), q, SLOT(updateFromCommandPalette()));
q->connect(commandPalette, SIGNAL(currentIndexChanged()), q, SLOT(updateFromCommandPalette()));
@@ -235,14 +236,16 @@ namespace Core {
void QuickPickPrivate::disconnectCommandPalette() {
Q_Q(QuickPick);
- if (!commandPalette) return;
-
+ if (!commandPalette)
+ return;
+
// Disconnect all connections
QObject::disconnect(commandPalette, nullptr, q, nullptr);
}
void QuickPickPrivate::syncToCommandPalette() {
- if (!commandPalette) return;
+ if (!commandPalette)
+ return;
// Sync properties to CommandPalette
commandPalette->setProperty("model", QVariant::fromValue(model));
commandPalette->setProperty("filterText", filterText);
diff --git a/src/plugins/coreplugin/core/quickpick.h b/src/plugins/coreplugin/core/quickpick.h
index b53d0e67..2536bea3 100644
--- a/src/plugins/coreplugin/core/quickpick.h
+++ b/src/plugins/coreplugin/core/quickpick.h
@@ -1,9 +1,10 @@
#ifndef DIFFSCOPE_COREPLUGIN_QUICKPICK_H
#define DIFFSCOPE_COREPLUGIN_QUICKPICK_H
-#include
#include
+#include
+
#include
class QAbstractItemModel;
diff --git a/src/plugins/coreplugin/core/quickpick_p.h b/src/plugins/coreplugin/core/quickpick_p.h
index 27563df0..73c56df5 100644
--- a/src/plugins/coreplugin/core/quickpick_p.h
+++ b/src/plugins/coreplugin/core/quickpick_p.h
@@ -1,12 +1,12 @@
#ifndef DIFFSCOPE_COREPLUGIN_QUICKPICK_P_H
#define DIFFSCOPE_COREPLUGIN_QUICKPICK_P_H
-#include
-
#include
#include
+#include
+
namespace Core {
class QuickPickPrivate {
@@ -20,7 +20,7 @@ namespace Core {
QPointer windowHandle;
bool visible{false};
QPointer commandPalette;
-
+
void connectCommandPalette();
void disconnectCommandPalette();
void syncToCommandPalette();
diff --git a/src/plugins/coreplugin/coreglobal.h b/src/plugins/coreplugin/coreglobal.h
index 33752012..4bd88629 100644
--- a/src/plugins/coreplugin/coreglobal.h
+++ b/src/plugins/coreplugin/coreglobal.h
@@ -4,9 +4,9 @@
#include
#if defined(CORE_LIBRARY)
-# define CORE_EXPORT Q_DECL_EXPORT
+# define CORE_EXPORT Q_DECL_EXPORT
#else
-# define CORE_EXPORT Q_DECL_IMPORT
+# define CORE_EXPORT Q_DECL_IMPORT
#endif
#endif // DIFFSCOPE_COREPLUGIN_COREGLOBAL_H
diff --git a/src/plugins/coreplugin/internal/actions/actionhelper.cpp b/src/plugins/coreplugin/internal/actions/actionhelper.cpp
index b0165b6d..5c7caf97 100644
--- a/src/plugins/coreplugin/internal/actions/actionhelper.cpp
+++ b/src/plugins/coreplugin/internal/actions/actionhelper.cpp
@@ -2,8 +2,9 @@
#include
-#include
#include
+#include
+
#include
#include
@@ -12,8 +13,7 @@ namespace Core::Internal {
Q_STATIC_LOGGING_CATEGORY(lcActionHelper, "diffscope.core.actionhelper")
- bool ActionHelper::triggerAction(const QAK::QuickActionContext *actionContext,
- const QString &id, QObject *source) {
+ bool ActionHelper::triggerAction(const QAK::QuickActionContext *actionContext, const QString &id, QObject *source) {
qCInfo(lcActionHelper) << "Triggering action" << id;
std::unique_ptr> action(createActionObject(actionContext, id, true));
if (!action) {
diff --git a/src/plugins/coreplugin/internal/actions/findactionsmodel.cpp b/src/plugins/coreplugin/internal/actions/findactionsmodel.cpp
index 0b16e914..10990d79 100644
--- a/src/plugins/coreplugin/internal/actions/findactionsmodel.cpp
+++ b/src/plugins/coreplugin/internal/actions/findactionsmodel.cpp
@@ -111,10 +111,7 @@ namespace Core::Internal {
--len;
if (len == 0)
break;
- } else if (s.at(pos) == QLatin1Char('(') && len >= 4 &&
- s.at(pos + 1) == QLatin1Char('&') &&
- s.at(pos + 2) != QLatin1Char('&') &&
- s.at(pos + 3) == QLatin1Char(')')) {
+ } else if (s.at(pos) == QLatin1Char('(') && len >= 4 && s.at(pos + 1) == QLatin1Char('&') && s.at(pos + 2) != QLatin1Char('&') && s.at(pos + 3) == QLatin1Char(')')) {
// a mnemonic with format "\s*(&X)"
int n = 0;
while (idx > n && text.at(idx - n - 1).isSpace())
@@ -185,9 +182,9 @@ namespace Core::Internal {
void FindActionsModel::setActions(const QStringList &actions) {
auto v = actions | std::views::filter([](const QString &id) {
- auto info = CoreInterface::actionRegistry()->actionInfo(id);
- return !info.attributes().contains(QAK::ActionAttributeKey("excludeFromCommands", "http://schemas.diffscope.org/diffscope/actions/diffscope"));
- });
+ auto info = CoreInterface::actionRegistry()->actionInfo(id);
+ return !info.attributes().contains(QAK::ActionAttributeKey("excludeFromCommands", "http://schemas.diffscope.org/diffscope/actions/diffscope"));
+ });
m_actions = QStringList(v.begin(), v.end());
}
@@ -204,7 +201,6 @@ namespace Core::Internal {
m_actionList.clear();
-
// Add remaining actions, excluding those already in priority list
QStringList remainingActions;
for (const QString &actionId : m_actions) {
@@ -216,7 +212,6 @@ namespace Core::Internal {
// Sort remaining actions using local collator
std::sort(remainingActions.begin(), remainingActions.end(), [this](const QString &a, const QString &b) { return m_collator.compare(a, b) < 0; });
-
auto pipeline = std::views::transform([=](const QString &id) -> QPair {
// TODO avoid creating action object on each time updating action list
auto actionObject = getActionObject(id);
@@ -252,4 +247,4 @@ namespace Core::Internal {
}
}
-}
\ No newline at end of file
+}
diff --git a/src/plugins/coreplugin/internal/addon/editactionsaddon.cpp b/src/plugins/coreplugin/internal/addon/editactionsaddon.cpp
index c8ed45a6..9ac9c4b6 100644
--- a/src/plugins/coreplugin/internal/addon/editactionsaddon.cpp
+++ b/src/plugins/coreplugin/internal/addon/editactionsaddon.cpp
@@ -2,13 +2,14 @@
#include
-#include
-
#include
+#include
+
#include
namespace Core::Internal {
+
EditActionsAddOn::EditActionsAddOn(QObject *parent) : WindowInterfaceAddOn(parent) {
}
@@ -33,4 +34,5 @@ namespace Core::Internal {
bool EditActionsAddOn::delayedInitialize() {
return WindowInterfaceAddOn::delayedInitialize();
}
+
}
diff --git a/src/plugins/coreplugin/internal/addon/findactionsaddon.cpp b/src/plugins/coreplugin/internal/addon/findactionsaddon.cpp
index e010b94d..d206ec28 100644
--- a/src/plugins/coreplugin/internal/addon/findactionsaddon.cpp
+++ b/src/plugins/coreplugin/internal/addon/findactionsaddon.cpp
@@ -1,17 +1,17 @@
#include "findactionsaddon.h"
-#include
+#include
#include
+#include
#include
-#include
-
-#include
#include
+#include
+
#include
-#include
#include
+#include
namespace Core::Internal {
diff --git a/src/plugins/coreplugin/internal/addon/metadataaddon.cpp b/src/plugins/coreplugin/internal/addon/metadataaddon.cpp
index b1538cd0..661274c1 100644
--- a/src/plugins/coreplugin/internal/addon/metadataaddon.cpp
+++ b/src/plugins/coreplugin/internal/addon/metadataaddon.cpp
@@ -3,10 +3,10 @@
#include
#include
-#include
-
#include
+#include
+
#include
#include
@@ -18,15 +18,16 @@ namespace Core::Internal {
void MetadataAddOn::initialize() {
auto windowInterface = windowHandle()->cast();
-
+
// Create MetadataPanel component and add it to action context
QQmlComponent component(RuntimeInterface::qmlEngine(), "DiffScope.Core", "MetadataPanel", this);
if (component.isError()) {
qFatal() << component.errorString();
}
auto o = component.createWithInitialProperties({
- {"addOn", QVariant::fromValue(this)},
- }, RuntimeInterface::qmlEngine()->rootContext());
+ {"addOn", QVariant::fromValue(this)},
+ },
+ RuntimeInterface::qmlEngine()->rootContext());
o->setParent(this);
windowInterface->actionContext()->addAction("core.panel.metadata", o->property("metadataPanelComponent").value());
}
@@ -39,4 +40,4 @@ namespace Core::Internal {
}
}
-#include "moc_metadataaddon.cpp"
\ No newline at end of file
+#include "moc_metadataaddon.cpp"
diff --git a/src/plugins/coreplugin/internal/addon/metadataaddon.h b/src/plugins/coreplugin/internal/addon/metadataaddon.h
index 06487b9b..17f38423 100644
--- a/src/plugins/coreplugin/internal/addon/metadataaddon.h
+++ b/src/plugins/coreplugin/internal/addon/metadataaddon.h
@@ -18,4 +18,4 @@ namespace Core::Internal {
}
-#endif //DIFFSCOPE_COREPLUGIN_METADATAADDON_H
\ No newline at end of file
+#endif //DIFFSCOPE_COREPLUGIN_METADATAADDON_H
diff --git a/src/plugins/coreplugin/internal/addon/notificationaddon.cpp b/src/plugins/coreplugin/internal/addon/notificationaddon.cpp
index 0a273691..44e60f1f 100644
--- a/src/plugins/coreplugin/internal/addon/notificationaddon.cpp
+++ b/src/plugins/coreplugin/internal/addon/notificationaddon.cpp
@@ -4,11 +4,11 @@
#include
#include
-#include
+#include
#include
-#include
+#include
#include
#include
@@ -26,9 +26,7 @@ namespace Core::Internal {
if (component.isError()) {
qFatal() << component.errorString();
}
- auto helper = component.createWithInitialProperties({
- {"addOn", QVariant::fromValue(this)}
- });
+ auto helper = component.createWithInitialProperties({{"addOn", QVariant::fromValue(this)}});
helper->setParent(windowInterface->window());
}
{
@@ -37,8 +35,9 @@ namespace Core::Internal {
qFatal() << component.errorString();
}
auto o = component.createWithInitialProperties({
- {"addOn", QVariant::fromValue(this)},
- }, RuntimeInterface::qmlEngine()->rootContext());
+ {"addOn", QVariant::fromValue(this)},
+ },
+ RuntimeInterface::qmlEngine()->rootContext());
o->setParent(this);
windowInterface->actionContext()->addAction("core.panel.notifications", o->property("notificationsPanelComponent").value());
}
diff --git a/src/plugins/coreplugin/internal/addon/projectstartuptimeraddon.cpp b/src/plugins/coreplugin/internal/addon/projectstartuptimeraddon.cpp
index 336022ba..7d34f06d 100644
--- a/src/plugins/coreplugin/internal/addon/projectstartuptimeraddon.cpp
+++ b/src/plugins/coreplugin/internal/addon/projectstartuptimeraddon.cpp
@@ -4,18 +4,18 @@
#include
#include
#include
-#include
#include
#include
-
-#include
+#include
#include
+#include
+
#include
-#include
-#include
#include
+#include
+#include
namespace Core::Internal {
@@ -29,9 +29,9 @@ namespace Core::Internal {
}
});
}
-
+
ProjectStartupTimerAddOn::~ProjectStartupTimerAddOn() = default;
-
+
void ProjectStartupTimerAddOn::initialize() {
auto windowInterface = windowHandle()->cast();
m_initializingMessage = new NotificationMessage(windowInterface->window());
@@ -40,13 +40,13 @@ namespace Core::Internal {
m_initializingMessage->setClosable(false);
windowInterface->sendNotification(m_initializingMessage);
}
-
+
void ProjectStartupTimerAddOn::extensionsInitialized() {
auto windowInterface = windowHandle()->cast();
auto window = windowInterface->window();
window->installEventFilter(this);
}
-
+
bool ProjectStartupTimerAddOn::delayedInitialize() {
return WindowInterfaceAddOn::delayedInitialize();
}
diff --git a/src/plugins/coreplugin/internal/addon/projectwindownavigatoraddon.cpp b/src/plugins/coreplugin/internal/addon/projectwindownavigatoraddon.cpp
index bf824a50..02974f7b 100644
--- a/src/plugins/coreplugin/internal/addon/projectwindownavigatoraddon.cpp
+++ b/src/plugins/coreplugin/internal/addon/projectwindownavigatoraddon.cpp
@@ -1,10 +1,10 @@
#include "projectwindownavigatoraddon.h"
-#include
#include
+#include
-#include
#include
+#include
#include
#include
@@ -40,20 +40,20 @@ namespace Core::Internal {
void ProjectWindowNavigatorAddOn::extensionsInitialized() {
auto windowSystem = CoreInterface::windowSystem();
-
+
// Connect to window creation and destruction signals
connect(windowSystem, &WindowSystem::windowCreated, this, [this](WindowInterface *windowInterface) {
if (qobject_cast(windowInterface)) {
updateProjectWindows();
}
});
-
+
connect(windowSystem, &WindowSystem::windowAboutToDestroy, this, [this](WindowInterface *windowInterface) {
if (qobject_cast(windowInterface)) {
updateProjectWindows();
}
});
-
+
// Initialize the list with current windows
updateProjectWindows();
}
@@ -117,4 +117,4 @@ namespace Core::Internal {
}
-#include "moc_projectwindownavigatoraddon.cpp"
\ No newline at end of file
+#include "moc_projectwindownavigatoraddon.cpp"
diff --git a/src/plugins/coreplugin/internal/addon/projectwindownavigatoraddon.h b/src/plugins/coreplugin/internal/addon/projectwindownavigatoraddon.h
index 09b4c81e..06fc6793 100644
--- a/src/plugins/coreplugin/internal/addon/projectwindownavigatoraddon.h
+++ b/src/plugins/coreplugin/internal/addon/projectwindownavigatoraddon.h
@@ -40,4 +40,4 @@ namespace Core::Internal {
}
-#endif //DIFFSCOPE_COREPLUGIN_PROJECTWINDOWNAVIGATORADDON_H
\ No newline at end of file
+#endif //DIFFSCOPE_COREPLUGIN_PROJECTWINDOWNAVIGATORADDON_H
diff --git a/src/plugins/coreplugin/internal/addon/recentfileaddon.cpp b/src/plugins/coreplugin/internal/addon/recentfileaddon.cpp
index a19e9ba8..56e7b96d 100644
--- a/src/plugins/coreplugin/internal/addon/recentfileaddon.cpp
+++ b/src/plugins/coreplugin/internal/addon/recentfileaddon.cpp
@@ -1,20 +1,20 @@
#include "recentfileaddon.h"
#include
+#include
#include
#include
-#include
-#include
-
-#include
#include
+#include
+
+#include
#include
+#include
#include
#include
-#include
namespace Core::Internal {
@@ -23,7 +23,7 @@ namespace Core::Internal {
using QStandardItemModel::QStandardItemModel;
QHash roleNames() const override {
- static const QHash m {
+ static const QHash m{
{UIShell::USDef::RF_NameRole, "name"},
{UIShell::USDef::RF_PathRole, "path"},
};
@@ -93,4 +93,4 @@ namespace Core::Internal {
void RecentFileAddOn::removeRecentFile(int index) {
CoreInterface::recentFileCollection()->removeRecentFile(CoreInterface::recentFileCollection()->recentFiles().at(index));
}
-}
\ No newline at end of file
+}
diff --git a/src/plugins/coreplugin/internal/addon/recentfileaddon.h b/src/plugins/coreplugin/internal/addon/recentfileaddon.h
index 4a444b0a..361266c3 100644
--- a/src/plugins/coreplugin/internal/addon/recentfileaddon.h
+++ b/src/plugins/coreplugin/internal/addon/recentfileaddon.h
@@ -37,4 +37,4 @@ namespace Core::Internal {
}
-#endif //DIFFSCOPE_COREPLUGIN_RECENTFILEADDON_H
\ No newline at end of file
+#endif //DIFFSCOPE_COREPLUGIN_RECENTFILEADDON_H
diff --git a/src/plugins/coreplugin/internal/addon/timelineaddon.cpp b/src/plugins/coreplugin/internal/addon/timelineaddon.cpp
index 8db5d714..195d3c3a 100644
--- a/src/plugins/coreplugin/internal/addon/timelineaddon.cpp
+++ b/src/plugins/coreplugin/internal/addon/timelineaddon.cpp
@@ -2,22 +2,21 @@
#include
-#include
#include
+#include
-#include
-#include
-#include
+#include
#include
-#include
+#include
+#include
+#include
-#include
+#include
#include
+#include
#include
-#include
-
namespace Core::Internal {
TimelineAddOn::TimelineAddOn(QObject *parent) : WindowInterfaceAddOn(parent) {
@@ -99,11 +98,7 @@ namespace Core::Internal {
if (t.millisecond() == 0) {
return Core::Internal::TimelineAddOn::tr("%1 %2", "absolute minute second").arg(minuteText, secondText);
}
- return Core::Internal::TimelineAddOn::tr("%1 %2 %3", "absolute minute second millisecond").arg(
- minuteText,
- secondText,
- millisecondText
- );
+ return Core::Internal::TimelineAddOn::tr("%1 %2 %3", "absolute minute second millisecond").arg(minuteText, secondText, millisecondText);
}
static inline QString relativeLongTimePromptText(const SVS::LongTime &t) {
auto minuteText = Core::Internal::TimelineAddOn::tr("%Ln minute(s)", "relative time", t.minute());
@@ -124,11 +119,7 @@ namespace Core::Internal {
if (t.millisecond() == 0) {
return Core::Internal::TimelineAddOn::tr("%1 %2", "relative minute second").arg(minuteText, secondText);
}
- return Core::Internal::TimelineAddOn::tr("%1 %2 %3", "relative minute second millisecond").arg(
- minuteText,
- secondText,
- millisecondText
- );
+ return Core::Internal::TimelineAddOn::tr("%1 %2 %3", "relative minute second millisecond").arg(minuteText, secondText, millisecondText);
}
static SVS::PersistentMusicTime quickJumpParseAbsoluteMusicTime(const QString &text, QuickInput *quickInput, const ProjectTimeline *timeline) {
bool ok;
@@ -225,9 +216,7 @@ namespace Core::Internal {
}
quickInput->setAcceptable(true);
quickInput->setStatus(adjusted ? SVS::SVSCraft::CT_Warning : SVS::SVSCraft::CT_Normal);
- quickInput->setPromptText(Core::Internal::TimelineAddOn::tr("Go to %1").arg(Core::Internal::TimelineAddOn::tr("previous measure (%1)").arg(absoluteMusicTimePromptText(t))) +
- (adjusted ? Core::Internal::TimelineAddOn::tr("\nThe time offset exceeds the boundary and has been adjusted to zero") : "")
- );
+ quickInput->setPromptText(Core::Internal::TimelineAddOn::tr("Go to %1").arg(Core::Internal::TimelineAddOn::tr("previous measure (%1)").arg(absoluteMusicTimePromptText(t))) + (adjusted ? Core::Internal::TimelineAddOn::tr("\nThe time offset exceeds the boundary and has been adjusted to zero") : ""));
return t;
}
if (text.length() == 2 && std::ranges::all_of(text, isLeftSquareBracket)) {
@@ -239,9 +228,7 @@ namespace Core::Internal {
}
quickInput->setAcceptable(true);
quickInput->setStatus(adjusted ? SVS::SVSCraft::CT_Warning : SVS::SVSCraft::CT_Normal);
- quickInput->setPromptText(Core::Internal::TimelineAddOn::tr("Go to %1").arg(Core::Internal::TimelineAddOn::tr("previous beat (%1)").arg(absoluteMusicTimePromptText(t))) +
- (adjusted ? Core::Internal::TimelineAddOn::tr("\nThe time offset exceeds the boundary and has been adjusted to zero") : "")
- );
+ quickInput->setPromptText(Core::Internal::TimelineAddOn::tr("Go to %1").arg(Core::Internal::TimelineAddOn::tr("previous beat (%1)").arg(absoluteMusicTimePromptText(t))) + (adjusted ? Core::Internal::TimelineAddOn::tr("\nThe time offset exceeds the boundary and has been adjusted to zero") : ""));
return t;
}
if (text.length() == 3 && std::ranges::all_of(text, isLeftSquareBracket)) {
@@ -253,9 +240,7 @@ namespace Core::Internal {
}
quickInput->setAcceptable(true);
quickInput->setStatus(adjusted ? SVS::SVSCraft::CT_Warning : SVS::SVSCraft::CT_Normal);
- quickInput->setPromptText(Core::Internal::TimelineAddOn::tr("Go to %1").arg(Core::Internal::TimelineAddOn::tr("previous tick (%1)").arg(absoluteMusicTimePromptText(t))) +
- (adjusted ? Core::Internal::TimelineAddOn::tr("\nThe time offset exceeds the boundary and has been adjusted to zero") : "")
- );
+ quickInput->setPromptText(Core::Internal::TimelineAddOn::tr("Go to %1").arg(Core::Internal::TimelineAddOn::tr("previous tick (%1)").arg(absoluteMusicTimePromptText(t))) + (adjusted ? Core::Internal::TimelineAddOn::tr("\nThe time offset exceeds the boundary and has been adjusted to zero") : ""));
return t;
}
auto isRightSquareBracket = [](QChar c) {
diff --git a/src/plugins/coreplugin/internal/addon/viewvisibilityaddon.cpp b/src/plugins/coreplugin/internal/addon/viewvisibilityaddon.cpp
index 73d9f631..d49f8c54 100644
--- a/src/plugins/coreplugin/internal/addon/viewvisibilityaddon.cpp
+++ b/src/plugins/coreplugin/internal/addon/viewvisibilityaddon.cpp
@@ -1,13 +1,13 @@
#include "viewvisibilityaddon.h"
-#include
#include
+#include
-#include
+#include
#include
-#include
+#include
#include
#include
@@ -93,7 +93,8 @@ namespace Core::Internal {
RuntimeInterface::qmlEngine(), window, tr("Please take attention"),
tr("After hiding the menu bar, it can be difficult to show it again. Make "
"sure you know how to do this.\n\nContinue?"),
- SVS::SVSCraft::Yes | SVS::SVSCraft::No, SVS::SVSCraft::No)) {
+ SVS::SVSCraft::Yes | SVS::SVSCraft::No, SVS::SVSCraft::No
+ )) {
if (action)
action->setProperty("checked", true);
qCInfo(lcViewVisibilityAddOn) << "Toggle visibility canceled";
diff --git a/src/plugins/coreplugin/internal/addon/workspaceaddon.cpp b/src/plugins/coreplugin/internal/addon/workspaceaddon.cpp
index 64928bb4..3e44b277 100644
--- a/src/plugins/coreplugin/internal/addon/workspaceaddon.cpp
+++ b/src/plugins/coreplugin/internal/addon/workspaceaddon.cpp
@@ -3,20 +3,20 @@
#include
#include
+#include
#include
#include
#include
-#include
+
+#include
#include
#include
-#include
-
#include
-#include
-#include
#include
+#include
+#include
namespace Core::Internal {
@@ -36,8 +36,7 @@ namespace Core::Internal {
if (component.isError()) {
qFatal() << component.errorString();
}
- m_helper = component.createWithInitialProperties({
- {"addOn", QVariant::fromValue(this)}
+ m_helper = component.createWithInitialProperties({{"addOn", QVariant::fromValue(this)}
});
m_helper->setParent(windowInterface->window());
}
@@ -46,10 +45,7 @@ namespace Core::Internal {
if (component.isError()) {
qFatal() << component.errorString();
}
- auto o = component.createWithInitialProperties({
- {"addOn", QVariant::fromValue(this)},
- {"helper", QVariant::fromValue(m_helper.get())}
- });
+ auto o = component.createWithInitialProperties({{"addOn", QVariant::fromValue(this)}, {"helper", QVariant::fromValue(m_helper.get())}});
o->setParent(this);
QMetaObject::invokeMethod(o, "registerToContext", windowInterface->actionContext());
@@ -91,14 +87,16 @@ namespace Core::Internal {
} else {
return {};
}
- qCDebug(lcWorkspaceAddOn).noquote().nospace() << "First spec " << "("
- << "width=" << firstSpec.width << ","
- << "height=" << firstSpec.height << ","
- << "visibleIndex=" << firstSpec.visibleIndex << ")";
- qCDebug(lcWorkspaceAddOn).noquote().nospace() << "Last spec " << "("
- << "width=" << lastSpec.width << ","
- << "height=" << lastSpec.height << ","
- << "visibleIndex=" << lastSpec.visibleIndex << ")";
+ qCDebug(lcWorkspaceAddOn).noquote().nospace() << "First spec "
+ << "("
+ << "width=" << firstSpec.width << ","
+ << "height=" << firstSpec.height << ","
+ << "visibleIndex=" << firstSpec.visibleIndex << ")";
+ qCDebug(lcWorkspaceAddOn).noquote().nospace() << "Last spec "
+ << "("
+ << "width=" << lastSpec.width << ","
+ << "height=" << lastSpec.height << ","
+ << "visibleIndex=" << lastSpec.visibleIndex << ")";
QVariantList result;
QVariantList visibleIndices;
double preferredPanelSize = edge == Qt::TopEdge || edge == Qt::BottomEdge
@@ -146,8 +144,8 @@ namespace Core::Internal {
object->setProperty("panelPersistentData", data);
}
result.append(QVariantMap{
- {"object", QVariant::fromValue(object)},
- {"geometry", geometry },
+ {"object", QVariant::fromValue(object)},
+ {"geometry", geometry},
});
}
}
@@ -167,10 +165,10 @@ namespace Core::Internal {
createSpec(lastSpec);
return {
- {"objects", result },
+ {"objects", result},
{"preferredPanelSize", preferredPanelSize},
- {"splitterRatio", splitterRatio },
- {"visibleIndices", visibleIndices },
+ {"splitterRatio", splitterRatio},
+ {"visibleIndices", visibleIndices},
};
}
@@ -179,8 +177,7 @@ namespace Core::Internal {
layout.setName(name);
auto customLayouts = ProjectWindowWorkspaceManager::customLayouts();
if (originName.isEmpty()) {
- auto it = std::ranges::find_if(customLayouts,
- [&](const auto &o) { return o.name() == name; });
+ auto it = std::ranges::find_if(customLayouts, [&](const auto &o) { return o.name() == name; });
if (it != customLayouts.end()) {
*it = layout;
} else {
@@ -188,8 +185,7 @@ namespace Core::Internal {
}
} else {
customLayouts.removeIf([&](const auto &o) { return o.name() == name; });
- auto it = std::ranges::find_if(customLayouts,
- [&](const auto &o) { return o.name() == originName; });
+ auto it = std::ranges::find_if(customLayouts, [&](const auto &o) { return o.name() == originName; });
if (it != customLayouts.end()) {
*it = layout;
}
diff --git a/src/plugins/coreplugin/internal/behaviorpreference.cpp b/src/plugins/coreplugin/internal/behaviorpreference.cpp
index 81e6d326..282a4780 100644
--- a/src/plugins/coreplugin/internal/behaviorpreference.cpp
+++ b/src/plugins/coreplugin/internal/behaviorpreference.cpp
@@ -94,7 +94,7 @@ namespace Core::Internal {
emit fontStyleChanged();
d->uiBehavior = settings->value("uiBehavior", QVariant::fromValue(UB_Frameless | UB_MergeMenuAndTitleBar)).value();
emit uiBehaviorChanged();
- d->graphicsBehavior = settings->value("graphicsBehavior", QVariant::fromValue(GB_Hardware |GB_Antialiasing)).value();
+ d->graphicsBehavior = settings->value("graphicsBehavior", QVariant::fromValue(GB_Hardware | GB_Antialiasing)).value();
emit graphicsBehaviorChanged();
d->animationEnabled = settings->value("animationEnabled", true).toBool();
emit animationEnabledChanged();
@@ -148,8 +148,10 @@ namespace Core::Internal {
settings->endGroup();
}
-#define M_INSTANCE_D Q_ASSERT(m_instance);auto d = m_instance->d_func()
-
+#define M_INSTANCE_D \
+ Q_ASSERT(m_instance); \
+ auto d = m_instance->d_func()
+
BehaviorPreference::StartupBehavior BehaviorPreference::startupBehavior() {
M_INSTANCE_D;
return d->startupBehavior;
diff --git a/src/plugins/coreplugin/internal/behaviorpreference.h b/src/plugins/coreplugin/internal/behaviorpreference.h
index 7d642387..7ed3ca80 100644
--- a/src/plugins/coreplugin/internal/behaviorpreference.h
+++ b/src/plugins/coreplugin/internal/behaviorpreference.h
@@ -1,9 +1,10 @@
#ifndef DIFFSCOPE_COREPLUGIN_BEHAVIORPREFERENCE_H
#define DIFFSCOPE_COREPLUGIN_BEHAVIORPREFERENCE_H
-#include
#include
+#include
+
class QQmlEngine;
class QJSEngine;
diff --git a/src/plugins/coreplugin/internal/colorscheme/colorschemecollection.cpp b/src/plugins/coreplugin/internal/colorscheme/colorschemecollection.cpp
index 07302552..e38a13d5 100644
--- a/src/plugins/coreplugin/internal/colorscheme/colorschemecollection.cpp
+++ b/src/plugins/coreplugin/internal/colorscheme/colorschemecollection.cpp
@@ -4,111 +4,114 @@
#include
#include
-#include
#include
+#include
+
+#include
#include
-#include
#include
-
-#include
+#include
namespace Core::Internal {
- static QList> m_internalPresets {
- {QT_TRANSLATE_NOOP("Core::Internal::ColorSchemeCollection", "Scopic Dark"), {
- {"accentColor", QVariant::fromValue(QColor(0x5566ff))},
- {"warningColor", QVariant::fromValue(QColor(0xCB8743))},
- {"errorColor", QVariant::fromValue(QColor(0xcc4455))},
- {"buttonColor", QVariant::fromValue(QColor(0x333437))},
- {"textFieldColor", QVariant::fromValue(QColor(0x27282b))},
- {"scrollBarColor", QVariant::fromValue(QColor::fromRgba(0x7f7f7f7f))},
- {"borderColor", QVariant::fromValue(QColor(0x4a4b4c))},
- {"backgroundPrimaryColor", QVariant::fromValue(QColor(0x212124))},
- {"backgroundSecondaryColor", QVariant::fromValue(QColor(0x232427))},
- {"backgroundTertiaryColor", QVariant::fromValue(QColor(0x252629))},
- {"backgroundQuaternaryColor", QVariant::fromValue(QColor(0x313235))},
- {"splitterColor", QVariant::fromValue(QColor(0x121315))},
- {"foregroundPrimaryColor", QVariant::fromValue(QColor(0xdadada))},
- {"foregroundSecondaryColor", QVariant::fromValue(QColor::fromRgba(0xa0dadada))},
- {"linkColor", QVariant::fromValue(QColor(0x5566ff))},
- {"navigationColor", QVariant::fromValue(QColor(0xffffff))},
- {"shadowColor", QVariant::fromValue(QColor(0x101113))},
- {"highlightColor", QVariant::fromValue(QColor(0xb28300))},
- {"flatButtonHighContrastBorderColor", QVariant::fromValue(QColor(Qt::transparent))},
- {"controlDisabledColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x33000000)}})},
- {"foregroundDisabledColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.5}})},
- {"controlHoveredColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x1affffff)}})},
- {"foregroundHoveredColorChange", QVariant::fromValue(SVS::ColorChange{})},
- {"controlPressedColorChange", QVariant::fromValue(SVS::ColorChange{})},
- {"foregroundPressedColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.8}})},
- {"controlCheckedColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x1affffff)}})},
- {"annotationPopupTitleColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.72}, SVS::BottomBlendColorFilter{0x212124}})},
- {"annotationPopupContentColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.16}, SVS::BottomBlendColorFilter{0x212124}})},
- {"dockingPanelHeaderActiveColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x265566ff)}})},
- }},
- {QT_TRANSLATE_NOOP("Core::Internal::ColorSchemeCollection", "Scopic Light"), {
- {"accentColor", QVariant::fromValue(QColor(0x7d8aff))},
- {"warningColor", QVariant::fromValue(QColor(0xcb9968))},
- {"errorColor", QVariant::fromValue(QColor(0xcc7782))},
- {"buttonColor", QVariant::fromValue(QColor(0xc8cbcc))},
- {"textFieldColor", QVariant::fromValue(QColor(0xd4d7d8))},
- {"scrollBarColor", QVariant::fromValue(QColor::fromRgba(0x7f7f7f7f))},
- {"borderColor", QVariant::fromValue(QColor(0xb3b4b5))},
- {"backgroundPrimaryColor", QVariant::fromValue(QColor(0xdbdbde))},
- {"backgroundSecondaryColor", QVariant::fromValue(QColor(0xd8dbdc))},
- {"backgroundTertiaryColor", QVariant::fromValue(QColor(0xd6d9da))},
- {"backgroundQuaternaryColor", QVariant::fromValue(QColor(0xcacdce))},
- {"splitterColor", QVariant::fromValue(QColor(0xeaeced))},
- {"foregroundPrimaryColor", QVariant::fromValue(QColor(0x252525))},
- {"foregroundSecondaryColor", QVariant::fromValue(QColor::fromRgba(0xa0252525))},
- {"linkColor", QVariant::fromValue(QColor(0x5566ff))},
- {"navigationColor", QVariant::fromValue(QColor::fromRgb(0x0))},
- {"shadowColor", QVariant::fromValue(QColor(0x101113))},
- {"highlightColor", QVariant::fromValue(QColor(0xb28300))},
- {"flatButtonHighContrastBorderColor", QVariant::fromValue(QColor(Qt::transparent))},
- {"controlDisabledColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x33ffffff)}})},
- {"foregroundDisabledColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.5}})},
- {"controlHoveredColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x1a000000)}})},
- {"foregroundHoveredColorChange", QVariant::fromValue(SVS::ColorChange{})},
- {"controlPressedColorChange", QVariant::fromValue(SVS::ColorChange{})},
- {"foregroundPressedColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.8}})},
- {"controlCheckedColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x1a000000)}})},
- {"annotationPopupTitleColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.72}, SVS::BottomBlendColorFilter{0xdbdede}})},
- {"annotationPopupContentColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.16}, SVS::BottomBlendColorFilter{0xdbdede}})},
- {"dockingPanelHeaderActiveColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x607d8aff)}})},
- }},
- {QT_TRANSLATE_NOOP("Core::Internal::ColorSchemeCollection", "Scopic High Contrast"), {
- {"accentColor", QVariant::fromValue(QColor(0x0055ff))},
- {"warningColor", QVariant::fromValue(QColor(0xdb5500))},
- {"errorColor", QVariant::fromValue(QColor(0xcc0019))},
- {"buttonColor", QVariant::fromValue(QColor(0x00212b))},
- {"textFieldColor", QVariant::fromValue(QColor(0x00211c))},
- {"scrollBarColor", QVariant::fromValue(QColor(0x7f7f7f))},
- {"borderColor", QVariant::fromValue(QColor(0xbbcc00))},
- {"backgroundPrimaryColor", QVariant::fromValue(QColor::fromRgb(0x000000))},
- {"backgroundSecondaryColor", QVariant::fromValue(QColor(0x060606))},
- {"backgroundTertiaryColor", QVariant::fromValue(QColor(0x0c0c0c))},
- {"backgroundQuaternaryColor", QVariant::fromValue(QColor(0x121212))},
- {"splitterColor", QVariant::fromValue(QColor(0xcc00aa))},
- {"foregroundPrimaryColor", QVariant::fromValue(QColor(0xffffff))},
- {"foregroundSecondaryColor", QVariant::fromValue(QColor::fromRgba(0xa0ffffff))},
- {"linkColor", QVariant::fromValue(QColor(0x5566ff))},
- {"navigationColor", QVariant::fromValue(QColor::fromRgb(0xcc00aa))},
- {"shadowColor", QVariant::fromValue(QColor(0x101113))},
- {"highlightColor", QVariant::fromValue(QColor(0xb28300))},
- {"flatButtonHighContrastBorderColor", QVariant::fromValue(QColor(0x00db58))},
- {"controlDisabledColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x33000000)}})},
- {"foregroundDisabledColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.5}})},
- {"controlHoveredColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x1a00c4ff)}})},
- {"foregroundHoveredColorChange", QVariant::fromValue(SVS::ColorChange{})},
- {"controlPressedColorChange", QVariant::fromValue(SVS::ColorChange{})},
- {"foregroundPressedColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.8}})},
- {"controlCheckedColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x1a00c4ff)}})},
- {"annotationPopupTitleColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.72}, SVS::BottomBlendColorFilter{0x212124}})},
- {"annotationPopupContentColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.16}, SVS::BottomBlendColorFilter{0x212124}})},
- {"dockingPanelHeaderActiveColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x400055ff)}})},
- }}
+ static QList> m_internalPresets{
+ {QT_TRANSLATE_NOOP("Core::Internal::ColorSchemeCollection", "Scopic Dark"),
+ {
+ {"accentColor", QVariant::fromValue(QColor(0x5566ff))},
+ {"warningColor", QVariant::fromValue(QColor(0xCB8743))},
+ {"errorColor", QVariant::fromValue(QColor(0xcc4455))},
+ {"buttonColor", QVariant::fromValue(QColor(0x333437))},
+ {"textFieldColor", QVariant::fromValue(QColor(0x27282b))},
+ {"scrollBarColor", QVariant::fromValue(QColor::fromRgba(0x7f7f7f7f))},
+ {"borderColor", QVariant::fromValue(QColor(0x4a4b4c))},
+ {"backgroundPrimaryColor", QVariant::fromValue(QColor(0x212124))},
+ {"backgroundSecondaryColor", QVariant::fromValue(QColor(0x232427))},
+ {"backgroundTertiaryColor", QVariant::fromValue(QColor(0x252629))},
+ {"backgroundQuaternaryColor", QVariant::fromValue(QColor(0x313235))},
+ {"splitterColor", QVariant::fromValue(QColor(0x121315))},
+ {"foregroundPrimaryColor", QVariant::fromValue(QColor(0xdadada))},
+ {"foregroundSecondaryColor", QVariant::fromValue(QColor::fromRgba(0xa0dadada))},
+ {"linkColor", QVariant::fromValue(QColor(0x5566ff))},
+ {"navigationColor", QVariant::fromValue(QColor(0xffffff))},
+ {"shadowColor", QVariant::fromValue(QColor(0x101113))},
+ {"highlightColor", QVariant::fromValue(QColor(0xb28300))},
+ {"flatButtonHighContrastBorderColor", QVariant::fromValue(QColor(Qt::transparent))},
+ {"controlDisabledColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x33000000)}})},
+ {"foregroundDisabledColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.5}})},
+ {"controlHoveredColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x1affffff)}})},
+ {"foregroundHoveredColorChange", QVariant::fromValue(SVS::ColorChange{})},
+ {"controlPressedColorChange", QVariant::fromValue(SVS::ColorChange{})},
+ {"foregroundPressedColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.8}})},
+ {"controlCheckedColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x1affffff)}})},
+ {"annotationPopupTitleColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.72}, SVS::BottomBlendColorFilter{0x212124}})},
+ {"annotationPopupContentColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.16}, SVS::BottomBlendColorFilter{0x212124}})},
+ {"dockingPanelHeaderActiveColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x265566ff)}})},
+ }},
+ {QT_TRANSLATE_NOOP("Core::Internal::ColorSchemeCollection", "Scopic Light"),
+ {
+ {"accentColor", QVariant::fromValue(QColor(0x7d8aff))},
+ {"warningColor", QVariant::fromValue(QColor(0xcb9968))},
+ {"errorColor", QVariant::fromValue(QColor(0xcc7782))},
+ {"buttonColor", QVariant::fromValue(QColor(0xc8cbcc))},
+ {"textFieldColor", QVariant::fromValue(QColor(0xd4d7d8))},
+ {"scrollBarColor", QVariant::fromValue(QColor::fromRgba(0x7f7f7f7f))},
+ {"borderColor", QVariant::fromValue(QColor(0xb3b4b5))},
+ {"backgroundPrimaryColor", QVariant::fromValue(QColor(0xdbdbde))},
+ {"backgroundSecondaryColor", QVariant::fromValue(QColor(0xd8dbdc))},
+ {"backgroundTertiaryColor", QVariant::fromValue(QColor(0xd6d9da))},
+ {"backgroundQuaternaryColor", QVariant::fromValue(QColor(0xcacdce))},
+ {"splitterColor", QVariant::fromValue(QColor(0xeaeced))},
+ {"foregroundPrimaryColor", QVariant::fromValue(QColor(0x252525))},
+ {"foregroundSecondaryColor", QVariant::fromValue(QColor::fromRgba(0xa0252525))},
+ {"linkColor", QVariant::fromValue(QColor(0x5566ff))},
+ {"navigationColor", QVariant::fromValue(QColor::fromRgb(0x0))},
+ {"shadowColor", QVariant::fromValue(QColor(0x101113))},
+ {"highlightColor", QVariant::fromValue(QColor(0xb28300))},
+ {"flatButtonHighContrastBorderColor", QVariant::fromValue(QColor(Qt::transparent))},
+ {"controlDisabledColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x33ffffff)}})},
+ {"foregroundDisabledColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.5}})},
+ {"controlHoveredColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x1a000000)}})},
+ {"foregroundHoveredColorChange", QVariant::fromValue(SVS::ColorChange{})},
+ {"controlPressedColorChange", QVariant::fromValue(SVS::ColorChange{})},
+ {"foregroundPressedColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.8}})},
+ {"controlCheckedColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x1a000000)}})},
+ {"annotationPopupTitleColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.72}, SVS::BottomBlendColorFilter{0xdbdede}})},
+ {"annotationPopupContentColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.16}, SVS::BottomBlendColorFilter{0xdbdede}})},
+ {"dockingPanelHeaderActiveColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x607d8aff)}})},
+ }},
+ {QT_TRANSLATE_NOOP("Core::Internal::ColorSchemeCollection", "Scopic High Contrast"),
+ {
+ {"accentColor", QVariant::fromValue(QColor(0x0055ff))},
+ {"warningColor", QVariant::fromValue(QColor(0xdb5500))},
+ {"errorColor", QVariant::fromValue(QColor(0xcc0019))},
+ {"buttonColor", QVariant::fromValue(QColor(0x00212b))},
+ {"textFieldColor", QVariant::fromValue(QColor(0x00211c))},
+ {"scrollBarColor", QVariant::fromValue(QColor(0x7f7f7f))},
+ {"borderColor", QVariant::fromValue(QColor(0xbbcc00))},
+ {"backgroundPrimaryColor", QVariant::fromValue(QColor::fromRgb(0x000000))},
+ {"backgroundSecondaryColor", QVariant::fromValue(QColor(0x060606))},
+ {"backgroundTertiaryColor", QVariant::fromValue(QColor(0x0c0c0c))},
+ {"backgroundQuaternaryColor", QVariant::fromValue(QColor(0x121212))},
+ {"splitterColor", QVariant::fromValue(QColor(0xcc00aa))},
+ {"foregroundPrimaryColor", QVariant::fromValue(QColor(0xffffff))},
+ {"foregroundSecondaryColor", QVariant::fromValue(QColor::fromRgba(0xa0ffffff))},
+ {"linkColor", QVariant::fromValue(QColor(0x5566ff))},
+ {"navigationColor", QVariant::fromValue(QColor::fromRgb(0xcc00aa))},
+ {"shadowColor", QVariant::fromValue(QColor(0x101113))},
+ {"highlightColor", QVariant::fromValue(QColor(0xb28300))},
+ {"flatButtonHighContrastBorderColor", QVariant::fromValue(QColor(0x00db58))},
+ {"controlDisabledColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x33000000)}})},
+ {"foregroundDisabledColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.5}})},
+ {"controlHoveredColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x1a00c4ff)}})},
+ {"foregroundHoveredColorChange", QVariant::fromValue(SVS::ColorChange{})},
+ {"controlPressedColorChange", QVariant::fromValue(SVS::ColorChange{})},
+ {"foregroundPressedColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.8}})},
+ {"controlCheckedColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x1a00c4ff)}})},
+ {"annotationPopupTitleColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.72}, SVS::BottomBlendColorFilter{0x212124}})},
+ {"annotationPopupContentColorChange", QVariant::fromValue(SVS::ColorChange{SVS::AlphaColorFilter{0.16}, SVS::BottomBlendColorFilter{0x212124}})},
+ {"dockingPanelHeaderActiveColorChange", QVariant::fromValue(SVS::ColorChange{SVS::TopBlendColorFilter{QColor::fromRgba(0x400055ff)}})},
+ }}
};
static const int MAX_INTERNAL_PRESETS = 65536;
@@ -128,7 +131,7 @@ namespace Core::Internal {
if (preset.isEmpty()) {
return preset;
}
- for (const auto &key: m_internalPresets[0].second.keys()) {
+ for (const auto &key : m_internalPresets[0].second.keys()) {
if (!preset.contains(key)) {
preset[key] = m_internalPresets[0].second[key];
}
@@ -174,7 +177,7 @@ namespace Core::Internal {
void ColorSchemeCollection::savePreset(const QString &name) {
if (auto it = std::ranges::find_if(m_presets, [&](const auto &p) { return p.first == name; }); it != m_presets.end()) {
it->second = m_unsavedPreset;
- m_currentIndex = MAX_INTERNAL_PRESETS+ std::distance(m_presets.begin(), it);
+ m_currentIndex = MAX_INTERNAL_PRESETS + std::distance(m_presets.begin(), it);
m_showUnsavedPreset = false;
emit allPresetsChanged();
emit currentIndexChanged();
@@ -208,7 +211,7 @@ namespace Core::Internal {
auto originName = m_presets.value(index).first;
m_presets.removeIf([&](const auto &o) { return o.first == name; });
auto it = std::ranges::find_if(m_presets, [&](const auto &o) { return o.first == originName; });
- Q_ASSERT (it != m_presets.end());
+ Q_ASSERT(it != m_presets.end());
it->first = name;
emit allPresetsChanged();
index = MAX_INTERNAL_PRESETS + std::distance(m_presets.begin(), it);
@@ -222,9 +225,7 @@ namespace Core::Internal {
auto filename = fileUrl.toLocalFile();
QFile f(filename);
if (!f.open(QIODevice::ReadOnly)) {
- SVS::MessageBox::critical(RuntimeInterface::qmlEngine(), window,
- tr("Failed to Import Preset"),
- tr("Unable to open file \"%1\"").arg(filename));
+ SVS::MessageBox::critical(RuntimeInterface::qmlEngine(), window, tr("Failed to Import Preset"), tr("Unable to open file \"%1\"").arg(filename));
return;
}
QDataStream in(&f);
@@ -234,9 +235,7 @@ namespace Core::Internal {
QByteArray a;
in >> a;
if (name.isEmpty() || a.isEmpty()) {
- SVS::MessageBox::critical(RuntimeInterface::qmlEngine(), window,
- tr("Failed to import preset"),
- tr("Invalid format in file \"%1\"").arg(filename));
+ SVS::MessageBox::critical(RuntimeInterface::qmlEngine(), window, tr("Failed to import preset"), tr("Invalid format in file \"%1\"").arg(filename));
return;
}
auto preset = deserializePreset(a);
@@ -251,9 +250,7 @@ namespace Core::Internal {
const auto &[name, preset] = m_currentIndex < MAX_INTERNAL_PRESETS ? m_internalPresets.value(m_currentIndex, m_internalPresets.first()) : m_presets.value(m_currentIndex - MAX_INTERNAL_PRESETS);
QFile f(filename);
if (!f.open(QIODevice::WriteOnly)) {
- SVS::MessageBox::critical(RuntimeInterface::qmlEngine(), window,
- tr("Failed to export preset"),
- tr("Unable to open file \"%1\"").arg(filename));
+ SVS::MessageBox::critical(RuntimeInterface::qmlEngine(), window, tr("Failed to export preset"), tr("Unable to open file \"%1\"").arg(filename));
return;
}
QDataStream out(&f);
@@ -269,12 +266,12 @@ namespace Core::Internal {
}),
std::back_inserter(ret),
[](const QPair &p) -> QVariant {
- return QVariantMap {
+ return QVariantMap{
{"name", p.first},
- {"data", QVariantMap {
- {"internal", true},
- {"indexOffset", 0}
- }}
+ {"data", QVariantMap{
+ {"internal", true},
+ {"indexOffset", 0}
+ }}
};
}
@@ -283,23 +280,23 @@ namespace Core::Internal {
m_presets,
std::back_inserter(ret),
[](const QPair &p) -> QVariant {
- return QVariantMap {
+ return QVariantMap{
{"name", p.first},
- {"data", QVariantMap {
- {"internal", false},
- {"indexOffset", MAX_INTERNAL_PRESETS - m_internalPresets.size()},
- }}
+ {"data", QVariantMap{
+ {"internal", false},
+ {"indexOffset", MAX_INTERNAL_PRESETS - m_internalPresets.size()},
+ }}
};
}
);
if (m_showUnsavedPreset) {
- ret.append(QVariantMap {
+ ret.append(QVariantMap{
{"name", tr("(Unsaved preset)")},
- {"data", QVariantMap {
- {"internal", true},
- {"unsaved", true},
- {"indexOffset", MAX_INTERNAL_PRESETS - m_internalPresets.size()},
- }}
+ {"data", QVariantMap{
+ {"internal", true},
+ {"unsaved", true},
+ {"indexOffset", MAX_INTERNAL_PRESETS - m_internalPresets.size()},
+ }}
});
}
return ret;
@@ -382,7 +379,7 @@ namespace Core::Internal {
std::ranges::transform(m_presets, std::back_inserter(presetsVariantList), [](const auto &p) {
return QVariant::fromValue(QVariantPair(p.first, serializePreset(p.second)));
});
- auto data = QVariantMap {
+ auto data = QVariantMap{
{"presets", presetsVariantList},
{"unsavedPreset", serializePreset(m_unsavedPreset)},
{"currentIndex", m_currentIndex},
diff --git a/src/plugins/coreplugin/internal/colorscheme/colorschemewelcomewizardpagehelper.h b/src/plugins/coreplugin/internal/colorscheme/colorschemewelcomewizardpagehelper.h
index eb854dc2..19cd28ea 100644
--- a/src/plugins/coreplugin/internal/colorscheme/colorschemewelcomewizardpagehelper.h
+++ b/src/plugins/coreplugin/internal/colorscheme/colorschemewelcomewizardpagehelper.h
@@ -1,9 +1,10 @@
#ifndef DIFFSCOPE_COREPLUGIN_COLORSCHEMEWELCOMEWIZARDPAGEHELPER_H
#define DIFFSCOPE_COREPLUGIN_COLORSCHEMEWELCOMEWIZARDPAGEHELPER_H
+#include
+
#include
#include
-#include
namespace Core::Internal {
diff --git a/src/plugins/coreplugin/internal/coreplugin.cpp b/src/plugins/coreplugin/internal/coreplugin.cpp
index 64bbd365..ad2532ad 100644
--- a/src/plugins/coreplugin/internal/coreplugin.cpp
+++ b/src/plugins/coreplugin/internal/coreplugin.cpp
@@ -1,70 +1,70 @@
#include "coreplugin.h"
#ifdef Q_OS_WIN
-# include
-# include
-# include
-# include
-# include
+# include
+# include
+# include
+# include
+# include
#endif
#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include