aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2024-05-06 08:14:24 +0200
committerEike Ziller <eike.ziller@qt.io>2024-05-06 08:14:24 +0200
commita79f02ca4a0375e7a8cf3b1984eb06020d2ba61b (patch)
tree8842be204010abf0eef2f247c8ec311b5dced3b2
parenta8d6dde8e37917bf4e6304b1bcda25fc7bdc2b32 (diff)
parent732f37685ced250e35ca10ed9a4679c963f293d1 (diff)
Merge remote-tracking branch 'origin/13.0'
-rw-r--r--share/qtcreator/debugger/lldbbridge.py21
-rw-r--r--share/qtcreator/themes/dark.figmatokens8
-rw-r--r--share/qtcreator/themes/light.figmatokens9
-rw-r--r--src/libs/utils/stylehelper.cpp8
-rw-r--r--src/plugins/android/androidsettingswidget.cpp1
-rw-r--r--src/plugins/clangformat/clangformatbaseindenter.cpp4
-rw-r--r--src/plugins/clangformat/llvmfilesystem.h6
-rw-r--r--src/plugins/coreplugin/fileutils.cpp26
-rw-r--r--src/plugins/projectexplorer/projectwelcomepage.cpp109
m---------src/shared/qbs0
-rw-r--r--tests/system/suite_general/tst_create_proj_wizard/test.py7
11 files changed, 126 insertions, 73 deletions
diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py
index 7809a6a3dc..f2387ac913 100644
--- a/share/qtcreator/debugger/lldbbridge.py
+++ b/share/qtcreator/debugger/lldbbridge.py
@@ -1456,6 +1456,21 @@ class Dumper(DumperBase):
if bp is not None:
self.reportBreakpointUpdate(bp)
+ def wantAutoContinue(self, frame):
+ if self.platform_ != 'remote-android':
+ return False
+ funcname = frame.GetFunctionName()
+ if funcname and funcname.startswith('java.'):
+ return True
+ module = frame.GetModule()
+ filespec = module.GetPlatformFileSpec() # Not GetFileSpec
+ filename = filespec.GetFilename()
+ if filename == 'libart.so':
+ return True
+ if funcname == None and not frame.line_entry.file.IsValid() and filename == None:
+ return True
+ return False
+
def handleEvent(self, event):
if lldb.SBBreakpoint.EventIsBreakpointEvent(event):
self.handleBreakpointEvent(event)
@@ -1490,8 +1505,12 @@ class Dumper(DumperBase):
if state == lldb.eStateStopped:
stoppedThread = self.firstStoppedThread()
if stoppedThread:
- #self.report("STOPPED THREAD: %s" % stoppedThread)
frame = stoppedThread.GetFrameAtIndex(0)
+ if self.wantAutoContinue(frame):
+ #self.warn("AUTO CONTINUE")
+ error = self.process.Continue()
+ return
+
#self.report("FRAME: %s" % frame)
function = frame.GetFunction()
functionName = function.GetName()
diff --git a/share/qtcreator/themes/dark.figmatokens b/share/qtcreator/themes/dark.figmatokens
index 8937a3cc2d..194ce7fab2 100644
--- a/share/qtcreator/themes/dark.figmatokens
+++ b/share/qtcreator/themes/dark.figmatokens
@@ -20,7 +20,13 @@ Token_Foreground_Subtle=ff2A2A2A
Token_Text_Default=ffF8F8F8
Token_Text_Muted=ffAEAEAE
Token_Text_Subtle=ff595959
-Token_Text_Accent=ff23B26A
+
+; Token_Text_Accent value from Figma is still too dark. Therefore, it is modified, here.
+; Text (consisting of thin lines) needs to be substantially brighter than accent colors used for
+; larger-area elements like the filled button.
+
+; Token_Text_Accent=ff23B26A
+Token_Text_Accent=ff30C06A
Token_Stroke_Strong=ffeeeeee
Token_Stroke_Muted=ff727272
diff --git a/share/qtcreator/themes/light.figmatokens b/share/qtcreator/themes/light.figmatokens
index 6ef243d17d..138ad74afd 100644
--- a/share/qtcreator/themes/light.figmatokens
+++ b/share/qtcreator/themes/light.figmatokens
@@ -10,7 +10,12 @@ Token_Accent_Muted=ff1f9b5d
Token_Accent_Subtle=ff1a8550
Token_Background_Default=fffcfcfc
-Token_Background_Muted=ffF2F2F2
+
+; Token_Background_Muted value from Figma is too dark to ensure proper contrast when used as
+; text bachground. Therefore, it is modified, here.
+
+;Token_Background_Muted=ffF2F2F2
+Token_Background_Muted=ffF6F6F6
Token_Background_Subtle=ffe7e7e7
Token_Foreground_Default=ffD8D8D8
@@ -20,7 +25,7 @@ Token_Foreground_Subtle=ffEFEFEF
Token_Text_Default=ff393939
Token_Text_Muted=ff6a6a6a
Token_Text_Subtle=ffbebebe
-Token_Text_Accent=ff28C878
+Token_Text_Accent=ff1F9B5D
Token_Stroke_Strong=ff464646
Token_Stroke_Muted=ff727272
diff --git a/src/libs/utils/stylehelper.cpp b/src/libs/utils/stylehelper.cpp
index 69b5e39556..07f526a4af 100644
--- a/src/libs/utils/stylehelper.cpp
+++ b/src/libs/utils/stylehelper.cpp
@@ -1010,7 +1010,13 @@ QFont StyleHelper::uiFont(UiElement element)
const qreal qrealPointSize = metrics.pixelSize * pixelsToPointSizeFactor;
font.setPointSizeF(qrealPointSize);
- font.setWeight(metrics.weight);
+ // Intermediate font weights can produce blurry rendering and are harder to read.
+ // For "non-retina" screens, apply the weight only for some fonts.
+ static const bool isHighDpi = qApp->devicePixelRatio() >= 2;
+ const bool setWeight = isHighDpi || element == UiElementCaptionStrong
+ || element <= UiElementH4;
+ if (setWeight)
+ font.setWeight(metrics.weight);
return font;
}
diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp
index 284a612071..785d0c5ac9 100644
--- a/src/plugins/android/androidsettingswidget.cpp
+++ b/src/plugins/android/androidsettingswidget.cpp
@@ -813,6 +813,7 @@ void AndroidSettingsWidget::updateUI()
}
}
+ m_makeDefaultNdkButton->setEnabled(m_ndkListWidget->count() > 0);
m_makeDefaultNdkButton->setText(isDefaultNdkSelected() ? Tr::tr("Unset Default")
: Tr::tr("Make Default"));
}
diff --git a/src/plugins/clangformat/clangformatbaseindenter.cpp b/src/plugins/clangformat/clangformatbaseindenter.cpp
index 1d5dc2730c..b491bd293f 100644
--- a/src/plugins/clangformat/clangformatbaseindenter.cpp
+++ b/src/plugins/clangformat/clangformatbaseindenter.cpp
@@ -65,7 +65,11 @@ static void adjustFormatStyleForLineBreak(clang::format::FormatStyle &style,
static llvm::StringRef clearExtraNewline(llvm::StringRef text)
{
+#if LLVM_VERSION_MAJOR >= 16
+ while (text.starts_with("\n\n"))
+#else
while (text.startswith("\n\n"))
+#endif
text = text.drop_front();
return text;
}
diff --git a/src/plugins/clangformat/llvmfilesystem.h b/src/plugins/clangformat/llvmfilesystem.h
index fface01fc0..b2d1c5de7e 100644
--- a/src/plugins/clangformat/llvmfilesystem.h
+++ b/src/plugins/clangformat/llvmfilesystem.h
@@ -127,7 +127,11 @@ public:
/// Gets real path of \p Path e.g. collapse all . and .. patterns, resolve
/// symlinks. For real file system, this uses `llvm::sys::fs::real_path`.
/// This returns errc::operation_not_permitted if not implemented by subclass.
- std::error_code getRealPath(const Twine &Path, SmallVectorImpl<char> &Output) const override
+ std::error_code getRealPath(const Twine &Path, SmallVectorImpl<char> &Output)
+#if LLVM_VERSION_MAJOR < 19
+ const
+#endif
+ override
{
Q_UNUSED(Path);
Q_UNUSED(Output);
diff --git a/src/plugins/coreplugin/fileutils.cpp b/src/plugins/coreplugin/fileutils.cpp
index 5712c9c8b5..f7c7d4a759 100644
--- a/src/plugins/coreplugin/fileutils.cpp
+++ b/src/plugins/coreplugin/fileutils.cpp
@@ -32,10 +32,28 @@
#include <QTextStream>
#include <QTextCodec>
+#ifdef Q_OS_WIN
+#ifdef QTCREATOR_PCH_H
+#define CALLBACK WINAPI
+#endif
+#include <qt_windows.h>
+#include <shlobj.h>
+#endif
+
using namespace Utils;
namespace Core {
+static FilePath windowsDirectory()
+{
+#ifdef Q_OS_WIN
+ wchar_t str[UNICODE_STRING_MAX_CHARS] = {};
+ if (SUCCEEDED(SHGetFolderPath(nullptr, CSIDL_WINDOWS, nullptr, 0, str)))
+ return FilePath::fromUserInput(QString::fromUtf16(reinterpret_cast<char16_t *>(str)));
+#endif
+ return {};
+}
+
// Show error with option to open settings.
static void showGraphicalShellError(QWidget *parent, const QString &app, const QString &error)
{
@@ -56,13 +74,7 @@ void FileUtils::showInGraphicalShell(QWidget *parent, const FilePath &pathIn)
const QFileInfo fileInfo = pathIn.toFileInfo();
// Mac, Windows support folder or file.
if (HostOsInfo::isWindowsHost()) {
- const FilePath explorer = FilePath("explorer.exe").searchInPath();
- if (explorer.isEmpty()) {
- QMessageBox::warning(parent,
- Tr::tr("Launching Windows Explorer Failed"),
- Tr::tr("Could not find explorer.exe in path to launch Windows Explorer."));
- return;
- }
+ const FilePath explorer = windowsDirectory().pathAppended("explorer.exe");
QStringList param;
if (!pathIn.isDir())
param += QLatin1String("/select,");
diff --git a/src/plugins/projectexplorer/projectwelcomepage.cpp b/src/plugins/projectexplorer/projectwelcomepage.cpp
index 9364c6106f..8d97d1ca8a 100644
--- a/src/plugins/projectexplorer/projectwelcomepage.cpp
+++ b/src/plugins/projectexplorer/projectwelcomepage.cpp
@@ -47,10 +47,9 @@ const char PROJECT_BASE_ID[] = "Welcome.OpenRecentProject";
namespace ProjectExplorer {
namespace Internal {
-constexpr TextFormat projectNameTF {Theme::Token_Text_Accent, StyleHelper::UiElementH6};
-constexpr TextFormat projectPathTF {Theme::Token_Text_Muted, StyleHelper::UiElementCaptionStrong};
-constexpr TextFormat sessionNameTF = {projectNameTF.themeColor, projectNameTF.uiElement,
- Qt::AlignVCenter | Qt::TextDontClip};
+constexpr TextFormat projectNameTF {Theme::Token_Text_Accent, StyleHelper::UiElementH5};
+constexpr TextFormat projectPathTF {Theme::Token_Text_Muted, StyleHelper::UiElementH6};
+constexpr TextFormat sessionNameTF = projectNameTF;
constexpr TextFormat sessionProjectNameTF {Theme::Token_Text_Default, projectNameTF.uiElement};
constexpr TextFormat shortcutNumberTF {Theme::Token_Text_Default,
StyleHelper::UiElementCaptionStrong,
@@ -59,7 +58,7 @@ constexpr TextFormat actionTF {Theme::Token_Text_Default, StyleHelper::UiElement
Qt::AlignCenter | Qt::TextDontClip};
constexpr TextFormat actionDisabledTF {Theme::Token_Text_Subtle, actionTF.uiElement,
actionTF.drawTextFlags};
-constexpr int shortcutNumberWidth = 16;
+constexpr int shortcutNumberWidth = 6;
constexpr int actionSepWidth = 1;
constexpr int sessionScrollBarGap = HPaddingXs;
@@ -316,36 +315,36 @@ public:
void paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &idx) const final
{
- // visible on withIcon() Gap + arrow visible on hover Extra margin right of project item
- // | | |
- // +-----------+----------+ +--------+-------+ +----------+----------+
- // | | | | | |
+ // visible on withIcon() Gap + arrow visible on hover Extra margin right of project item
+ // | | |
+ // +----------+----------+ +--------+-------+ +----------+----------+
+ // | | | | | |
//
- // +------------+--------+---------+------------+---------+-------------+--------+-------+------------+---------------------+ --+
- // | | | |(VPaddingXs)| |(VPaddingXs) | | | | | |
- // | | | +------------+ +-------------+ | | | | |
- // |(HPaddingXs)|<number>|(HGapXxs)| <icon> |(HGapXxs)|<sessionName>|(HGapXs)|<arrow>| | | +-- Header
- // | |(16x16) | +------------+ +-------------+ | | | | |
- // | | | |(VPaddingXs)| |(VPaddingXs) | | | | | |
- // |------------+--------+---------+------------+---------+-------------+--------+-------+ | | --+
- // | +-- | (VPaddingXxs) | | | |
- // | | +------------------------------+(HPaddingXs)| | |
- // | | | <projectName> | | | |
- // | | +------------------------------+ | | |
- // | Per project in session --+ | (ExPaddingGapS) | |(sessionScrollBarGap)| |
- // | | +------------------------------+ | | |
- // | | | <projectPath> | | | |
- // | | +------------------------------+ | | +-- Expansion
- // | +-- | (VPaddingXxs) | | | |
- // +------------------------------------------------------+------------------------------+------------+ | |
- // | (VPaddingXs) | | |
- // +-----------------------------------------+--------------+-----------------------------------------+ | |
- // +-- | <cloneButton>|<renameButton>|<deleteButton> | | |
- // | +-----------------------------------------+--------------+-----------------------------------------+ | |
- // | | (VPaddingXs) | | |
- // | +--------------------------------------------------------------------------------------------------+---------------------+ --+
- // | | (VGapL) | +-- Gap between session items
- // | +------------------------------------------------------------------------------------------------------------------------+ --+
+ // +------------+--------+--------+------------+--------+-------------+--------+-------+------------+---------------------+ --+
+ // | | | |(VPaddingXs)| |(VPaddingXs) | | | | | |
+ // | | | +------------+ +-------------+ | | | | |
+ // |(HPaddingXs)|<number>|(HGapXs)| <icon> |(HGapXs)|<sessionName>|(HGapXs)|<arrow>| | | +-- Header
+ // | |(w:6) | +------------+ +-------------+ | | | | |
+ // | | | |(VPaddingXs)| |(VPaddingXs) | | | | | |
+ // |------------+--------+--------+------------+--------+-------------+--------+-------+ | | --+
+ // | +-- | (VPaddingXxs) | | | |
+ // | | +------------------------------+(HPaddingXs)| | |
+ // | | | <projectName> | | | |
+ // | | +------------------------------+ | | |
+ // | Per project in session --+ | (ExPaddingGapS) | |(sessionScrollBarGap)| |
+ // | | +------------------------------+ | | |
+ // | | | <projectPath> | | | |
+ // | | +------------------------------+ | | +-- Expansion
+ // | +-- | (VPaddingXxs) | | | |
+ // +----------------------------------------------------+------------------------------+------------+ | |
+ // | (VPaddingXs) | | |
+ // +---------------------------------------+--------------+-----------------------------------------+ | |
+ // +-- | <cloneButton>|<renameButton>|<deleteButton> | | |
+ // | +---------------------------------------+--------------+-----------------------------------------+ | |
+ // | | (VPaddingXs) | | |
+ // | +------------------------------------------------------------------------------------------------+---------------------+ --+
+ // | | (VGapL) | +-- Gap between session items
+ // | +----------------------------------------------------------------------------------------------------------------------+ --+
// |
// \ session action "buttons" and dividers
// +-----------------------------------------------+--------+---------+--------+
@@ -381,11 +380,11 @@ public:
const int y = bgR.y();
const int numberX = x + s(HPaddingXs);
- const int iconX = numberX + shortcutNumberWidth + s(HGapXxs);
+ const int iconX = numberX + shortcutNumberWidth + s(HGapXs);
const int arrowX = bgR.right() - s(HPaddingXs) - arrowS.width();
const QRect arrowHoverR(arrowX - s(HGapXs) + 1, y,
s(HGapXs) + arrowS.width() + s(HPaddingXs), hdR.height());
- const int textX = withIcon() ? iconX + iconS.width() + s(HGapXxs) : iconX;
+ const int textX = withIcon() ? iconX + iconS.width() + s(HGapXs) : iconX;
const int iconY = y + (hdR.height() - iconS.height()) / 2;
const int arrowY = y + (hdR.height() - arrowS.height()) / 2;
@@ -622,24 +621,24 @@ class ProjectDelegate : public BaseDelegate
public:
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &idx) const final
{
- // visible on with Icon() Extra margin right of project item
- // | |
- // +--------+-------+ +------+-----+
- // | | | |
+ // visible on with Icon() Extra margin right of project item
+ // | |
+ // +--------+-------+ +------+-----+
+ // | | | |
//
- // +------------+--------+---------+------+---------+-------------+------------+------------+
- // | | | | | | (VPaddingXs)| | |
- // | | | | | +-------------+ | |
- // | | | | | |<projectName>| | |
- // | | | | | +-------------+ | |
- // |(HPaddingXs)|<number>|(HGapXxs)|<icon>|(HGapXxs)| (VGapXs) |(HPaddingXs)|(HPaddingXs)|
- // | |(16x16) | | | +-------------+ | |
- // | | | | | |<projectPath>| | |
- // | | | | | +-------------+ | |
- // | | | | | | (VPaddingXs)| | |
- // +------------+--------+---------+------+---------+-------------+------------+------------+ --+
- // | (VGapL) | +-- Gap between project items
- // +----------------------------------------------------------------------------------------+ --+
+ // +------------+--------+--------+------+---------+-------------+------------+------------+
+ // | | | | | | (VPaddingXs)| | |
+ // | | | | | +-------------+ | |
+ // | | | | | |<projectName>| | |
+ // | | | | | +-------------+ | |
+ // |(HPaddingXs)|<number>|(HGapXs)|<icon>|(HGapXxs)| (VGapXs) |(HPaddingXs)|(HPaddingXs)|
+ // | |(w:6) | | | +-------------+ | |
+ // | | | | | |<projectPath>| | |
+ // | | | | | +-------------+ | |
+ // | | | | | | (VPaddingXs)| | |
+ // +------------+--------+--------+------+---------+-------------+------------+------------+ --+
+ // | (VGapL) | +-- Gap between project items
+ // +---------------------------------------------------------------------------------------+ --+
const bool hovered = option.widget->isActiveWindow()
&& option.state & QStyle::State_MouseOver;
@@ -651,9 +650,9 @@ public:
const int x = bgR.x();
const int numberX = x + s(HPaddingXs);
- const int iconX = numberX + shortcutNumberWidth + s(HGapXxs);
+ const int iconX = numberX + shortcutNumberWidth + s(HGapXs);
const int iconWidth = iconS.width();
- const int textX = withIcon() ? iconX + iconWidth + s(HGapXxs) : iconX;
+ const int textX = withIcon() ? iconX + iconWidth + s(HGapXs) : iconX;
const int textWidth = bgR.width() - s(HPaddingXs) - textX;
const int y = bgR.y();
diff --git a/src/shared/qbs b/src/shared/qbs
-Subproject 12bc60c93d684432af1b28576f21f853b8922d9
+Subproject 488fbe40e86602d06e568a1749277387fd4a565
diff --git a/tests/system/suite_general/tst_create_proj_wizard/test.py b/tests/system/suite_general/tst_create_proj_wizard/test.py
index 78178d82bb..176b606b8b 100644
--- a/tests/system/suite_general/tst_create_proj_wizard/test.py
+++ b/tests/system/suite_general/tst_create_proj_wizard/test.py
@@ -113,10 +113,7 @@ def handleBuildSystemVerifyKits(category, template, kits, displayedPlatforms,
return
fixedBuildSystems = list(availableBuildSystems)
- if template == 'Qt Quick Application':
- fixedBuildSystems.remove('qmake')
- test.log("Skipped qmake (not supported).")
- elif template == 'Qt Quick 2 Extension Plugin':
+ if template == 'Qt Quick 2 Extension Plugin':
fixedBuildSystems.remove('Qbs')
test.log("Skipped Qbs (not supported).")
@@ -126,7 +123,7 @@ def handleBuildSystemVerifyKits(category, template, kits, displayedPlatforms,
clickButton(waitForObject(":Next_QPushButton"))
if specialHandlingFunc:
specialHandlingFunc(displayedPlatforms, *args)
- if not ('Plain C' in template or template == 'Qt Quick Application'):
+ if not ('Plain C' in template):
__createProjectHandleTranslationSelection__()
verifyKitCheckboxes(kits, displayedPlatforms)
safeClickButton("Cancel")