This commit is contained in:
peijiankang 2022-06-27 14:22:31 +08:00
parent 1ccdab7003
commit e2595c8427
2 changed files with 75 additions and 1 deletions

68
0004-add-log.patch Normal file
View File

@ -0,0 +1,68 @@
From 75a0f24336e038f7f2380745abf4639c6d94229f Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Mon, 27 Jun 2022 14:20:06 +0800
Subject: [PATCH] add log
---
debian/control | 2 +-
debian/source/format | 2 +-
kylin-screenshot.pro | 2 +-
src/main.cpp | 2 ++
4 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/debian/control b/debian/control
index 2c99e66..4ac86d9 100755
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: graphics
Priority: optional
Maintainer: Kylin Team <team+kylin@tracker.debian.org>
Uploaders: handsome_feng <jianfengli@ubuntukylin.com>
-Build-Depends: debhelper-compat (= 13),
+Build-Depends: debhelper-compat (= 12),
qt5-qmake,
qtbase5-dev,
qttools5-dev-tools,
diff --git a/debian/source/format b/debian/source/format
index 163aaf8..89ae9db 100755
--- a/debian/source/format
+++ b/debian/source/format
@@ -1 +1 @@
-3.0 (quilt)
+3.0 (native)
diff --git a/kylin-screenshot.pro b/kylin-screenshot.pro
index 3ffbc60..69458fb 100755
--- a/kylin-screenshot.pro
+++ b/kylin-screenshot.pro
@@ -6,7 +6,7 @@
win32:LIBS += -luser32 -lshell32
-LIBS += -lavutil -lavformat -lavcodec -lswscale -lX11 -lXext -lXtst -lXfixes -lXinerama -lpulse
+LIBS += -lukui-log4qt -lavutil -lavformat -lavcodec -lswscale -lX11 -lXext -lXtst -lXfixes -lXinerama -lpulse
TAG_VERSION = $$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags)
isEmpty(TAG_VERSION){
diff --git a/src/main.cpp b/src/main.cpp
index fc06999..d90685c 100755
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -28,6 +28,7 @@
#include <sys/types.h>
#include <signal.h>
#include "src/common/CommandLineOptions.h"
+#include <ukui-log4qt.h>
#if defined(Q_OS_LINUX) || defined(Q_OS_UNIX)
#include "src/core/flameshotdbusadapter.h"
@@ -57,6 +58,7 @@ int main(int argc, char *argv[]) {
// required for the button serialization
// TODO: change to QVector in v1.0
+ initUkuiLog4qt("kylin-screenshot");
if (getScreenWidth() > 2560) {
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
--
2.33.0

View File

@ -1,7 +1,7 @@
%define debug_package %{nil}
Name: kylin-screenshot
Version: 1.0.0
Release: 7
Release: 8
Summary: a powerful screenshot and screen recording tool
License: GPL-3.0-or-later and LGPL-3.0-or-later and MIT and Apache-2.0
URL: https://github.com/ubuntukylin
@ -23,6 +23,7 @@ BuildRequires: ffmpeg-devel
BuildRequires: kf5-kwindowsystem-devel
BuildRequires: kf5-kwindowsystem
BuildRequires: gsettings-qt-devel
BuildRequires: ukui-interface
# Requires: NetworkManager
@ -30,6 +31,7 @@ patch0: 0001-fix-screenshot-service.patch
patch1: 0001-add-save-dialog.patch
patch2: optimize-the-undo-button-function.patch
patch3: 0003-change-kylin-screenshot-to-screenshot.patch
patch4: 0004-add-log.patch
%description
Powerful yet simple-to-use screenshot software
kylin-screenshot is a powerful screenshot and screen recording tool.
@ -44,6 +46,7 @@ patch3: 0003-change-kylin-screenshot-to-screenshot.patch
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
%{qmake_qt5} %{_qt5_qmake_flags} CONFIG+=enable-by-default kylin-screenshot.pro
@ -94,6 +97,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/metainfo/kylinscreenshot.appdata.xml
%changelog
* Mon Jun 27 2022 peijiankang <peijiankang@kylinos.cn> - 1.0.0-8
- add log
* Fri Jun 24 2022 peijiankang <peijiankang@kylinos.cn> - 1.0.0-7
- change kylin-screenshot to screenshot