Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package deepin-shortcut-viewer for
openSUSE:Factory checked in at 2022-09-04 22:11:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/deepin-shortcut-viewer (Old)
and /work/SRC/openSUSE:Factory/.deepin-shortcut-viewer.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "deepin-shortcut-viewer"
Sun Sep 4 22:11:51 2022 rev:2 rq:1001106 version:5.0.6
Changes:
--------
---
/work/SRC/openSUSE:Factory/deepin-shortcut-viewer/deepin-shortcut-viewer.changes
2021-04-26 16:39:54.990104346 +0200
+++
/work/SRC/openSUSE:Factory/.deepin-shortcut-viewer.new.2083/deepin-shortcut-viewer.changes
2022-09-04 22:12:01.060325431 +0200
@@ -1,0 +2,6 @@
+Sun Aug 28 12:00:36 UTC 2022 - Hillwood Yang <[email protected]>
+
+- Update version to 5.0.6
+ * Fix bugs
+
+-------------------------------------------------------------------
Old:
----
deepin-shortcut-viewer-5.0.3.tar.gz
New:
----
deepin-shortcut-viewer-5.0.6.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ deepin-shortcut-viewer.spec ++++++
--- /var/tmp/diff_new_pack.YMsO3S/_old 2022-09-04 22:12:01.560326837 +0200
+++ /var/tmp/diff_new_pack.YMsO3S/_new 2022-09-04 22:12:01.564326848 +0200
@@ -1,7 +1,7 @@
#
# spec file for package deepin-shortcut-viewer
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,20 +12,21 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
+
Name: deepin-shortcut-viewer
-Version: 5.0.3
+Version: 5.0.6
Release: 0
Summary: Deepin Shortcut Viewer
-License: GPL-3.0
+License: GPL-3.0-or-later
URL: https://github.com/linuxdeepin/deepin-shortcut-viewer
Source0:
https://github.com/linuxdeepin/deepin-shortcut-viewer/archive/%{version}/%{name}-%{version}.tar.gz
Group: Productivity/Graphics/Viewers
BuildRequires: pkgconfig(Qt5Core)
-BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5Network)
+BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(dtkwidget)
Provides: bundled(CuteLogger)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ deepin-shortcut-viewer-5.0.3.tar.gz ->
deepin-shortcut-viewer-5.0.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/deepin-shortcut-viewer-5.0.3/rpm/deepin-shortcut-viewer.spec
new/deepin-shortcut-viewer-5.0.6/rpm/deepin-shortcut-viewer.spec
--- old/deepin-shortcut-viewer-5.0.3/rpm/deepin-shortcut-viewer.spec
1970-01-01 01:00:00.000000000 +0100
+++ new/deepin-shortcut-viewer-5.0.6/rpm/deepin-shortcut-viewer.spec
2021-06-22 11:31:13.000000000 +0200
@@ -0,0 +1,68 @@
+Name: deepin-shortcut-viewer
+Version: 5.0.5
+Release: 2
+Summary: Deepin Shortcut Viewer
+License: GPLv3
+URL: https://github.com/linuxdeepin/deepin-shortcut-viewer
+Source0: %{name}_%{version}.orig.tar.xz
+
+BuildRequires: dtkwidget-devel
+BuildRequires: pkgconfig(Qt5Core)
+BuildRequires: pkgconfig(Qt5Widgets)
+BuildRequires: pkgconfig(Qt5Network)
+Provides: bundled(CuteLogger)
+
+%description
+The program displays a shortcut key window when a JSON data is passed.
+
+%prep
+%setup -q
+
+%build
+%qmake_qt5 PREFIX=%{_prefix}
+%make_build
+
+%install
+%make_install INSTALL_ROOT="%{buildroot}"
+
+%files
+%doc README.md
+%license LICENSE
+%{_bindir}/%{name}
+
+%changelog
+* Thu Jan 31 2019 Fedora Release Engineering <[email protected]> -
1.3.5-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
+
+* Fri Jul 20 2018 mosquito <[email protected]> - 1.3.5-1
+- Update to 1.3.5
+
+* Thu Jul 12 2018 Fedora Release Engineering <[email protected]> -
1.3.4-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+
+* Fri Feb 16 2018 mosquito <[email protected]> - 1.3.4-1
+- Update to 1.3.4
+
+* Wed Feb 07 2018 Fedora Release Engineering <[email protected]> -
1.3.3-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
+
+* Sat Dec 2 2017 mosquito <[email protected]> - 1.3.3-1
+- Update to 1.3.3
+
+* Mon Aug 21 2017 mosquito <[email protected]> - 1.3.2-1
+- Update to 1.3.2
+
+* Sun Aug 20 2017 mosquito <[email protected]> - 1.3.1-2
+- Use dtkwidget1 library
+
+* Fri Jul 14 2017 mosquito <[email protected]> - 1.3.1-1.git729e82d
+- Update to 1.3.1
+
+* Tue Jan 17 2017 mosquito <[email protected]> - 1.0.2-1.git760b082
+- Update to 1.0.2
+
+* Sun Dec 04 2016 Jaroslav <[email protected]> Stepanek 1.02-1
+- Updated to version 1.02-1
+
+* Mon Oct 10 2016 Jaroslav <[email protected]> Stepanek 1.01-1
+- Initial package build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/deepin-shortcut-viewer-5.0.3/view/mainwidget.cpp
new/deepin-shortcut-viewer-5.0.6/view/mainwidget.cpp
--- old/deepin-shortcut-viewer-5.0.3/view/mainwidget.cpp 2020-05-29
09:43:35.000000000 +0200
+++ new/deepin-shortcut-viewer-5.0.6/view/mainwidget.cpp 2021-06-22
11:31:13.000000000 +0200
@@ -26,6 +26,7 @@
#include <DApplication>
#include <QProcessEnvironment>
+#include <QTimer>
MainWidget::MainWidget(QWidget *parent)
: DAbstractDialog(false, parent)
@@ -45,16 +46,14 @@
m_mainView->setScene(m_scene);
if (str_output == "zh_CN.UTF-8") {
- m_mainView->resize(m_scene->sceneRect().width() + 88,
m_scene->sceneRect().height() + 80);
+ m_mainView->resize(static_cast<int>(m_scene->sceneRect().width() +
88), static_cast<int>(m_scene->sceneRect().height() + 80));
setFixedSize(m_mainView->size().width() + CONTENT_MARGINS * 2,
m_mainView->size().height() + CONTENT_MARGINS * 2);
}
else {
- m_mainView->resize(m_scene->sceneRect().width() + 44,
m_scene->sceneRect().height() + 40);
+ m_mainView->resize(static_cast<int>(m_scene->sceneRect().width() +
44), static_cast<int>(m_scene->sceneRect().height() + 40));
setFixedSize(m_mainView->size().width() + CONTENT_MARGINS * 2,
m_mainView->size().height() + CONTENT_MARGINS * 2);
}
-
-
}
void MainWidget::initUI()
@@ -68,7 +67,7 @@
m_mainView = new QGraphicsView(this);
m_mainView->setStyleSheet("background: transparent;");
- m_mainView->setFrameShape(QFrame::NoFrame);
+ setWindowFlag(Qt::FramelessWindowHint);
m_mainView->setObjectName("MainView");
m_mainLayout->addWidget(m_mainView);
@@ -82,7 +81,7 @@
DPlatformWindowHandle handle(this);
handle.setBorderWidth(2);
- handle.setBorderColor(QColor(255, 255, 255, 255 * 0.15));
+ handle.setBorderColor(QColor(255, 255, 255, static_cast<int>(255 *
0.15)));
}
}
@@ -92,14 +91,14 @@
DAbstractDialog::mousePressEvent(e);
}
-//void MainWidget::keyReleaseEvent(QKeyEvent *e)
-//{
-//// if (e->key() == Qt::Key_Control || e->key() == Qt::Key_Shift) {
-//// releaseKeyboard();
-//// DAbstractDialog::keyReleaseEvent(e);
-//// hide();
-//// }
-//}
+void MainWidget::keyReleaseEvent(QKeyEvent *e)
+{
+ if (e->key() == Qt::Key_Control || e->key() == Qt::Key_Shift) {
+ releaseKeyboard();
+ DAbstractDialog::keyReleaseEvent(e);
+ hide();
+ }
+}
void MainWidget::focusInEvent(QFocusEvent *e)
{
@@ -119,11 +118,21 @@
setFocus(Qt::MouseFocusReason);
grabKeyboard();
+
+ QTimer::singleShot(500, this, [this](){
+ if (DApplication::queryKeyboardModifiers() != (Qt::ShiftModifier |
Qt::ControlModifier))
+ hide();
+ });
+}
+
+void MainWidget::hideEvent(QHideEvent *e)
+{
+ DAbstractDialog::hideEvent(e);
}
void MainWidget::paintEvent(QPaintEvent *e)
{
Q_UNUSED(e)
QPainter pa(this);
- pa.fillRect(rect(), QColor(0, 0, 0, 255 * 0.7));
+ pa.fillRect(rect(), QColor(0, 0, 0, static_cast<int>(255 * 0.7)));
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/deepin-shortcut-viewer-5.0.3/view/mainwidget.h
new/deepin-shortcut-viewer-5.0.6/view/mainwidget.h
--- old/deepin-shortcut-viewer-5.0.3/view/mainwidget.h 2020-05-29
09:43:35.000000000 +0200
+++ new/deepin-shortcut-viewer-5.0.6/view/mainwidget.h 2021-06-22
11:31:13.000000000 +0200
@@ -43,18 +43,19 @@
{
Q_OBJECT
public:
- MainWidget(QWidget *parent = 0);
+ MainWidget(QWidget *parent = nullptr);
void setJsonData(const QString &data, int flag = 0);
protected:
void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
-// void keyReleaseEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
+ void keyReleaseEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
void focusInEvent(QFocusEvent *e) Q_DECL_OVERRIDE;
void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
protected:
void showEvent(QShowEvent *e) Q_DECL_OVERRIDE;
+ void hideEvent(QHideEvent *e) Q_DECL_OVERRIDE;
void paintEvent(QPaintEvent *e) override;
private:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/deepin-shortcut-viewer-5.0.3/view/shortcutscene.cpp
new/deepin-shortcut-viewer-5.0.6/view/shortcutscene.cpp
--- old/deepin-shortcut-viewer-5.0.3/view/shortcutscene.cpp 2020-05-29
09:43:35.000000000 +0200
+++ new/deepin-shortcut-viewer-5.0.6/view/shortcutscene.cpp 2021-06-22
11:31:13.000000000 +0200
@@ -188,7 +188,7 @@
nametextItem->setPlainText(data.name);
nametextItem->setDefaultTextColor(Qt::white);
- valueTextItem->setDefaultTextColor(QColor(255, 255, 255, 0.8 *
255));
+ valueTextItem->setDefaultTextColor(QColor(255, 255, 255,
static_cast<int>(0.8 * 255)));
addItem(nametextItem);
addItem(valueTextItem);
m_listTextItems[i * 2]->append(nametextItem);
@@ -217,7 +217,7 @@
int index = 0;
foreach (QGraphicsTextItem *item, *m_listTextItems[a]) {
int x = m_cols[a].x;
- int y = m_displayShortcutLists[(int)a / 2 * 1]->at(index).y;
+ int y = m_displayShortcutLists[static_cast<int>(a / 2 *
1)]->at(index).y;
item->setPos(x, y);
index++;
}
@@ -228,8 +228,8 @@
}
void ShortcutScene::initData()
{
- m_maxContentHeigth = qApp->desktop()->height() * 0.8;
- m_maxContentWidth = qApp->desktop()->width() * 0.8 - 150;
+ m_maxContentHeigth = static_cast<int>(qApp->desktop()->height() * 0.8);
+ m_maxContentWidth = static_cast<int>(qApp->desktop()->width() * 0.8 - 150);
m_displayShortcutLists[0] = new QList<Shortcut>();
m_displayShortcutLists[1] = new QList<Shortcut>();
@@ -240,7 +240,7 @@
void ShortcutScene::sortData()
{
int offset = m_shortcutList.count() % 3;
- int average = (int)m_shortcutList.count() / 3;
+ int average = static_cast<int>(m_shortcutList.count() / 3);
int i = 0;
int colLsength[3] = {0, 0, 0};