69 lines
3.7 KiB
Diff
69 lines
3.7 KiB
Diff
From 950e4d17e17680b1c3fe1d3181b76e54dd45e331 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, 20 May 2024 17:08:17 +0800
|
|
Subject: [PATCH] peony: fix wrong operators used
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Signed-off-by: 侯红勋 <houhongxun@kylinos.cn>
|
|
---
|
|
.../file-operation/file-untrash-operation.cpp | 10 +++++-----
|
|
.../tablet/src/UtilityFunction/fulllistview.cpp | 12 ++++++------
|
|
2 files changed, 11 insertions(+), 11 deletions(-)
|
|
|
|
diff --git a/libpeony-qt/file-operation/file-untrash-operation.cpp b/libpeony-qt/file-operation/file-untrash-operation.cpp
|
|
index 139c75c..a81d2cf 100644
|
|
--- a/libpeony-qt/file-operation/file-untrash-operation.cpp
|
|
+++ b/libpeony-qt/file-operation/file-untrash-operation.cpp
|
|
@@ -100,11 +100,11 @@ const QString FileUntrashOperation::handleDuplicate(const QString &uri)
|
|
return newUri;
|
|
} else {
|
|
int pos = list.count() - 1;
|
|
- if (list.last() == "gz" |
|
|
- list.last() == "xz" |
|
|
- list.last() == "Z" |
|
|
- list.last() == "sit" |
|
|
- list.last() == "bz" |
|
|
+ if (list.last() == "gz" ||
|
|
+ list.last() == "xz" ||
|
|
+ list.last() == "Z" ||
|
|
+ list.last() == "sit" ||
|
|
+ list.last() == "bz" ||
|
|
list.last() == "bz2") {
|
|
pos--;
|
|
}
|
|
diff --git a/peony-qt-desktop/desktops/tablet/src/UtilityFunction/fulllistview.cpp b/peony-qt-desktop/desktops/tablet/src/UtilityFunction/fulllistview.cpp
|
|
index 9776b22..21587a9 100755
|
|
--- a/peony-qt-desktop/desktops/tablet/src/UtilityFunction/fulllistview.cpp
|
|
+++ b/peony-qt-desktop/desktops/tablet/src/UtilityFunction/fulllistview.cpp
|
|
@@ -228,9 +228,9 @@ void FullListView::mousePressEvent(QMouseEvent *event)
|
|
pressedpos = event->pos();
|
|
pressedGlobalPos = event->globalPos();
|
|
if(event->button() == Qt::LeftButton) {//左键
|
|
- if((this->indexAt(event->pos()).isValid())&&(pressedpos.x() % Style::AppListItemSizeWidth >= Style::AppLeftSpace &
|
|
- pressedpos.x() % Style::AppListItemSizeWidth <= Style::AppLeftSpace+ Style::AppListIconSize &
|
|
- pressedpos.y() % Style::AppListItemSizeHeight >= Style::AppTopSpace &
|
|
+ if((this->indexAt(event->pos()).isValid())&&(pressedpos.x() % Style::AppListItemSizeWidth >= Style::AppLeftSpace &&
|
|
+ pressedpos.x() % Style::AppListItemSizeWidth <= Style::AppLeftSpace+ Style::AppListIconSize &&
|
|
+ pressedpos.y() % Style::AppListItemSizeHeight >= Style::AppTopSpace &&
|
|
pressedpos.y() % Style::AppListItemSizeHeight <= Style::AppTopSpace+ Style::AppListIconSize))
|
|
|
|
{
|
|
@@ -252,9 +252,9 @@ void FullListView::mousePressEvent(QMouseEvent *event)
|
|
}
|
|
} else if(event->button() == Qt::RightButton) {//右键
|
|
|
|
- if((this->indexAt(event->pos()).isValid())&&(pressedpos.x() % Style::AppListItemSizeWidth >= Style::AppLeftSpace &
|
|
- pressedpos.x() % Style::AppListItemSizeWidth <= Style::AppLeftSpace+ Style::AppListIconSize &
|
|
- pressedpos.y() % Style::AppListItemSizeHeight >= Style::AppTopSpace &
|
|
+ if((this->indexAt(event->pos()).isValid())&&(pressedpos.x() % Style::AppListItemSizeWidth >= Style::AppLeftSpace &&
|
|
+ pressedpos.x() % Style::AppListItemSizeWidth <= Style::AppLeftSpace+ Style::AppListIconSize &&
|
|
+ pressedpos.y() % Style::AppListItemSizeHeight >= Style::AppTopSpace &&
|
|
pressedpos.y() % Style::AppListItemSizeHeight <= Style::AppTopSpace+ Style::AppListIconSize))
|
|
|
|
{
|
|
--
|
|
2.43.0
|
|
|