qt: Update to 6.6.0 (#7099)

This commit is contained in:
Steveice10 2023-11-01 17:58:02 -07:00 committed by GitHub
parent 8d811913a5
commit 79ea06b226
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 38 additions and 20 deletions

View file

@ -59,7 +59,7 @@ jobs:
name: ${{ env.OS }}-${{ env.TARGET }} name: ${{ env.OS }}-${{ env.TARGET }}
path: artifacts/ path: artifacts/
macos: macos:
runs-on: macos-latest runs-on: macos-13
strategy: strategy:
matrix: matrix:
target: ["x86_64", "arm64"] target: ["x86_64", "arm64"]
@ -92,7 +92,7 @@ jobs:
path: ${{ env.OS }}-${{ env.TARGET }} path: ${{ env.OS }}-${{ env.TARGET }}
key: ${{ runner.os }}-${{ matrix.target }}-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }} key: ${{ runner.os }}-${{ matrix.target }}-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
macos-universal: macos-universal:
runs-on: macos-latest runs-on: macos-13
needs: macos needs: macos
env: env:
OS: macos OS: macos
@ -234,7 +234,7 @@ jobs:
name: ${{ env.OS }}-${{ env.TARGET }} name: ${{ env.OS }}-${{ env.TARGET }}
path: src/android/app/artifacts/ path: src/android/app/artifacts/
ios: ios:
runs-on: macos-latest runs-on: macos-13
if: ${{ !startsWith(github.ref, 'refs/tags/') }} if: ${{ !startsWith(github.ref, 'refs/tags/') }}
env: env:
CCACHE_DIR: ${{ github.workspace }}/.ccache CCACHE_DIR: ${{ github.workspace }}/.ccache

View file

@ -236,7 +236,7 @@ find_package(Threads REQUIRED)
if (ENABLE_QT) if (ENABLE_QT)
if (NOT USE_SYSTEM_QT) if (NOT USE_SYSTEM_QT)
download_qt(6.5.1) download_qt(6.6.0)
endif() endif()
find_package(Qt6 REQUIRED COMPONENTS Widgets Multimedia Concurrent) find_package(Qt6 REQUIRED COMPONENTS Widgets Multimedia Concurrent)

View file

@ -2,7 +2,13 @@
Name=colorful_dark Name=colorful_dark
Comment=Colorful theme (Dark style) Comment=Colorful theme (Dark style)
Inherits=default Inherits=default
Directories=16x16 Directories=16x16,48x48,256x256
[16x16] [16x16]
Size=16 Size=16
[48x48]
Size=48
[256x256]
Size=256

View file

@ -2,7 +2,13 @@
Name=colorful_midnight_blue Name=colorful_midnight_blue
Comment=Colorful theme (Midnight Blue style) Comment=Colorful theme (Midnight Blue style)
Inherits=default Inherits=default
Directories=16x16 Directories=16x16,48x48,256x256
[16x16] [16x16]
Size=16 Size=16
[48x48]
Size=48
[256x256]
Size=256

View file

@ -258,13 +258,15 @@ void GameList::OnUpdateThemedIcons() {
for (int i = 0; i < item_model->invisibleRootItem()->rowCount(); i++) { for (int i = 0; i < item_model->invisibleRootItem()->rowCount(); i++) {
QStandardItem* child = item_model->invisibleRootItem()->child(i); QStandardItem* child = item_model->invisibleRootItem()->child(i);
const int icon_size = IconSizes.at(UISettings::values.game_list_icon_size.GetValue());
switch (child->data(GameListItem::TypeRole).value<GameListItemType>()) { switch (child->data(GameListItem::TypeRole).value<GameListItemType>()) {
case GameListItemType::InstalledDir: case GameListItemType::InstalledDir:
child->setData(QIcon::fromTheme(QStringLiteral("sd_card")).pixmap(48), child->setData(QIcon::fromTheme(QStringLiteral("sd_card")).pixmap(icon_size),
Qt::DecorationRole); Qt::DecorationRole);
break; break;
case GameListItemType::SystemDir: case GameListItemType::SystemDir:
child->setData(QIcon::fromTheme(QStringLiteral("chip")).pixmap(48), Qt::DecorationRole); child->setData(QIcon::fromTheme(QStringLiteral("chip")).pixmap(icon_size),
Qt::DecorationRole);
break; break;
case GameListItemType::CustomDir: { case GameListItemType::CustomDir: {
const UISettings::GameDir& game_dir = const UISettings::GameDir& game_dir =
@ -272,11 +274,12 @@ void GameList::OnUpdateThemedIcons() {
const QString icon_name = QFileInfo::exists(game_dir.path) const QString icon_name = QFileInfo::exists(game_dir.path)
? QStringLiteral("folder") ? QStringLiteral("folder")
: QStringLiteral("bad_folder"); : QStringLiteral("bad_folder");
child->setData(QIcon::fromTheme(icon_name).pixmap(48), Qt::DecorationRole); child->setData(QIcon::fromTheme(icon_name).pixmap(icon_size), Qt::DecorationRole);
break; break;
} }
case GameListItemType::AddDir: case GameListItemType::AddDir:
child->setData(QIcon::fromTheme(QStringLiteral("plus")).pixmap(48), Qt::DecorationRole); child->setData(QIcon::fromTheme(QStringLiteral("plus")).pixmap(icon_size),
Qt::DecorationRole);
break; break;
default: default:
break; break;

View file

@ -2741,7 +2741,10 @@ void GMainWindow::filterBarSetChecked(bool state) {
} }
void GMainWindow::UpdateUITheme() { void GMainWindow::UpdateUITheme() {
const QString default_icons = QStringLiteral(":/icons/default"); const QString icons_base_path = QStringLiteral(":/icons/");
const QString default_theme = QStringLiteral("default");
const QString default_theme_path = icons_base_path + default_theme;
const QString& current_theme = UISettings::values.theme; const QString& current_theme = UISettings::values.theme;
const bool is_default_theme = current_theme == QString::fromUtf8(UISettings::themes[0].second); const bool is_default_theme = current_theme == QString::fromUtf8(UISettings::themes[0].second);
QStringList theme_paths(default_theme_paths); QStringList theme_paths(default_theme_paths);
@ -2759,8 +2762,8 @@ void GMainWindow::UpdateUITheme() {
qApp->setStyleSheet({}); qApp->setStyleSheet({});
setStyleSheet({}); setStyleSheet({});
} }
theme_paths.append(default_icons); theme_paths.append(default_theme_path);
QIcon::setThemeName(default_icons); QIcon::setThemeName(default_theme);
} else { } else {
const QString theme_uri(QLatin1Char{':'} + current_theme + QStringLiteral("/style.qss")); const QString theme_uri(QLatin1Char{':'} + current_theme + QStringLiteral("/style.qss"));
QFile f(theme_uri); QFile f(theme_uri);
@ -2772,9 +2775,9 @@ void GMainWindow::UpdateUITheme() {
LOG_ERROR(Frontend, "Unable to set style, stylesheet file not found"); LOG_ERROR(Frontend, "Unable to set style, stylesheet file not found");
} }
const QString theme_name = QStringLiteral(":/icons/") + current_theme; const QString current_theme_path = icons_base_path + current_theme;
theme_paths.append({default_icons, theme_name}); theme_paths.append({default_theme_path, current_theme_path});
QIcon::setThemeName(theme_name); QIcon::setThemeName(current_theme);
} }
QIcon::setThemeSearchPaths(theme_paths); QIcon::setThemeSearchPaths(theme_paths);

View file

@ -17,7 +17,7 @@
#include "common/file_util.h" #include "common/file_util.h"
#include "common/logging/log.h" #include "common/logging/log.h"
#ifdef Q_OS_OSX #ifdef Q_OS_MACOS
#define DEFAULT_TOOL_PATH QStringLiteral("../../../../maintenancetool") #define DEFAULT_TOOL_PATH QStringLiteral("../../../../maintenancetool")
#else #else
#define DEFAULT_TOOL_PATH QStringLiteral("../maintenancetool") #define DEFAULT_TOOL_PATH QStringLiteral("../maintenancetool")
@ -102,7 +102,7 @@ QString UpdaterPrivate::ToSystemExe(QString base_path) {
return base_path + QStringLiteral(".exe"); return base_path + QStringLiteral(".exe");
else else
return base_path; return base_path;
#elif defined(Q_OS_OSX) #elif defined(Q_OS_MACOS)
if (base_path.endsWith(QStringLiteral(".app"))) if (base_path.endsWith(QStringLiteral(".app")))
base_path.truncate(base_path.lastIndexOf(QStringLiteral("."))); base_path.truncate(base_path.lastIndexOf(QStringLiteral(".")));
return base_path + QStringLiteral(".app/Contents/MacOS/") + QFileInfo(base_path).fileName(); return base_path + QStringLiteral(".app/Contents/MacOS/") + QFileInfo(base_path).fileName();
@ -112,7 +112,7 @@ QString UpdaterPrivate::ToSystemExe(QString base_path) {
} }
QFileInfo UpdaterPrivate::GetMaintenanceTool() const { QFileInfo UpdaterPrivate::GetMaintenanceTool() const {
#if defined(Q_OS_UNIX) && !defined(Q_OS_OSX) #if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
const auto appimage_path = QProcessEnvironment::systemEnvironment() const auto appimage_path = QProcessEnvironment::systemEnvironment()
.value(QStringLiteral("APPIMAGE"), {}) .value(QStringLiteral("APPIMAGE"), {})
.toStdString(); .toStdString();