sync form 24.03-LTS
This commit is contained in:
parent
48f475d267
commit
80d3b0adaf
42
0001-use-QRandomGenerator-to-generate-random-numbers.patch
Normal file
42
0001-use-QRandomGenerator-to-generate-random-numbers.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 64e868be8ff42979c955a38b34678b9e24a18dcf Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=E4=BE=AF=E7=BA=A2=E5=8B=8B?= <houhongxun@kylinos.cn>
|
||||
Date: Mon, 6 May 2024 10:00:18 +0800
|
||||
Subject: [PATCH] use QRandomGenerator to generate random numbers
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: 侯红勋 <houhongxun@kylinos.cn>
|
||||
---
|
||||
UIControl/player/coreplayer/mmediaplaylist.cpp | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/UIControl/player/coreplayer/mmediaplaylist.cpp b/UIControl/player/coreplayer/mmediaplaylist.cpp
|
||||
index 9aa1c03..38f93a5 100644
|
||||
--- a/UIControl/player/coreplayer/mmediaplaylist.cpp
|
||||
+++ b/UIControl/player/coreplayer/mmediaplaylist.cpp
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "mmediaplaylist.h"
|
||||
+#include <QRandomGenerator>
|
||||
|
||||
MMediaPlaylist::MMediaPlaylist(QObject *parent)
|
||||
: QObject(parent)
|
||||
@@ -223,11 +224,10 @@ MMediaPlaylist::PlaybackMode MMediaPlaylist::playbackMode() const
|
||||
|
||||
int MMediaPlaylist::randomIndex()
|
||||
{
|
||||
- qsrand(QDateTime::currentDateTime().toMSecsSinceEpoch());
|
||||
- return qrand()%(m_playerList.length());
|
||||
+ QRandomGenerator rnd(QDateTime::currentDateTime().toMSecsSinceEpoch());
|
||||
+ return rnd.generate()%(m_playerList.length());
|
||||
}
|
||||
|
||||
-
|
||||
MMediaContent::MMediaContent(QUrl url)
|
||||
{
|
||||
m_url = url;
|
||||
--
|
||||
2.43.0
|
||||
|
||||
30
fix-kylin-music-border-space.patch
Normal file
30
fix-kylin-music-border-space.patch
Normal file
@ -0,0 +1,30 @@
|
||||
diff -Naur kylin-music-1.1.3/UI/sidebar/sidebarwidget.cpp kylin-music-1.1.3~/UI/sidebar/sidebarwidget.cpp
|
||||
--- kylin-music-1.1.3/UI/sidebar/sidebarwidget.cpp 2022-03-03 17:05:57.000000000 +0800
|
||||
+++ kylin-music-1.1.3~/UI/sidebar/sidebarwidget.cpp 2024-05-09 17:59:58.015452869 +0800
|
||||
@@ -93,7 +93,7 @@
|
||||
myPlayListLayout->addWidget(myPlayListLabel);
|
||||
myPlayListLayout->addStretch();
|
||||
myPlayListLayout->addWidget(myPlayListBtn);
|
||||
- myPlayListLayout->setContentsMargins(38,0,38,0);
|
||||
+ myPlayListLayout->setContentsMargins(38-13,0,38-27,0);
|
||||
|
||||
QScrollArea *scrollArea = new QScrollArea(this);
|
||||
scrollArea->setFrameStyle(0);
|
||||
diff -Naur kylin-music-1.1.3/UI/tableview/tableone.cpp kylin-music-1.1.3~/UI/tableview/tableone.cpp
|
||||
--- kylin-music-1.1.3/UI/tableview/tableone.cpp 2022-03-03 17:05:57.000000000 +0800
|
||||
+++ kylin-music-1.1.3~/UI/tableview/tableone.cpp 2024-05-09 18:00:39.313778080 +0800
|
||||
@@ -88,12 +88,12 @@
|
||||
if(WidgetStyle::themeColor == 0) {
|
||||
horizonHeader->setStyleSheet("QHeaderView::section,QTableCornerButton::section {padding-left: 25px;\
|
||||
border: none;border-bottom: 1px solid white;\
|
||||
- border-right: 1px solid white;border-bottom: 1px transparent;\
|
||||
+ border-right: 5px solid white;border-bottom: 1px transparent;\
|
||||
background-color:white;color:#8F9399;}");
|
||||
} else {
|
||||
horizonHeader->setStyleSheet("QHeaderView::section,QTableCornerButton::section {padding-left: 25px;\
|
||||
border: none;border-bottom: 1px solid #252526;\
|
||||
- border-right: 1px solid #252526;border-bottom: 1px transparent;\
|
||||
+ border-right: 5px solid #252526;border-bottom: 1px transparent;\
|
||||
background-color:#252526;color:#8F9399;}");
|
||||
}
|
||||
|
||||
13
fix-kylin-music-mini-mode-stay-on-top-hint.patch
Normal file
13
fix-kylin-music-mini-mode-stay-on-top-hint.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff -Naur kylin-music-1.1.3/UI/player/miniwidget.cpp kylin-music-1.1.3~/UI/player/miniwidget.cpp
|
||||
--- kylin-music-1.1.3/UI/player/miniwidget.cpp 2022-03-03 17:05:57.000000000 +0800
|
||||
+++ kylin-music-1.1.3~/UI/player/miniwidget.cpp 2024-05-06 20:42:34.813768730 +0800
|
||||
@@ -28,8 +28,7 @@
|
||||
this->setObjectName("miniWidget");
|
||||
|
||||
m_mouseState = false;
|
||||
- setWindowFlags(Qt::WindowStaysOnTopHint);
|
||||
-// setWindowFlags(Qt::FramelessWindowHint|Qt::Tool|Qt::WindowStaysOnTopHint);
|
||||
+ setWindowFlags(Qt::WindowStaysOnTopHint); //置顶显示
|
||||
this->setAttribute(Qt::WA_TranslucentBackground, true); //窗体透明
|
||||
// this->setWindowTitle(tr("音乐"));
|
||||
this->setWindowTitle(tr("Music Player"));
|
||||
@ -1,6 +1,6 @@
|
||||
Name: kylin-music
|
||||
Version: 1.1.3
|
||||
Release: 5
|
||||
Release: 8
|
||||
Summary: kylin-music
|
||||
License: GPL-3.0-or-later and MIT
|
||||
URL: https://github.com/UbuntuKylin/kylin-music
|
||||
@ -11,6 +11,9 @@ patch1: 0002-modify-version-is-error.patch
|
||||
Patch2: kylin-music-1.1.3_kylin_fix_install_the_repair_file_in_the_bin_directory.patch
|
||||
Patch3: 0001-kylin-music-fix-wrong-mouse-style-of-some-title-bar-.patch
|
||||
Patch4: 0001-kylin-music-fix-null-pointer-widget-error.patch
|
||||
Patch5: 0001-use-QRandomGenerator-to-generate-random-numbers.patch
|
||||
Patch6: fix-kylin-music-mini-mode-stay-on-top-hint.patch
|
||||
Patch7: fix-kylin-music-border-space.patch
|
||||
|
||||
BuildRequires: qt5-qtbase-devel
|
||||
BuildRequires: qtchooser
|
||||
@ -38,6 +41,9 @@ kylin-music
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
|
||||
%build
|
||||
export PATH=%{_qt5_bindir}:$PATH
|
||||
@ -82,6 +88,18 @@ cp -r %{_builddir}/%{name}-%{version}/data/kylin-music %{buildroot}/usr/share/ky
|
||||
%{_datadir}/kylin-user-guide/data/guide/*
|
||||
|
||||
%changelog
|
||||
* Thu May 09 2024 douyan <douyan@kylinos.cn> - 1.1.3-8
|
||||
- add fix-kylin-music-border-space.patch
|
||||
|
||||
* Tue May 07 2024 douyan <douyan@kylinos.cn> - 1.1.3-7
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC: add fix-kylin-music-mini-mode-stay-on-top-hint.patch
|
||||
|
||||
* Mon May 06 2024 houhongxun <houhongxun@kylinos.cn> - 1.1.3-6
|
||||
- add Patch5: 0001-use-QRandomGenerator-to-generate-random-numbers.patch
|
||||
|
||||
* Tue Apr 16 2024 houhongxun <houhongxun@kylinos.cn> - 1.1.3-5
|
||||
- add Patch4: 0001-kylin-music-fix-null-pointer-widget-error.patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user