Skip to content

Commit

Permalink
BREAKING CHANGE: delete Log4Qt 3rdparty
Browse files Browse the repository at this point in the history
  • Loading branch information
XMuli committed Mar 11, 2022
1 parent 0dbf355 commit f3a892f
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/MacOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11.6] # macos-10.14 macos-10.15, macos-11.6 # https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md
os: [macos-10.15] # macos-10.14 macos-10.15, macos-11.6 # https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md
qt_ver: [5.12.11] # 参考: https://mirrors.cloud.tencent.com/qt/online/qtsdkrepository/mac_x64/desktop/qt5_5111
qt_arch: [clang_64]
env:
Expand All @@ -28,7 +28,7 @@ jobs:

# macos 11.0 后默认环境变了,要指定
- name: prepare env
if: ${{ matrix.os == 'macos-11.6' }}
if: ${{ matrix.os == 'macos-11.0' }}
run: |
softwareupdate --all --install --force
sudo xcode-select --print-path
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "3rdparty/QHotkey"]
path = 3rdparty/QHotkey
url = https://github.com/Skycoder42/QHotkey.git
[submodule "3rdparty/Log4Qt"]
path = 3rdparty/Log4Qt
url = https://github.com/MEONMedical/Log4Qt.git
1 change: 0 additions & 1 deletion 3rdparty/Log4Qt
Submodule Log4Qt deleted from 2d0b44
9 changes: 4 additions & 5 deletions 3rdparty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@



| 序号 | 库名 | 许可证 | 简介 | 备注 |
| :--: | :-----------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------- | :--: |
| 1 | [Log4Qt](https://github.com/MEONMedical/Log4Qt) | [Apache 2.0](https://github.com/MEONMedical/Log4Qt/blob/master/LICENSE) | Log4Qt - Logging for the Qt cross-platform application framework | |
| 2 | [ QHotkey](https://github.com/Skycoder42/QHotkey) | [BSD 3-Clause](https://github.com/Skycoder42/QHotkey/blob/master/LICENSE) | A global shortcut/hotkey for Desktop Qt-Applications ||
| | | | | |
| 序号 | 库名 | 许可证 | 简介 | 备注 |
| :--: | :-----------------------------------------------: | :----------------------------------------------------------: | :--------------------------------------------------- | :--: |
| 1 | [ QHotkey](https://github.com/Skycoder42/QHotkey) | [BSD 3-Clause](https://github.com/Skycoder42/QHotkey/blob/master/LICENSE) | A global shortcut/hotkey for Desktop Qt-Applications ||
| | | | | |



1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
cmake_minimum_required(VERSION 3.3.0)
project(PicShot)
#add_subdirectory(3rdparty/Log4Qt)
add_subdirectory(3rdparty/QHotkey)
add_subdirectory(src)
add_subdirectory(test)
11 changes: 5 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ find_package(Qt5 COMPONENTS

configure_file(${CMAKE_SOURCE_DIR}/config/log4qt.conf ${CMAKE_BINARY_DIR} COPYONLY)

add_compile_definitions(QT_MESSAGELOGCONTEXT # Release 版本下也能输出文件名、行号等
QT_NO_DEBUG_OUTPUT # 屏蔽 debug\info\warning 信息
# QT_NO_INFO_OUTPUT
# QT_NO_WARNING_OUTPUT
)
#add_compile_definitions(QT_MESSAGELOGCONTEXT # Release 版本下也能输出文件名、行号等
# QT_NO_DEBUG_OUTPUT # 屏蔽 debug\info\warning 信息
## QT_NO_INFO_OUTPUT
## QT_NO_WARNING_OUTPUT
# )

include_directories(${CMAKE_SOURCE_DIR}/3rdparty/Log4Qt/include
${CMAKE_SOURCE_DIR}/3rdparty/QHotkey/QHotkey
Expand Down Expand Up @@ -123,7 +123,6 @@ endif()

target_link_libraries(${PROJECT_NAME}
${QT5_LIBS_LINK}
# log4qt
qhotkey
)

Expand Down
14 changes: 0 additions & 14 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
#include "screen/screenshot.h"
#include "screen/winsetting.h"

// qtlog4
//#include "logger.h"
//#include "logmanager.h"
//#include "propertyconfigurator.h"

// test
//#include <QHotkey>
#include "./screen/winresetbtn.h"
Expand All @@ -38,15 +33,6 @@ int main(int argc, char *argv[])
/* 枚举窗口的所有进程 */
//获取屏幕上所有的顶层窗口,每发现一个窗口就调用回调函数一次

#if 0
//配置文件路径(日志调试)
Log4Qt::PropertyConfigurator::configure(a.applicationDirPath() + "/../log4qt.conf");
Log4Qt::LogManager::setHandleQtMessages(true);
#else
// 改变缺省消息处理程序的输出(终端调试)
//qSetMessagePattern("%{appname} %{type} %{time [yyyy-MM-dd hh:mm:ss]} %{pid} %{threadid} %{qthreadptr} (%{file} %{line}) %{function} %{message}");
//qSetMessagePattern("%{type} %{time [yyyy-MM-dd hh:mm:ss]} (%{file} %{line}) %{function} %{message}");
#endif

// qInfo()<<QObject::tr("Program running program start.");

Expand Down

0 comments on commit f3a892f

Please sign in to comment.